Advertisement
orinlucarudd

Untitled

Oct 7th, 2022
1,101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | Source Code | 0 0
  1. --Variables
  2. local player = game.Players.LocalPlayer
  3. local uis = game:GetService("UserInputService")
  4.  
  5. --Functions
  6. uis.InputBegan:Connect(function(input)
  7.        
  8.     if input.KeyCode == Enum.KeyCode.LeftShift or input.KeyCode == Enum.KeyCode.RightShift then --Change "LeftShift" and/or "RightShift" to your desired keycode
  9.         player.Character.Humanoid.WalkSpeed = 50 --Change "50" to your desired walkspeed (Default WalkSpeed = 16)
  10.     end
  11.        
  12.     uis.InputEnded:Connect(function(input)
  13.         if input.KeyCode == Enum.KeyCode.LeftShift or input.KeyCode == Enum.KeyCode.RightShift then
  14.             player.Charactercharacter.Humanoid.WalkSpeed = 16
  15.         end
  16.     end)
  17.        
  18. end)
  19.  
  20. -- Help regarding Enum.KeyCode: https://create.roblox.com/docs/reference/engine/enums/KeyCode
Tags: Roblox lua
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement