Advertisement
Guest User

1 key 2 animations (The Script)

a guest
Nov 14th, 2016
475
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. repeat wait() until player.Character.Humanoid
  3. local humanoid = player.Character.Humanoid
  4. local mouse = player:GetMouse()
  5. local once = true
  6. local enabled = true
  7.  
  8.  
  9. mouse.KeyDown:connect(function(key)
  10. if not enabled then return end
  11. enabled = false
  12. if key == "q" then
  13. if once == true then
  14. once = false
  15. local anim = Instance.new("Animation")
  16. anim.AnimationId = "http://www.roblox.com/asset/?id=(animation's Id)"
  17. local PlayAnim = humanoid:LoadAnimation(anim)
  18. PlayAnim:Play()
  19. wait(1)
  20. else
  21. once = true
  22. local anim2 = Instance.new("Animation")
  23. anim2.AnimationId = "http://www.roblox.com/asset/?id=(animation's Id)"
  24. local playAnim = humanoid:LoadAnimation(anim2)
  25. playAnim:Play()
  26. wait(1)
  27. end
  28. end
  29. wait(0.1)
  30. enabled = true
  31. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement