AugusTH

Fps Counter

Nov 1st, 2023
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. repeat wait() until game:IsLoaded() wait(2)
  2. local ScreenGui = Instance.new("ScreenGui")
  3. local Fps = Instance.new("TextLabel")
  4. local Ping = Instance.new("TextLabel")
  5.  
  6. --Properties:
  7.  
  8. ScreenGui.Parent = game.CoreGui
  9. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  10.  
  11. Fps.Name = "Fps"
  12. Fps.Parent = ScreenGui
  13. Fps.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  14. Fps.BackgroundTransparency = 0.000
  15. Fps.BorderColor3 = Color3.fromRGB(255, 0, 0)
  16. Fps.Position = UDim2.new(0.786138654, 0, 0, 0)
  17. Fps.Size = UDim2.new(0, 125, 0, 25)
  18. Fps.Font = Enum.Font.SourceSans
  19. Fps.TextColor3 = Color3.fromRGB(255, 255, 255)
  20. Fps.TextScaled = true
  21. Fps.TextSize = 14.000
  22. Fps.TextWrapped = true
  23.  
  24. Fps.Active = true
  25. Fps.Draggable = true
  26.  
  27. Ping.Name = "Ping"
  28. Ping.Parent = ScreenGui
  29. Ping.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  30. Ping.BackgroundTransparency = 0.000
  31. Ping.BorderColor3 = Color3.fromRGB(255, 0, 0)
  32. Ping.Position = UDim2.new(0.6811241, 0, 0, 0)
  33. Ping.Size = UDim2.new(0, 125, 0, 25)
  34. Ping.Font = Enum.Font.SourceSans
  35. Ping.TextColor3 = Color3.fromRGB(253, 253, 253)
  36. Ping.TextScaled = true
  37. Ping.TextSize = 14.000
  38. Ping.TextWrapped = true
  39.  
  40. Ping.Active = true
  41. Ping.Draggable = true
  42.  
  43. -- Scripts:
  44.  
  45. local script = Instance.new('LocalScript', Fps)
  46. local RunService = game:GetService("RunService")
  47. RunService.RenderStepped:Connect(function(frame) -- This will fire every time a frame is rendered
  48. script.Parent.Text = ("FPS: "..math.round(1/frame))
  49. end)
  50.  
  51.  
  52. local script = Instance.new('LocalScript', Ping)
  53. local RunService = game:GetService("RunService")
  54. RunService.RenderStepped:Connect(function(ping)
  55. script.Parent.Text = ("Ping: " ..game:GetService("Stats").Network.ServerStatsItem["Data Ping"]:GetValueString(math.round(2/ping))) -- your ping
  56. end)
  57.  
  58. game.StarterGui:SetCore("SendNotification", {
  59. Title = "Credit to : Augus X";
  60. Text = "You Can Drag The Gui";
  61. Icon = "rbxassetid://12585776892";
  62. Duration = "6";
  63. })
Advertisement
Add Comment
Please, Sign In to add comment