local screenGui = Instance.new("ScreenGui") screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 200, 0, 50) frame.Position = UDim2.new(0.5, -100, 0, 10) frame.BackgroundTransparency = 0.5 frame.BackgroundColor3 = Color3.new(0, 0, 0) frame.Parent = screenGui local textLabel = Instance.new("TextLabel") textLabel.Size = UDim2.new(1, 0, 1, 0) textLabel.Text = "FPS: 0" textLabel.TextColor3 = Color3.new(1, 1, 1) textLabel.BackgroundTransparency = 1 textLabel.Font = Enum.Font.SourceSansBold textLabel.TextSize = 24 textLabel.Parent = frame local lastTime = tick() local frameCount = 0 local fps = 0 local function updateColor() local time = tick() local r = math.sin(time * 1) * 0.5 + 0.5 local g = math.sin(time * 1.5) * 0.5 + 0.5 local b = math.sin(time * 2) * 0.5 + 0.5 textLabel.TextColor3 = Color3.new(r, g, b) end game:GetService("RunService").RenderStepped:Connect(function() frameCount = frameCount + 1 local currentTime = tick() if currentTime - lastTime >= 1 then fps = frameCount frameCount = 0 lastTime = currentTime textLabel.Text = "FPS: " .. fps end updateColor() end)