-- Создание GUI local ScreenGui = Instance.new("ScreenGui") local Frame = Instance.new("Frame") local TextButton = Instance.new("TextButton") local UICorner = Instance.new("UICorner") -- Настройки GUI ScreenGui.Parent = game.CoreGui ScreenGui.Name = "ServerHopGui" Frame.Parent = ScreenGui Frame.BackgroundColor3 = Color3.fromRGB(35, 35, 35) Frame.Position = UDim2.new(0.5, -75, 0.5, -25) Frame.Size = UDim2.new(0, 150, 0, 50) Frame.Active = true Frame.Draggable = true -- Можно перетаскивать по экрану UICorner.Parent = Frame TextButton.Parent = Frame TextButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50) TextButton.Size = UDim2.new(1, -10, 1, -10) TextButton.Position = UDim2.new(0, 5, 0, 5) TextButton.Font = Enum.Font.SourceSansBold TextButton.Text = "Server Hop" TextButton.TextColor3 = Color3.fromRGB(255, 255, 255) TextButton.TextSize = 20 local UICorner2 = Instance.new("UICorner") UICorner2.Parent = TextButton -- Функция Server Hop local function Teleport() local HttpService = game:GetService("HttpService") local TeleportService = game:GetService("TeleportService") local PlaceId = game.PlaceId local url = "https://games.roblox.com/v1/games/" .. PlaceId .. "/servers/Public?sortOrder=Asc&limit=100" local success, result = pcall(function() return HttpService:JSONDecode(game:HttpGet(url)) end) if success and result.data then for _, server in ipairs(result.data) do -- Проверяем, что сервер не полный и это не наш текущий сервер if server.playing < server.maxPlayers and server.id ~= game.JobId then TeleportService:TeleportToPlaceInstance(PlaceId, server.id, game.Players.LocalPlayer) return end end else warn("Не удалось получить список серверов.") end end -- Обработка нажатия TextButton.MouseButton1Click:Connect(function() TextButton.Text = "Searching..." Teleport() wait(2) TextButton.Text = "Server Hop" end)