Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- 100 views!!!!!
- -- Script by EconomicSerg
- -- Works on ROBLOX only
- -- Put a LocalScript into StarterPlayer>StarterCharacterScripts or StarterPlayerScripts
- local UIS = game:GetService("UserInputService")
- local Player = game.Players.LocalPlayer or game:GetService("Players").LocalPlayer
- local Character = Player.Character or Player.CharacterAdded:Wait()
- local isRunning = false
- UIS.InputBegan:Connect(function(Key)
- if Key.KeyCode == Enum.KeyCode.LeftShift or Key.KeyCode == Enum.KeyCode.RightShift then -- Determining whether the player hits "LeftShift" or "RightShift" on their keyboard
- isRunning = true -- Variable saying that the player is running
- if Character.Humanoid then
- Character.Humanoid.WalkSpeed = 32 -- The speed the player gets when running
- end
- end
- end)
- UIS.InputEnded:Connect(function(Key)
- if Key.KeyCode == Enum.KeyCode.LeftShift or Key.KeyCode == Enum.KeyCode.RightShift then -- Determining whether the player lets go of "LeftShift" or "RightShift" on their keyboard
- isRunning = false -- Variable saying that the player is not running
- if Character.Humanoid then
- Character.Humanoid.WalkSpeed = 16 -- The speed the player gets when walking
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement