Ping and fps counter
Key RequiredUniversal

Ping and fps counter

Universal ScriptUnknown_personUnknown_person 3.2K views 1.1K executesUpdated Apr 10, 2025
3.3/ 5(3 votes)
2167% Positive
Lua Script•76 lines (2493 chars)
local RunService = game:GetService("RunService")
local Stats = game:GetService("Stats")
local Players = game:GetService("Players")
local StarterGui = game:GetService("StarterGui")

-- Show Notification
StarterGui:SetCore("SendNotification", {
    Title = "romans 15:13";
    Text = "script Made by ryu949";
    Duration = 20; -- Notification stays for 20 seconds
})

-- Create UI
local screenGui = Instance.new("ScreenGui", game.CoreGui)

local frame = Instance.new("Frame", screenGui)
frame.Size = UDim2.new(0.15, 0, 0.1, 0)
frame.Position = UDim2.new(0.85, 0, 0.0001, 0)
frame.BackgroundTransparency = 1  -- Keep it transparent

-- Image Background
local background = Instance.new("ImageLabel", frame)
background.Size = UDim2.new(1, 0, 1, 0)
background.Position = UDim2.new(0, 0, 0, 0)
background.Image = "rbxassetid://131928643682688"  -- Change to your new image ID
background.ScaleType = Enum.ScaleType.Stretch
background.BackgroundTransparency = 1

-- FPS Label (Left Side)
local fpsLabel = Instance.new("TextLabel", frame)
fpsLabel.Size = UDim2.new(0.5, 0, 0.3, 0)  -- Adjusted size
fpsLabel.Position = UDim2.new(0.05, 0, 0.1, 0)  -- Left aligned
fpsLabel.TextColor3 = Color3.new(1, 1, 1)
fpsLabel.TextStrokeTransparency = 0
fpsLabel.TextStrokeColor3 = Color3.new(0, 0, 0)
fpsLabel.TextScaled = false
fpsLabel.Font = Enum.Font.SourceSansBold
fpsLabel.TextSize = 18
fpsLabel.BackgroundTransparency = 1
fpsLabel.Text = "FPS: 0"

-- MS Label (Below FPS)
local msLabel = Instance.new("TextLabel", frame)
msLabel.Size = UDim2.new(0.5, 0, 0.3, 0)
msLabel.Position = UDim2.new(0.05, 0, 0.5, 0)  -- Positioned below FPS
msLabel.TextColor3 = Color3.new(1, 1, 1)
msLabel.TextStrokeTransparency = 0
msLabel.TextStrokeColor3 = Color3.new(0, 0, 0)
msLabel.TextScaled = false
msLabel.Font = Enum.Font.SourceSansBold
msLabel.TextSize = 18
msLabel.BackgroundTransparency = 1
msLabel.Text = "MS: 0"

-- FPS Counter
local lastTick = tick()
local frameCount = 0

RunService.RenderStepped:Connect(function()
    frameCount = frameCount + 1
    if tick() - lastTick >= 1 then
        fpsLabel.Text = "FPS: " .. frameCount
        frameCount = 0
        lastTick = tick()
    end
end)

-- MS Counter (Ping)
RunService.RenderStepped:Connect(function()
    local ping = Stats.Network:FindFirstChild("ServerStatsItem") and Stats.Network.ServerStatsItem["Data Ping"]:GetValue()
    if ping then
        msLabel.Text = "MS: " .. math.floor(ping) .. " ms"
    else
        msLabel.Text = "MS: Unknown"
    end
end)

Features & Information

Ping and fps counter script universal Please subscribe to my YouTube https://youtube.com/@carlll_54321?si=TxsYG84iBlqLDY9X
#Ping and fps counter

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts