Advertisement
Azzz_4565

Untitled

Jun 24th, 2025
376
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 4.22 KB | None | 0 0
  1. -- FPS Counter – Bottom Line Full Text Visible
  2. -- Place this LocalScript in StarterPlayerScripts or StarterGui.
  3.  
  4. --== SERVICES =================================================================
  5. local Players     = game:GetService("Players")
  6. local RunService  = game:GetService("RunService")
  7.  
  8. --== PLAYER & GUI SETUP ========================================================
  9. local player      = Players.LocalPlayer
  10. local playerGui   = player:WaitForChild("PlayerGui")
  11.  
  12. local screenGui   = Instance.new("ScreenGui")
  13. screenGui.Name            = "FPSCounterGui"
  14. screenGui.ResetOnSpawn    = false
  15. screenGui.IgnoreGuiInset  = true
  16. screenGui.Parent          = playerGui
  17.  
  18. --== EMOJI LABEL ======================================================
  19. local emoji = Instance.new("TextLabel")
  20. emoji.Name                   = "Emoji"
  21. emoji.Size                   = UDim2.new(0, 26, 0, 26)
  22. emoji.AnchorPoint            = Vector2.new(0, 1)
  23. emoji.Position               = UDim2.new(0.5, -190, 1, -10)
  24. emoji.BackgroundTransparency = 1
  25. emoji.Text                   = "😂"
  26. emoji.TextScaled             = true
  27. emoji.Font                   = Enum.Font.SourceSansBold
  28. emoji.TextColor3             = Color3.fromRGB(0, 255, 0)
  29. emoji.Parent                 = screenGui
  30.  
  31. --== FPS LABEL ============================================================
  32. local fpsLabel = Instance.new("TextLabel")
  33. fpsLabel.Name               = "FPSLabel"
  34. fpsLabel.AnchorPoint        = Vector2.new(0, 1)
  35. fpsLabel.Position           = UDim2.new(0.5, -155, 1, -10)
  36. fpsLabel.Size               = UDim2.new(0, 80, 0, 26)
  37. fpsLabel.BackgroundColor3   = Color3.fromRGB(30, 30, 30)
  38. fpsLabel.BorderSizePixel    = 0
  39. fpsLabel.Text               = "FPS: --"
  40. fpsLabel.TextColor3         = Color3.fromRGB(0, 255, 0)
  41. fpsLabel.Font               = Enum.Font.SourceSansBold
  42. fpsLabel.TextScaled         = true
  43. fpsLabel.Parent             = screenGui
  44.  
  45. local corner = Instance.new("UICorner", fpsLabel)
  46. corner.CornerRadius = UDim.new(0, 6)
  47.  
  48. --== MESSAGE BOX =======================================================
  49. local messageBox = Instance.new("TextLabel")
  50. messageBox.Name               = "MessageBox"
  51. messageBox.AnchorPoint        = Vector2.new(0, 1)
  52. messageBox.Position           = UDim2.new(0.5, -65, 1, -10)
  53. messageBox.Size               = UDim2.new(0, 300, 0, 26)
  54. messageBox.BackgroundColor3   = Color3.fromRGB(50, 50, 50)
  55. messageBox.BorderSizePixel    = 0
  56. messageBox.Text               = "FPS is good"
  57. messageBox.TextColor3         = Color3.fromRGB(0, 255, 0)
  58. messageBox.Font               = Enum.Font.SourceSansBold
  59. messageBox.TextScaled         = true
  60. messageBox.Parent             = screenGui
  61.  
  62. local messageBoxCorner = Instance.new("UICorner", messageBox)
  63. messageBoxCorner.CornerRadius = UDim.new(0, 6)
  64.  
  65. --== FPS CALCULATION ===========================================================
  66. local frameCount = 0
  67. local lastTime   = tick()
  68. local rotation   = 0
  69.  
  70. RunService.RenderStepped:Connect(function()
  71.     frameCount += 1
  72.     if tick() - lastTime >= 1 then
  73.         local fps = frameCount
  74.         fpsLabel.Text = ("FPS: %d"):format(fps)
  75.  
  76.         if fps >= 60 then
  77.             fpsLabel.TextColor3 = Color3.fromRGB(0, 255, 0)
  78.             emoji.Text          = "😂"
  79.             emoji.TextColor3    = Color3.fromRGB(0, 255, 0)
  80.             messageBox.Text     = "FPS is good"
  81.             messageBox.TextColor3 = Color3.fromRGB(0, 255, 0)
  82.         elseif fps >= 30 then
  83.             fpsLabel.TextColor3 = Color3.fromRGB(255, 170, 0)
  84.             emoji.Text          = "😅"
  85.             emoji.TextColor3    = Color3.fromRGB(255, 170, 0)
  86.             messageBox.Text     = "Medium FPS - Possible minor lag"
  87.             messageBox.TextColor3 = Color3.fromRGB(255, 170, 0)
  88.         else
  89.             fpsLabel.TextColor3 = Color3.fromRGB(255, 0, 0)
  90.             emoji.Text          = "💀"
  91.             emoji.TextColor3    = Color3.fromRGB(255, 0, 0)
  92.             messageBox.Text     = "Low FPS - High graphics or many players"
  93.             messageBox.TextColor3 = Color3.fromRGB(255, 0, 0)
  94.         end
  95.  
  96.         frameCount = 0
  97.         lastTime = tick()
  98.     end
  99.  
  100.     -- Spin emoji
  101.     rotation += 3
  102.     emoji.Rotation = rotation % 360
  103. end)
  104.  
  105. print("[FPSCounter] Loaded ✔ – adjusted for full visibility")
  106.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement