Advertisement
Syahrul_Gibran

Untitled

Jun 5th, 2025 (edited)
20
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.87 KB | None | 0 0
  1. --[[
  2.     WARNING: Heads up! This script has not been verified by ScriptBlox. Use at your own risk!
  3. ]]
  4. -- Services
  5. local RunService = game:GetService("RunService")
  6. local Stats = game:GetService("Stats")
  7. local Players = game:GetService("Players")
  8. local LocalPlayer = Players.LocalPlayer
  9. local StarterGui = game:GetService("StarterGui")
  10.  
  11. -- Create GUI
  12. local ScreenGui = Instance.new("ScreenGui")
  13. ScreenGui.Name = "FPS_Ping_Display"
  14. ScreenGui.Parent = game:GetService("CoreGui")
  15.  
  16. local Frame = Instance.new("Frame")
  17. Frame.Size = UDim2.new(0, 200, 0, 80)
  18. Frame.Position = UDim2.new(0.7, 0, 0.05, 0)
  19. Frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  20. Frame.BackgroundTransparency = 0.3
  21. Frame.BorderSizePixel = 2
  22. Frame.Parent = ScreenGui
  23. Frame.Active = true
  24. Frame.Draggable = true -- Makes the GUI movable
  25.  
  26. local TitleLabel = Instance.new("TextLabel")
  27. TitleLabel.Size = UDim2.new(1, 0, 0.3, 0)
  28. TitleLabel.Position = UDim2.new(0, 0, 0, 0)
  29. TitleLabel.BackgroundTransparency = 1
  30. TitleLabel.Text = "FPS & Ping counter"
  31. TitleLabel.Font = Enum.Font.SourceSansBold
  32. TitleLabel.TextSize = 16
  33. TitleLabel.TextColor3 = Color3.new(1, 1, 1)
  34. TitleLabel.Parent = Frame
  35.  
  36. local FPSText = Instance.new("TextLabel")
  37. FPSText.Size = UDim2.new(1, 0, 0.35, 0)
  38. FPSText.Position = UDim2.new(0, 0, 0.3, 0)
  39. FPSText.BackgroundTransparency = 1
  40. FPSText.Font = Enum.Font.SourceSansBold
  41. FPSText.TextSize = 16
  42. FPSText.TextColor3 = Color3.new(1, 1, 1)
  43. FPSText.Parent = Frame
  44.  
  45. local PingText = Instance.new("TextLabel")
  46. PingText.Size = UDim2.new(1, 0, 0.35, 0)
  47. PingText.Position = UDim2.new(0, 0, 0.65, 0)
  48. PingText.BackgroundTransparency = 1
  49. PingText.Font = Enum.Font.SourceSansBold
  50. PingText.TextSize = 16
  51. PingText.TextColor3 = Color3.new(1, 1, 1)
  52. PingText.Parent = Frame
  53.  
  54. -- Send a welcoming notification to the player
  55. StarterGui:SetCore("SendNotification", {
  56.     Title = "Yippee!",
  57.     Text = "Thanks you for choosing this script!",
  58.     Icon = "rbxassetid://15652789465", -- New icon ID
  59.     Duration = 5
  60. })
  61.  
  62. -- Update FPS & Ping every second
  63. task.spawn(function()
  64.     while true do
  65.         -- FPS Calculation
  66.         local fps = math.floor(1 / RunService.RenderStepped:Wait())
  67.  
  68.         -- Ping Calculation
  69.         local ping = math.floor(Stats.Network.ServerStatsItem["Data Ping"]:GetValue())
  70.  
  71.         -- FPS Rating
  72.         local fpsRating = (fps > 60 and "Excellent (Ultra Smooth)") or
  73.                           (fps >= 30 and "Playable") or
  74.                           "Choppy (Bad)"
  75.  
  76.         -- Ping Rating
  77.         local pingRating = (ping <= 50 and "Good") or
  78.                            (ping <= 100 and "Decent") or
  79.                            "Bad (High Ping)"
  80.  
  81.         -- Update GUI Text
  82.         FPSText.Text = "FPS: " .. fps .. " (" .. fpsRating .. ")"
  83.         PingText.Text = "Ping: " .. ping .. "ms (" .. pingRating .. ")"
  84.  
  85.         task.wait(0.1) -- Update every second
  86.     end
  87. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement