Advertisement
Guest User

Untitled

a guest
Feb 28th, 2020
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34. -- Press 'x' to enable and a box will show up.
  35. -- Throw your knife at the box until it is no longer colourful.
  36. -- This will only work if you have a target (not free for all/infected)
  37.  
  38. local Players = game:GetService("Players")
  39. local Player = Players.LocalPlayer
  40. local Mouse = Player:GetMouse()
  41.  
  42. local Enabled = false
  43. Mouse.KeyDown:connect(function(key)
  44. key = key:upper()
  45. if key == "X" then
  46. if Enabled then
  47. Enabled = false
  48. print("Disabled")
  49. else
  50. Enabled = true
  51. print("Enabled")
  52. end
  53. end
  54. end)
  55.  
  56. --// Created by EncryptedRBX/Floof //--
  57.  
  58. local Hitbox = Instance.new("Part")
  59. Hitbox.Transparency = 0.6
  60. Hitbox.Color = Color3.new(1, 1, 1)
  61. Hitbox.Size = Vector3.new(3, 3, 3)
  62. Hitbox.Material = "SmoothPlastic"
  63. Hitbox.CanCollide = false
  64. Hitbox.Anchored = true
  65.  
  66. local S = Instance.new("SelectionBox", Hitbox)
  67. S.Adornee = Hitbox
  68. S.Transparency = 0.3
  69. S.SurfaceTransparency = 1
  70. S.Color3 = Color3.new(0, 0, 0)
  71. S.LineThickness = 0.05
  72.  
  73. game:GetService("RunService"):BindToRenderStep(tostring(math.random(1, 10000)), 1, function()
  74. if Player and Player.Character then
  75. if Player.Character:findFirstChild("HumanoidRootPart") then
  76. local HRP = Player.Character:findFirstChild("HumanoidRootPart")
  77. Hitbox.CFrame = HRP.CFrame * CFrame.new(10, 0, 0)
  78. end
  79. if Player.PlayerGui.ScreenGui.UI.Target.Visible == false then
  80. Hitbox.Transparency = 1
  81. else
  82. Hitbox.Transparency = 0.6
  83. end
  84. end
  85. end)
  86.  
  87. --// Created by EncryptedRBX/Floof //--
  88.  
  89. function c3lerp(a,b,t)
  90. return Color3.new(a.r * (1-t) + (b.r*t),a.g * (1-t) + (b.g*t),a.b * (1-t) + (b.b*t))
  91. end
  92.  
  93. local Rainbow = {
  94. Color3.new(1,0,0);
  95. Color3.new(0,1,0);
  96. Color3.new(0,0,1);
  97. Color3.new(0,1,1);
  98. Color3.new(1,0,1);
  99. Color3.new(1,1,0);
  100. }
  101.  
  102. spawn(function()
  103. while true do
  104. local k=Hitbox.Color
  105. local b=Rainbow[math.random(1,#Rainbow)]
  106. local slow=100
  107. for i=1, slow do
  108. Hitbox.Color=c3lerp(k,b,i/slow)
  109. wait()
  110. end
  111. end
  112. end)
  113.  
  114. --// Created by EncryptedRBX/Floof //--
  115.  
  116. GetTarget = function()
  117. local Target = nil
  118. local TargetName = nil
  119. pcall(function()
  120. TargetName = Player.PlayerGui.ScreenGui.UI.Target.TargetText.Text
  121. end)
  122. if TargetName then
  123. if Players:findFirstChild(TargetName) then
  124. Target = Players:findFirstChild(TargetName)
  125. end
  126. end
  127. return Target
  128. end
  129.  
  130. while wait() do
  131. if Enabled then
  132. local Target = GetTarget()
  133. if Target and Target.Character then
  134. Hitbox.Parent = Target.Character
  135. else
  136. Hitbox.Parent = workspace
  137. end
  138. else
  139. Hitbox.Parent = nil
  140. end
  141. end
  142. --// Created by Spho3nex //--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement