Advertisement
Prephy

Hmmm

Jul 8th, 2020
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. local tool = Instance.new("Tool",game.ReplicatedStorage)
  2. tool.Name = "Dubstep Gun"
  3. tool.GripForward = Vector3.new(1,0,0)
  4. tool.GripPos = Vector3.new(-2,0.3,0)
  5. tool.GripRight = Vector3.new(0,1,0)
  6. tool.GripUp = Vector3.new(0,0,-1)
  7. tool.ToolTip = "Throw the dubstep out of people!"
  8. tool.Enabled = true
  9. local dubstep = Instance.new("Sound",tool)
  10. dubstep.Name = "Sound"
  11. dubstep.Volume = 1
  12. dubstep.Looped = true
  13. dubstep.SoundId = "rbxassetid://130768080"
  14. local handle = Instance.new("Part",tool)
  15. handle.Name = "Handle"
  16. handle.Color = Color3.fromRGB(0,32,96)
  17. handle.Material = "Plastic"
  18. handle.Size = Vector3.new(2.4,0.9,2)
  19. handle.CanCollide = false
  20. handle.Orientation = Vector3.new(88.95,0,-90)
  21. handle.Position = Vector3.new(1.2,3.436,-3.499)
  22. local mesh = Instance.new("SpecialMesh",handle)
  23. mesh.MeshId = "rbxassetid://519125417"
  24. mesh.MeshType = Enum.MeshType.FileMesh
  25. mesh.Offset = Vector3.new(0,0,0)
  26. mesh.Scale = Vector3.new(0.006,0.006,0.006)
  27. script.Parent = tool
  28.  
  29. tool.Parent = game.Players.projor22.Backpack
  30.  
  31. local m = script.Parent.Parent.Parent:GetMouse()
  32. local holding = false
  33. m.Button1Down:connect(function()
  34. if tool.Parent == game.Players.projor22.Character then
  35. holding = true
  36. script.Parent.Sound:Play()
  37. repeat
  38. local TARGET = m.Target
  39. if TARGET~=nil then
  40. if TARGET.Parent:FindFirstChild("Humanoid")~=nil then
  41. TARGET.Parent.Humanoid.Health = TARGET.Parent.Humanoid.Health - (TARGET.Parent.Humanoid.MaxHealth/50)
  42. end
  43. end
  44. wait(.05)
  45. until holding == false
  46. end
  47. end)
  48. m.Button1Up:connect(function()
  49. if tool.Parent == game.Players.projor22.Character then
  50. holding = false
  51. script.Parent.Sound:Stop()
  52. end
  53. end)
  54. tool.Unequipped:connect(function()
  55. script.Parent.Sound:Stop()
  56. end)
  57.  
  58. --[[
  59. repeat
  60. local bullet = script.Parent.Bullet:Clone()
  61. bullet.Position = script.Parent.Handle.Position
  62. local perfectrotation = script.Parent.Handle.Orientation
  63. bullet.Orientation = perfectrotation
  64.  
  65. for i = 1,1000 do
  66. bullet.Position = bullet.Position + Vector3.new(0,0,1)
  67. wait()
  68. end
  69. wait(.05)
  70.  
  71.  
  72.  
  73.  
  74. --]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement