rrixh

join lowest player

Jul 11th, 2023
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. local Http = game:GetService("HttpService")
  2. local TPS = game:GetService("TeleportService")
  3. local Api = "https://games.roblox.com/v1/games/"
  4.  
  5. local _place = game.PlaceId
  6. local _servers = Api.._place.."/servers/Public?sortOrder=Asc&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.  
  12. local Server, Next; repeat
  13. local Servers = ListServers(Next)
  14. Server = Servers.data[1]
  15. Next = Servers.nextPageCursor
  16. until Server
  17.  
  18. TPS:TeleportToPlaceInstance(_place,Server.id,game.Players.LocalPlayer)
Add Comment
Please, Sign In to add comment