Server Teleport
Key Required

Server Teleport

Brookhaven 🏡RPAlfanHubAlfanHub 16.1K views 205 executesUpdated Sep 10, 2025
Unrated
00
Lua Script•221 lines (8154 chars)
-- 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})

Features & Information

1. GUI Name: Server Teleport – modern design, draggable and minimizable into a round icon. 2. Country Input: Type a country name (e.g., Indonesia, USA) to search for servers in that region. 3. Player Filter: Includes a box to set minimum player count, so you won’t land in empty servers. 4. Default Setting: Minimum players automatically set to 10 (editable). 5. Drag Feature: The main frame can be freely moved around the screen. 6. Minimize Feature: GUI can be minimized into a round “ST” icon at the corner. 7. Round Icon: The icon is draggable and can be clicked to reopen the GUI. 8. Teleport Button: The main button to start searching and teleporting into servers. 9. Stop Button: Allows you to cancel the search process at any time. 10. GUI Notifications: All actions show notifications (success, fail, stop, etc). 11. Server Filtering: Only selects servers that meet the minimum player requirement. 12. Random Server Pick: Randomly selects one of the filtered servers to avoid repetition. 13. Auto Request: Uses Roblox official API to fetch server data. 14. Cross-Executor Support: Works with executors that support HTTP requests (Synapse, Script-Ware, Arceus Neo, etc). 15. Empty Input Warning: If the country field is empty, a “Please enter a country name!” notification appears. 16. Fail Protection: Shows notification if no servers are found. 17. Clean UI: Modern dark design with rounded corners. 18. Fast Search: Instantly fetches server data in real-time. 19. Cursor Support: Can continue fetching from the next server page (multi-page search). 20. Custom Size GUI: Medium-sized frame (360x180), suitable for small and large screens. 21. Multi-Device Friendly: Works smoothly on both mobile and PC. 22. No Reset Loss: GUI remains visible even after character reset. 23. Clear Text Control: Country input does not auto-clear when focused, easy to edit. 24. Manual Save: Minimum players can be adjusted anytime without reload. 25. Flexible Range: Minimum player filter can be set from 1 to 100. 26. Crowded Server Mode: Perfect for hunting active/populated servers. 27. Low Player Mode: Can also search for small/quiet servers by lowering min players. 28. Full Control: Search and stop are fully managed with GUI buttons. 29. Simple Use: Just type country + min players + click Teleport. 30. Notification Style: Clear text with color-coded messages (blue/white for info, red for errors). 31. Error Bypass: If teleport fails, the script instantly explains the error cause.

Community Comments (1)

EROOREROORSep 17, 2025

Work?

More Scripts for Brookhaven 🏡RP