1. local Player = game.Players.LocalPlayer
  2. local Http = game:GetService("HttpService")
  3. local TPS = game:GetService("TeleportService")
  4. local Api = "https://games.roblox.com/v1/games/"
  5. local _place,_id = game.PlaceId, game.JobId
  6. local _servers = Api.._place.."/servers/Public?sortOrder=Desc&limit=100"
  7. function ListServers(cursor)
  8. local Raw = game:HttpGet(_servers .. ((cursor and "&cursor="..cursor) or ""))
  9. return Http:JSONDecode(Raw)
  10. end
  11. local Next; repeat
  12. local Servers = ListServers(Next)
  13. for i,v in next, Servers.data do
  14. if v.playing < v.maxPlayers and v.id ~= _id then
  15. local s,r = pcall(TPS.TeleportToPlaceInstance,TPS,_place,v.id,Player)
  16. if s then break end
  17. end
  18. end
  19. Next = Servers.nextPageCursor
  20. until not Next