local RunService = game:GetService("RunService") local Lighting = game:GetService("Lighting") -- Configurações local lowFPS = 25 -- abaixo disso ativa modo leve local highFPS = 50 -- acima disso ativa modo qualidade local checkInterval = 1 -- checar FPS a cada 1 segundo local fps = 60 local timer = 0 local mode = "normal" local function setLowQuality() if mode == "low" then return end mode = "low" -- Iluminação mais leve Lighting.GlobalShadows = false Lighting.EnvironmentSpecularScale = 0 Lighting.EnvironmentDiffuseScale = 0.2 settings().Rendering.QualityLevel = Enum.QualityLevel.Level01 -- Diminui partículas for _, v in ipairs(workspace:GetDescendants()) do if v:IsA("ParticleEmitter") or v:IsA("Beam") then v.Enabled = false end end print("⚠️ MODO DESEMPENHO ATIVADO (menos lag)") end local function setHighQuality() if mode == "high" then return end mode = "high" -- Iluminação bonita Lighting.GlobalShadows = true Lighting.EnvironmentSpecularScale = 1 Lighting.EnvironmentDiffuseScale = 1 settings().Rendering.QualityLevel = Enum.QualityLevel.Automatic -- Ativa partículas for _, v in ipairs(workspace:GetDescendants()) do if v:IsA("ParticleEmitter") or v:IsA("Beam") then v.Enabled = true end end print("✨ MODO QUALIDADE ATIVADO (mais bonito)") end RunService.RenderStepped:Connect(function(dt) fps = 1 / dt timer += dt if timer >= checkInterval then timer = 0 if fps < lowFPS then setLowQuality() elseif fps > highFPS then setHighQuality() end end end)