Advertisement
Guest User

Untitled

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