Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local UserInputService = game:GetService("UserInputService")
- local Lighting = game:GetService("Lighting")
- local StarterGui = game:GetService("StarterGui")
- -- Создаем ScreenGui
- local screenGui = Instance.new("ScreenGui")
- screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- -- Создаем кнопку
- local button = Instance.new("TextButton")
- button.Size = UDim2.new(0, 200, 0, 50)
- button.Position = UDim2.new(0.5, -100, 0.5, -25)
- button.AnchorPoint = Vector2.new(0.5, 0.5)
- button.Text = "Toggle Graphics"
- button.Parent = screenGui
- local isLowGraphics = false
- local originalSettings = {
- Ambient = Lighting.Ambient,
- Brightness = Lighting.Brightness,
- GlobalShadows = Lighting.GlobalShadows,
- OutdoorAmbient = Lighting.OutdoorAmbient,
- Technology = Lighting.Technology,
- GraphicsQualityLevel = settings().Rendering.QualityLevel
- }
- local function setLowGraphics()
- Lighting.Ambient = Color3.new(0.5, 0.5, 0.5)
- Lighting.Brightness = 1
- Lighting.GlobalShadows = false
- Lighting.OutdoorAmbient = Color3.new(0.5, 0.5, 0.5)
- Lighting.Technology = Enum.Technology.Compatibility
- settings().Rendering.QualityLevel = Enum.QualityLevel.Level01
- StarterGui:SetCore("TopbarEnabled", false)
- end
- local function restoreGraphics()
- Lighting.Ambient = originalSettings.Ambient
- Lighting.Brightness = originalSettings.Brightness
- Lighting.GlobalShadows = originalSettings.GlobalShadows
- Lighting.OutdoorAmbient = originalSettings.OutdoorAmbient
- Lighting.Technology = originalSettings.Technology
- settings().Rendering.QualityLevel = originalSettings.GraphicsQualityLevel
- StarterGui:SetCore("TopbarEnabled", true)
- end
- button.MouseButton1Click:Connect(function()
- if isLowGraphics then
- restoreGraphics()
- else
- setLowGraphics()
- end
- isLowGraphics = not isLowGraphics
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement