fps = 0 time = os.time() while true do if os.time() - time > 1 then print (fps) fps = 0 time = os.time() end fps = fps + 1 end