MaxproGlitcher

Server Hop Test Gui

Jun 22nd, 2025
42
0
Never
4
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.15 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local TeleportService = game:GetService("TeleportService")
  3. local HttpService = game:GetService("HttpService")
  4. local CoreGui = game:GetService("CoreGui")
  5. local LocalPlayer = Players.LocalPlayer
  6. local PLACE_ID = game.PlaceId
  7.  
  8. local gui = Instance.new("ScreenGui", CoreGui)
  9. gui.Name = "MiniServerHopGui"
  10. gui.ResetOnSpawn = false
  11.  
  12. local frame = Instance.new("Frame", gui)
  13. frame.Size = UDim2.new(0, 200, 0, 120)
  14. frame.Position = UDim2.new(0.5, -100, 0.5, -60)
  15. frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  16. frame.BorderSizePixel = 0
  17. frame.Active = true
  18. frame.Draggable = true
  19. Instance.new("UICorner", frame).CornerRadius = UDim.new(0, 8)
  20.  
  21. local title = Instance.new("TextLabel", frame)
  22. title.Size = UDim2.new(1, 0, 0, 20)
  23. title.Position = UDim2.new(0, 0, 0, 0)
  24. title.Text = "Aroon's Serverhop"
  25. title.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  26. title.TextColor3 = Color3.fromRGB(255, 255, 255)
  27. title.Font = Enum.Font.SourceSansBold
  28. title.TextSize = 16
  29.  
  30. local toggleBtn = Instance.new("TextButton", gui)
  31. toggleBtn.Size = UDim2.new(0, 100, 0, 25)
  32. toggleBtn.Position = UDim2.new(0, 10, 0, 10)
  33. toggleBtn.Text = "Toggle GUI"
  34. toggleBtn.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  35. toggleBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
  36. Instance.new("UICorner", toggleBtn).CornerRadius = UDim.new(0, 6)
  37.  
  38. toggleBtn.MouseButton1Click:Connect(function()
  39. frame.Visible = not frame.Visible
  40. end)
  41.  
  42. local hopBtn = Instance.new("TextButton", frame)
  43. hopBtn.Size = UDim2.new(1, -20, 0, 40)
  44. hopBtn.Position = UDim2.new(0, 10, 0, 25)
  45. hopBtn.Text = "Server Hop"
  46. hopBtn.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
  47. hopBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
  48. hopBtn.Font = Enum.Font.SourceSansBold
  49. hopBtn.TextSize = 18
  50. Instance.new("UICorner", hopBtn).CornerRadius = UDim.new(0, 6)
  51.  
  52. local status = Instance.new("TextLabel", frame)
  53. status.Size = UDim2.new(1, -20, 0, 20)
  54. status.Position = UDim2.new(0, 10, 0, 75)
  55. status.BackgroundTransparency = 1
  56. status.Text = "Ready"
  57. status.TextColor3 = Color3.fromRGB(200, 200, 200)
  58. status.Font = Enum.Font.SourceSans
  59. status.TextSize = 14
  60. status.TextXAlignment = Enum.TextXAlignment.Center
  61.  
  62. local function serverHop()
  63. local currentJobId = game.JobId
  64. local maxTotalTime = 10
  65. local startTime = tick()
  66. status.Text = "Finding server..."
  67. repeat
  68. local success, result = pcall(function()
  69. local url = ("https://games.roblox.com/v1/games/%d/servers/Public?limit=100&sortOrder=Asc"):format(PLACE_ID)
  70. return HttpService:JSONDecode(game:HttpGet(url))
  71. end)
  72. if success and result and result.data then
  73. local validServers = {}
  74. for _, server in pairs(result.data) do
  75. if server.playing < server.maxPlayers and server.id ~= currentJobId then
  76. table.insert(validServers, server)
  77. end
  78. end
  79. if #validServers > 0 then
  80. local chosen = validServers[math.random(1, #validServers)]
  81. status.Text = "Hopping..."
  82. TeleportService:TeleportToPlaceInstance(PLACE_ID, chosen.id, LocalPlayer)
  83. return
  84. end
  85. end
  86. task.wait(3)
  87. until tick() - startTime > maxTotalTime
  88. status.Text = "Failed. Try again."
  89. end
  90.  
  91. hopBtn.MouseButton1Click:Connect(serverHop)
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
Add Comment
Please, Sign In to add comment