Advertisement
2AreYouMental110

stand upright auto server hop to find chaka spawning in 5 minutes (FIXED)

Apr 6th, 2023 (edited)
1,074
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.14 KB | None | 0 0
  1. -- put this in your autoexecute folder
  2. local range = 5 -- set range for the minutes it goes back, example: if you put to 10 then it will find a server with chaka spawning in 10 minutes
  3.  
  4.  
  5. if game.PlaceId == 8540168650 then
  6.     game.Workspace:WaitForChild("Age",math.huge)
  7.     local mins = string.sub(tostring(game.Workspace.Age.Value/(60*60)),2)*60
  8.     print(mins)
  9.     print(mins > 30,mins < 60-range,mins < 30-range)
  10.     if mins > 30 and mins < 60-range or mins < 30-range then
  11.         print("TELEPORTING")
  12.         local servers = {}
  13.         local serverstorage = game:GetService("HttpService"):JSONDecode(request({Url = string.format("https://games.roblox.com/v1/games/%d/servers/Public?sortOrder=Asc&limit=100", game.PlaceId)}).Body).data
  14.         for i,v in pairs(serverstorage) do
  15.             if v.id and v.id ~= game.JobId and tonumber(v.playing) < tonumber(v.maxPlayers) then
  16.                 table.insert(servers,v.id)
  17.             end
  18.         end
  19.         game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId,servers[math.random(1,#servers)],game.Players.LocalPlayer)
  20.     else
  21.         print("SERVER FOUND!!!")
  22.     end
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement