local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") -- GUI Setup local screenGui = Instance.new("ScreenGui") screenGui.Name = "FPSPingCounter" screenGui.ResetOnSpawn = false screenGui.Parent = playerGui local mainFrame = Instance.new("Frame") mainFrame.Size = UDim2.new(0, 130, 0, 30) mainFrame.Position = UDim2.new(0.8, 0, 0, 50) mainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25) mainFrame.BackgroundTransparency = 0.7 mainFrame.BorderSizePixel = 1 mainFrame.BorderColor3 = Color3.fromRGB(50, 50, 50) mainFrame.Parent = screenGui mainFrame.Active = true mainFrame.Draggable = true mainFrame.ClipsDescendants = true -- Add UICorner local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 10) corner.Parent = mainFrame -- FPS TextLabel local fpsLabel = Instance.new("TextLabel") fpsLabel.Size = UDim2.new(0.5, -5, 1, -10) fpsLabel.Position = UDim2.new(0, 5, 0, 5) fpsLabel.BackgroundTransparency = 1 fpsLabel.Text = "FPS: 0" fpsLabel.TextColor3 = Color3.new(1, 1, 1) fpsLabel.Font = Enum.Font.Code fpsLabel.TextSize = 15 fpsLabel.TextXAlignment = Enum.TextXAlignment.Left fpsLabel.Parent = mainFrame -- PING TextLabel local pingLabel = Instance.new("TextLabel") pingLabel.Size = UDim2.new(0.5, -5, 1, -10) pingLabel.Position = UDim2.new(0.5, 5, 0, 5) pingLabel.BackgroundTransparency = 1 pingLabel.Text = "PING: 0" pingLabel.TextColor3 = Color3.new(1, 1, 1) pingLabel.Font = Enum.Font.Code pingLabel.TextSize = 15 pingLabel.TextXAlignment = Enum.TextXAlignment.Right pingLabel.Parent = mainFrame -- Dragging local dragging = false local dragInput, mousePos, framePos local function updateDrag(input) local delta = input.Position - mousePos mainFrame.Position = UDim2.new(0, framePos.X + delta.X, 0, framePos.Y + delta.Y) end mainFrame.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = true mousePos = input.Position framePos = mainFrame.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) mainFrame.InputChanged:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseMovement then dragInput = input end end) UserInputService.InputChanged:Connect(function(input) if input == dragInput and dragging then updateDrag(input) end end) -- Smooth FPS/PING update local displayedFPS = 0 local displayedPing = 0 local lastTime = tick() RunService.RenderStepped:Connect(function() local currentTime = tick() local fps = 1 / (currentTime - lastTime) lastTime = currentTime local ping = player:GetNetworkPing() * 1000 -- Smooth transition displayedFPS = displayedFPS + (fps - displayedFPS) * 0.1 displayedPing = displayedPing + (ping - displayedPing) * 0.1 fpsLabel.Text = string.format("FPS: %d", math.floor(displayedFPS)) pingLabel.Text = string.format("PING: %d", math.floor(displayedPing)) -- FPS color if displayedFPS <= 25 then fpsLabel.TextColor3 = Color3.fromRGB(255, 0, 0) elseif displayedFPS <= 40 then fpsLabel.TextColor3 = Color3.fromRGB(255, 255, 0) else fpsLabel.TextColor3 = Color3.fromRGB(0, 255, 0) end -- PING color if displayedPing <= 150 then pingLabel.TextColor3 = Color3.fromRGB(0, 255, 0) elseif displayedPing <= 250 then pingLabel.TextColor3 = Color3.fromRGB(255, 255, 0) else pingLabel.TextColor3 = Color3.fromRGB(255, 0, 0) end end)