Advertisement
ERROR_CODE

Graphic

Jan 18th, 2025
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.88 KB | None | 0 0
  1. local UserInputService = game:GetService("UserInputService")
  2. local Lighting = game:GetService("Lighting")
  3. local StarterGui = game:GetService("StarterGui")
  4.  
  5. -- Создаем ScreenGui
  6. local screenGui = Instance.new("ScreenGui")
  7. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  8.  
  9. -- Создаем кнопку
  10. local button = Instance.new("TextButton")
  11. button.Size = UDim2.new(0, 200, 0, 50)
  12. button.Position = UDim2.new(0.5, -100, 0.5, -25)
  13. button.AnchorPoint = Vector2.new(0.5, 0.5)
  14. button.Text = "Toggle Graphics"
  15. button.Parent = screenGui
  16.  
  17. local isLowGraphics = false
  18.  
  19. local originalSettings = {
  20.     Ambient = Lighting.Ambient,
  21.     Brightness = Lighting.Brightness,
  22.     GlobalShadows = Lighting.GlobalShadows,
  23.     OutdoorAmbient = Lighting.OutdoorAmbient,
  24.     Technology = Lighting.Technology,
  25.     GraphicsQualityLevel = settings().Rendering.QualityLevel
  26. }
  27.  
  28. local function setLowGraphics()
  29.     Lighting.Ambient = Color3.new(0.5, 0.5, 0.5)
  30.     Lighting.Brightness = 1
  31.     Lighting.GlobalShadows = false
  32.     Lighting.OutdoorAmbient = Color3.new(0.5, 0.5, 0.5)
  33.     Lighting.Technology = Enum.Technology.Compatibility
  34.     settings().Rendering.QualityLevel = Enum.QualityLevel.Level01
  35.     StarterGui:SetCore("TopbarEnabled", false)
  36. end
  37.  
  38. local function restoreGraphics()
  39.     Lighting.Ambient = originalSettings.Ambient
  40.     Lighting.Brightness = originalSettings.Brightness
  41.     Lighting.GlobalShadows = originalSettings.GlobalShadows
  42.     Lighting.OutdoorAmbient = originalSettings.OutdoorAmbient
  43.     Lighting.Technology = originalSettings.Technology
  44.     settings().Rendering.QualityLevel = originalSettings.GraphicsQualityLevel
  45.     StarterGui:SetCore("TopbarEnabled", true)
  46. end
  47.  
  48. button.MouseButton1Click:Connect(function()
  49.     if isLowGraphics then
  50.         restoreGraphics()
  51.     else
  52.         setLowGraphics()
  53.     end
  54.     isLowGraphics = not isLowGraphics
  55. end)
  56.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement