Advertisement
MisterH_t

Print Shift to Run

Dec 23rd, 2020
508
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. -- LocalScript at StarterPlayer > StarterPlayerScripts --
  2.  
  3. local inputService = game:GetService("UserInputService")
  4. local plr = game.Players.LocalPlayer
  5. local char = plr.Character or plr.CharacterAdded:wait()
  6.  
  7. local sprinting = false
  8.  
  9. inputService.InputBegan:Connect(function(key)
  10. if key.KeyCode == Enum.KeyCode.LeftShift or key.KeyCode == Enum.KeyCode.R then
  11. running = true
  12. if char.Humanoid then
  13. char.Humanoid.WalkSpeed = 30
  14. end
  15. end
  16. end)
  17.  
  18. inputService.InputEnded:Connect(function(key)
  19. if key.KeyCode == Enum.KeyCode.LeftShift or key.KeyCode == Enum.KeyCode.R then
  20. running = false
  21. if char.Humanoid then
  22. char.Humanoid.WalkSpeed = 16
  23. end
  24. end
  25. end)
  26.  
  27. -- Não se esqueçam de inscrever no canal :D --
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement