Advertisement
Guest User

BetTheDerp scripts

a guest
Oct 19th, 2019
2,623
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. --first script
  2. script.Parent.Equipped:Connect(function(Mouse)
  3. Mouse.Button1Down:Connect(function()
  4. local animation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Animation)
  5. animation:Play()
  6. script.Disabled = true
  7. wait(1.5)
  8. script.Disabled = false
  9. end)
  10. end)
  11.  
  12. --second script
  13. Mouse_Icon = "rbxasset://textures/GunCursor.png"
  14. Reloading_Icon = "rbxasset://textures/GunWaitCursor.png"
  15.  
  16. Tool = script.Parent
  17.  
  18. Mouse = nil
  19.  
  20. function UpdateIcon()
  21. if Mouse then
  22. Mouse.Icon = Tool.Enabled and Mouse_Icon or Reloading_Icon
  23. end
  24. end
  25.  
  26. function OnEquipped(ToolMouse)
  27. Mouse = ToolMouse
  28. UpdateIcon()
  29. end
  30.  
  31. function OnChanged(Property)
  32. if Property == "Enabled" then
  33. UpdateIcon()
  34. end
  35. end
  36.  
  37. Tool.Equipped:Connect(OnEquipped)
  38. Tool.Changed:Connect(OnChanged)
  39.  
  40. --Third script
  41. script.Parent.Touched:Connect(function(hit)
  42. if hit.Parent:FindFirstChild("Humanoid") then
  43. hit.Parent.Humanoid:TakeDamage(10)
  44. wait(0.1)
  45. script.Disabled = true
  46. wait(1)
  47. script.Disabled = false
  48. end
  49.  
  50. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement