Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- This script is simpler; it forever increases the speed but resets when the player stops and
- resumes walking.
- --]]
- local player = game.Players.LocalPlayer
- local hum = player.Character:WaitForChild("Humanoid")
- local WALK_SPEED = 16 -- Beginning walk speed
- local INCREASE = 0.5 -- How much it accelerates each time
- local INTERVAL = 0.1
- local isRunning = false -- Whether the humanoid is running
- hum.Running:Connect(function(speed)
- if speed == 0 then
- isRunning = false
- elseif not isRunning then -- When the player is just starting to run
- isRunning = true
- hum.WalkSpeed = WALK_SPEED
- end
- end)
- while wait(INTERVAL) do
- hum.WalkSpeed = hum.WalkSpeed + INCREASE
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement