Advertisement
Volqh

Untitled

Nov 3rd, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.57 KB | None | 0 0
  1. -- Press 'v' 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. -- james is really cool bitch
  6.  
  7. local Players = game:GetService("Players")
  8. local Player = Players.LocalPlayer
  9. local Mouse = Player:GetMouse()
  10.  
  11. local Enabled = false
  12. Mouse.KeyDown:connect(function(key)
  13. key = key:upper()
  14. if key == "V" then
  15. if Enabled then
  16. Enabled = false
  17. print("Disabled")
  18. else
  19. Enabled = true
  20. print("Enabled")
  21. end
  22. end
  23. end)
  24.  
  25. --// Created by EncryptedRBX/Floof //--
  26.  
  27. local Hitbox = Instance.new("Part")
  28. Hitbox.Transparency = 0.6
  29. Hitbox.Color = Color3.new(1, 1, 1)
  30. Hitbox.Size = Vector3.new(3, 3, 3)
  31. Hitbox.Material = "SmoothPlastic"
  32. Hitbox.CanCollide = false
  33. Hitbox.Anchored = true
  34.  
  35. local S = Instance.new("SelectionBox", Hitbox)
  36. S.Adornee = Hitbox
  37. S.Transparency = 0.3
  38. S.SurfaceTransparency = 1
  39. S.Color3 = Color3.new(0, 0, 0)
  40. S.LineThickness = 0.05
  41.  
  42. game:GetService("RunService"):BindToRenderStep(tostring(math.random(1, 10000)), 1, function()
  43. if Player and Player.Character then
  44. if Player.Character:findFirstChild("HumanoidRootPart") then
  45. local HRP = Player.Character:findFirstChild("HumanoidRootPart")
  46. Hitbox.CFrame = HRP.CFrame * CFrame.new(10, 0, 0)
  47. end
  48. if Player.PlayerGui.ScreenGui.UI.Target.Visible == false then
  49. Hitbox.Transparency = 1
  50. else
  51. Hitbox.Transparency = 0.6
  52. end
  53. end
  54. end)
  55.  
  56. --// Created by EncryptedRBX/Floof //--
  57.  
  58. function c3lerp(a,b,t)
  59. return Color3.new(a.r * (1-t) + (b.r*t),a.g * (1-t) + (b.g*t),a.b * (1-t) + (b.b*t))
  60. end
  61.  
  62. local Rainbow = {
  63. Color3.new(1,0,0);
  64. Color3.new(0,1,0);
  65. Color3.new(0,0,1);
  66. Color3.new(0,1,1);
  67. Color3.new(1,0,1);
  68. Color3.new(1,1,0);
  69. }
  70.  
  71. spawn(function()
  72. while true do
  73. local k=Hitbox.Color
  74. local b=Rainbow[math.random(1,#Rainbow)]
  75. local slow=100
  76. for i=1, slow do
  77. Hitbox.Color=c3lerp(k,b,i/slow)
  78. wait()
  79. end
  80. end
  81. end)
  82.  
  83. --// Created by EncryptedRBX/Floof //--
  84.  
  85. GetTarget = function()
  86. local Target = nil
  87. local TargetName = nil
  88. pcall(function()
  89. TargetName = Player.PlayerGui.ScreenGui.UI.Target.TargetText.Text
  90. end)
  91. if TargetName then
  92. if Players:findFirstChild(TargetName) then
  93. Target = Players:findFirstChild(TargetName)
  94. end
  95. end
  96. return Target
  97. end
  98.  
  99. while wait() do
  100. if Enabled then
  101. local Target = GetTarget()
  102. if Target and Target.Character then
  103. Hitbox.Parent = Target.Character
  104. else
  105. Hitbox.Parent = workspace
  106. end
  107. else
  108. Hitbox.Parent = nil
  109. end
  110. end
  111. --// Created by Aconst-Sub to YT //--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement