Fr4st3yyt

Sprint System

Jul 30th, 2022
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. local UIS = game:GetService("UserInputService")
  2.  
  3. local KeyCode = Enum.KeyCode.LeftShift
  4.  
  5. UIS.InputBegan:Connect(function(input,GameProcessed)
  6. if input.KeyCode == KeyCode then
  7. script.Parent.Humanoid.WalkSpeed = 32
  8. end
  9. end)
  10.  
  11. UIS.InputEnded:Connect(function(input,GameProcessed)
  12. if input.KeyCode == KeyCode then
  13. script.Parent.Humanoid.WalkSpeed = 16
  14. end
  15. end)
Advertisement
Add Comment
Please, Sign In to add comment