Advertisement
RoScripter

Shift to Sprint

Mar 1st, 2020
7,697
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.39 KB | None | 0 0
  1. --PUT THIS SCRIPT IN STARTERGUI--
  2.  
  3. local player = game.Players.LocalPlayer
  4. local mouse = player:GetMouse()
  5.  
  6. local sprintSpeed = 40
  7.  
  8. mouse.KeyDown:Connect(function(key)
  9.     if key == "0" then
  10.         --Sprint
  11.         player.Character.Humanoid.WalkSpeed = sprintSpeed
  12.     end
  13. end)
  14.  
  15. mouse.KeyUp:Connect(function(key)
  16.     if key == "0" then
  17.         --Stop Sprint
  18.         player.Character.Humanoid.WalkSpeed = 16
  19.     end
  20. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement