Advertisement
OEAgamer1

Shift to Sprint

Feb 10th, 2025
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.42 KB | None | 0 0
  1. local Input = game:GetService("UserInputService")
  2. local Humanoid = script.Parent:WaitForChild("Humanoid")
  3. local runningSpeed =
  4. local walkingSpeed =
  5.  
  6. Input.InputBegan:Connect(function(key)
  7.     if key.KeyCode == Enum.KeyCode.LeftShift then
  8.         Humanoid.WalkSpeed = runningSpeed
  9.     end
  10. end)
  11.  
  12. Input.InputEnded:Connect(function(key)
  13.     if key.KeyCode == Enum.KeyCode.LeftShift then
  14.         Humanoid.WalkSpeed = walkingSpeed
  15.     end
  16. end)
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement