Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- FPS Counter – Bottom Line Full Text Visible
- -- Place this LocalScript in StarterPlayerScripts or StarterGui.
- --== SERVICES =================================================================
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- --== PLAYER & GUI SETUP ========================================================
- local player = Players.LocalPlayer
- local playerGui = player:WaitForChild("PlayerGui")
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "FPSCounterGui"
- screenGui.ResetOnSpawn = false
- screenGui.IgnoreGuiInset = true
- screenGui.Parent = playerGui
- --== EMOJI LABEL ======================================================
- local emoji = Instance.new("TextLabel")
- emoji.Name = "Emoji"
- emoji.Size = UDim2.new(0, 26, 0, 26)
- emoji.AnchorPoint = Vector2.new(0, 1)
- emoji.Position = UDim2.new(0.5, -190, 1, -10)
- emoji.BackgroundTransparency = 1
- emoji.Text = "😂"
- emoji.TextScaled = true
- emoji.Font = Enum.Font.SourceSansBold
- emoji.TextColor3 = Color3.fromRGB(0, 255, 0)
- emoji.Parent = screenGui
- --== FPS LABEL ============================================================
- local fpsLabel = Instance.new("TextLabel")
- fpsLabel.Name = "FPSLabel"
- fpsLabel.AnchorPoint = Vector2.new(0, 1)
- fpsLabel.Position = UDim2.new(0.5, -155, 1, -10)
- fpsLabel.Size = UDim2.new(0, 80, 0, 26)
- fpsLabel.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- fpsLabel.BorderSizePixel = 0
- fpsLabel.Text = "FPS: --"
- fpsLabel.TextColor3 = Color3.fromRGB(0, 255, 0)
- fpsLabel.Font = Enum.Font.SourceSansBold
- fpsLabel.TextScaled = true
- fpsLabel.Parent = screenGui
- local corner = Instance.new("UICorner", fpsLabel)
- corner.CornerRadius = UDim.new(0, 6)
- --== MESSAGE BOX =======================================================
- local messageBox = Instance.new("TextLabel")
- messageBox.Name = "MessageBox"
- messageBox.AnchorPoint = Vector2.new(0, 1)
- messageBox.Position = UDim2.new(0.5, -65, 1, -10)
- messageBox.Size = UDim2.new(0, 300, 0, 26)
- messageBox.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- messageBox.BorderSizePixel = 0
- messageBox.Text = "FPS is good"
- messageBox.TextColor3 = Color3.fromRGB(0, 255, 0)
- messageBox.Font = Enum.Font.SourceSansBold
- messageBox.TextScaled = true
- messageBox.Parent = screenGui
- local messageBoxCorner = Instance.new("UICorner", messageBox)
- messageBoxCorner.CornerRadius = UDim.new(0, 6)
- --== FPS CALCULATION ===========================================================
- local frameCount = 0
- local lastTime = tick()
- local rotation = 0
- RunService.RenderStepped:Connect(function()
- frameCount += 1
- if tick() - lastTime >= 1 then
- local fps = frameCount
- fpsLabel.Text = ("FPS: %d"):format(fps)
- if fps >= 60 then
- fpsLabel.TextColor3 = Color3.fromRGB(0, 255, 0)
- emoji.Text = "😂"
- emoji.TextColor3 = Color3.fromRGB(0, 255, 0)
- messageBox.Text = "FPS is good"
- messageBox.TextColor3 = Color3.fromRGB(0, 255, 0)
- elseif fps >= 30 then
- fpsLabel.TextColor3 = Color3.fromRGB(255, 170, 0)
- emoji.Text = "😅"
- emoji.TextColor3 = Color3.fromRGB(255, 170, 0)
- messageBox.Text = "Medium FPS - Possible minor lag"
- messageBox.TextColor3 = Color3.fromRGB(255, 170, 0)
- else
- fpsLabel.TextColor3 = Color3.fromRGB(255, 0, 0)
- emoji.Text = "💀"
- emoji.TextColor3 = Color3.fromRGB(255, 0, 0)
- messageBox.Text = "Low FPS - High graphics or many players"
- messageBox.TextColor3 = Color3.fromRGB(255, 0, 0)
- end
- frameCount = 0
- lastTime = tick()
- end
- -- Spin emoji
- rotation += 3
- emoji.Rotation = rotation % 360
- end)
- print("[FPSCounter] Loaded ✔ – adjusted for full visibility")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement