Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Part0 = Instance.new("Part")
- SurfaceGui1 = Instance.new("SurfaceGui")
- TextLabel2 = Instance.new("TextBox")
- TextLabel3 = Instance.new("TextBox")
- TextLabel4 = Instance.new("TextBox")
- Part0.Parent = script
- Part0.CFrame = CFrame.new(0, 8.08998775, -19.2699966, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part0.Position = Vector3.new(0, 8.08998775, -19.2699966)
- Part0.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Part0.Size = Vector3.new(20, 10, 2)
- Part0.Anchored = true
- Part0.BottomSurface = Enum.SurfaceType.Smooth
- Part0.BrickColor = BrickColor.new("Really black")
- Part0.CanCollide = false
- Part0.Locked = true
- Part0.Material = Enum.Material.SmoothPlastic
- Part0.TopSurface = Enum.SurfaceType.Smooth
- Part0.brickColor = BrickColor.new("Really black")
- SurfaceGui1.Parent = Part0
- SurfaceGui1.LightInfluence = 1
- SurfaceGui1.Face = Enum.NormalId.Back
- SurfaceGui1.ClipsDescendants = true
- SurfaceGui1.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- SurfaceGui1.Adornee = Part0
- TextLabel2.Name = "fps"
- TextLabel2.Parent = SurfaceGui1
- TextLabel2.Size = UDim2.new(1, 0, 0.330000013, 0)
- TextLabel2.BackgroundColor = BrickColor.new("Institutional white")
- TextLabel2.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel2.BackgroundTransparency = 1
- TextLabel2.Font = Enum.Font.SourceSans
- TextLabel2.FontSize = Enum.FontSize.Size96
- TextLabel2.Text = "N/A"
- TextLabel2.TextColor = BrickColor.new("Institutional white")
- TextLabel2.TextColor3 = Color3.new(1, 1, 1)
- TextLabel2.TextScaled = true
- TextLabel2.TextSize = 100
- TextLabel2.TextWrap = true
- TextLabel2.TextWrapped = true
- TextLabel3.Name = "memory"
- TextLabel3.Parent = SurfaceGui1
- TextLabel3.Position = UDim2.new(0, 0, 0.330000013, 0)
- TextLabel3.Size = UDim2.new(1, 0, 0.330000013, 0)
- TextLabel3.BackgroundColor = BrickColor.new("Institutional white")
- TextLabel3.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel3.BackgroundTransparency = 1
- TextLabel3.Font = Enum.Font.SourceSans
- TextLabel3.FontSize = Enum.FontSize.Size96
- TextLabel3.Text = "N/A"
- TextLabel3.TextColor = BrickColor.new("Institutional white")
- TextLabel3.TextColor3 = Color3.new(1, 1, 1)
- TextLabel3.TextScaled = true
- TextLabel3.TextSize = 100
- TextLabel3.TextWrap = true
- TextLabel3.TextWrapped = true
- TextLabel4.Name = "physicstep"
- TextLabel4.Parent = SurfaceGui1
- TextLabel4.Position = UDim2.new(0, 0, 0.660000026, 0)
- TextLabel4.Size = UDim2.new(1, 0, 0.330000013, 0)
- TextLabel4.BackgroundColor = BrickColor.new("Institutional white")
- TextLabel4.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel4.BackgroundTransparency = 1
- TextLabel4.Font = Enum.Font.SourceSans
- TextLabel4.FontSize = Enum.FontSize.Size96
- TextLabel4.Text = "N/A"
- TextLabel4.TextColor = BrickColor.new("Institutional white")
- TextLabel4.TextColor3 = Color3.new(1, 1, 1)
- TextLabel4.TextScaled = true
- TextLabel4.TextSize = 100
- TextLabel4.TextWrap = true
- TextLabel4.TextWrapped = true
- local p = Part0
- local stats = game:GetService("Stats")
- local fps = 60
- local memory = 0
- local physicstep = 0
- local _fps,_memory,_physicstep
- local cf = p.CFrame
- function update_p()
- --p.CFrame = cf
- game:GetService("TweenService"):Create(p,TweenInfo.new(0),{CFrame = cf}):Play()
- p.Size = Vector3.new(15,10,2)
- p.Parent = script
- p.CanCollide = false
- p.Anchored = true
- p.Locked = true
- p.Archivable = false
- end
- update_p()
- for i,v in pairs(p:GetDescendants()) do
- if v:IsA("SurfaceGui") then
- v.SizingMode = Enum.SurfaceGuiSizingMode.PixelsPerStud
- v.PixelsPerStud = 100
- elseif v.Name == 'fps' then
- _fps = v
- elseif v.Name == 'memory' then
- _memory = v
- elseif v.Name == 'physicstep' then
- _physicstep = v
- end
- end
- function change_color(cur,max,obj,mode)
- local r,g,b = 1,1,1
- if (cur > max) then
- cur = max
- end
- if mode == 1 then
- cur = cur/max
- elseif mode == 2 then
- cur = (max-cur)/max
- end
- r = cur
- g = g-r
- b = b-r
- obj.TextColor3 = Color3.new(r,g,b)
- --game:GetService("TweenService"):Create(obj,TweenInfo.new(1),{TextColor = Color3.new(r,g,b)}):Play()
- end
- local Count = 0
- local lastTime = os.time()
- local st = os.clock()
- local mem_limit = 6250
- game:GetService("RunService").Heartbeat:Connect(function(dt)
- local f = 1/dt
- if os.clock()-st >= 0.1 then st = os.clock() else return end
- fps = math.round(f*10)/10
- fps = math.clamp(fps,0,60)
- memory = stats:GetTotalMemoryUsageMb()
- memory = math.round(memory*10)/10
- physicstep = stats.PhysicsStepTimeMs
- physicstep = math.round(physicstep*1000)/1000
- _fps.Text = 'SERVER FPS: ' .. tostring(fps)
- _memory.Text = 'MEMORY(MB): ' .. tostring(memory) .. '/' .. mem_limit
- _physicstep.Text = 'PHYSICS STEP TIME(MS): ' .. tostring(physicstep)
- change_color(fps,60,_fps,2)
- change_color(memory,mem_limit,_memory,1)
- change_color(physicstep,5,_physicstep,1) -- ms
- update_p()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement