Advertisement
scriptingtales

Roblox FPS displayer and checker

Mar 28th, 2024
786
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.96 KB | None | 0 0
  1. BillboardGui0 = Instance.new("BillboardGui", owner.Character.Head)
  2. TextLabel2 = Instance.new("TextLabel", BillboardGui0)
  3.  
  4.  
  5. BillboardGui0.Size = UDim2.new(0, 200, 0, 50)
  6. BillboardGui0.Active = true
  7. BillboardGui0.ClipsDescendants = true
  8. BillboardGui0.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  9. BillboardGui0.AlwaysOnTop = true
  10. BillboardGui0.MaxDistance = 42000000
  11. BillboardGui0.StudsOffset = Vector3.new(0, 2, 0)
  12.  
  13.  
  14.  
  15. TextLabel2.Size = UDim2.new(0, 200, 0, 50)
  16. TextLabel2.BackgroundColor = BrickColor.new("Institutional white")
  17. TextLabel2.BackgroundColor3 = Color3.new(1, 1, 1)
  18. TextLabel2.BackgroundTransparency = 1
  19. TextLabel2.BorderColor = BrickColor.new("Really black")
  20. TextLabel2.BorderColor3 = Color3.new(0, 0, 0)
  21. TextLabel2.BorderSizePixel = 0
  22. TextLabel2.Font = Enum.Font.SourceSansLight
  23. TextLabel2.FontSize = Enum.FontSize.Size14
  24. TextLabel2.Text = "0"
  25. TextLabel2.TextColor = BrickColor.new("Institutional white")
  26. TextLabel2.TextColor3 = Color3.new(1, 1, 1)
  27. TextLabel2.TextScaled = true
  28. TextLabel2.TextSize = 14
  29. TextLabel2.TextStrokeTransparency = 0
  30. TextLabel2.TextWrap = true
  31. TextLabel2.TextWrapped = true
  32.  
  33. RemoteEvent = Instance.new("RemoteEvent", owner.PlayerGui)
  34.  
  35.  
  36. local RunService = game:GetService("RunService")
  37.  
  38. RemoteEvent:FireClient(owner, TextLabel2)
  39. RemoteEvent.OnServerEvent:Connect(function(p, text)
  40.     if text >= 50 then
  41.         TextLabel2.TextColor3 = Color3.fromRGB(0, 255, 0)
  42.     end
  43.     if text < 50 then
  44.         TextLabel2.TextColor3 = Color3.fromRGB(255, 173, 51)
  45.     end
  46.     if text < 30 then
  47.         TextLabel2.TextColor3 = Color3.fromRGB(255, 0, 0)
  48.     end
  49.     if text > 65 then
  50.         TextLabel2.TextColor3 = Color3.fromRGB(46, 145, 255)
  51.     end
  52.     TextLabel2.Text = text .." FPS"
  53. end)
  54.  
  55.  
  56.  
  57. NLS([[
  58.  
  59.  
  60. local remt = script.Parent.RemoteEvent
  61. local RunService = game:GetService("RunService")
  62. remt.OnClientEvent:Connect(function(fps)
  63.     RunService.RenderStepped:Connect(function()
  64.         fps = math.floor(1 / RunService.RenderStepped:Wait())
  65.         remt:FireServer(fps)
  66.     end)
  67. end)]])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement