Universal Script 📌
616 Views
15.9k Executions

Show Fps

10K executions
Universal Script 📌
bernardo029c
bernardo029c10K executions
7 months ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

show your exactly fps.

View Raw
local oldGui = game:GetService("CoreGui"):FindFirstChild("FPS_Display")
if oldGui then oldGui:Destroy() end

local screenGui = Instance.new("ScreenGui")
screenGui.Name = "FPS_Display"
screenGui.Parent = game:GetService("CoreGui")
screenGui.IgnoreGuiInset = true

local fpsLabel = Instance.new("TextLabel")
fpsLabel.Parent = screenGui
fpsLabel.Size = UDim2.new(0, 120, 0, 30)
fpsLabel.Position = UDim2.new(1, -130, 0, 10)
fpsLabel.BackgroundTransparency = 0.5
fpsLabel.BackgroundColor3 = Color3.new(0, 0, 0)
fpsLabel.TextColor3 = Color3.new(1, 1, 1)
fpsLabel.TextSize = 18
fpsLabel.Font = Enum.Font.Code

local RunService = game:GetService("RunService")
local lastTime = tick()
local frameCount = 0

RunService.RenderStepped:Connect(function()
    frameCount = frameCount + 1
    local currentTime = tick()
    local delta = currentTime - lastTime
    
    if delta >= 1 then
        local fps = frameCount / delta
        if fps < 1 then
            fpsLabel.Text = string.format("FPS: %.2f", fps)
        else
            fpsLabel.Text = "FPS: " .. math.floor(fps)
        end
        frameCount = 0
        lastTime = currentTime
    end
end)



Comments

0
Log in to join the conversation. Login
No comments yet. Be the first!

More universal scripts

See all
Script hub
178.8k
1.7M
Bumped 3 hours ago
Key System
Universal Script 📌
9.1k
31.7k
Bumped 5 hours ago
Script hub
49.9k
12.4k
Bumped 5 hours ago
Key System
Paid
Script hub
5.5M
1.1M
Bumped 10 hours ago
Key System
Script hub
20.6k
4.0k
Bumped 10 hours ago
Key System
Paid
Universal Script 📌
744
221
Approved 16 hours ago
Universal Script 📌
648
2.7k
Approved 16 hours ago