GaryScripts

Untitled

Mar 1st, 2021
787
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local FpsLabel = script.Parent
  2. local Heartbeat = game:GetService("RunService").Heartbeat
  3.  
  4. local LastIteration, Start
  5. local FrameUpdateTable = { }
  6.  
  7. local function HeartbeatUpdate()
  8.     LastIteration = tick()
  9.     for Index = #FrameUpdateTable, 1, -1 do
  10.         FrameUpdateTable[Index + 1] = (FrameUpdateTable[Index] >= LastIteration - 1) and FrameUpdateTable[Index] or nil
  11.     end
  12.  
  13.     FrameUpdateTable[1] = LastIteration
  14.     local CurrentFPS = (tick() - Start >= 1 and #FrameUpdateTable) or (#FrameUpdateTable / (tick() - Start))
  15.     CurrentFPS = math.floor(CurrentFPS)
  16.     FpsLabel.Text = CurrentFPS .. " FPS"
  17. end
  18.  
  19. Start = tick()
  20. wait(1)
  21. Heartbeat:Connect(HeartbeatUpdate)
  22.  
  23. --code made by randomStuffz
  24. --modified by kurt faircloth/kurtfan5468
  25.  
  26.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×