38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
-- FPS Widget by aabbaaii13/14 (https://rscripts.net/script/fps-counter-v11-9Rrh)
|
|
|
|
if _G.Settings.Main.ShowFPS == false then return end
|
|
|
|
local p = game:GetService("Players").LocalPlayer
|
|
if not p:WaitForChild("PlayerGui"):FindFirstChild("TopbarStandard") then
|
|
loadstring(game:HttpGet("https://raw.githubusercontent.com/CaseohCASEOH/aabbaaii/refs/heads/main/Topbar.lua"))()
|
|
end
|
|
|
|
local gui = p.PlayerGui.TopbarStandard.Holders.Left
|
|
local frame = Instance.new("Frame", gui)
|
|
frame.Name = "Widget"
|
|
frame.Size = UDim2.new(0, 44, 0, 44)
|
|
frame.Position = UDim2.new(0.85, 0, 0, 0)
|
|
frame.BackgroundColor3 = Color3.new(0, 0, 0)
|
|
frame.BackgroundTransparency = 0.3
|
|
|
|
Instance.new("UICorner", frame).CornerRadius = UDim.new(1, 0)
|
|
|
|
local label = Instance.new("TextLabel", frame)
|
|
label.Size = UDim2.new(1, 0, 1, 0)
|
|
label.BackgroundTransparency = 1
|
|
label.TextColor3 = Color3.new(1, 1, 1)
|
|
label.TextSize = 12
|
|
label.Font = Enum.Font.GothamBold
|
|
label.Text = "FPS: 0"
|
|
|
|
local n, t = 0, 0
|
|
game:GetService("RunService").RenderStepped:Connect(function(dt)
|
|
n += 1
|
|
t += dt
|
|
if t >= 1 then
|
|
label.Text = ("FPS: %d"):format(n / t)
|
|
n, t = 0, 0
|
|
end
|
|
end)
|
|
_G.FPSWidget = frame
|