Advertisement
Werick12

FPS MÁXIMO

Mar 5th, 2023
1,311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 10.28 KB | Source Code | 0 0
  1. -- CRIADOR (WERICK CARVALHO)
  2.  
  3.  
  4.  
  5.  
  6.  
  7. if not game:IsLoaded() then
  8.     repeat
  9.         task.wait()
  10.     until game:IsLoaded()
  11. end
  12. if not _G.Settings then
  13.     _G.Settings = {
  14.         Players = {
  15.             ["Ignore Me"] = true,
  16.             ["Ignore Others"] = true
  17.         },
  18.         Meshes = {
  19.             Destroy = false,
  20.             LowDetail = true -- No Longer Used (Will be removed in future update)
  21.         },
  22.         Images = {
  23.             Invisible = true,
  24.             LowDetail = false, -- No Longer Used (Will be removed in future update)
  25.             Destroy = false
  26.         },
  27.         Other = {
  28.             ["FPS Cap"] = 240 = true, -- Set this true to uncap FPS
  29.             ["No Particles"] = true,
  30.             ["No Camera Effects"] = true,
  31.             ["No Explosions"] = true, -- Not recommended for PVP games
  32.             ["No Clothes"] = true,
  33.             ["Low Water Graphics"] = true,
  34.             ["No Shadows"] = true,
  35.             ["Low Rendering"] = true,
  36.             ["Low Quality Parts"] = true
  37.         }
  38.     }
  39. end
  40. local Players, Lighting, StarterGui = game:GetService("Players"), game:GetService("Lighting"), game:GetService("StarterGui")
  41. local ME = Players.LocalPlayer
  42. local BadInstances = {"DataModelMesh", "FaceInstance", "ParticleEmitter", "Trail", "Smoke", "Fire", "Sparkles", "PostEffect", "Explosion", "Clothing", "BasePart"}
  43. local CanBeEnabled = {"ParticleEmitter", "Trail", "Smoke", "Fire", "Sparkles", "PostEffect"}
  44. local function PartOfCharacter(Instance)
  45.     for i, v in pairs(Players:GetPlayers()) do
  46.         if v ~= ME and v.Character and Instance:IsDescendantOf(v.Character) then
  47.             return true
  48.         end
  49.     end
  50.     return false
  51. end
  52. local function ReturnDescendants()
  53.     local Descendants = {}
  54.     WaitNumber = 5000
  55.     if _G.Settings.Players["Ignore Me"] and _G.Settings.Players["Ignore Others"] then
  56.         for i, v in pairs(game:GetDescendants()) do
  57.             if not v:IsDescendantOf(Players) and not PartOfCharacter(v) and not v:IsDescendantOf(ME.Character) then
  58.                 for i2, v2 in pairs(BadInstances) do
  59.                     if v:IsA(v2) then
  60.                         table.insert(Descendants, v)
  61.                     end
  62.                 end
  63.             end
  64.             if i == WaitNumber then
  65.                 task.wait()
  66.                 WaitNumber = WaitNumber + 5000
  67.             end
  68.         end
  69.     elseif _G.Settings.Players["Ignore Others"] then
  70.         for i, v in pairs(game:GetDescendants()) do
  71.             if not v:IsDescendantOf(Players) and not PartOfCharacter(v) then
  72.                 for i2, v2 in pairs(BadInstances) do
  73.                     if v:IsA(v2) then
  74.                         table.insert(Descendants, v)
  75.                     end
  76.                 end
  77.             end
  78.             if i == WaitNumber then
  79.                 task.wait()
  80.                 WaitNumber = WaitNumber + 5000
  81.             end
  82.         end
  83.     elseif _G.Settings.Players["Ignore Me"] then
  84.         for i, v in pairs(game:GetDescendants()) do
  85.             if not v:IsDescendantOf(Players) and not v:IsDescendantOf(ME.Character) then
  86.                 for i2, v2 in pairs(BadInstances) do
  87.                     if v:IsA(v2) then
  88.                         table.insert(Descendants, v)
  89.                     end
  90.                 end
  91.             end
  92.             if i == WaitNumber then
  93.                 task.wait()
  94.                 WaitNumber = WaitNumber + 5000
  95.             end
  96.         end
  97.     else
  98.         for i, v in pairs(game:GetDescendants()) do
  99.             if not v:IsDescendantOf(Players) then
  100.                 for i2, v2 in pairs(BadInstances) do
  101.                     if v:IsA(v2) then
  102.                         table.insert(Descendants, v)
  103.                     end
  104.                 end
  105.             end
  106.             if i == WaitNumber then
  107.                 task.wait()
  108.                 WaitNumber = WaitNumber + 5000
  109.             end
  110.         end
  111.     end
  112.     return Descendants
  113. end
  114. local function CheckIfBad(Instance)
  115.     if not Instance:IsDescendantOf(Players) and (_G.Settings.Players["Ignore Others"] and not PartOfCharacter(Instance) or not _G.Settings.Players["Ignore Others"]) and (_G.Settings.Players["Ignore Me"] and ME.Character and not Instance:IsDescendantOf(ME.Character) or not _G.Settings.Players["Ignore Me"]) --[[not PartOfCharacter(Instance)]] then
  116.         if Instance:IsA("DataModelMesh") then
  117.             if _G.Settings.Meshes.LowDetail then
  118.                 --sethiddenproperty(Instance, "LODX", Enum.LevelOfDetailSetting.Low)
  119.                 --sethiddenproperty(Instance, "LODY", Enum.LevelOfDetailSetting.Low)
  120.             elseif _G.Settings.Meshes.Destroy then
  121.                 Instance:Destroy()
  122.             end
  123.         elseif Instance:IsA("FaceInstance") then
  124.             if _G.Settings.Images.Invisible then
  125.                 Instance.Transparency = 1
  126.             elseif _G.Settings.Images.LowDetail then
  127.                 Instance.Shiny = 1
  128.             elseif _G.Settings.Images.Destroy then
  129.                 Instance:Destroy()
  130.             end
  131.         elseif table.find(CanBeEnabled, Instance.ClassName) then
  132.             if _G.Settings["No Particles"] or (_G.Settings.Other and _G.Settings.Other["No Particles"]) then
  133.                 Instance.Enabled = false
  134.             end
  135.         elseif Instance:IsA("PostEffect") and (_G.Settings["No Camera Effects"] or (_G.Settings.Other and _G.Settings.Other["No Camera Effects"])) then
  136.             Instance.Enabled = false
  137.         elseif Instance:IsA("Explosion") then
  138.             if _G.Settings["No Explosions"] or (_G.Settings.Other and _G.Settings.Other["No Explosions"]) then
  139.                 Instance.Visible = false
  140.             end
  141.         elseif Instance:IsA("Clothing") then
  142.             if _G.Settings["No Clothes"] or (_G.Settings.Other and _G.Settings.Other["No Clothes"]) then
  143.                 Instance:Destroy()
  144.             end
  145.         elseif Instance:IsA("BasePart") then
  146.             if _G.Settings["Low Quality Parts"] or (_G.Settings.Other and _G.Settings.Other["Low Quality Parts"]) then
  147.                 Instance.Material = Enum.Material.Plastic
  148.                 Instance.Reflectance = 0
  149.             end
  150.         end
  151.     end
  152. end
  153. StarterGui:SetCore("SendNotification", {
  154.     Text = "Carregando FPS Booster...",
  155.     Duration = math.huge,
  156.     Button1 = "Okay"
  157. })
  158. coroutine.wrap(pcall)(function()
  159.     if (_G.Settings["Low Water Graphics"] or (_G.Settings.Other and _G.Settings.Other["Low Water Graphics"])) then
  160.         if not workspace:FindFirstChildOfClass("Terrain") then
  161.             repeat
  162.                 task.wait()
  163.             until workspace:FindFirstChildOfClass("Terrain")
  164.         end
  165.         workspace:FindFirstChildOfClass("Terrain").WaterWaveSize = 0
  166.         workspace:FindFirstChildOfClass("Terrain").WaterWaveSpeed = 0
  167.         workspace:FindFirstChildOfClass("Terrain").WaterReflectance = 0
  168.         workspace:FindFirstChildOfClass("Terrain").WaterTransparency = 0
  169.         sethiddenproperty(workspace:FindFirstChildOfClass("Terrain"), "Decoration", false)
  170.         StarterGui:SetCore("SendNotification", {
  171.             Text = "Gráficos de Pouca Água Ativados",
  172.             Duration = 5,
  173.             Button1 = "Okay"
  174.         })
  175.         warn("Low Water Graphics Enabled")
  176.     end
  177. end)
  178. coroutine.wrap(pcall)(function()
  179.     if _G.Settings["No Shadows"] or (_G.Settings.Other and _G.Settings.Other["No Shadows"]) then
  180.         Lighting.GlobalShadows = false
  181.         Lighting.FogEnd = 9e9
  182.         sethiddenproperty(Lighting, "Technology", 2)
  183.         StarterGui:SetCore("SendNotification", {
  184.             Text = "Sem Sombras Habilitadas",q
  185.             Duration = 5,
  186.             Button1 = "Okay"
  187.         })
  188.         warn("No Shadows Enabled")
  189.     end
  190. end)
  191. coroutine.wrap(pcall)(function()
  192.     if _G.Settings["Low Rendering"] or (_G.Settings.Other and _G.Settings.Other["Low Rendering"]) then
  193.         settings().Rendering.QualityLevel = 3
  194.         StarterGui:SetCore("SendNotification", {
  195.             Text = "Baixa Renderização Habilitada",
  196.             Duration = 5,
  197.             Button1 = "Okay"
  198.         })
  199.         warn("Low Rendering Enabled")
  200.     end
  201. end)
  202. coroutine.wrap(pcall)(function()
  203.     if _G.Settings["FPS Cap"] or (_G.Settings.Other and _G.Settings.Other["FPS Cap"]) then
  204.         if setfpscap then
  205.             if type(_G.Settings["FPS Cap"] or (_G.Settings.Other and _G.Settings.Other["FPS Cap"])) == "string" or type(_G.Settings["FPS Cap"] or (_G.Settings.Other and _G.Settings.Other["FPS Cap"])) == "number" then
  206.                 setfpscap(tonumber(_G.Settings["FPS Cap"] or (_G.Settings.Other and _G.Settings.Other["FPS Cap"])))
  207.                 StarterGui:SetCore("SendNotification", {
  208.                     Text = "FPS limitado to " .. tostring(_G.Settings["FPS Cap"] or (_G.Settings.Other and _G.Settings.Other["FPS Cap"])),
  209.                     Duration = 5,
  210.                     Button1 = "Okay"
  211.                 })
  212.                 warn("FPS Capped to " .. tostring(_G.Settings["FPS Cap"] or (_G.Settings.Other and _G.Settings.Other["FPS Cap"])))
  213.             elseif _G.Settings["FPS Cap"] or (_G.Settings.Other and _G.Settings.Other["FPS Cap"]) == true then
  214.                 setfpscap(1e6)
  215.                 StarterGui:SetCore("SendNotification", {
  216.                     Text = "FPS Ilimitado",
  217.                     Duration = 5,
  218.                     Button1 = "Okay"
  219.                 })
  220.                 warn("FPS Ilimitado")
  221.             end
  222.         else
  223.             StarterGui:SetCore("SendNotification", {
  224.                 Text = "Limite de FPS Falhou",
  225.                 Duration = math.huge,
  226.                 Button1 = "Okay"
  227.             })
  228.             warn("FPS Cap Failed")
  229.         end
  230.     end
  231. end)
  232. local Descendants = ReturnDescendants()
  233. local WaitNumber = 500
  234. StarterGui:SetCore("SendNotification", {
  235.     Text = "Verificando " .. #Descendants .. " Instances...",
  236.     Duration = 15,
  237.     Button1 = "Okay"
  238. })
  239. warn("Verificando " .. #Descendants .. " Instances...")
  240. for i, v in pairs(Descendants) do
  241.     CheckIfBad(v)
  242.     if i == WaitNumber then
  243.         task.wait()
  244.         print("Carregado " .. i .. "/" .. #Descendants)
  245.         WaitNumber = WaitNumber + 500
  246.     end
  247. end
  248. StarterGui:SetCore("SendNotification", {
  249.     Text = "FPS Reforço Carregado!",
  250.     Duration = math.huge,
  251.     Button1 = "Okay"
  252. })
  253. warn("FPS Booster Carregado!")
  254. game.DescendantAdded:Connect(CheckIfBad)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement