-- s, Server
local RunService = game:GetService("RunService")
local iTick
local iCPUStart
local iCPUTime
local iPhysicsTime
while true do
iTick = 60
iCPUStart = os.clock()
while iTick > do
RunService.Heartbeat:Wait()
iTick -= 1
end
iCPUTime = math.round(((1 - ((60 / (os.clock() - iCPUStart))) / 60)) * 100)
iPhysicsTime = math.round(((1 - (workspace:GetRealPhysicsFPS()) / 60)) * 100)
if iCPUTime + iPhysicsTime < 1 then
iCPUTime = 0
elseif iCPUTime + iPhysicsTime > 100 then
iCPUTime = 100
else
iCPUTime += iPhysicsTime
end
workspace:SetAttribute("ServerCPULoadMeasure", iCPUTime)
end
To embed this project on your website, copy the following code and paste it into your website's HTML: