MaxproGlitcher

find small servers script

Jul 31st, 2022 (edited)
2,416
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. game:GetService("StarterGui"):SetCore("SendNotification",{
  2. Title = "Petit servers",
  3. Text = "Script a été executer",
  4. Icon = "rbxassetid://11823384169",
  5. Duration = 15
  6. })
  7.  
  8. local Http = game:GetService("HttpService")
  9. local TPS = game:GetService("TeleportService")
  10. local Api = "https://games.roblox.com/v1/games/"
  11.  
  12. local _place = game.PlaceId
  13. local _servers = Api.._place.."/servers/Public?sortOrder=Asc&limit=100"
  14. function ListServers(cursor)
  15. local Raw = game:HttpGet(_servers .. ((cursor and "&cursor="..cursor) or ""))
  16. return Http:JSONDecode(Raw)
  17. end
  18.  
  19. local Server, Next; repeat
  20. local Servers = ListServers(Next)
  21. Server = Servers.data[1]
  22. Next = Servers.nextPageCursor
  23. until Server
  24.  
  25. TPS:TeleportToPlaceInstance(_place,Server.id,game.Players.LocalPlayer)
Advertisement
Add Comment
Please, Sign In to add comment