Kembali

FPS & PING DISPLAY GUI

lua Uploaded by Neo 3 views 03 Jun 2026

Script FPS & Ping Display GUI ini berfungsi untuk menampilkan performa player secara realtime, yaitu jumlah FPS dan Ping langsung di layar. Script ini cocok digunakan untuk membantu developer mengecek performa game, mendeteksi lag, dan memberikan informasi koneksi kepada player. GUI dibuat otomatis melalui LocalScript, sehingga tidak perlu membuat interface manual di StarterGui. Cocok untuk game kompetitif, lobby, obby, hangout, roleplay, maupun project Roblox Studio yang membutuhkan indikator performa sederhana dan modern.

FPS & PING DISPLAY GUI LUA
--[[
	FPS & Ping Display GUI
	Author  : NEOBLOX
	License : MIT

	Description:
	Menampilkan FPS dan Ping player secara realtime di layar.
	Cocok untuk debugging performa, game kompetitif, lobby, dan map Roblox Studio.

	Place:
	StarterPlayer > StarterPlayerScripts > LocalScript
]]

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local Stats = game:GetService("Stats")

local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")

local screenGui = Instance.new("ScreenGui")
screenGui.Name = "FPSPingDisplay"
screenGui.ResetOnSpawn = false
screenGui.IgnoreGuiInset = true
screenGui.Parent = playerGui

local frame = Instance.new("Frame")
frame.Name = "Container"
frame.Size = UDim2.new(0, 170, 0, 62)
frame.Position = UDim2.new(0, 15, 0, 15)
frame.BackgroundColor3 = Color3.fromRGB(15, 18, 25)
frame.BackgroundTransparency = 0.15
frame.BorderSizePixel = 0
frame.Parent = screenGui

local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0, 10)
corner.Parent = frame

local stroke = Instance.new("UIStroke")
stroke.Color = Color3.fromRGB(0, 170, 255)
stroke.Thickness = 1.5
stroke.Transparency = 0.15
stroke.Parent = frame

local title = Instance.new("TextLabel")
title.Name = "Title"
title.Size = UDim2.new(1, -20, 0, 20)
title.Position = UDim2.new(0, 10, 0, 6)
title.BackgroundTransparency = 1
title.Text = "NEOBLOX PERFORMANCE"
title.TextColor3 = Color3.fromRGB(0, 200, 255)
title.TextSize = 11
title.Font = Enum.Font.GothamBold
title.TextXAlignment = Enum.TextXAlignment.Left
title.Parent = frame

local fpsLabel = Instance.new("TextLabel")
fpsLabel.Name = "FPSLabel"
fpsLabel.Size = UDim2.new(0.5, -10, 0, 25)
fpsLabel.Position = UDim2.new(0, 10, 0, 28)
fpsLabel.BackgroundTransparency = 1
fpsLabel.Text = "FPS: 0"
fpsLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
fpsLabel.TextSize = 15
fpsLabel.Font = Enum.Font.GothamSemibold
fpsLabel.TextXAlignment = Enum.TextXAlignment.Left
fpsLabel.Parent = frame

local pingLabel = Instance.new("TextLabel")
pingLabel.Name = "PingLabel"
pingLabel.Size = UDim2.new(0.5, -10, 0, 25)
pingLabel.Position = UDim2.new(0.5, 0, 0, 28)
pingLabel.BackgroundTransparency = 1
pingLabel.Text = "Ping: 0ms"
pingLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
pingLabel.TextSize = 15
pingLabel.Font = Enum.Font.GothamSemibold
pingLabel.TextXAlignment = Enum.TextXAlignment.Left
pingLabel.Parent = frame

local frames = 0
local lastTime = tick()
local currentFPS = 0

RunService.RenderStepped:Connect(function()
	frames += 1

	local now = tick()
	if now - lastTime >= 1 then
		currentFPS = frames
		frames = 0
		lastTime = now

		fpsLabel.Text = "FPS: " .. tostring(currentFPS)

		if currentFPS >= 50 then
			fpsLabel.TextColor3 = Color3.fromRGB(80, 255, 120)
		elseif currentFPS >= 30 then
			fpsLabel.TextColor3 = Color3.fromRGB(255, 210, 80)
		else
			fpsLabel.TextColor3 = Color3.fromRGB(255, 80, 80)
		end
	end
end)

task.spawn(function()
	while true do
		local ping = 0

		pcall(function()
			local networkStats = Stats.Network.ServerStatsItem
			ping = math.floor(networkStats["Data Ping"]:GetValue())
		end)

		pingLabel.Text = "Ping: " .. tostring(ping) .. "ms"

		if ping <= 100 then
			pingLabel.TextColor3 = Color3.fromRGB(80, 255, 120)
		elseif ping <= 200 then
			pingLabel.TextColor3 = Color3.fromRGB(255, 210, 80)
		else
			pingLabel.TextColor3 = Color3.fromRGB(255, 80, 80)
		end

		task.wait(1)
	end
end)