Guest User

FLEX YOUR FPS SCRIPT

a guest
Jul 31st, 2024
8,962
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.34 KB | Gaming | 1 0
  1. local OrionLib = loadstring(game:HttpGet('https://raw.githubusercontent.com/shlexware/Orion/main/source'))()
  2. local Window = OrionLib:MakeWindow({
  3.     Name = "Title of the Library",
  4.     HidePremium = false,
  5.     SaveConfig = true,
  6.     ConfigFolder = "OrionTest"
  7. })
  8.  
  9. local Tab = Window:MakeTab({
  10.     Name = "Main",
  11.     Icon = "rbxassetid://4483345998",
  12.     PremiumOnly = false
  13. })
  14.  
  15. getgenv().settings = {
  16.     minFPS = 0,
  17.     maxFPS = 3500,
  18.     interval = 1000
  19. }
  20.  
  21. local firing = false
  22. local backupScript = nil
  23.  
  24. local function destroyCounter()
  25.     local playerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  26.     local counter = playerGui:FindFirstChild("fps_counter") and playerGui.fps_counter:FindFirstChild("counter_main")
  27.     if counter then
  28.         backupScript = counter:Clone()
  29.         counter:Destroy()
  30.     end
  31. end
  32.  
  33. local function restoreCounter()
  34.     if backupScript then
  35.         backupScript.Parent = game.Players.LocalPlayer.PlayerGui.fps_counter
  36.         backupScript = nil
  37.     end
  38. end
  39.  
  40. local function startFiring()
  41.     spawn(function()
  42.         while firing do
  43.             game.ReplicatedStorage:WaitForChild("UpdateFPS"):FireServer(math.random(settings.minFPS, settings.maxFPS))
  44.             task.wait(settings.interval / 1000)
  45.         end
  46.     end)
  47. end
  48.  
  49. Tab:AddToggle({
  50.     Name = "Change Fps",
  51.     Default = false,
  52.     Callback = function(state)
  53.         firing = state
  54.         if firing then
  55.             destroyCounter()
  56.             startFiring()
  57.         else
  58.             restoreCounter()
  59.         end
  60.     end
  61. })
  62.  
  63. Tab:AddSlider({
  64.     Name = "Min FPS",
  65.     Min = 0,
  66.     Max = 3500,
  67.     Default = 0,
  68.     Color = Color3.fromRGB(255, 255, 255),
  69.     Increment = 1,
  70.     ValueName = "Min FPS",
  71.     Callback = function(value)
  72.         settings.minFPS = value
  73.     end
  74. })
  75.  
  76. Tab:AddSlider({
  77.     Name = "Max FPS",
  78.     Min = 0,
  79.     Max = 3500,
  80.     Default = 3500,
  81.     Color = Color3.fromRGB(255, 255, 255),
  82.     Increment = 1,
  83.     ValueName = "Max FPS",
  84.     Callback = function(value)
  85.         settings.maxFPS = value
  86.     end
  87. })
  88.  
  89. Tab:AddSlider({
  90.     Name = "Update Interval",
  91.     Min = 0,
  92.     Max = 1000,
  93.     Default = 100,
  94.     Color = Color3.fromRGB(255, 255, 255),
  95.     Increment = 1,
  96.     ValueName = "ms",
  97.     Callback = function(value)
  98.         settings.interval = value
  99.     end
  100. })
  101.  
  102. OrionLib:Init()
Advertisement
Add Comment
Please, Sign In to add comment