The text below is selected, press Ctrl+C to copy to your clipboard. (⌘+C on Mac) No line numbers will be copied.
Guest
See server region, fps, and ping script pastebin roblox
By see server region, fps, and ping on 2024-11-26 08:00 am | Syntax: LUA | Views: 15



New Script | Raw | Show/Hide line no. | Copy text to clipboard
  1. -- services
  2. local network = game:GetService("NetworkClient")
  3. local stats = game:GetService("Stats")
  4. local http = game:GetService("HttpService")
  5. -- guis
  6. local gui = Instance.new("ScreenGui")
  7. local layout = Instance.new("UIListLayout")
  8. local mainFrame = Instance.new("Frame")
  9. -- vars
  10. local layoutNum = 99999
  11. -- properties
  12. gui.Name = "stats"
  13. gui.Parent = game:WaitForChild("CoreGui")
  14. gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  15. gui.IgnoreGuiInset = true
  16.  
  17. mainFrame.Size = UDim2.new(0.94, 0, 0, 36)
  18. mainFrame.Position = UDim2.new(0.5, 0, 0, 0)
  19. mainFrame.AnchorPoint = Vector2.new(0.5, 0)
  20. mainFrame.BackgroundTransparency = 1
  21. mainFrame.Parent = gui
  22.  
  23. layout.FillDirection = Enum.FillDirection.Horizontal
  24. layout.HorizontalAlignment = Enum.HorizontalAlignment.Right
  25. layout.VerticalAlignment = Enum.VerticalAlignment.Bottom
  26. layout.Padding = UDim.new(0, 10, 0, 0)
  27. layout.SortOrder = Enum.SortOrder.LayoutOrder
  28. layout.Parent = mainFrame
  29. -- main
  30. function newIcon(text: string)
  31.         local icon = Instance.new("Frame")
  32.         local label = Instance.new("TextLabel")
  33.         local corner = Instance.new("UICorner")
  34.         icon.LayoutOrder = layoutNum
  35.         icon.Parent = mainFrame
  36.         icon.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  37.         icon.BackgroundTransparency = 0.500
  38.         icon.Size = UDim2.new(0, 80, 0, 31)
  39.         label.Parent = icon
  40.         label.AnchorPoint = Vector2.new(0.5, 0.5)
  41.         label.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  42.         label.BackgroundTransparency = 1.000
  43.         label.Position = UDim2.new(0.5, 0, 0.5, 0)
  44.         label.Size = UDim2.new(0.699999988, 0, 0.699999988, 0)
  45.         label.Font = Enum.Font.GothamSemibold
  46.         label.Text = text
  47.         label.TextColor3 = Color3.fromRGB(255, 255, 255)
  48.         label.TextScaled = true
  49.         label.TextSize = 14.000
  50.         label.TextWrapped = true
  51.         corner.Parent = icon
  52.         layoutNum -= 1
  53.         return icon
  54. end
  55. network.ConnectionAccepted:Connect(function(server)
  56.         local ipInfo = http:JSONDecode(game:HttpGet("http://ipinfo.io/"..string.split(server, "|")[1].."/json"))
  57.         local country = ipInfo["country"]
  58.         local region = ipInfo["region"]
  59.         local icon = newIcon(country.."/"..region)
  60.         icon.LayoutOrder = math.huge
  61. end)
  62. game.Loaded:Wait()
  63. task.spawn(function()
  64.         local icon = newIcon("0ms")
  65.         while task.wait(1) do
  66.                 local ping = tonumber(string.split(stats:WaitForChild("Network"):WaitForChild("ServerStatsItem"):WaitForChild("Data Ping"):GetValueString(), " ")[1])
  67.                 if ping == nil then continue end
  68.                 icon.TextLabel.Text = math.floor(ping).."ms"
  69.         end
  70. end)
  71. do
  72.         local icon = newIcon("0fps")
  73.         local fps = 0
  74.         game:GetService("RunService").RenderStepped:Connect(function()
  75.                 fps += 1
  76.         end)
  77.         while task.wait(1) do
  78.                 icon.TextLabel.Text = fps.."fps"
  79.                 fps = 0
  80.         end
  81. end



  • Recent Roblox Scripts