RTX button issue

  1. What do you want to achieve?
    I have a RTX script, i want to make it so that it makes the script turn on after the button is pressed so what do i do to fix it
-- local Vignette = false


local Lighting = game:GetService("Lighting")
local StarterGui = game:GetService("StarterGui")
local Bloom = Instance.new("BloomEffect")
local Blur = Instance.new("BlurEffect")
local ColorCor = Instance.new("ColorCorrectionEffect")
local SunRays = Instance.new("SunRaysEffect")
local Sky = Instance.new("Sky")
local Atm = Instance.new("Atmosphere")


for i, v in pairs(Lighting:GetChildren()) do
    if v then
        v:Destroy()
    end
end

Bloom.Parent = Lighting
Blur.Parent = Lighting
ColorCor.Parent = Lighting
SunRays.Parent = Lighting
Sky.Parent = Lighting
Atm.Parent = Lighting

if Vignette == true then
    local Gui = Instance.new("ScreenGui")
    Gui.Parent = StarterGui
    Gui.IgnoreGuiInset = true
    
    local ShadowFrame = Instance.new("ImageLabel")
    ShadowFrame.Parent = Gui
    ShadowFrame.AnchorPoint = Vector2.new(0.5,1)
    ShadowFrame.Position = UDim2.new(0.5,0,1,0)
    ShadowFrame.Size = UDim2.new(1,0,1.05,0)
    ShadowFrame.BackgroundTransparency = 1
    ShadowFrame.Image = "rbxassetid://4576475446"
    ShadowFrame.ImageTransparency = 0.3
    ShadowFrame.ZIndex = 10
end

Bloom.Intensity = 0.3
Bloom.Size = 10
Bloom.Threshold = 0.8

Blur.Size = 5
ColorCor.Brightness = 0.1
ColorCor.Contrast = 0.5
ColorCor.Saturation = -0.3
ColorCor.TintColor = Color3.fromRGB(255, 235, 203)

SunRays.Intensity = 0.075
SunRays.Spread = 0.727

Sky.SkyboxBk = "http://www.roblox.com/asset/?id=151165214"
Sky.SkyboxDn = "http://www.roblox.com/asset/?id=151165197"
Sky.SkyboxFt = "http://www.roblox.com/asset/?id=151165224"
Sky.SkyboxLf = "http://www.roblox.com/asset/?id=151165191"
Sky.SkyboxRt = "http://www.roblox.com/asset/?id=151165206"
Sky.SkyboxUp = "http://www.roblox.com/asset/?id=151165227"
Sky.SunAngularSize = 10


Lighting.Ambient = Color3.fromRGB(2,2,2)
Lighting.Brightness = 2.25
Lighting.ColorShift_Bottom = Color3.fromRGB(0,0,0)
Lighting.ColorShift_Top = Color3.fromRGB(0,0,0)
Lighting.EnvironmentDiffuseScale = 0.2
Lighting.EnvironmentSpecularScale = 0.2
Lighting.GlobalShadows = true
Lighting.OutdoorAmbient = Color3.fromRGB(0,0,0)
Lighting.ShadowSoftness = 0.2
Lighting.ClockTime = 17
Lighting.GeographicLatitude = 45
Lighting.ExposureCompensation = 0.5

Atm.Density = 0.364
Atm.Offset = 0.556
Atm.Color = Color3.fromRGB(199, 175, 166)
Atm.Decay = Color3.fromRGB(44, 39, 33)
Atm.Glare = 0.36
Atm.Haze = 1.72

script:Destroy()
2 Likes

Put something like this at the top of your script:

GuiButton.MouseButton1Click:Wait()

GuiButton should be the button the user should click.

Hello, I’m an admin of RTX Enchancer (the script you’re using)
I already made a button for it, but it didn’t released yet, so while that, put a local script inside your gui button and write this (or copy)

(this wasn’t made for all games, so if you have a custom lightning, it can broke, if you need a custom script, send a message to me)

local active = false

