Advertisement
MaxproGlitcher

New Anti AFK

Oct 29th, 2023
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. -- // More Realistic Anti-Afk
  2.  
  3.  
  4. local function aiwalk(player)
  5. local humanoid = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
  6. local targetPosition = player.Character.HumanoidRootPart.Position
  7. humanoid:MoveTo(targetPosition - targetPosition.Unit * 5)
  8. humanoid.MoveToFinished:Wait()
  9. end
  10. local function getRandomPlayer()
  11. local players = game.Players:GetPlayers()
  12. return players[math.random(1, #players)]
  13. end
  14. while true do
  15. local targetPlayer = getRandomPlayer()
  16. aiwalk(targetPlayer)
  17. wait(5)
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement