Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- // More Realistic Anti-Afk
- local function aiwalk(player)
- local humanoid = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
- local targetPosition = player.Character.HumanoidRootPart.Position
- humanoid:MoveTo(targetPosition - targetPosition.Unit * 5)
- humanoid.MoveToFinished:Wait()
- end
- local function getRandomPlayer()
- local players = game.Players:GetPlayers()
- return players[math.random(1, #players)]
- end
- while true do
- local targetPlayer = getRandomPlayer()
- aiwalk(targetPlayer)
- wait(5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement