TheUnknownDiscord

spy

Aug 26th, 2021 (edited)
357
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.31 KB | None | 0 0
  1. local billboard = Instance.new("ScreenGui", owner.PlayerGui)
  2. cloakmeter = Instance.new("Frame",billboard)
  3. cloakmeter.BackgroundColor3 = Color3.fromRGB(100,100,200)
  4. cloakmeter.Size = UDim2.new(0.25,0,0.0625,0)
  5. cloakmeter.AnchorPoint = Vector2.new(0.5, 0)
  6. cloakmeter.Position = UDim2.new(0.5, 0, 0, 0)
  7. cloakmeter.Active = true
  8. cloakmeter.BackgroundTransparency = 0
  9. cloakmeter2 = Instance.new("Frame",cloakmeter)
  10. cloakmeter2.Size = UDim2.new(1,0,1,0)
  11. cloakmeter2.BackgroundColor3 = Color3.fromRGB(0,0,200)
  12. Tool = Instance.new("Tool")
  13. Cloak = Instance.new("Tool")
  14. Sapper = Instance.new("Tool")
  15. Tool.Name = "ButterFly Knife"
  16. Cloak.Name = "Cloak"
  17. Sapper.Name = "Sapper lol"
  18. Knife = Instance.new("Part")
  19. sapperlmao = Instance.new("Part")
  20. sapperlmao.Name = "Handle"
  21. sapperlmao.CFrame = CFrame.Angles(0, math.rad(180), 0)
  22. sapperlmao.Parent = Sapper
  23. Sapper.Grip = CFrame.new(0.75,0,0)
  24. Inviswatch = Instance.new("Part")
  25. Inviswatch.Name = "Handle"
  26. Inviswatch.Parent = Cloak
  27. Inviswatch.Size = Vector3.new(1.0625,1.0625,0.75)
  28. Cloak.GripPos = Vector3.new(0,0,-0.5)
  29. Knife.Name = "Handle"
  30. Knife.Parent = Tool
  31. Cloak.Parent = workspace.Lucas_YT111
  32. Tool.Parent = workspace.Lucas_YT111
  33. Sapper.Parent = workspace.Lucas_YT111
  34. Tool.GripPos = Vector3.new(0,-0.5,0.25)
  35. Mesh = Instance.new("SpecialMesh")
  36. Knife.Size = Vector3.new(1, 2, 1)
  37. Mesh.Parent = Knife
  38. Mesh.MeshId = "http://www.roblox.com/asset/?id=531813581"
  39. Mesh.TextureId = "http://www.roblox.com/asset/?id=531813594"
  40. Mesh.Scale = Vector3.new(0.35, 0.35, 0.35)
  41. myhum = owner.Character.Humanoid
  42. local cloaked = Instance.new("Sound", owner.character.Head)
  43. cloaked.SoundId = "rbxassetid://195575792"
  44. local stab = Instance.new("Sound", owner.character.Head)
  45. stab.SoundId = "rbxassetid://6405267300"
  46. stab.Volume = 1.5
  47. cloaked.Volume = 1.5
  48. local death = Instance.new("Sound", owner.character.Head)
  49. Mesh = Instance.new("SpecialMesh")
  50. Mesh.Parent = sapperlmao
  51. Mesh.MeshId = "http://www.roblox.com/asset/?id=450814674"
  52. Mesh.TextureId = "http://www.roblox.com/asset/?id=450814682"
  53. local tased = Instance.new("Sound", owner.character.Head)
  54. tased.SoundId = "rbxassetid://82273261"
  55. tased.Volume = 1.5
  56. candamage = false
  57. toolout = false
  58. Tool.Activated:connect(function()
  59. local Anim = Instance.new("StringValue")
  60. Anim.Name = "toolanim"
  61. Anim.Value = "Slash"
  62. Anim.Parent = Tool
  63. candamage = true
  64. wait(0.5)
  65. candamage = false
  66. end)
  67. local isTouched = false
  68.  
  69. local function damagePlayer(otherPart)
  70. if candamage then
  71. local partParent = otherPart.Parent
  72. local humanoid = partParent:FindFirstChildWhichIsA("Humanoid")
  73. local headdude = partParent:findFirstChild("HumanoidRootPart") or partParent:findFirstChild("Head")
  74. if humanoid ~= "myhum" and humanoid then
  75. if not isTouched then
  76. isTouched = true
  77. coroutine.wrap(function()
  78. wait(0.65)
  79. isTouched = false
  80. end)()
  81. local ObjectSpace = headdude.CFrame:inverse() * owner.Character.Head.CFrame
  82. if ObjectSpace.Z > 0.35 or ObjectSpace.Z > -0.35 then
  83. stab.SoundId = "rbxassetid://6405267300"
  84. stab:Play()
  85. humanoid.Health = 0
  86. humanoid.BreakJointsOnDeath = false
  87. coroutine.wrap(function()
  88. local billboard = Instance.new("BillboardGui", headdude)
  89. billboard.Adornee = headdude
  90. billboard.StudsOffset = Vector3.new(-1, 2.5, 0)
  91. billboard.Size = UDim2.new(2,0,2,0)
  92. billboard.Name = "gaming"
  93. local frame = Instance.new("ImageLabel", billboard)
  94. frame.BackgroundTransparency = 1
  95. frame.Image = "http://www.roblox.com/asset/?id=283011882"
  96. frame.Size = billboard.Size
  97. local deathrandom = math.random(1,4)
  98. if deathrandom == 1 then
  99. death.SoundId = "rbxassetid://1080611063"
  100. death.Volume = 2
  101. death:Play()
  102. elseif deathrandom == 2 then
  103. death.SoundId = "rbxassetid://565424468"
  104. death.Volume = 2
  105. death:Play()
  106. elseif deathrandom == 3 then
  107. death.SoundId = "rbxassetid://1080625252"
  108. death.Volume = 2
  109. death:Play()
  110. end
  111. wait(1.5)
  112. billboard:Destroy()
  113. end)()
  114. else
  115. humanoid.Health = humanoid.Health - 40
  116. stab.SoundId = "rbxassetid://7122602098"
  117. stab:Play()
  118. end
  119. end
  120. end
  121. end
  122. end
  123. local time = 1
  124. Knife.Touched:Connect(damagePlayer)
  125. recharge = true
  126. Cloak.Unequipped:Connect(function()
  127. recharge = true
  128. for i,v in pairs(owner.Character:GetDescendants()) do
  129. if v:IsA("BasePart") or v:IsA("Decal") then
  130. if v.Name ~= "HumanoidRootPart" then
  131. local tweenService = game:GetService("TweenService")
  132.  
  133. local timeToFade = 0.5
  134. local object = v
  135. local tweenInfo = TweenInfo.new(timeToFade)
  136. local goal = {}
  137. goal.Transparency = 0
  138.  
  139. local tween = tweenService:Create(object, tweenInfo, goal)
  140. tween:Play()
  141. owner.Character.HumanoidRootPart.Transparency = 1
  142. cloaked:Play()
  143. toolout = false
  144. end
  145. end
  146. end
  147. end)
  148.  
  149. Cloak.Equipped:Connect(function()
  150. if time ~= 0 then
  151. recharge = false
  152. for i,v in pairs(owner.Character:GetDescendants()) do
  153. if v:IsA("BasePart") or v:IsA("Decal") then
  154. local tweenService = game:GetService("TweenService")
  155.  
  156. local timeToFade = 0.5
  157. local object = v
  158. local tweenInfo = TweenInfo.new(timeToFade)
  159. local goal = {}
  160. goal.Transparency = 1
  161.  
  162. local tween = tweenService:Create(object, tweenInfo, goal)
  163. tween:Play()
  164. cloaked:Play()
  165. toolout = true
  166. end
  167. end
  168. end
  169. end)
  170. Tool.Equipped:Connect(function()
  171. toolout = true
  172. end)
  173. Tool.Unequipped:Connect(function()
  174. toolout = false
  175. end)
  176. sapped = false
  177.  
  178. Sapper.Activated:connect(function()
  179. sapped = true
  180. wait(3)
  181. sapped = false
  182. end)
  183.  
  184. local issapped = false
  185.  
  186. local function hahasapped(otherPart)
  187. if sapped then
  188. local partParent = otherPart.Parent
  189. local humanoid = partParent:FindFirstChildWhichIsA("Humanoid")
  190. if humanoid ~= "myhum" and humanoid then
  191. if not issapped then
  192. issapped = true
  193. tased:Play()
  194. humanoid.PlatformStand = true
  195. wait(3)
  196. humanoid.PlatformStand = false
  197. wait(0.5)
  198. issapped = false
  199. end
  200. end
  201. end
  202. end
  203.  
  204. sapperlmao.Touched:Connect(hahasapped)
  205.  
  206. Sapper.Equipped:Connect(function()
  207. toolout = true
  208. end)
  209. Sapper.Unequipped:Connect(function()
  210. toolout = false
  211. end)
  212. coroutine.wrap(function()
  213. while true do
  214. task.wait()
  215. local tweenService = game:GetService("TweenService")
  216.  
  217. local timeToFade = 0.5
  218. local object = cloakmeter2
  219. local tweenInfo = TweenInfo.new(timeToFade)
  220. local goal = {}
  221. goal.Size = UDim2.new(time,0,1,0)
  222.  
  223. local tween = tweenService:Create(object, tweenInfo, goal)
  224. tween:Play()
  225. if recharge then
  226. wait(1.75)
  227. if owner.Character.Humanoid.MoveDirection ~= Vector3.new() then
  228. time = math.clamp(time + .05,0,1)
  229. else
  230. time = math.clamp(time + .1,0,1)
  231. end
  232. elseif not recharge then
  233. wait(1)
  234. if owner.Character.Humanoid.MoveDirection ~= Vector3.new() then
  235. time = math.clamp(time - .05,0,1)
  236. else
  237. time = math.clamp(time - .025,0,1)
  238. end
  239. if time == 0 then
  240. wait(1.5)
  241. for i,v in pairs(owner.Character:GetDescendants()) do
  242. if v:IsA("BasePart") or v:IsA("Decal") then
  243. if v.Name ~= "HumanoidRootPart" then
  244. local tweenService = game:GetService("TweenService")
  245.  
  246. local timeToFade = 0.5
  247. local object = v
  248. local tweenInfo = TweenInfo.new(timeToFade)
  249. local goal = {}
  250. goal.Transparency = 0
  251.  
  252. local tween = tweenService:Create(object, tweenInfo, goal)
  253. tween:Play()
  254. owner.Character.HumanoidRootPart.Transparency = 1
  255. end
  256. end
  257. end
  258. cloaked:Play()
  259. toolout = false
  260. recharge = true
  261. end
  262. end
  263. end
  264. end)()
  265. function CreateRegion3FromLocAndSize(Position, Size)
  266.  
  267. local SizeOffset = Size / 2
  268. local Point1 = Position - SizeOffset
  269. local Point2 = Position + SizeOffset
  270. return Region3.new(Point1, Point2)
  271. end
  272. game:GetService("RunService").Heartbeat:Connect(function()
  273. pcall(function()
  274. for i,v in pairs(workspace:GetDescendants()) do
  275. if v:IsA("Model") and v ~= owner.Character then
  276. local headdude = v:findFirstChild("HumanoidRootPart") or v:findFirstChild("Head")
  277. if headdude then
  278. local hum = v:findFirstChild("Humanoid")
  279. if hum then
  280. if hum.Health ~= 0 then
  281. local ObjectSpace = headdude.CFrame:inverse() * owner.Character.Head.CFrame
  282. if ObjectSpace.Z > 0.35 or ObjectSpace.Z > -0.35 then
  283. if (owner.Character.Head.CFrame.Position - headdude.CFrame.Position).magnitude <= 6 then
  284. Tool.Grip = CFrame.Angles(math.rad(180),0,0)
  285. Tool.GripPos = Vector3.new(0,-0.5,-0.25)
  286. else
  287. Tool.Grip = CFrame.Angles(math.rad(0),0,0)
  288. Tool.GripPos = Vector3.new(0,-0.5,0.25)
  289. end
  290. end
  291. elseif (owner.Character.Head.CFrame.Position - headdude.CFrame.Position).magnitude >= 6 then
  292. Tool.Grip = CFrame.Angles(math.rad(0),0,0)
  293. Tool.GripPos = Vector3.new(0,-0.5,0.25)
  294. end
  295. end
  296. end
  297. end
  298. end
  299. end)
  300. end)
Add Comment
Please, Sign In to add comment