script.Parent.MouseButton1Click:Connect(function()
	
	if active == false then
		
		active = true
		
		local Vignette = true



		local Lighting = game:GetService("Lighting")
		local StarterGui = game:GetService("StarterGui")
		local Bloom = Instance.new("BloomEffect")
		local Blur = Instance.new("BlurEffect")
		local ColorCor = Instance.new("ColorCorrectionEffect")
		local Sky = Instance.new("Sky")
		local Atm = Instance.new("Atmosphere")


		for i, v in pairs(Lighting:GetChildren()) do
			if v then
				v:Destroy()
			end
		end

		Bloom.Parent = Lighting
		Blur.Parent = Lighting
		ColorCor.Parent = Lighting
		Sky.Parent = Lighting
		Atm.Parent = Lighting

		if Vignette == true then
			local Gui = Instance.new("ScreenGui")
			Gui.Parent = StarterGui
			Gui.IgnoreGuiInset = true

			local ShadowFrame = Instance.new("ImageLabel")
			ShadowFrame.Parent = Gui
			ShadowFrame.AnchorPoint = Vector2.new(0.5,1)
			ShadowFrame.Position = UDim2.new(0.5,0,1,0)
			ShadowFrame.Size = UDim2.new(1,0,1.05,0)
			ShadowFrame.BackgroundTransparency = 1
			ShadowFrame.Image = "rbxassetid://4576475446"
			ShadowFrame.ImageTransparency = 0.3
			ShadowFrame.ZIndex = 10
		end

		Bloom.Intensity = 0.3
		Bloom.Size = 10
		Bloom.Threshold = 0.8

		Blur.Size = 5

		ColorCor.Brightness = 0.1
		ColorCor.Contrast = 0.5
		ColorCor.Saturation = -0.3
		ColorCor.TintColor = Color3.fromRGB(255, 235, 203)

		Sky.SkyboxBk = "http://www.roblox.com/asset/?id=151165214"
		Sky.SkyboxDn = "http://www.roblox.com/asset/?id=151165197"
		Sky.SkyboxFt = "http://www.roblox.com/asset/?id=151165224"
		Sky.SkyboxLf = "http://www.roblox.com/asset/?id=151165191"
		Sky.SkyboxRt = "http://www.roblox.com/asset/?id=151165206"
		Sky.SkyboxUp = "http://www.roblox.com/asset/?id=151165227"
		Sky.SunAngularSize = 10

		Lighting.Ambient = Color3.fromRGB(2,2,2)
		Lighting.Brightness = 2.25
		Lighting.ColorShift_Bottom = Color3.fromRGB(0,0,0)
		Lighting.ColorShift_Top = Color3.fromRGB(0,0,0)
		Lighting.EnvironmentDiffuseScale = 0.2
		Lighting.EnvironmentSpecularScale = 0.2
		Lighting.GlobalShadows = true
		Lighting.OutdoorAmbient = Color3.fromRGB(0,0,0)
		Lighting.ShadowSoftness = 0.2
		Lighting.ClockTime = 17
		Lighting.GeographicLatitude = 45
		Lighting.ExposureCompensation = 0.5

		Atm.Density = 0.364
		Atm.Offset = 0.556
		Atm.Color = Color3.fromRGB(199, 175, 166)
		Atm.Decay = Color3.fromRGB(44, 39, 33)
		Atm.Glare = 0.36
		Atm.Haze = 1.72
		
		script.Parent.Text = "Disable RTX enchancer"
		
	else
		
		active = false

		local Lighting = game:GetService("Lighting")
		local StarterGui = game:GetService("StarterGui")
		local Bloom = Instance.new("BloomEffect")
		local ColorCor = Instance.new("ColorCorrectionEffect")
		local sr = Instance.new("SunRaysEffect")
		local Sky = Instance.new("Sky")
		local Atm = Instance.new("Atmosphere")


		for i, v in pairs(Lighting:GetChildren()) do
			if v then
				v:Destroy()
			end
		end

		Bloom.Parent = Lighting
		ColorCor.Parent = Lighting
		sr.Parent = Lighting
		Sky.Parent = Lighting
		Atm.Parent = Lighting

		Bloom.Intensity = 1
		Bloom.Size = 13
		Bloom.Threshold = 2

		ColorCor.Brightness = 0
		ColorCor.Contrast = 0
		ColorCor.Saturation = 1
		ColorCor.TintColor = Color3.fromRGB(255, 255, 255)
		
		Sky.MoonTextureId = "rbxassetid://6444320592"
		Sky.SkyboxBk = "rbxassetid://6444884337"
		Sky.SkyboxDn = "rbxassetid://6444884785"
		Sky.SkyboxFt = "rbxassetid://6444884337"
		Sky.SkyboxLf = "rbxassetid://6444884337"
		Sky.SkyboxRt = "rbxassetid://6444884337"
		Sky.SkyboxUp = "rbxassetid://6412503613"
		Sky.SunAngularSize = 11

		Lighting.Ambient = Color3.fromRGB(70,70,70)
		Lighting.Brightness = 3
		Lighting.ColorShift_Bottom = Color3.fromRGB(0,0,0)
		Lighting.ColorShift_Top = Color3.fromRGB(0,0,0)
		Lighting.EnvironmentDiffuseScale = 1
		Lighting.EnvironmentSpecularScale = 1
		Lighting.GlobalShadows = true
		Lighting.OutdoorAmbient = Color3.fromRGB(70,70,70)
		Lighting.ShadowSoftness = 0
		Lighting.ClockTime = 12
		Lighting.GeographicLatitude = 0
		Lighting.ExposureCompensation = 0

		Atm.Density = 0.3
		Atm.Offset = 0.25
		Atm.Color = Color3.fromRGB(199, 199, 199)
		Atm.Decay = Color3.fromRGB(106, 112, 125)
		Atm.Glare = 0
		Atm.Haze = 1
		
		sr.Intensity = 0.01
		sr.Spread = 0.1
		
		script.Parent.Text = "Enable RTX enchancer"
		
	end
	
end)
1 Like

So pressing this can disable and enable it right?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.