local player = game.Players.LocalPlayer local runService = game:GetService("RunService") local textLabel local function createUI() local screenGui = Instance.new("ScreenGui") screenGui.Name = "FPSPingDisplay" screenGui.Parent = player:WaitForChild("PlayerGui") textLabel = Instance.new("TextLabel") textLabel.Size = UDim2.new(0, 200, 0, 50) textLabel.Position = UDim2.new(0.5, -100, 0, 10) textLabel.AnchorPoint = Vector2.new(0.5, 0) textLabel.BackgroundTransparency = 1 textLabel.TextColor3 = Color3.fromRGB(255, 255, 255) textLabel.TextStrokeTransparency = 0 textLabel.Font = Enum.Font.SourceSansBold textLabel.TextSize = 24 textLabel.Text = "FPS: 0 | Ping: 0" textLabel.Parent = screenGui end local function updateStats() local fps = 0 local lastTime = tick() runService.RenderStepped:Connect(function() fps = math.floor(1 / (tick() - lastTime)) lastTime = tick() end) while true do local ping = math.floor(game:GetService("Stats").Network.ServerStatsItem["Data Ping"]:GetValue()) textLabel.Text = string.format("FPS: %d | Ping: %d ms", fps, ping) task.wait(1) end end createUI() task.spawn(updateStats)