Sign In to Your Account

Manual registration is temporarily disabled. Please use Discord, Google or GitHub to create an account.

CONTINUE WITH
fps counter - Universal Script | Free Roblox Script

fps counter

Universal 1 views just now
fps counter - Roblox Script
Mobile Mobile Friendly
Key Key Required

Description

Credits: piletom

just shows your fps and ping with style

116 Lines 4,459 Bytes
local RunService = game:GetService("RunService")
local Stats = game:GetService("Stats")
local Players = game:GetService("Players")

local function getColorForFPS(fps)
	if fps >= 50 then return Color3.fromRGB(0, 255, 0)
	elseif fps >= 30 then return Color3.fromRGB(255, 255, 0)
	else return Color3.fromRGB(255, 0, 0) end
end

local function getColorForPing(ping)
	if ping < 100 then return Color3.fromRGB(0, 255, 0)
	elseif ping < 200 then return Color3.fromRGB(255, 255, 0)
	else return Color3.fromRGB(255, 0, 0) end
end

if not Players.LocalPlayer:WaitForChild("PlayerGui"):FindFirstChild("TopbarStandard") then
	local Frame1 = Instance.new("Frame", game:GetService("CoreGui").TopBarApp.TopBarApp)
	local Frame2 = Instance.new("Frame", Frame1)
	local UIListLayout = Instance.new("UIListLayout", Frame2)
	
	Frame1.Size = UDim2.new(1, 0, 0, 48)
	Frame1.Position = UDim2.new(0, 0, 0, 10)
	Frame1.BackgroundTransparency = 1
	Frame2.Size = UDim2.new(1, 0, 0, 44)
	Frame2.Position = UDim2.new(0, 172, 0, 2)
	Frame2.BackgroundTransparency = 1
	
	UIListLayout.Padding = UDim.new(0, 12)
	UIListLayout.FillDirection = Enum.FillDirection.Horizontal
	UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Left
	UIListLayout.VerticalAlignment = Enum.VerticalAlignment.Bottom
	
	local Frame3 = Instance.new("Frame", Frame2)
	local TextLabelFPS = Instance.new("TextLabel", Frame3)
	local UICorner1 = Instance.new("UICorner", Frame3)
	Frame3.Size = UDim2.new(0, 96, 0, 44)
	Frame3.BackgroundColor3 = Color3.fromRGB(18, 18, 21)
	Frame3.BackgroundTransparency = 0.08
	UICorner1.CornerRadius = UDim.new(1, 0)
	TextLabelFPS.Size = UDim2.new(1, 0, 1, 0)
	TextLabelFPS.BackgroundTransparency = 1
	TextLabelFPS.Font = Enum.Font.BuilderSansBold
	TextLabelFPS.TextSize = 18
	
	local Frame4 = Instance.new("Frame", Frame2)
	local TextLabelPing = Instance.new("TextLabel", Frame4)
	local UICorner2 = Instance.new("UICorner", Frame4)
	Frame4.Size = UDim2.new(0, 96, 0, 44)
	Frame4.BackgroundColor3 = Color3.fromRGB(18, 18, 21)
	Frame4.BackgroundTransparency = 0.08
	UICorner2.CornerRadius = UDim.new(1, 0)
	TextLabelPing.Size = UDim2.new(1, 0, 1, 0)
	TextLabelPing.BackgroundTransparency = 1
	TextLabelPing.Font = Enum.Font.BuilderSansBold
	TextLabelPing.TextSize = 18

	local lastUpdate = 0
	RunService.RenderStepped:Connect(function(f)
		if tick() - lastUpdate >= 0.5 then
			lastUpdate = tick()
			local fps = 1/f
			TextLabelFPS.Text = string.format("%.1f", fps) .. " FPS"
			TextLabelFPS.TextColor3 = getColorForFPS(fps)
			
			local ping = 0
			pcall(function() ping = Stats.Network.ServerStatsItem["Data Ping"]:GetValue() end)
			TextLabelPing.Text = math.floor(ping) .. " ms"
			TextLabelPing.TextColor3 = getColorForPing(ping)
		end
	end)
end

pcall(function()
	local parentHolder = Players.LocalPlayer.PlayerGui.TopbarStandard.Holders.Left
	
	local FrameFPS = Instance.new("Frame", parentHolder)
	local UICornerFPS = Instance.new("UICorner", FrameFPS)
	local TextLabelFPS = Instance.new("TextLabel", FrameFPS)
	FrameFPS.Size = UDim2.new(0, 96, 0, 44)
	FrameFPS.BackgroundColor3 = Color3.fromRGB(18, 18, 21)
	FrameFPS.BackgroundTransparency = 0.08
	UICornerFPS.CornerRadius = UDim.new(1, 0)
	TextLabelFPS.Size = UDim2.new(1, 0, 1, 0)
	TextLabelFPS.BackgroundTransparency = 1
	TextLabelFPS.Font = Enum.Font.BuilderSansBold
	TextLabelFPS.TextSize = 18
	
	local FramePing = Instance.new("Frame", parentHolder)
	local UICornerPing = Instance.new("UICorner", FramePing)
	local TextLabelPing = Instance.new("TextLabel", FramePing)
	FramePing.Size = UDim2.new(0, 96, 0, 44)
	FramePing.BackgroundColor3 = Color3.fromRGB(18, 18, 21)
	FramePing.BackgroundTransparency = 0.08
	UICornerPing.CornerRadius = UDim.new(1, 0)
	TextLabelPing.Size = UDim2.new(1, 0, 1, 0)
	TextLabelPing.BackgroundTransparency = 1
	TextLabelPing.Font = Enum.Font.BuilderSansBold
	TextLabelPing.TextSize = 18

	local lastUpdate = 0
	RunService.RenderStepped:Connect(function(f)
		if tick() - lastUpdate >= 0.5 then
			lastUpdate = tick()
			local fps = 1/f
			TextLabelFPS.Text = string.format("%.1f", fps) .. " FPS"
			TextLabelFPS.TextColor3 = getColorForFPS(fps)
			
			local ping = 0
			pcall(function() ping = Stats.Network.ServerStatsItem["Data Ping"]:GetValue() end)
			TextLabelPing.Text = math.floor(ping) .. " ms"
			TextLabelPing.TextColor3 = getColorForPing(ping)
		end
	end)
end)

Comments

Comments section coming soon...

Frequently Asked Questions

To use this script, you need a Roblox Executor. Simply copy the script from this page, paste it into your executor, and run it while you are in the Universal game.

This script may require a payment or subscription. Please check the script's description for more details.

Yes, this script has a key system. You may need to complete a task or join a Discord server to get a key.

Yes, this script is designed to be compatible with mobile executors.

Similar Scripts

Share Script

Share this script with others by copying the link or using your device's share options.

https://rbxscripts.net/scripts/fps-counter/
or

Report Script

Help us maintain a safe community. Your report will be reviewed by our moderation team and appropriate action will be taken if needed.

Select a reason...
Malicious Code
Inappropriate Content
Copyright Infringement
Spam
Misleading Information
Other