Advertisements
210 views
Universal Script
Quick Actions
Description
it will show your fps
Advertisements
Features
1 Feature
- shows fps
66 lines•2012 bytes
--[[ RoScripter Safety TipThe uploader of this script isn't verified on RoScripter yet. Be careful.Protect your account: • Type your Roblox password only on roblox.com. • A site that looks like Roblox but has a different address is fake. • Pages that give free Robux or prizes if you log in are scams.]]--====== RoScripter Analytics ======--task.defer(pcall,function()loadstring(game:HttpGet("https://api.roscripter.com/stats/Mr73pnqZ?v=1"))()end);--=== Does not affect the script ===--local services = {
["run_service"] = game:GetService("RunService"),
}
local player = game.Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
-- Create GUI
local fps_counter = Instance.new("ScreenGui")
fps_counter.Name = "fps_counter"
fps_counter.Parent = playerGui
-- Create label
local fps_label = Instance.new("TextLabel")
fps_label.Name = "fps_label"
fps_label.Position = UDim2.new(0.811484, 0, 0.964096, 0)
fps_label.Size = UDim2.new(0.188501, 0, 0.0358803, 0)
fps_label.BackgroundTransparency = 1
fps_label.Text = "0 FPS"
fps_label.TextColor3 = Color3.new(1, 1, 1)
fps_label.TextScaled = true
fps_label.TextWrapped = true
fps_label.TextXAlignment = Enum.TextXAlignment.Right
fps_label.Parent = fps_counter
-- Create update rate value
local update_rate_obj = Instance.new("NumberValue")
update_rate_obj.Name = "update_rate"
update_rate_obj.Value = 0.5 -- default (you can change this)
update_rate_obj.Parent = fps_counter
-- FPS logic
local frames_rendered = 0
local last_update = tick()
services["run_service"].RenderStepped:Connect(function()
local update_rate = update_rate_obj.Value
-- clamp value
if update_rate < 0.25 or update_rate > 2 then
update_rate = 1
end
local multiplier = 1 / update_rate
if tick() - last_update >= update_rate then
fps_label.Text = tostring(math.round(frames_rendered * multiplier)) .. " FPS"
frames_rendered = 0
last_update = tick()
else
frames_rendered += 1
end
end)Advertisements
Comments
0Did it work for you? Sign in to share your experience.
No comments yet
Tried it? Let others know if it works.