Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- This gets rid of the 0.1 second blindspot.
- --]]
- 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
- local isRunning = hum.MoveDirection ~= Vector3.new()
- spawn(function() -- One loop detects when the player stops, getting rid of the blind spot
- repeat
- isRunning = hum.Running:Wait() ~= 0
- until not isRunning
- end)
- while isRunning do -- The other loop will incrememnt the WalkSpeed
- 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