Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- A much simplified version. The only problem with this is that wait(INTERVAL) is a blindspot.
- If the player stops during this time, and resumes really quickly,the speed won't reset.
- --]]
- 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
- while true do
- while hum.MoveDirection ~= Vector3.new() do -- While the humanoid hasn't stopped
- hum.WalkSpeed = hum.WalkSpeed + INCREASE
- wait(INTERVAL)
- end
- hum.WalkSpeed = WALK_SPEED
- -- Wait for player to start running agains
- hum.Running:Wait() -- or wait for hum.MoveDirection to change with hum:GetPropertyChangedSignal()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement