Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onKeyPress(inputObject, gameProcessedEvent)
- if inputObject.KeyCode == Enum.KeyCode.Minus then
- game.Players.LocalPlayer.Character.Humanoid:AddPropertyEmulator("WalkSpeed")
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = game.Players.LocalPlayer.Character:FindFirstChild("Humanoid").WalkSpeed - 10;
- elseif inputObject.KeyCode == Enum.KeyCode.Equals then
- game.Players.LocalPlayer.Character.Humanoid:AddPropertyEmulator("WalkSpeed")
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = game.Players.LocalPlayer.Character:FindFirstChild("Humanoid").WalkSpeed + 10;
- end
- end
- game:GetService("UserInputService").InputBegan:connect(onKeyPress)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement