
2.5k Views
56 Executions
new serverhop
Universal Script 📌
mzeenFirst script
2 years ago
Please login to perform these actions:Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
uhm serverhop
local httprequest = (syn and syn.request) or (http and http.request) or http_request or (fluxus and fluxus.request) or request
local function serverHop()
local function notify(title, message)
game:GetService("StarterGui"):SetCore("SendNotification", {
Title = title,
Text = message,
Duration = 5
})
end
if httprequest then
notify("Serverhop", "Searching for a new server...")
local HttpService = game:GetService("HttpService")
local PlaceId = game.PlaceId
local JobId = game.JobId
local TeleportService = game:GetService("TeleportService")
local LocalPlayer = game:GetService("Players").LocalPlayer
local req = httprequest({
Url = string.format("https://games.roblox.com/v1/games/%d/servers/Public?sortOrder=Desc&limit=100&excludeFullGames=true", PlaceId)
})
local success, body = pcall(function()
return HttpService:JSONDecode(req.Body)
end)
if success and body and body.data then
local servers = {}
for _, server in pairs(body.data) do
if server.playing < server.maxPlayers and server.id ~= JobId then
table.insert(servers, server)
end
end
if #servers > 0 then
local selectedServer = servers[math.random(1, #servers)]
Comments
0Log in to join the conversation. Login
No comments yet. Be the first!







