
Keyless

-- Server Teleport GUI (Versi dengan Min Player Setting)
-- Bisa drag, minimize jadi ikon bulat, dan atur minimal jumlah player server
local HttpService = game:GetService("HttpService")
local TeleportService = game:GetService("TeleportService")
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local StarterGui = game:GetService("StarterGui")
-- ====== Request Handler ======
local function doRequest(req)
if syn and syn.request then
return syn.request(req)
elseif request then
return request(req)
elseif http and http.request then
return http.request(req)
elseif http_request then
return http_request(req)
else
error("Executor tidak support HTTP Request.")
end
end
-- ====== Server API ======
local function getServers(placeId, cursor, minPlayers)
local url = ("https://games.roblox.com/v1/games/%d/servers/Public?sortOrder=Desc&limit=100"):format(placeId)
if cursor then
url = url .. "&cursor=" .. cursor
end
local ok, res = pcall(function()
return doRequest({
Url = url,
Method = "GET",
Headers = {["User-Agent"] = "Roblox/Windows"}
})
end)
if not ok or not res then return nil end
if res.StatusCode ~= 200 then return nil end
local body = res.Body or res.body
local data = HttpService:JSONDecode(body)
-- Filter minPlayers
local filtered = {}
if data and data.data then
for _, server in ipairs(data.data) do
if server.playing and server.playing >= minPlayers then
table.insert(filtered, server)
end
end
data.data = filtered
end
return data
end
-- ====== GUI ======
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "ServerTeleportGUI"
screenGui.ResetOnSpawn = false
screenGui.Parent = Player:WaitForChild("PlayerGui")
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 360, 0, 180)
frame.Position = UDim2.new(0.5, -180, 0.25, 0)
frame.AnchorPoint = Vector2.new(0.5, 0)
frame.BackgroundColor3 = Color3.fromRGB(20,20,20)
frame.Parent = screenGui
Instance.new("UICorner", frame).CornerRadius = UDim.new(0,10)
local title = Instance.new("TextLabel", frame)
title.Size = UDim2.new(1, -12, 0, 30)
title.Position = UDim2.new(0,6,0,6)
title.BackgroundTransparency = 1
title.Text = "Server Teleport"
title.TextColor3 = Color3.fromRGB(255,255,255)
title.TextScaled = true
title.Font = Enum.Font.SourceSansBold
local countryBox = Instance.new("TextBox", frame)
countryBox.PlaceholderText = "Tulis Nama Negara (contoh: Indonesia)"
countryBox.Size = UDim2.new(1, -12, 0, 30)
countryBox.Position = UDim2.new(0,6,0,40)
countryBox.BackgroundColor3 = Color3.fromRGB(30,30,30)
countryBox.TextColor3 = Color3.fromRGB(230,230,230)
countryBox.ClearTextOnFocus = false
countryBox.Font = Enum.Font.SourceSans
countryBox.TextSize = 16
Instance.new("UICorner", countryBox).CornerRadius = UDim.new(0,6)
local minPlayerBox = Instance.new("TextBox", frame)
minPlayerBox.PlaceholderText = "Minimal Player (contoh: 10)"
minPlayerBox.Size = UDim2.new(1, -12, 0, 30)
minPlayerBox.Position = UDim2.new(0,6,0,76)
minPlayerBox.BackgroundColor3 = Color3.fromRGB(30,30,30)
minPlayerBox.TextColor3 = Color3.fromRGB(230,230,230)
minPlayerBox.ClearTextOnFocus = false
minPlayerBox.Font = Enum.Font.SourceSans
minPlayerBox.TextSize = 16
minPlayerBox.Text = "10" -- default
Instance.new("UICorner", minPlayerBox).CornerRadius = UDim.new(0,6)
local teleportBtn = Instance.new("TextButton", frame)
teleportBtn.Text = "Find & Teleport"
teleportBtn.Size = UDim2.new(0.5, -10, 0, 36)
teleportBtn.Position = UDim2.new(0,6,0,116)
teleportBtn.BackgroundColor3 = Color3.fromRGB(45,135,255)
teleportBtn.TextColor3 = Color3.fromRGB(255,255,255)
teleportBtn.Font = Enum.Font.SourceSansBold
teleportBtn.TextSize = 16
Instance.new("UICorner", teleportBtn).CornerRadius = UDim.new(0,6)
local stopBtn = Instance.new("TextButton", frame)
stopBtn.Text = "Stop"
stopBtn.Size = UDim2.new(0.5, -10, 0, 36)
stopBtn.Position = UDim2.new(0.5, 4, 0, 116)
stopBtn.BackgroundColor3 = Color3.fromRGB(200,60,60)
stopBtn.TextColor3 = Color3.fromRGB(255,255,255)
stopBtn.Font = Enum.Font.SourceSansBold
stopBtn.TextSize = 16
Instance.new("UICorner", stopBtn).CornerRadius = UDim.new(0,6)
-- Minimize
local minBtn = Instance.new("TextButton", frame)
minBtn.Text = "—"
minBtn.Size = UDim2.new(0,28,0,28)
minBtn.Position = UDim2.new(1, -36, 0, 6)
minBtn.BackgroundColor3 = Color3.fromRGB(60,60,60)
minBtn.TextColor3 = Color3.fromRGB(255,255,255)
minBtn.Font = Enum.Font.SourceSansBold
minBtn.TextSize = 20
Instance.new("UICorner", minBtn).CornerRadius = UDim.new(0,6)
local miniIcon = Instance.new("ImageButton", screenGui)
miniIcon.Size = UDim2.new(0,56,0,56)
miniIcon.Position = UDim2.new(0.02,0,0.8,0)
miniIcon.BackgroundColor3 = Color3.fromRGB(30,30,30)
miniIcon.Visible = false
Instance.new("UICorner", miniIcon).CornerRadius = UDim.new(1,0)
local miniLabel = Instance.new("TextLabel", miniIcon)
miniLabel.Size = UDim2.new(1,0,1,0)
miniLabel.BackgroundTransparency = 1
miniLabel.Text = "ST"
miniLabel.TextColor3 = Color3.fromRGB(255,255,255)
miniLabel.Font = Enum.Font.SourceSansBold
miniLabel.TextScaled = true
-- ====== Drag ======
local UserInputService = game:GetService("UserInputService")
local function makeDraggable(obj)
local dragging, dragStart, startPos
obj.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = true
dragStart = input.Position
startPos = obj.Position
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end)
obj.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement and dragging then
local delta = input.Position - dragStart
obj.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X,
startPos.Y.Scale, startPos.Y.Offset + delta.Y)
end
end)
end
makeDraggable(frame)
makeDraggable(miniIcon)
minBtn.MouseButton1Click:Connect(function()
frame.Visible = false
miniIcon.Visible = true
end)
miniIcon.MouseButton1Click:Connect(function()
frame.Visible = true
miniIcon.Visible = false
end)
-- ====== Teleport Logic ======
local searching = false
teleportBtn.MouseButton1Click:Connect(function()
if searching then return end
local targetCountry = countryBox.Text
local minPlayers = tonumber(minPlayerBox.Text) or 10
if targetCountry == "" then
StarterGui:SetCore("SendNotification",{Title="Server Teleport",Text="Isi nama negara dulu!",Duration=3})
return
end
searching = true
StarterGui:SetCore("SendNotification",{Title="Server Teleport",Text="Mencari server ("..minPlayers.."+) untuk "..targetCountry,Duration=4})
spawn(function()
local placeId = game.PlaceId
local data = getServers(placeId,nil,minPlayers)
if not data or not data.data or #data.data == 0 then
StarterGui:SetCore("SendNotification",{Title="Server Teleport",Text="Tidak ada server dengan "..minPlayers.." pemain ditemukan.",Duration=4})
searching = false
return
end
local sid = data.data[math.random(1,#data.data)].id
local ok, err = pcall(function()
TeleportService:TeleportToPlaceInstance(placeId, sid, Player)
end)
if not ok then
StarterGui:SetCore("SendNotification",{Title="Server Teleport",Text="Teleport gagal: "..tostring(err),Duration=4})
end
searching = false
end)
end)
stopBtn.MouseButton1Click:Connect(function()
searching = false
StarterGui:SetCore("SendNotification",{Title="Server Teleport",Text="Pencarian dihentikan.",Duration=3})
end)
StarterGui:SetCore("SendNotification",{Title="Server Teleport",Text="GUI siap! Isi negara + minimal player, lalu klik Find & Teleport.",Duration=5})
Work?