Advertisement
DaVector212

FLY!

May 10th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. --Created by DaVector212.
  2. --Please SMASH that subscribe button.
  3. local UIS = game:GetService('UserInputService')
  4. local Player = game.Players.LocalPlayer
  5. local Character = Player.Character
  6.  
  7. UIS.InputBegan:connect(function(input)--When a player has pressed LeftShift it will play the animation and it will set the normal walking speed (16) to 35.
  8. if input.KeyCode == Enum.KeyCode.LeftShift then
  9. Character.Humanoid.WalkSpeed = 35
  10. local Anim = Instance.new('Animation')
  11. Anim.AnimationId = 'rbxassetid://1356959880'
  12. PlayAnim = Character.Humanoid:LoadAnimation(Anim)
  13. PlayAnim:Play()
  14. end
  15. end)
  16.  
  17. UIS.InputEnded:connect(function(input)
  18. if input.KeyCode == Enum.KeyCode.LeftShift then
  19. Character.Humanoid.WalkSpeed = 10
  20. PlayAnim:Stop()
  21. end
  22. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement