Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function isNumber(str)
- if tonumber(str) ~= nil or str == 'inf' then
- return true
- end
- end
- local tspeed = 1
- local hb = game:GetService("RunService").Heartbeat
- local tpwalking = true
- local player = game:GetService("Players")
- local lplr = player.LocalPlayer
- local chr = lplr.Character
- local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
- while tpwalking and hb:Wait() and chr and hum and hum.Parent do
- if hum.MoveDirection.Magnitude > 0 then
- if tspeed and isNumber(tspeed) then
- chr:TranslateBy(hum.MoveDirection * tonumber(tspeed))
- else
- chr:TranslateBy(hum.MoveDirection)
- end
- end
- end
Add Comment
Please, Sign In to add comment