TheUnknownDiscord

C U B E

Jul 13th, 2021 (edited)
817
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. tool = Instance.new("Tool")
  2. Part1 = Instance.new("Part")
  3. Part6 = Instance.new("Part")
  4. Part7 = Instance.new("Part")
  5. tool.Name = "Cube"
  6. tool.Parent = owner.Backpack
  7. tool.ToolTip = "Dont Touch"
  8. Part1.Name = "Handle"
  9. Part1.Parent = tool
  10. Part1.Size = Vector3.new(1, 1, 1)
  11. Part1.Color = Color3.fromRGB(255, 0, 0)
  12. Part1.Material = "Neon"
  13. Part6.Name = "hitbox"
  14. Part6.Parent = tool
  15. Part6.Transparency = 1
  16. Part6.Size = Vector3.new(3, 3, 3)
  17. Part6.BrickColor = BrickColor.new("Institutional White")
  18. Part6.CanCollide = false
  19. Part6.Material = "SmoothPlastic"
  20. Part7.Name = "Visible"
  21. Part7.Parent = tool
  22. Part7.Color = Color3.fromRGB(79, 79, 79)
  23. Part7.Transparency = 0.5
  24. Part7.Size = Vector3.new(1.5, 1.5, 1.5)
  25. Part7.Material = "SmoothPlastic"
  26. Weld4 = Instance.new("Weld",Part1)
  27. Weld8 = Instance.new("Weld",Part1)
  28. Weld4.Part0 = Part1
  29. Weld4.Part1 = Part6
  30. Weld8.Part0 = Part1
  31. Weld8.Part1 = Part7
  32. local music = Instance.new("Sound", owner.character.Head)
  33. music.Looped = true
  34. music.Volume = 1
  35. players = game:GetService("Players")
  36. runservice = game:GetService("RunService")
  37. owner = nil
  38. equipped = false
  39. candamage = false
  40. tool.Activated:Connect(function()
  41. if not candamage then
  42. candamage = true
  43. Part1.Color = Color3.fromRGB(255, 0, 0)
  44. elseif candamage then
  45. candamage = false
  46. Part1.Color = Color3.fromRGB(82, 82, 82)
  47. end
  48. end)
  49. tool.Unequipped:connect(function()
  50.     equipped = false
  51. music:Pause()
  52.     owner.Character.Humanoid.WalkSpeed = 16
  53. end)
  54.  
  55. tool.Equipped:connect(function()
  56.     owner = players:GetPlayerFromCharacter(tool.Parent)
  57.     owner.Character.Humanoid.WalkSpeed = 50
  58.     equipped = true
  59. music:Resume()
  60. local playerhum = owner.Character.Humanoid
  61.     local rightgrip
  62.     if playerhum.RigType == Enum.HumanoidRigType.R6 then
  63.         rightgrip = owner.Character["Right Arm"]:WaitForChild("RightGrip")
  64.     elseif playerhum.RigType == Enum.HumanoidRigType.R15 then
  65.         rightgrip = owner.Character["RightHand"]:WaitForChild("RightGrip")
  66.     end
  67.     coroutine.wrap(function()
  68.         while equipped and runservice.Stepped:wait() do
  69.             if playerhum.RigType == Enum.HumanoidRigType.R15 then
  70.                 rightgrip.C0 = CFrame.new(0,-0.4,0) * CFrame.fromEulerAnglesXYZ(math.sin(tick()*1.5)/6,math.cos(tick()*1.5),0)
  71.             elseif playerhum.RigType == Enum.HumanoidRigType.R6 then
  72.                 rightgrip.C0 = CFrame.new(0,-1.5,0) * CFrame.fromEulerAnglesXYZ(math.sin(tick()*1.5)/6,math.cos(tick()*1.5),0)
  73.             end
  74.         end
  75.     end)()
  76. end)
  77. local SoundIds = {"4821414299", "6394547745", "2953054310", "2502051246"}
  78.  
  79. music.SoundId = "rbxassetid://" .. SoundIds[math.random(1, #SoundIds)]
  80.  
  81. music.Ended:Connect(function(SoundId)
  82.     local newSoundId
  83.  
  84.     do repeat
  85.         newSoundId = "rbxassetid://" .. SoundIds[math.random(1, #SoundIds)]
  86.         wait()
  87.     until
  88.         newSoundId ~= SoundId
  89.     end
  90.  
  91.     music:Stop()
  92.     music.SoundId  = newSoundId
  93.     music.TimePosition = 0
  94.     task.wait()
  95.     music:Resume()
  96. end)
  97.  
  98. function killfunction(part)
  99. if part.Name ~= "Base" and candamage then
  100. part:Destroy()
  101. end
  102. end
  103.  
  104. Part6.Touched:connect(killfunction)
Add Comment
Please, Sign In to add comment