MaxproGlitcher

task.spawn(function() while AutoChest do local hrp = game.Players.LocalPlayer.Character

Oct 9th, 2026
11
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. local AutoChest = true
  2.  
  3. task.spawn(function()
  4. while AutoChest do
  5. local hrp = game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
  6.  
  7. if hrp then
  8. for _, chest in ipairs(workspace.CornMaze.Chests:GetChildren()) do
  9. if not AutoChest then
  10. break
  11. end
  12.  
  13. local part = chest:FindFirstChildWhichIsA("BasePart", true)
  14.  
  15. if part then
  16. hrp.CFrame = part.CFrame + Vector3.new(0, 3, 0)
  17. task.wait(0.5)
  18. end
  19. end
  20. end
  21.  
  22. task.wait(1)
  23. end
  24. end)
Advertisement
Add Comment
Please, Sign In to add comment