Advertisement
Guest User

Untitled

a guest
Feb 28th, 2020
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.71 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local Player = Players.LocalPlayer
  3. local Mouse = Player:GetMouse()
  4.  
  5. local Enabled = false
  6. Mouse.KeyDown:connect(function(key)
  7. key = key:upper()
  8. if key == "X" then
  9. if Enabled then
  10. Enabled = false
  11. print("Disabled")
  12. else
  13. Enabled = true
  14. print("Enabled")
  15. end
  16. end
  17. end)
  18.  
  19. local Hitbox = Instance.new("Part")
  20. Hitbox.Transparency = 0.6
  21. Hitbox.Color = Color3.new(1, 1, 1)
  22. Hitbox.Size = Vector3.new(3, 3, 3)
  23. Hitbox.Material = "SmoothPlastic"
  24. Hitbox.CanCollide = false
  25. Hitbox.Anchored = true
  26.  
  27. local S = Instance.new("SelectionBox", Hitbox)
  28. S.Adornee = Hitbox
  29. S.Transparency = 0.3
  30. S.SurfaceTransparency = 1
  31. S.Color3 = Color3.new(0, 0, 0)
  32. S.LineThickness = 0.05
  33.  
  34. game:GetService("RunService"):BindToRenderStep(tostring(math.random(1, 10000)), 1, function()
  35. if Player and Player.Character then
  36. if Player.Character:findFirstChild("HumanoidRootPart") then
  37. local HRP = Player.Character:findFirstChild("HumanoidRootPart")
  38. Hitbox.CFrame = HRP.CFrame * CFrame.new(0, 0, 0)
  39. end
  40. if Player.PlayerGui.ScreenGui.UI.Target.Visible == false then
  41. Hitbox.Transparency = 1
  42. else
  43. Hitbox.Transparency = 0.6
  44. end
  45. end
  46. end)
  47.  
  48. function c3lerp(a,b,t)
  49. return Color3.new(a.r * (1-t) + (b.r*t),a.g * (1-t) + (b.g*t),a.b * (1-t) + (b.b*t))
  50. end
  51.  
  52. local Rainbow = {
  53. Color3.new(1,0,0);
  54. Color3.new(0,1,0);
  55. Color3.new(0,0,1);
  56. Color3.new(0,1,1);
  57. Color3.new(1,0,1);
  58. Color3.new(1,1,0);
  59. }
  60.  
  61. spawn(function()
  62. while true do
  63. local k=Hitbox.Color
  64. local b=Rainbow[math.random(1,#Rainbow)]
  65. local slow=100
  66. for i=1, slow do
  67. Hitbox.Color=c3lerp(k,b,i/slow)
  68. wait()
  69. end
  70. end
  71. end)
  72.  
  73. GetTarget = function()
  74. local Target = nil
  75. local TargetName = nil
  76. pcall(function()
  77. TargetName = Player.PlayerGui.ScreenGui.UI.Target.TargetText.Text
  78. end)
  79. if TargetName then
  80. if Players:findFirstChild(TargetName) then
  81. Target = Players:findFirstChild(TargetName)
  82. end
  83. end
  84. return Target
  85. end
  86.  
  87. while wait() do
  88. if Enabled then
  89. local Target = GetTarget()
  90. if Target and Target.Character then
  91. Hitbox.Parent = Target.Character
  92. else
  93. Hitbox.Parent = workspace
  94. end
  95. else
  96. Hitbox.Parent = nil
  97. end
  98. end
  99. local Players = game:GetService("Players")
  100. local Player = Players.LocalPlayer
  101. local Mouse = Player:GetMouse()
  102.  
  103. local Enabled = false
  104. Mouse.KeyDown:connect(function(key)
  105. key = key:upper()
  106. if key == "X" then
  107. if Enabled then
  108. Enabled = false
  109. print("Disabled")
  110. else
  111. Enabled = true
  112. print("Enabled")
  113. end
  114. end
  115. end)
  116.  
  117. local Hitbox = Instance.new("Part")
  118. Hitbox.Transparency = 0.6
  119. Hitbox.Color = Color3.new(1, 1, 1)
  120. Hitbox.Size = Vector3.new(3, 3, 3)
  121. Hitbox.Material = "SmoothPlastic"
  122. Hitbox.CanCollide = false
  123. Hitbox.Anchored = true
  124.  
  125. local S = Instance.new("SelectionBox", Hitbox)
  126. S.Adornee = Hitbox
  127. S.Transparency = 0.3
  128. S.SurfaceTransparency = 1
  129. S.Color3 = Color3.new(0, 0, 0)
  130. S.LineThickness = 0.05
  131.  
  132. game:GetService("RunService"):BindToRenderStep(tostring(math.random(1, 10000)), 1, function()
  133. if Player and Player.Character then
  134. if Player.Character:findFirstChild("HumanoidRootPart") then
  135. local HRP = Player.Character:findFirstChild("HumanoidRootPart")
  136. Hitbox.CFrame = HRP.CFrame * CFrame.new(0, 0, 0)
  137. end
  138. if Player.PlayerGui.ScreenGui.UI.Target.Visible == false then
  139. Hitbox.Transparency = 1
  140. else
  141. Hitbox.Transparency = 0.6
  142. end
  143. end
  144. end)
  145.  
  146. function c3lerp(a,b,t)
  147. return Color3.new(a.r * (1-t) + (b.r*t),a.g * (1-t) + (b.g*t),a.b * (1-t) + (b.b*t))
  148. end
  149.  
  150. local Rainbow = {
  151. Color3.new(1,0,0);
  152. Color3.new(0,1,0);
  153. Color3.new(0,0,1);
  154. Color3.new(0,1,1);
  155. Color3.new(1,0,1);
  156. Color3.new(1,1,0);
  157. }
  158.  
  159. spawn(function()
  160. while true do
  161. local k=Hitbox.Color
  162. local b=Rainbow[math.random(1,#Rainbow)]
  163. local slow=100
  164. for i=1, slow do
  165. Hitbox.Color=c3lerp(k,b,i/slow)
  166. wait()
  167. end
  168. end
  169. end)
  170.  
  171. GetTarget = function()
  172. local Target = nil
  173. local TargetName = nil
  174. pcall(function()
  175. TargetName = Player.PlayerGui.ScreenGui.UI.Target.TargetText.Text
  176. end)
  177. if TargetName then
  178. if Players:findFirstChild(TargetName) then
  179. Target = Players:findFirstChild(TargetName)
  180. end
  181. end
  182. return Target
  183. end
  184.  
  185. while wait() do
  186. if Enabled then
  187. local Target = GetTarget()
  188. if Target and Target.Character then
  189. Hitbox.Parent = Target.Character
  190. else
  191. Hitbox.Parent = workspace
  192. end
  193. else
  194. Hitbox.Parent = nil
  195. end
  196. end--Only works for target rounds. Not FFA or Infected.
  197. --Just cick to kill a random person. (The box around you is a "person")
  198.  
  199. local Players = game:GetService("Players")
  200. local Player = Players.LocalPlayer
  201. local Mouse = Player:GetMouse()
  202.  
  203. local Enabled = false
  204. Mouse.KeyDown:connect(function(key)
  205. key = key:upper()
  206. if key == "X" then
  207. if Enabled then
  208. Enabled = false
  209. print("Disabled")
  210. else
  211. Enabled = true
  212. print("Enabled")
  213. end
  214. end
  215. end)
  216.  
  217. local Hitbox = Instance.new("Part")
  218. Hitbox.Transparency = 0.6
  219. Hitbox.Color = Color3.new(1, 1, 1)
  220. Hitbox.Size = Vector3.new(3, 3, 3)
  221. Hitbox.Material = "SmoothPlastic"
  222. Hitbox.CanCollide = false
  223. Hitbox.Anchored = true
  224.  
  225. local S = Instance.new("SelectionBox", Hitbox)
  226. S.Adornee = Hitbox
  227. S.Transparency = 0.3
  228. S.SurfaceTransparency = 1
  229. S.Color3 = Color3.new(0, 0, 0)
  230. S.LineThickness = 0.05
  231.  
  232. game:GetService("RunService"):BindToRenderStep(tostring(math.random(1, 10000)), 1, function()
  233. if Player and Player.Character then
  234. if Player.Character:findFirstChild("HumanoidRootPart") then
  235. local HRP = Player.Character:findFirstChild("HumanoidRootPart")
  236. Hitbox.CFrame = HRP.CFrame * CFrame.new(0, 0, 0)
  237. end
  238. if Player.PlayerGui.ScreenGui.UI.Target.Visible == false then
  239. Hitbox.Transparency = 1
  240. else
  241. Hitbox.Transparency = 0.6
  242. end
  243. end
  244. end)
  245.  
  246. function c3lerp(a,b,t)
  247. return Color3.new(a.r * (1-t) + (b.r*t),a.g * (1-t) + (b.g*t),a.b * (1-t) + (b.b*t))
  248. end
  249.  
  250. local Rainbow = {
  251. Color3.new(1,0,0);
  252. Color3.new(0,1,0);
  253. Color3.new(0,0,1);
  254. Color3.new(0,1,1);
  255. Color3.new(1,0,1);
  256. Color3.new(1,1,0);
  257. }
  258.  
  259. spawn(function()
  260. while true do
  261. local k=Hitbox.Color
  262. local b=Rainbow[math.random(1,#Rainbow)]
  263. local slow=100
  264. for i=1, slow do
  265. Hitbox.Color=c3lerp(k,b,i/slow)
  266. wait()
  267. end
  268. end
  269. end)
  270.  
  271. GetTarget = function()
  272. local Target = nil
  273. local TargetName = nil
  274. pcall(function()
  275. TargetName = Player.PlayerGui.ScreenGui.UI.Target.TargetText.Text
  276. end)
  277. if TargetName then
  278. if Players:findFirstChild(TargetName) then
  279. Target = Players:findFirstChild(TargetName)
  280. end
  281. end
  282. return Target
  283. end
  284.  
  285. while wait() do
  286. if Enabled then
  287. local Target = GetTarget()
  288. if Target and Target.Character then
  289. Hitbox.Parent = Target.Character
  290. else
  291. Hitbox.Parent = workspace
  292. end
  293. else
  294. Hitbox.Parent = nil
  295. end
  296. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement