Advertisement
Jaden11

Gun script

Dec 6th, 2014
415
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. debounce = 0
  2.  
  3. function equipped(mouse)
  4. function Shoot()
  5. if debounce == 0 then
  6. debounce = 1
  7. if mouse.Target ~= nil then
  8. if mouse.Target.Parent:findFirstChild("Humanoid") ~= nil and mouse.Target.Name ~= "Head" then
  9. mouse.Target.Parent.Humanoid:TakeDamage(50)
  10. elseif mouse.Target.Parent.Parent:findFirstChild("Humanoid") ~= nil then
  11. mouse.Target.Parent.Parent.Humanoid:TakeDamage(100)
  12. elseif mouse.Target.Name == "Head" then
  13. mouse.Target.Parent.Humanoid:TakeDamage(100)
  14. end
  15. end
  16. script.Parent.Hole.Flash.Enabled = true
  17. script.Parent.GripUp = Vector3.new(0,1,-0.1)
  18. wait(0.1)
  19. script.Parent.Hole.Flash.Enabled = false
  20. script.Parent.GripUp = Vector3.new(0,1,0)
  21. wait(0.9)
  22. debounce = 0
  23. end
  24. end
  25. mouse.Button1Down:connect(Shoot)
  26. end
  27.  
  28. script.Parent.Equipped:connect(equipped)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement