Zenith RTX Engine
Key RequiredUniversal

Zenith RTX Engine

Universal ScriptKanschkovRobloxAcc1KanschkovRobloxAcc1 679 views 3.7K executesUpdated Jul 8, 2026
5.0/ 5(1 votes)
10100% Positive
Lua Script•1863 lines (61191 chars)
-- =============================================================
-- ZENITH SYSTEM SHADER ENGINE v12.0 [ULTRA-OPTICS UPGRADE]
-- COMPATIBILITY: SOLARA CORE-GUI / GETHUI INDESTRUCTIBLE BYPASS
-- LAYOUT: FIXED ANTI-COLLAPSE COORDINATE MATRIX ENGINE
-- TOGGLE KEY: PRESS "INSERT" TO SHOW/HIDE INTERFACE
-- MODIFICATIONS: REALTIME WEATHER ENGINE, GAIT OPTICS, DYNAMIC COLOR CYCLING
-- SECURITY OPTIMIZATION: FIXED TOGGLE THREAD CRASH & SECTOR ALIGNMENT
-- =============================================================
-- =============================================================
-- SCRIPT LOAD INITIALIZATION BROADCAST (UNIVERSAL FIX)
-- =============================================================
task.spawn(function()
	-- Wait safely in the background until the game client is fully loaded
	if not game:IsLoaded() then
		game.Loaded:Wait()
	end
	
	local messageText = "[ZENITH SHADER]: Engine v1.5 (RELEASED) by Kanschkov loaded successfully! Press INSERT to toggle controls. Make sure your graphics is set to automatic or max for advanced lighting to work like sunrays."
	local messageColor = "rgb(147, 51, 234)" -- Signature purple in RichText format
	
	-- 1. Try Modern Roblox TextChatService Engine
	local TextChatService = game:GetService("TextChatService")
	if TextChatService and TextChatService.ChatVersion == Enum.ChatVersion.TextChatService then
		local systemChannel = TextChatService:FindFirstChild("TextChannels") and TextChatService.TextChannels:FindFirstChild("RBXSystem")
		if systemChannel then
			systemChannel:DisplaySystemMessage("<font color='"..messageColor.."'><b>" .. messageText .. "</b></font>")
			print("|| ZENITH SYSTEM SHADER ENGINE v12.0 INITIALIZED (MODERN CHAT) ||")
			return
		end
	end
	
	-- 2. Fallback to Old Legacy Chat Engine (SetCore)
	local success, err = pcall(function()
		game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", {
			Text = messageText;
			Color = Color3.fromRGB(147, 51, 234);
			Font = Enum.Font.GothamBold;
			TextSize = 13;
		})
	end)
	
	if success then
		print("|| ZENITH SYSTEM SHADER ENGINE v12.0 INITIALIZED (LEGACY CHAT) ||")
	else
		-- 3. Absolute Last Resort: Print to local F9 console if both chat systems fail/are disabled
		warn("|| ZENITH ENGINE LOADED // CHAT CHANNELS INACCESSIBLE ||")
	end
end)

-- Your original script continues below this line...
local TweenService = game:GetService("TweenService")
local Lighting = game:GetService("Lighting")
local Workspace = game:GetService("Workspace")
local Players = game:GetService("Players")
local UIS = game:GetService("UserInputService")
local MaterialService = game:GetService("MaterialService")
local CoreGui = game:GetService("CoreGui")
local RunService = game:GetService("RunService")

-- -------------------------------------------------------------
-- SECURITY INTERCEPT & STEALTH ATTACHMENT
-- -------------------------------------------------------------
local SafeParent = nil
if gethui then
	SafeParent = gethui()
elseif CoreGui then
	SafeParent = CoreGui
else
	SafeParent = Players.LocalPlayer:WaitForChild("PlayerGui")
end

if SafeParent:FindFirstChild("ZenithSolaraAbsolute") then
	SafeParent:FindFirstChild("ZenithSolaraAbsolute"):Destroy()
end

if SafeParent:FindFirstChild("ZenithCameraLensOverlay") then
	SafeParent:FindFirstChild("ZenithCameraLensOverlay"):Destroy()
end

-- -------------------------------------------------------------
-- ADVANCED POST-PROCESSING EFFECTS SCHEMATIC
-- -------------------------------------------------------------
local Terrain = Workspace:FindFirstChildOfClass("Terrain") or Workspace.Terrain
local CurrentCamera = Workspace.CurrentCamera

local function getOrCreateEffect(className, name, parentObj)
	local targetParent = parentObj or Lighting
	local effect = targetParent:FindFirstChild(name)
	if not effect then
		effect = Instance.new(className)
		effect.Name = name
		effect.Parent = targetParent
	end
	return effect
end

local ColorCorrection = getOrCreateEffect("ColorCorrectionEffect", "ZenithColor")
local Bloom = getOrCreateEffect("BloomEffect", "ZenithBloom")
local SunRays = getOrCreateEffect("SunRaysEffect", "ZenithRays")
local Atmosphere = getOrCreateEffect("Atmosphere", "ZenithAtmosphere")
local DepthOfField = getOrCreateEffect("DepthOfFieldEffect", "ZenithDOF")
local ScreenBlur = getOrCreateEffect("BlurEffect", "ZenithBlur")
local Clouds = getOrCreateEffect("Clouds", "ZenithClouds", Terrain)

-- Force High-End Graphics Foundation
Lighting.Technology = Enum.Technology.Future
Lighting.GlobalShadows = true
DepthOfField.Enabled = false
ScreenBlur.Size = 0
Clouds.Enabled = true

local function GetActiveSky()
	local activeSky = Lighting:FindFirstChildOfClass("Sky")
	if not activeSky then
		activeSky = Instance.new("Sky")
		activeSky.Parent = Lighting
	end
	return activeSky
end

-- Tracking Matrices & Optics Toggles
local windX = 20
local windZ = 10
local bobbingEnabled = false
local bobbingIntensity = 10
local bobbingSpeed = 10
local swayEnabled = false
local swayIntensity = 10
local dynamicFovEnabled = false

-- -------------------------------------------------------------
-- DYNAMIC WEATHER CORE ENGINE (PERFORMANCE OPTIMIZED)
-- -------------------------------------------------------------
local WeatherPart = Instance.new("Part")
WeatherPart.Name = "ZenithWeatherEnginePart"
WeatherPart.Size = Vector3.new(180, 1, 180)
WeatherPart.Transparency = 1
WeatherPart.CastShadow = false
WeatherPart.CanCollide = false
WeatherPart.CanTouch = false
WeatherPart.CanQuery = false
WeatherPart.Anchored = true
WeatherPart.Parent = CurrentCamera

local RainEmitter = Instance.new("ParticleEmitter")
RainEmitter.Name = "ZenithRain"
RainEmitter.Texture = "rbxassetid://9873099745"
RainEmitter.Size = NumberSequence.new(0.4)
RainEmitter.Transparency = NumberSequence.new(0.35)
RainEmitter.Lifetime = NumberRange.new(1.2, 1.8)
RainEmitter.Rate = 0
RainEmitter.Speed = NumberRange.new(50, 70)
RainEmitter.Acceleration = Vector3.new(0, -20, 0)
RainEmitter.EmissionDirection = Enum.NormalId.Bottom
RainEmitter.Orientation = Enum.ParticleOrientation.VelocityParallel
RainEmitter.Parent = WeatherPart

local SnowEmitter = Instance.new("ParticleEmitter")
SnowEmitter.Name = "ZenithSnow"
SnowEmitter.Texture = "rbxassetid://242337197"
SnowEmitter.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.25), NumberSequenceKeypoint.new(1, 0.55)})
SnowEmitter.Transparency = NumberSequence.new(0.15)
SnowEmitter.Lifetime = NumberRange.new(2.5, 4.0)
SnowEmitter.Rate = 0
SnowEmitter.Speed = NumberRange.new(10, 18)
SnowEmitter.Acceleration = Vector3.new(0, -2, 0)
SnowEmitter.VelocityInheritance = 0.2
SnowEmitter.SpreadAngle = Vector2.new(15, 15)
SnowEmitter.EmissionDirection = Enum.NormalId.Bottom
SnowEmitter.Parent = WeatherPart

-- -------------------------------------------------------------
-- HIGH-PRECISION SYNCHRONIZED RENDER PIPELINE
-- -------------------------------------------------------------
local tickCount = 0
local baseFov = 70

pcall(function() RunService:UnbindFromRenderStep("ZenithOpticsUpdate") end)

RunService:BindToRenderStep("ZenithOpticsUpdate", Enum.RenderPriority.Camera.Value + 1, function(deltaTime)
	local localPlayer = Players.LocalPlayer
	if localPlayer and localPlayer.Character and localPlayer.Character:FindFirstChild("HumanoidRootPart") then
		local rootPart = localPlayer.Character.HumanoidRootPart
		WeatherPart.CFrame = CFrame.new(rootPart.Position + Vector3.new(0, 45, 0))
		
		local isFirstPerson = (CurrentCamera.CFrame.Position - CurrentCamera.Focus.Position).Magnitude < 1.0
		if isFirstPerson then
			local velocity = rootPart.AssemblyLinearVelocity
			local speed = Vector3.new(velocity.X, 0, velocity.Z).Magnitude
			
			if speed > 1.5 and bobbingEnabled then
				tickCount = tickCount + deltaTime * (speed * (bobbingSpeed / 10) * 1.1)
				local modifierX = math.sin(tickCount * 0.5) * 0.045 * (bobbingIntensity / 10)
				local modifierY = math.abs(math.sin(tickCount)) * 0.065 * (bobbingIntensity / 10)
				local modifierZ = math.cos(tickCount * 0.5) * 0.006 * (bobbingIntensity / 10)
				CurrentCamera.CFrame = CurrentCamera.CFrame * CFrame.new(modifierX, modifierY, 0) * CFrame.Angles(0, 0, modifierZ)
			end
			
			if swayEnabled then
				local mouseDelta = UIS:GetMouseDelta()
				local lookSwayX = -mouseDelta.X * 0.00035 * (swayIntensity / 10)
				local lookSwayY = -mouseDelta.Y * 0.00035 * (swayIntensity / 10)
				CurrentCamera.CFrame = CurrentCamera.CFrame * CFrame.Angles(lookSwayY, lookSwayX, lookSwayX * 0.4)
			end
			
			if dynamicFovEnabled then
				local targetFov = baseFov + math.clamp(speed * 0.4, 0, 25)
				CurrentCamera.FieldOfView = CurrentCamera.FieldOfView + (targetFov - CurrentCamera.FieldOfView) * 0.1
			end
		end
	else
		WeatherPart.CFrame = CFrame.new(CurrentCamera.CFrame.Position + Vector3.new(0, 45, 0))
	end
end)

-- -------------------------------------------------------------
-- COLOR CYCLING REALTIME THREAD
-- -------------------------------------------------------------
local ActiveColorPickers = {}
local lastDiscoTick = 0
local currentDiscoColor = Color3.new(1, 1, 1)

RunService.RenderStepped:Connect(function()
	local t = tick()
	
	if t - lastDiscoTick > 0.1 then
		currentDiscoColor = Color3.fromRGB(math.random(0, 255), math.random(0, 255), math.random(0, 255))
		lastDiscoTick = t
	end

	for _, picker in ipairs(ActiveColorPickers) do
		if picker.Mode ~= "Static" then
			local targetColor = Color3.new(1, 1, 1)
			
			if picker.Mode == "Rainbow" then
				targetColor = Color3.fromHSV(t % 5 / 5, 1, 1)
			elseif picker.Mode == "Super Fast Rainbow" then
				targetColor = Color3.fromHSV(t % 0.5 / 0.5, 1, 1)
			elseif picker.Mode == "Chromatic" then
				targetColor = Color3.fromHSV((t % 10 / 10), 0.6, 1)
			elseif picker.Mode == "3Color" then
				local cycle = math.floor(t * 2) % 3
				if cycle == 0 then targetColor = Color3.fromRGB(255, 0, 0)
				elseif cycle == 1 then targetColor = Color3.fromRGB(0, 255, 0)
				else targetColor = Color3.fromRGB(0, 0, 255) end
			elseif picker.Mode == "4Color" then
				local cycle = math.floor(t * 2) % 4
				if cycle == 0 then targetColor = Color3.fromRGB(255, 0, 255)
				elseif cycle == 1 then targetColor = Color3.fromRGB(0, 255, 255)
				elseif cycle == 2 then targetColor = Color3.fromRGB(255, 255, 0)
				else targetColor = Color3.fromRGB(147, 51, 234) end
			elseif picker.Mode == "Disco" then
				targetColor = currentDiscoColor
			elseif picker.Mode == "Blinking" then
				if math.floor(t * 4) % 2 == 0 then
					targetColor = Color3.new(1, 1, 1)
				else
					targetColor = Color3.new(0, 0, 0)
				end
			end
			
			picker.Callback(targetColor)
		end
	end
end)

-- -------------------------------------------------------------
-- CAMERA OPTICS HUD OVERLAY SYSTEM
-- -------------------------------------------------------------
local CameraOverlayGui = Instance.new("ScreenGui")
CameraOverlayGui.Name = "ZenithCameraLensOverlay"
CameraOverlayGui.IgnoreGuiInset = true
CameraOverlayGui.ResetOnSpawn = false
CameraOverlayGui.Parent = SafeParent

local RingMask = Instance.new("Frame")
RingMask.Size = UDim2.new(1, 0, 1, 0)
RingMask.BackgroundTransparency = 1
RingMask.Visible = false
RingMask.Parent = CameraOverlayGui

local RingCorner = Instance.new("UICorner")
RingCorner.CornerRadius = UDim.new(1, 0)
RingCorner.Parent = RingMask

local function createBlocker(size, pos)
	local b = Instance.new("Frame")
	b.Size = size
	b.Position = pos
	b.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
	b.BorderSizePixel = 0
	b.Parent = RingMask
end
createBlocker(UDim2.new(0.25, 0, 1, 0), UDim2.new(0, 0, 0, 0))
createBlocker(UDim2.new(0.25, 0, 1, 0), UDim2.new(0.75, 0, 0, 0))

local GlitchText = Instance.new("TextLabel")
GlitchText.Size = UDim2.new(1, 0, 0, 50)
GlitchText.Position = UDim2.new(0, 30, 0, 30)
GlitchText.BackgroundTransparency = 1
GlitchText.Text = "REC ● LOSS OF SIGNAL // FEED_SEC_01"
GlitchText.TextColor3 = Color3.fromRGB(255, 255, 255)
GlitchText.Font = Enum.Font.Code
GlitchText.TextSize = 15
GlitchText.TextXAlignment = Enum.TextXAlignment.Left
GlitchText.Visible = false
GlitchText.Parent = CameraOverlayGui

local function ResetCameraFilters()
	RingMask.Visible = false
	GlitchText.Visible = false
	ColorCorrection.TintColor = Color3.fromRGB(255, 255, 255)
	ColorCorrection.Contrast = 0
	ColorCorrection.Saturation = 0
	ColorCorrection.Brightness = 0
	Lighting.OutdoorAmbient = Color3.fromRGB(128, 128, 128)
end

-- -------------------------------------------------------------
-- TOP-LEVEL CANVAS GENERATOR
-- -------------------------------------------------------------
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "ZenithSolaraAbsolute"
ScreenGui.ResetOnSpawn = false
ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
ScreenGui.IgnoreGuiInset = true
ScreenGui.DisplayOrder = 999999999
ScreenGui.Parent = SafeParent

local MainFrame = Instance.new("Frame")
MainFrame.Name = "MainFrame"
MainFrame.Size = UDim2.new(0, 520, 0, 570)
MainFrame.Position = UDim2.new(0.5, -260, 0.5, -285)
MainFrame.BackgroundColor3 = Color3.fromRGB(12, 12, 14)
MainFrame.BorderSizePixel = 0
MainFrame.Active = true
MainFrame.Visible = true
MainFrame.Parent = ScreenGui

local MainCorner = Instance.new("UICorner")
MainCorner.CornerRadius = UDim.new(0, 10)
MainCorner.Parent = MainFrame

local dragging = false
local dragInput = nil
local dragStart = nil
local startPos = nil

local function updateDrag(input)
	local delta = input.Position - dragStart
	MainFrame.Position = UDim2.new(
		startPos.X.Scale,
		startPos.X.Offset + delta.X,
		startPos.Y.Scale,
		startPos.Y.Offset + delta.Y
	)
end

MainFrame.InputBegan:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseButton1 then
		dragging = true
		dragStart = input.Position
		startPos = MainFrame.Position
		input.Changed:Connect(function()
			if input.UserInputState == Enum.UserInputState.End then
				dragging = false
			end
		end)
	end
end)

MainFrame.InputChanged:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseMovement then
		dragInput = input
	end
end)

UIS.InputChanged:Connect(function(input)
	if input == dragInput and dragging then
		updateDrag(input)
	end
end)

local uiVisible = true
UIS.InputBegan:Connect(function(input, gameProcessed)
	if input.KeyCode == Enum.KeyCode.Insert then
		uiVisible = not uiVisible
		MainFrame.Visible = uiVisible
		UIS.ModalEnabled = uiVisible
	end
end)
UIS.ModalEnabled = true

local Header = Instance.new("TextLabel")
Header.Size = UDim2.new(1, 0, 0, 45)
Header.BackgroundTransparency = 1
Header.Text = "  ZENITH ENGINE v12.0 // GAIT SIMULATION LAYER // [INS]"
Header.TextColor3 = Color3.fromRGB(147, 51, 234)
Header.TextXAlignment = Enum.TextXAlignment.Left
Header.Font = Enum.Font.GothamBold
Header.TextSize = 12
Header.Visible = true
Header.Parent = MainFrame

local Container = Instance.new("ScrollingFrame")
Container.Size = UDim2.new(1, -20, 1, -65)
Container.Position = UDim2.new(0, 10, 0, 55)
Container.BackgroundTransparency = 1
Container.ScrollBarThickness = 6
Container.ScrollBarImageColor3 = Color3.fromRGB(147, 51, 234)
Container.Visible = true
Container.Parent = MainFrame

-- -------------------------------------------------------------
-- ANTI-CRUSH GEOMETRIC SPACE MANAGER
-- -------------------------------------------------------------
local currentY = 10
local elementPadding = 12
local GlobalRandomizers = {} -- Storing references for the randomizer button

local function AllocateSpace(amount)
	currentY = currentY + amount + elementPadding
	Container.CanvasSize = UDim2.new(0, 0, 0, currentY + 20)
end

-- -------------------------------------------------------------
-- EXPLICIT CODE INTERFACE GENERATORS
-- -------------------------------------------------------------
local function CreateSectionHeader(text)
	local label = Instance.new("TextLabel")
	label.Size = UDim2.new(0, 460, 0, 25)
	label.Position = UDim2.new(0, 20, 0, currentY)
	label.BackgroundTransparency = 1
	label.Text = "--- " .. string.upper(text) .. " ---"
	label.TextColor3 = Color3.fromRGB(147, 51, 234)
	label.Font = Enum.Font.GothamBold
	label.TextSize = 11
	label.Visible = true
	label.Parent = Container

	AllocateSpace(25)
end

local function CreateSlider(labelName, min, max, default, callback)
	local sliderFrame = Instance.new("Frame")
	sliderFrame.Size = UDim2.new(0, 460, 0, 48)
	sliderFrame.Position = UDim2.new(0, 20, 0, currentY)
	sliderFrame.BackgroundColor3 = Color3.fromRGB(20, 20, 24)
	sliderFrame.BorderSizePixel = 0
	sliderFrame.Visible = true
	sliderFrame.Parent = Container

	local uic = Instance.new("UICorner")
	uic.CornerRadius = UDim.new(0, 4)
	uic.Parent = sliderFrame

	local title = Instance.new("TextLabel")
	title.Size = UDim2.new(0, 300, 0, 20)
	title.Position = UDim2.new(0, 12, 0, 4)
	title.BackgroundTransparency = 1
	title.Text = labelName .. ": " .. tostring(default)
	title.TextColor3 = Color3.fromRGB(224, 224, 230)
	title.Font = Enum.Font.Gotham
	title.TextSize = 11
	title.TextXAlignment = Enum.TextXAlignment.Left
	title.Visible = true
	title.Parent = sliderFrame

	local track = Instance.new("Frame")
	track.Size = UDim2.new(1, -24, 0, 6)
	track.Position = UDim2.new(0, 12, 0, 30)
	track.BackgroundColor3 = Color3.fromRGB(45, 45, 50)
	track.BorderSizePixel = 0
	track.Visible = true
	track.Parent = sliderFrame

	local fill = Instance.new("Frame")
	fill.Size = UDim2.new((default - min) / (max - min), 0, 1, 0)
	fill.BackgroundColor3 = Color3.fromRGB(147, 51, 234)
	fill.BorderSizePixel = 0
	fill.Visible = true
	fill.Parent = track

	local trigger = Instance.new("TextButton")
	trigger.Size = UDim2.new(1, 0, 1, 0)
	trigger.BackgroundTransparency = 1
	trigger.Text = ""
	trigger.Visible = true
	trigger.Parent = track

	local sliding = false
	local function updateSlider(input, forceVal)
		local finalVal = default
		if forceVal then
			finalVal = forceVal
			local relativeX = math.clamp((finalVal - min) / (max - min), 0, 1)
			fill.Size = UDim2.new(relativeX, 0, 1, 0)
		else
			local relativeX = math.clamp((input.Position.X - track.AbsolutePosition.X) / track.AbsoluteSize.X, 0, 1)
			fill.Size = UDim2.new(relativeX, 0, 1, 0)
			finalVal = math.floor(min + (relativeX * (max - min)))
		end
		title.Text = labelName .. ": " .. tostring(finalVal)
		callback(finalVal)
	end

	trigger.InputBegan:Connect(function(input)
		if input.UserInputType == Enum.UserInputType.MouseButton1 then
			sliding = true
			updateSlider(input)
		end
	end)
	trigger.InputEnded:Connect(function(input)
		if input.UserInputType == Enum.UserInputType.MouseButton1 then
			sliding = false
		end
	end)
	UIS.InputChanged:Connect(function(input)
		if sliding and input.UserInputType == Enum.UserInputType.MouseMovement then
			updateSlider(input)
		end
	end)

	-- Register for randomizer
	table.insert(GlobalRandomizers, function()
		updateSlider(nil, math.random(min, max))
	end)

	AllocateSpace(48)
end

local function CreateToggle(labelName, default, callback)
	local toggleFrame = Instance.new("Frame")
	toggleFrame.Size = UDim2.new(0, 460, 0, 38)
	toggleFrame.Position = UDim2.new(0, 20, 0, currentY)
	toggleFrame.BackgroundColor3 = Color3.fromRGB(20, 20, 24)
	toggleFrame.BorderSizePixel = 0
	toggleFrame.Visible = true
	toggleFrame.Parent = Container

	local uic = Instance.new("UICorner")
	uic.CornerRadius = UDim.new(0, 4)
	uic.Parent = toggleFrame

	local title = Instance.new("TextLabel")
	title.Size = UDim2.new(0, 300, 1, 0)
	title.Position = UDim2.new(0, 12, 0, 0)
	title.BackgroundTransparency = 1
	title.Text = labelName
	title.TextColor3 = Color3.fromRGB(224, 224, 230)
	title.Font = Enum.Font.Gotham
	title.TextSize = 11
	title.TextXAlignment = Enum.TextXAlignment.Left
	title.Visible = true
	title.Parent = toggleFrame

	local state = default
	local button = Instance.new("TextButton")
	button.Size = UDim2.new(0, 42, 0, 22)
	button.Position = UDim2.new(1, -54, 0.5, -11)
	button.BackgroundColor3 = state and Color3.fromRGB(147, 51, 234) or Color3.fromRGB(55, 55, 60)
	button.Text = ""
	button.Visible = true

	local btnCorner = Instance.new("UICorner")
	btnCorner.CornerRadius = UDim.new(0, 11)
	btnCorner.Parent = button
	button.Parent = toggleFrame

	local function toggleState(forceState)
		if forceState ~= nil then state = forceState else state = not state end
		local targetColor = state and Color3.fromRGB(147, 51, 234) or Color3.fromRGB(55, 55, 60)
		TweenService:Create(button, TweenInfo.new(0.2), {BackgroundColor3 = targetColor}):Play()
		callback(state)
	end

	button.MouseButton1Click:Connect(function() toggleState() end)

	table.insert(GlobalRandomizers, function()
		toggleState(math.random() > 0.5)
	end)

	AllocateSpace(38)
end

-- =============================================================
-- UPGRADED RGB PALETTE SYSTEM W/ DROPDOWN (FIXED Z-INDEX)
-- =============================================================
local function CreateRGBPalette(labelName, callback)
	local palFrame = Instance.new("Frame")
	palFrame.Size = UDim2.new(0, 460, 0, 95)
	palFrame.Position = UDim2.new(0, 20, 0, currentY)
	palFrame.BackgroundColor3 = Color3.fromRGB(20, 20, 24)
	palFrame.BorderSizePixel = 0
	palFrame.Visible = true
	palFrame.ZIndex = 1 -- Base ZIndex
	palFrame.Parent = Container

	local uic = Instance.new("UICorner")
	uic.CornerRadius = UDim.new(0, 4)
	uic.Parent = palFrame

	local title = Instance.new("TextLabel")
	title.Size = UDim2.new(0, 200, 0, 30)
	title.Position = UDim2.new(0, 12, 0, 5)
	title.BackgroundTransparency = 1
	title.Text = labelName
	title.TextColor3 = Color3.fromRGB(224, 224, 230)
	title.Font = Enum.Font.Gotham
	title.TextSize = 11
	title.TextXAlignment = Enum.TextXAlignment.Left
	title.Visible = true
	title.ZIndex = 2
	title.Parent = palFrame

	-- RGB Inputs
	local function makeValueBox(posX, placeholder)
		local box = Instance.new("TextBox")
		box.Size = UDim2.new(0, 80, 0, 26)
		box.Position = UDim2.new(0, posX, 0, 55)
		box.BackgroundColor3 = Color3.fromRGB(34, 34, 38)
		box.TextColor3 = Color3.fromRGB(255, 255, 255)
		box.Font = Enum.Font.Gotham
		box.TextSize = 11
		box.PlaceholderText = placeholder
		box.Text = ""
		box.Visible = true
		box.ZIndex = 2
		box.Parent = palFrame

		local boxCorner = Instance.new("UICorner")
		boxCorner.CornerRadius = UDim.new(0, 4)
		boxCorner.Parent = box
		return box
	end

	local rBox = makeValueBox(12, "R")
	local gBox = makeValueBox(102, "G")
	local bBox = makeValueBox(192, "B")

	-- Register picker into tracking table
	local pickerData = {
		Mode = "Static",
		Callback = callback
	}
	table.insert(ActiveColorPickers, pickerData)

	local function processChange()
		if pickerData.Mode ~= "Static" then return end
		local r = tonumber(rBox.Text) or 255
		local g = tonumber(gBox.Text) or 255
		local b = tonumber(bBox.Text) or 255
		callback(Color3.fromRGB(math.clamp(r, 0, 255), math.clamp(g, 0, 255), math.clamp(b, 0, 255)))
	end

	rBox.FocusLost:Connect(processChange)
	gBox.FocusLost:Connect(processChange)
	bBox.FocusLost:Connect(processChange)

	-- Dropdown UI Construction
	local dropOptions = {"Static", "Rainbow", "Chromatic", "3Color", "4Color", "Disco", "Super Fast Rainbow", "Blinking"}
	
	local dropBtn = Instance.new("TextButton")
	dropBtn.Size = UDim2.new(0, 160, 0, 26)
	dropBtn.Position = UDim2.new(1, -172, 0, 55)
	dropBtn.BackgroundColor3 = Color3.fromRGB(34, 34, 38)
	dropBtn.TextColor3 = Color3.fromRGB(147, 51, 234)
	dropBtn.Font = Enum.Font.GothamBold
	dropBtn.TextSize = 10
	dropBtn.Text = "Mode: Static ▼"
	dropBtn.ZIndex = 10
	dropBtn.Parent = palFrame

	local dropCorner = Instance.new("UICorner")
	dropCorner.CornerRadius = UDim.new(0, 4)
	dropCorner.Parent = dropBtn

	local dropList = Instance.new("ScrollingFrame")
	dropList.Size = UDim2.new(0, 160, 0, 120)
	dropList.Position = UDim2.new(1, -172, 0, 85)
	dropList.BackgroundColor3 = Color3.fromRGB(28, 28, 32)
	dropList.BorderSizePixel = 0
	dropList.ScrollBarThickness = 4
	dropList.ZIndex = 11
	dropList.Visible = false
	dropList.Parent = palFrame

	local listLayout = Instance.new("UIListLayout")
	listLayout.Parent = dropList

	for i, option in ipairs(dropOptions) do
		local optBtn = Instance.new("TextButton")
		optBtn.Size = UDim2.new(1, 0, 0, 25)
		optBtn.BackgroundColor3 = Color3.fromRGB(28, 28, 32)
		optBtn.TextColor3 = Color3.fromRGB(220, 220, 225)
		optBtn.Font = Enum.Font.Gotham
		optBtn.TextSize = 10
		optBtn.Text = option
		optBtn.ZIndex = 12
		optBtn.Parent = dropList

		optBtn.MouseButton1Click:Connect(function()
			pickerData.Mode = option
			dropBtn.Text = "Mode: " .. option .. " ▼"
			dropList.Visible = false
			palFrame.ZIndex = 1 -- Reset ZIndex when item is selected
			if option == "Static" then processChange() end
		end)
	end
	dropList.CanvasSize = UDim2.new(0, 0, 0, #dropOptions * 25)

	dropBtn.MouseButton1Click:Connect(function()
		dropList.Visible = not dropList.Visible
		if dropList.Visible then
			palFrame.ZIndex = 50 -- Bring entire container to the front when opened
		else
			palFrame.ZIndex = 1 -- Reset when closed without selecting
		end
	end)

	AllocateSpace(95)
end

local function CreateSkyIDInput(labelName, callback)
	local inputFrame = Instance.new("Frame")
	inputFrame.Size = UDim2.new(0, 460, 0, 45)
	inputFrame.Position = UDim2.new(0, 20, 0, currentY)
	inputFrame.BackgroundColor3 = Color3.fromRGB(20, 20, 24)
	inputFrame.BorderSizePixel = 0
	inputFrame.Visible = true
	inputFrame.Parent = Container

	local uic = Instance.new("UICorner")
	uic.CornerRadius = UDim.new(0, 4)
	uic.Parent = inputFrame

	local title = Instance.new("TextLabel")
	title.Size = UDim2.new(0, 130, 1, 0)
	title.Position = UDim2.new(0, 12, 0, 0)
	title.BackgroundTransparency = 1
	title.Text = labelName
	title.TextColor3 = Color3.fromRGB(224, 224, 230)
	title.Font = Enum.Font.Gotham
	title.TextSize = 11
	title.TextXAlignment = Enum.TextXAlignment.Left
	title.Visible = true
	title.Parent = inputFrame

	local box = Instance.new("TextBox")
	box.Size = UDim2.new(0, 210, 0, 26)
	box.Position = UDim2.new(0, 150, 0.5, -13)
	box.BackgroundColor3 = Color3.fromRGB(34, 34, 38)
	box.TextColor3 = Color3.fromRGB(255, 255, 255)
	box.Font = Enum.Font.Gotham
	box.TextSize = 11
	box.PlaceholderText = "Paste Asset ID Here..."
	box.Text = ""
	box.Visible = true
	box.Parent = inputFrame

	local boxCorner = Instance.new("UICorner")
	boxCorner.CornerRadius = UDim.new(0, 4)
	boxCorner.Parent = box

	local btn = Instance.new("TextButton")
	btn.Size = UDim2.new(0, 80, 0, 26)
	btn.Position = UDim2.new(0, 370, 0.5, -13)
	btn.BackgroundColor3 = Color3.fromRGB(147, 51, 234)
	btn.Text = "Inject"
	btn.TextColor3 = Color3.fromRGB(255, 255, 255)
	btn.Font = Enum.Font.GothamBold
	btn.TextSize = 11
	btn.Visible = true
	btn.Parent = inputFrame

	local btnCorner = Instance.new("UICorner")
	btnCorner.CornerRadius = UDim.new(0, 4)
	btnCorner.Parent = btn

	btn.MouseButton1Click:Connect(function()
		local text = box.Text
		local cleanedId = string.match(text, "%d+")
		if cleanedId then
			callback("rbxassetid://" .. cleanedId)
		else
			callback(text)
		end
	end)

	AllocateSpace(45)
end

local function CreatePresetBar(presetsTable)
	local bar = Instance.new("Frame")
	bar.Size = UDim2.new(0, 460, 0, 42)
	bar.Position = UDim2.new(0, 20, 0, currentY)
	bar.BackgroundTransparency = 1
	bar.BorderSizePixel = 0
	bar.Visible = true
	bar.Parent = Container

	local count = #presetsTable
	for i, preset in ipairs(presetsTable) do
		local btn = Instance.new("TextButton")
		btn.Size = UDim2.new(1 / count, -4, 1, 0)
		btn.Position = UDim2.new((i - 1) / count, 2, 0, 0)
		btn.BackgroundColor3 = Color3.fromRGB(28, 28, 32)
		btn.Text = preset.Name
		btn.TextColor3 = Color3.fromRGB(220, 220, 225)
		btn.Font = Enum.Font.GothamBold
		btn.TextSize = 10
		btn.Visible = true
		btn.Parent = bar

		local btnCorner = Instance.new("UICorner")
		btnCorner.CornerRadius = UDim.new(0, 4)
		btnCorner.Parent = btn

		btn.MouseButton1Click:Connect(preset.Callback)
	end

	AllocateSpace(42)
end

-- -------------------------------------------------------------
-- ADVANCED SKYBOX ENGINE AND EXTENDED DATA PRESETS
-- -------------------------------------------------------------
local function ApplySkyboxPreset(skyType)
	for _, obj in ipairs(Lighting:GetChildren()) do
		if obj:IsA("Sky") then
			obj:Destroy()
		end
	end

	local NewSky = Instance.new("Sky")
	NewSky.Parent = Lighting

	if skyType == "Sunny" then
		NewSky.SkyboxBk = "rbxassetid://64452140"
		NewSky.SkyboxDn = "rbxassetid://64452159"
		NewSky.SkyboxFt = "rbxassetid://64452331"
		NewSky.SkyboxLf = "rbxassetid://64452342"
		NewSky.SkyboxRt = "rbxassetid://64452357"
		NewSky.SkyboxUp = "rbxassetid://64452367"
		Lighting.ClockTime = 14
		Atmosphere.Density = 0.2
		Atmosphere.Haze = 0
		Atmosphere.Color = Color3.fromRGB(190, 190, 210)
		ColorCorrection.TintColor = Color3.fromRGB(255, 255, 255)
		ColorCorrection.Contrast = 0.1
		ColorCorrection.Saturation = 0.1
		Clouds.Cover = 0.3
		Clouds.Density = 0.4
		Clouds.Color = Color3.fromRGB(255, 255, 255)
	elseif skyType == "Sunset" then
		NewSky.SkyboxBk = "rbxassetid://600886026"
		NewSky.SkyboxDn = "rbxassetid://600886364"
		NewSky.SkyboxFt = "rbxassetid://600886592"
		NewSky.SkyboxLf = "rbxassetid://600886737"
		NewSky.SkyboxRt = "rbxassetid://600887143"
		NewSky.SkyboxUp = "rbxassetid://600887556"
		Lighting.ClockTime = 17.8
		Atmosphere.Density = 0.28
		Atmosphere.Haze = 1.2
		Atmosphere.Color = Color3.fromRGB(240, 110, 60)
		ColorCorrection.TintColor = Color3.fromRGB(255, 220, 200)
		ColorCorrection.Contrast = 0.15
		Clouds.Cover = 0.55
		Clouds.Density = 0.6
		Clouds.Color = Color3.fromRGB(245, 140, 90)
	elseif skyType == "Sunrise" then
		NewSky.SkyboxBk = "rbxassetid://490403120"
		NewSky.SkyboxDn = "rbxassetid://490403177"
		NewSky.SkyboxFt = "rbxassetid://490403254"
		NewSky.SkyboxLf = "rbxassetid://490403332"
		NewSky.SkyboxRt = "rbxassetid://490403426"
		NewSky.SkyboxUp = "rbxassetid://490403487"
		Lighting.ClockTime = 6.0
		Atmosphere.Density = 0.22
		Atmosphere.Haze = 1.4
		Atmosphere.Color = Color3.fromRGB(255, 160, 120)
		ColorCorrection.TintColor = Color3.fromRGB(255, 240, 210)
		Clouds.Cover = 0.4
		Clouds.Density = 0.5
		Clouds.Color = Color3.fromRGB(255, 200, 170)
	elseif skyType == "UltraReal" then
		NewSky.SkyboxBk = "rbxassetid://252760975"
		NewSky.SkyboxDn = "rbxassetid://252761339"
		NewSky.SkyboxFt = "rbxassetid://252761435"
		NewSky.SkyboxLf = "rbxassetid://252761499"
		NewSky.SkyboxRt = "rbxassetid://252761552"
		NewSky.SkyboxUp = "rbxassetid://252761655"
		Lighting.ClockTime = 12.5
		Atmosphere.Density = 0.24
		Atmosphere.Haze = 0.6
		Atmosphere.Color = Color3.fromRGB(200, 215, 230)
		ColorCorrection.Contrast = 0.25
		ColorCorrection.Saturation = 0.18
		Bloom.Intensity = 2.0
		Clouds.Cover = 0.65
		Clouds.Density = 0.7
		Clouds.Color = Color3.fromRGB(240, 242, 245)
	elseif skyType == "Toxic" then
		NewSky.SkyboxBk = "rbxassetid://1013531393"
		NewSky.SkyboxDn = "rbxassetid://1013531514"
		NewSky.SkyboxFt = "rbxassetid://1013531614"
		NewSky.SkyboxLf = "rbxassetid://1013531713"
		NewSky.SkyboxRt = "rbxassetid://1013531843"
		NewSky.SkyboxUp = "rbxassetid://1013531955"
		Lighting.ClockTime = 15.0
		Atmosphere.Density = 0.6
		Atmosphere.Haze = 4.0
		Atmosphere.Color = Color3.fromRGB(120, 180, 100)
		ColorCorrection.TintColor = Color3.fromRGB(180, 255, 160)
		ColorCorrection.Contrast = 0.1
		ColorCorrection.Saturation = -0.1
		Clouds.Cover = 0.8
		Clouds.Density = 0.85
		Clouds.Color = Color3.fromRGB(140, 190, 110)
	elseif skyType == "Blizzard" then
		NewSky.SkyboxBk = "rbxassetid://151153965"
		NewSky.SkyboxDn = "rbxassetid://151153968"
		NewSky.SkyboxFt = "rbxassetid://151153974"
		NewSky.SkyboxLf = "rbxassetid://151153977"
		NewSky.SkyboxRt = "rbxassetid://151153983"
		NewSky.SkyboxUp = "rbxassetid://151153987"
		Lighting.ClockTime = 8.0
		Atmosphere.Density = 0.75
		Atmosphere.Haze = 5.0
		Atmosphere.Color = Color3.fromRGB(230, 240, 255)
		ColorCorrection.TintColor = Color3.fromRGB(220, 230, 255)
		ColorCorrection.Saturation = -0.3
		Clouds.Cover = 0.95
		Clouds.Density = 0.95
		Clouds.Color = Color3.fromRGB(225, 230, 240)
	elseif skyType == "Cyberpunk" then
		Lighting.ClockTime = 21
		Atmosphere.Density = 0.4
		Atmosphere.Haze = 2.5
		Atmosphere.Color = Color3.fromRGB(30, 10, 45)
		ColorCorrection.TintColor = Color3.fromRGB(255, 170, 230)
		ColorCorrection.Contrast = 0.3
		ColorCorrection.Saturation = 0.4
		Bloom.Intensity = 4.0
		Clouds.Cover = 0.7
		Clouds.Density = 0.5
		Clouds.Color = Color3.fromRGB(200, 60, 180)
	elseif skyType == "Midnight" then
		Lighting.ClockTime = 0
		Atmosphere.Density = 0.1
		Atmosphere.Haze = 0.2
		Atmosphere.Color = Color3.fromRGB(5, 5, 15)
		ColorCorrection.TintColor = Color3.fromRGB(140, 160, 220)
		ColorCorrection.Contrast = 0.15
		ColorCorrection.Saturation = -0.05
		Clouds.Cover = 0.2
		Clouds.Density = 0.3
		Clouds.Color = Color3.fromRGB(20, 25, 40)
	elseif skyType == "Autumn" then
		Lighting.ClockTime = 16.5
		Atmosphere.Density = 0.35
		Atmosphere.Haze = 2.0
		Atmosphere.Color = Color3.fromRGB(165, 95, 45)
		ColorCorrection.TintColor = Color3.fromRGB(255, 210, 170)
		ColorCorrection.Contrast = 0.12
		ColorCorrection.Saturation = 0.25
		Clouds.Cover = 0.5
		Clouds.Density = 0.6
		Clouds.Color = Color3.fromRGB(210, 140, 95)
	end
end

-- -------------------------------------------------------------
-- PIPELINE GENERATION INITIALIZATION
-- -------------------------------------------------------------

CreateSectionHeader("Custom Interactive Skybox Injection")
CreateSkyIDInput("Custom Skybox Face ID", function(formattedId)
	local activeSky = GetActiveSky()
	activeSky.SkyboxBk = formattedId
	activeSky.SkyboxDn = formattedId
	activeSky.SkyboxFt = formattedId
	activeSky.SkyboxLf = formattedId
	activeSky.SkyboxRt = formattedId
	activeSky.SkyboxUp = formattedId
end)

CreateSectionHeader("Atmospheric Core Presets")
CreatePresetBar({
	{Name = "Sunny Day", Callback = function() ApplySkyboxPreset("Sunny") end},
	{Name = "Sunset View", Callback = function() ApplySkyboxPreset("Sunset") end},
	{Name = "Sunrise Glow", Callback = function() ApplySkyboxPreset("Sunrise") end}
})
CreatePresetBar({
	{Name = "Ultra RTX", Callback = function() ApplySkyboxPreset("UltraReal") end},
	{Name = "Toxic Waste", Callback = function() ApplySkyboxPreset("Toxic") end},
	{Name = "Blizzard Storm", Callback = function() ApplySkyboxPreset("Blizzard") end}
})
CreatePresetBar({
	{Name = "Cyber Neon", Callback = function() ApplySkyboxPreset("Cyberpunk") end},
	{Name = "Midnight Void", Callback = function() ApplySkyboxPreset("Midnight") end},
	{Name = "Autumn Eerie", Callback = function() ApplySkyboxPreset("Autumn") end}
})

-- PROCEDURAL GAIT OPTICS ENGINE LAYOUT
CreateSectionHeader("Procedural 1st Person Human Gait Engine")
CreateToggle("Enable Interactive Human Walking Bounce", false, function(state)
	bobbingEnabled = state
end)
CreateSlider("Walking Step Impact Amplitude", 1, 30, 10, function(val)
	bobbingIntensity = val
end)
CreateSlider("Walking Stride Pace Frequency", 1, 30, 10, function(val)
	bobbingSpeed = val
end)
CreateToggle("Enable Kinetic Look Head Sway", false, function(state)
	swayEnabled = state
end)
CreateSlider("Head Sway Inertial Momentum", 1, 30, 10, function(val)
	swayIntensity = val
end)
CreateToggle("Enable Dynamic Motion FOV Shift", false, function(state)
	dynamicFovEnabled = state
end)

-- DYNAMIC DAY TIME CONFIGURATIONS
CreateSectionHeader("Dynamic Day Configuration")
CreateSlider("Sun Size Scale", 0, 100, 11, function(val)
	local sky = GetActiveSky()
	sky.SunSize = val
end)
CreateSlider("Sun Halo Glare Size", 0, 100, 10, function(val)
	Atmosphere.Glare = val / 10
end)
CreateSlider("Sun Ray Dispersion Spread", 0, 100, 25, function(val)
	SunRays.Spread = val / 100
end)
CreateSlider("Solar Bloom Blur Intensity", 0, 100, 15, function(val)
	Bloom.Intensity = val / 10
end)

-- DYNAMIC NIGHT TIME CONFIGURATIONS
CreateSectionHeader("Dynamic Night Configuration")
CreateSlider("Amount of Stars Density", 0, 10000, 3000, function(val)
	local sky = GetActiveSky()
	sky.StarCount = val
end)
CreateSlider("Moon Size Scale", 0, 100, 11, function(val)
	local sky = GetActiveSky()
	sky.MoonSize = val
end)
CreateSlider("Moon Halo Haze Density", 0, 100, 20, function(val)
	Atmosphere.Haze = val / 10
end)
CreateSlider("Moonlit Global Brightness", 0, 50, 20, function(val)
	Lighting.Brightness = val / 10
end)

-- WEATHER SYSTEMS & REALTIME ENVIRONMENT CONTROLS
CreateSectionHeader("Weather & Seasonal Climate Simulator")
CreateSlider("Volumetric Rain Intensity", 0, 400, 0, function(val)
	RainEmitter.Rate = val
end)
CreateSlider("Volumetric Snow Intensity", 0, 300, 0, function(val)
	SnowEmitter.Rate = val
end)

CreatePresetBar({
	{Name = "Heavy Storm", Callback = function()
		Atmosphere.Density = 0.65
		Atmosphere.Haze = 3.5
		Atmosphere.Color = Color3.fromRGB(100, 110, 120)
		Lighting.ClockTime = 12
		Lighting.Brightness = 0.5
		Clouds.Cover = 0.85
		Clouds.Density = 0.9
		Clouds.Color = Color3.fromRGB(70, 75, 80)
		RainEmitter.Rate = 250
		SnowEmitter.Rate = 0
	end},
	{Name = "Sandstorm", Callback = function()
		Atmosphere.Density = 0.75
		Atmosphere.Haze = 5.0
		Atmosphere.Color = Color3.fromRGB(190, 140, 90)
		Lighting.ClockTime = 14
		Clouds.Cover = 0.60
		Clouds.Density = 0.75
		Clouds.Color = Color3.fromRGB(160, 120, 80)
		RainEmitter.Rate = 0
		SnowEmitter.Rate = 0
	end},
	{Name = "Fog Silent Hill", Callback = function()
		Atmosphere.Density = 0.95
		Atmosphere.Haze = 0.1
		Atmosphere.Color = Color3.fromRGB(210, 215, 220)
		Lighting.ClockTime = 7.5
		Clouds.Cover = 0.9
		Clouds.Density = 0.2
		RainEmitter.Rate = 0
		SnowEmitter.Rate = 0
	end}
})

-- ADVANCED CAMERA LAYOUT MODULES
CreateSectionHeader("Camera Lens Layout Profiles")
CreatePresetBar({
	{Name = "Default Optics", Callback = function()
		ResetCameraFilters()
	end},
	{Name = "Ring Camera (Circle)", Callback = function()
		ResetCameraFilters()
		RingMask.Visible = true
		ColorCorrection.TintColor = Color3.fromRGB(240, 245, 220)
		ColorCorrection.Contrast = 0.1
	end}
})

CreatePresetBar({
	{Name = "Thermal Matrix", Callback = function()
		ResetCameraFilters()
		ColorCorrection.TintColor = Color3.fromRGB(100, 100, 255)
		ColorCorrection.Contrast = 0.8
		ColorCorrection.Saturation = 0.5
		Lighting.OutdoorAmbient = Color3.fromRGB(255, 50, 50)
	end},
	{Name = "Security (B&W Glitch)", Callback = function()
		ResetCameraFilters()
		GlitchText.Visible = true
		ColorCorrection.Saturation = -1
		ColorCorrection.Contrast = 0.4
		
		task.spawn(function()
			while GlitchText.Visible do
				ColorCorrection.Brightness = math.random(-5, 12) / 100
				GlitchText.TextTransparency = math.random(0, 3) / 10
				task.wait(math.random(5, 15) / 100)
			end
		end)
	end}
})

-- PIPELINE VISIBILITY SUITE RE-ENGAGED
CreateSectionHeader("Advanced Camera Optics Suite")
CreateSlider("Camera Field of View (FOV)", 20, 120, 70, function(val)
	baseFov = val
	CurrentCamera.FieldOfView = val
end)
CreateSlider("Camera Max Zoom Distance", 10, 500, 400, function(val)
	local localPlayer = Players.LocalPlayer
	if localPlayer then
		localPlayer.CameraMaxZoomDistance = val
	end
end)
CreateSlider("Camera Near View Offset (Height)", -10, 20, 0, function(val)
	CurrentCamera.CameraOffset = Vector3.new(CurrentCamera.CameraOffset.X, val, CurrentCamera.CameraOffset.Z)
end)

-- CINEMATIC LUT GRADE ENGINE
CreateSectionHeader("Cinematic Grade Color Profiles")
CreatePresetBar({
	{Name = "Vintage Film", Callback = function()
		ColorCorrection.Contrast = 0.15
		ColorCorrection.Saturation = -0.15
		ColorCorrection.TintColor = Color3.fromRGB(255, 240, 210)
	end},
	{Name = "Horror Decay", Callback = function()
		ColorCorrection.Contrast = 0.35
		ColorCorrection.Saturation = -0.45
		ColorCorrection.TintColor = Color3.fromRGB(180, 195, 175)
	end},
	{Name = "Cyber Matrix", Callback = function()
		ColorCorrection.Contrast = 0.20
		ColorCorrection.Saturation = 0.35
		ColorCorrection.TintColor = Color3.fromRGB(190, 255, 200)
	end}
})

CreateSectionHeader("ULTRA ULTRA REALISM MODE ENGINE")
CreateToggle("Enable Uncapped Photorealism Pipeline", false, function(state)
	Terrain.Decoration = state
	MaterialService.Use2022Materials = state
	if state then
		Lighting.EnvironmentDiffuseScale = 1
		Lighting.EnvironmentSpecularScale = 1
		ColorCorrection.Contrast = 0.25
		ColorCorrection.Saturation = 0.15
		for _, part in ipairs(Workspace:GetDescendants()) do
			if part:IsA("BasePart") and part.Material == Enum.Material.SmoothPlastic then
				part.Material = Enum.Material.Concrete
			end
		end
	else
		Lighting.EnvironmentDiffuseScale = 0
		Lighting.EnvironmentSpecularScale = 0
	end
end)

-- SURFACE MATERIALS MATRIX
CreateSectionHeader("High Resolution Textures")
CreateToggle("Force Premium PBR Surface Materials", false, function(state)
	MaterialService.Use2022Materials = state
	for _, part in ipairs(Workspace:GetDescendants()) do
		if part:IsA("BasePart") and part.Material == Enum.Material.SmoothPlastic then
			if state then
				part.Material = Enum.Material.Concrete
			else
				part.Material = Enum.Material.SmoothPlastic
			end
		end
	end
end)

CreateSectionHeader("Volumetric Cloud Rendering Engine")
CreateToggle("Enable Volumetric Clouds Layer", true, function(state)
	Clouds.Enabled = state
end)
CreateSlider("Cloud Cover Space (Size)", 0, 100, 30, function(val)
	Clouds.Cover = val / 100
end)
CreateSlider("Cloud Opacity Thickness", 0, 100, 40, function(val)
	Clouds.Density = val / 100
end)
CreateRGBPalette("Clouds Particle Color Tint", function(color)
	Clouds.Color = color
end)

CreateSectionHeader("PBR Material & Environment Scales")
CreateSlider("Environment Diffuse Shading Scale", 0, 100, 100, function(val)
	Lighting.EnvironmentDiffuseScale = val / 100
end)
CreateSlider("Environment Specular Reflection Scale", 0, 100, 100, function(val)
	Lighting.EnvironmentSpecularScale = val / 100
end)

-- HYDRO-DYNAMIC WATER ENGINE
CreateSectionHeader("Hydro-Dynamic Water Engine")
CreateSlider("Water Wave Size Scale", 0, 100, 15, function(val)
	Terrain.WaterWaveSize = val / 100
end)
CreateSlider("Water Wave Velocity Speed", 0, 100, 20, function(val)
	Terrain.WaterWaveSpeed = val
end)
CreateSlider("Water Transparency Transparency", 0, 100, 30, function(val)
	Terrain.WaterTransparency = val / 100
end)
CreateSlider("Water Surface Reflectance Depth", 0, 100, 100, function(val)
	Terrain.WaterReflectance = val / 100
end)
CreateRGBPalette("Water Physical Color Tint", function(color)
	Terrain.WaterColor = color
end)

-- ENHANCED WIND MATRIX INTEGRATION
CreateSectionHeader("High Resolution Physical Shading Matrix")
CreateSlider("Wind Velocity Force (X-Axis)", -250, 250, 20, function(val)
	windX = val
	Workspace.GlobalWind = Vector3.new(windX, 0, windZ)
end)
CreateSlider("Wind Turbulence Strain (Z-Axis)", -250, 250, 10, function(val)
	windZ = val
	Workspace.GlobalWind = Vector3.new(windX, 0, windZ)
end)

-- COLOR SPECTRUM GENERATORS
CreateSectionHeader("Realtime Spectrum Tints (RGB)")
CreateRGBPalette("Fog Atmosphere Color Tint", function(color)
	Lighting.FogColor = color
	Atmosphere.Color = color
end)
CreateRGBPalette("World Outdoor Ambient Tone", function(color)
	Lighting.Ambient = color
	Lighting.OutdoorAmbient = color
end)
CreateRGBPalette("Screen Overlay Matrix Filter", function(color)
	ColorCorrection.TintColor = color
end)
CreateRGBPalette("Upper Sky Reflection Glow", function(color)
	Lighting.ColorShift_Top = color
end)
CreateRGBPalette("Lower Ground Ambient Shading", function(color)
	Lighting.ColorShift_Bottom = color
end)

-- ENVIRONMENTAL CONFIGURATOR
CreateSectionHeader("Environmental Density Controls")
CreateSlider("Fog Render Density Map", 0, 100, 20, function(val)
	Atmosphere.Density = val / 100
end)
CreateSlider("Atmosphere Haze Depth Line", 0, 100, 10, function(val)
	Atmosphere.Haze = val / 10
end)
CreateSlider("Engine Planetary Clock Time", 0, 24, 14, function(val)
	Lighting.ClockTime = val
end)
CreateSlider("Exposure Gain Compensation", 0, 200, 100, function(val)
	Lighting.ExposureCompensation = (val / 100) - 1
end)

-- CINEMATIC OPTICS FOCUS CONFIGURATOR
CreateSectionHeader("Cinematic Focal & Optics Layouts")
CreateToggle("Enable Geometric Focus Blur", false, function(state)
	DepthOfField.Enabled = state
end)
CreateSlider("Optics Focal Range Line", 1, 100, 30, function(val)
	DepthOfField.FocusDistance = val
end)
CreateSlider("In-Focus Boundary Radius", 1, 100, 10, function(val)
	DepthOfField.InFocusRadius = val
end)
CreateSlider("High-Key Bloom Spread Size", 1, 56, 15, function(val)
	Bloom.Size = val
end)
CreateSlider("Screen Radial Blur Intensity", 0, 100, 0, function(val)
	ScreenBlur.Size = val
end)

-- RTX MODES CONFIGURATOR
CreateSectionHeader("RTX Post Processing Profiles")
CreateToggle("Hyper Realistic Future Lighting", true, function(state)
	Lighting.GlobalShadows = state
	if state then
		Lighting.Technology = Enum.Technology.Future
	else
		Lighting.Technology = Enum.Technology.ShadowMap
	end
end)
CreateToggle("Volumetric Sun Shaft Shading", true, function(state)
	SunRays.Enabled = state
end)
CreateSlider("Sun Ray Dispersion Spread", 0, 100, 25, function(val)
	SunRays.Intensity = val / 100
end)
CreateSlider("HDR Bloom Scale Strength", 0, 100, 15, function(val)
	Bloom.Intensity = val / 10
end)

-- CONTRAST CONFIGURATOR
CreateSectionHeader("Advanced Shading & Contrast Metrics")
CreateSlider("Global Color Calibration Contrast", 0, 100, 10, function(val)
	ColorCorrection.Contrast = val / 100
end)
CreateSlider("Vibrancy Color Curve Saturation", 0, 200, 100, function(val)
	ColorCorrection.Saturation = (val / 100) - 1
end)
CreateSlider("Master Core Screen Brightness", 0, 200, 100, function(val)
	ColorCorrection.Brightness = (val / 100) - 1
end)

-- =============================================================
-- EXTENDED GRAPHICS ENGINE & MOVIE PRESETS COUPLING
-- =============================================================

-- -------------------------------------------------------------
-- 1. ADVANCED LIGHTING CALIBRATION
-- -------------------------------------------------------------
CreateSectionHeader("Advanced Lighting Calibration")

CreateSlider("Environment Exposure", -200, 200, 50, function(val)
	Lighting.ExposureCompensation = val / 100
end)

CreateSlider("Geographic Latitude Shift", -90, 90, 23, function(val)
	Lighting.GeographicLatitude = val
end)

CreateRGBPalette("Outdoor Ambient Shading Color", function(color)
	Lighting.OutdoorAmbient = color
end)

CreateToggle("Global Shadows Layer", true, function(state)
	Lighting.GlobalShadows = state
end)

CreateSlider("Shadow Softness Engine Factor", 0, 100, 50, function(val)
	pcall(function()
		Lighting.ShadowSoftness = val / 100
	end)
end)

-- -------------------------------------------------------------
-- 2. VOLUMETRIC CLOUDS CONFIGURATOR
-- -------------------------------------------------------------
CreateSectionHeader("Volumetric Cloud Configurator")

CreateToggle("Clouds Master Enabled", true, function(state)
	Clouds.Enabled = state
end)

CreateSlider("Cloud Speed", 0, 250, 40, function(val)
	workspace.GlobalWind = Vector3.new(val, workspace.GlobalWind.Y, workspace.GlobalWind.Z)
end)

CreateSlider("Cloud Base Thickness Density", 0, 100, 60, function(val)
	Clouds.Density = val / 100
end)

-- Dynamic Cloud Configurations (Organized cleanly via rows)
CreatePresetBar({
	{
		Name = "Classic Clouds",
		Callback = function() Clouds.Cover = 0.45; Clouds.Density = 0.50 end
	},
	{
		Name = "OG Clouds",
		Callback = function() Clouds.Cover = 0.65; Clouds.Density = 0.35 end
	}
})

CreatePresetBar({
	{
		Name = "Twisty Clouds",
		Callback = function() Clouds.Cover = 0.80; Clouds.Density = 0.75 end
	},
	{
		Name = "Smooth Clouds",
		Callback = function() Clouds.Cover = 0.25; Clouds.Density = 0.90 end
	}
})

-- -------------------------------------------------------------
-- 3. ATMOSPHERE TUNING & SCATTERING
-- -------------------------------------------------------------
CreateSectionHeader("Atmosphere Tuning & Scattering")

CreateToggle("Atmosphere Density Toggle", true, function(state)
	Atmosphere.Density = state and 0.35 or 0
end)
CreateSlider("Atmosphere Density Scale", 0, 100, 35, function(val)
	Atmosphere.Density = val / 100
end)

CreateToggle("Atmosphere Offset Toggle", true, function(state)
	Atmosphere.Offset = state and 0.3 or 0
end)
CreateSlider("Atmosphere Offset Scale", 0, 100, 30, function(val)
	Atmosphere.Offset = val / 100
end)

CreateToggle("Atmosphere Haze Toggle", true, function(state)
	Atmosphere.Haze = state and 2.5 or 0
end)
CreateSlider("Atmosphere Haze Scale", 0, 100, 25, function(val)
	Atmosphere.Haze = val / 10
end)

CreateToggle("Atmosphere Glare Toggle", true, function(state)
	Atmosphere.Glare = state and 1.5 or 0
end)
CreateSlider("Atmosphere Glare Scale", 0, 100, 15, function(val)
	Atmosphere.Glare = val / 10
end)

CreateRGBPalette("Atmosphere Scattering Color", function(color)
	Atmosphere.Color = color
end)

CreateRGBPalette("Atmosphere Absorption Decay", function(color)
	Atmosphere.Decay = color
end)

-- -------------------------------------------------------------
-- 4. ADVANCED WATER ENGINE
-- -------------------------------------------------------------
CreateSectionHeader("Advanced Water Settings")

CreateSlider("Water Wave Size Scale", 0, 100, 15, function(val)
	Terrain.WaterWaveSize = val / 10
end)

CreateSlider("Water Wave Speed Scale", 0, 100, 20, function(val)
	Terrain.WaterWaveSpeed = val / 10
end)

CreateSlider("Water Transparency Gradient", 0, 100, 30, function(val)
	Terrain.WaterTransparency = val / 100
end)

CreateSlider("Water Surface Reflectance", 0, 100, 100, function(val)
	Terrain.WaterReflectance = val / 100
end)

-- -------------------------------------------------------------
-- 5. GLOBAL WIND SEGMENTATION
-- -------------------------------------------------------------
CreateSectionHeader("Global Wind Settings")

CreateSlider("Wind Direction Vector X", -250, 250, 40, function(val)
	workspace.GlobalWind = Vector3.new(val, workspace.GlobalWind.Y, workspace.GlobalWind.Z)
end)

CreateSlider("Wind Direction Vector Y", -250, 250, 0, function(val)
	workspace.GlobalWind = Vector3.new(workspace.GlobalWind.X, val, workspace.GlobalWind.Z)
end)

CreateSlider("Wind Direction Vector Z", -250, 250, 10, function(val)
	workspace.GlobalWind = Vector3.new(workspace.GlobalWind.X, workspace.GlobalWind.Y, val)
end)

-- -------------------------------------------------------------
-- 6. FULL COLOR CORRECTION EXTENSIONS
-- -------------------------------------------------------------
CreateSectionHeader("Color Correction Matrix")

CreateSlider("Screen Contrast Scale", -100, 100, 15, function(val)
	ColorCorrection.Contrast = val / 100
end)

CreateSlider("Screen Saturation Scale", -100, 100, 30, function(val)
	ColorCorrection.Saturation = val / 100
end)

CreateSlider("Screen Brightness Level", -100, 100, 0, function(val)
	ColorCorrection.Brightness = val / 100
end)

CreateRGBPalette("Screen Color Tint Matrix", function(color)
	ColorCorrection.TintColor = color
end)

-- -------------------------------------------------------------
-- 7. CELESTIAL STARRY VECTOR MATRIX
-- -------------------------------------------------------------
CreateSectionHeader("Celestial Vector Correction")

CreateSlider("Star Count Renderer", 0, 10000, 3000, function(val)
	local sky = Lighting:FindFirstChildOfClass("Sky")
	if sky then sky.StarCount = val end
end)

-- -------------------------------------------------------------
-- 8. ENV REFLECTION COUPLING
-- -------------------------------------------------------------
CreateSectionHeader("Reflections Toggles & Scales")

CreateToggle("Global Reflections Toggle", true, function(state)
	if state then
		Lighting.EnvironmentSpecularScale = 1.0
		Lighting.EnvironmentDiffuseScale = 1.0
	else
		Lighting.EnvironmentSpecularScale = 0
		Lighting.EnvironmentDiffuseScale = 0
	end
end)

CreateSlider("Reflection Specular Scaling", 0, 100, 100, function(val)
	Lighting.EnvironmentSpecularScale = val / 100
end)

CreateSlider("Reflection Diffuse Scaling", 0, 100, 100, function(val)
	Lighting.EnvironmentDiffuseScale = val / 100
end)

-- -------------------------------------------------------------
-- 9. THE COMPLETE 12 CINEMATIC MOVIE PRESETS
-- -------------------------------------------------------------
CreateSectionHeader("Cinematic Movie Presets")

-- Divided across clean preset bars so buttons don't crush together
CreatePresetBar({
	{
		Name = "Golden Hour",
		Callback = function()
			Lighting.ClockTime = 17.4
			Lighting.GeographicLatitude = 23.5
			Lighting.ExposureCompensation = 0.5
			Atmosphere.Density = 0.35
			Atmosphere.Offset = 0.3
			Atmosphere.Haze = 2.5
			Atmosphere.Glare = 1.5
			Atmosphere.Color = Color3.fromRGB(255, 170, 90)
			Atmosphere.Decay = Color3.fromRGB(230, 80, 20)
			ColorCorrection.Contrast = 0.15
			ColorCorrection.Saturation = 0.3
			Clouds.Cover = 0.55
			Clouds.Density = 0.6
			Clouds.Color = Color3.fromRGB(255, 215, 150)
		end
	},
	{
		Name = "Pink Sunset",
		Callback = function()
			Lighting.ClockTime = 18.1
			Lighting.GeographicLatitude = 40
			Lighting.ExposureCompensation = 0.2
			Atmosphere.Density = 0.4
			Atmosphere.Offset = 0.25
			Atmosphere.Haze = 3.2
			Atmosphere.Glare = 0.5
			Atmosphere.Color = Color3.fromRGB(255, 130, 180)
			Atmosphere.Decay = Color3.fromRGB(255, 110, 50)
			ColorCorrection.Contrast = 0.12
			ColorCorrection.Saturation = 0.35
			Clouds.Cover = 0.35
			Clouds.Density = 0.45
			Clouds.Color = Color3.fromRGB(140, 90, 180)
		end
	},
	{
		Name = "Blade Runner",
		Callback = function()
			Lighting.ClockTime = 21.5
			Atmosphere.Density = 0.55
			Atmosphere.Haze = 4.0
			Atmosphere.Color = Color3.fromRGB(30, 5, 40)
			Atmosphere.Decay = Color3.fromRGB(240, 10, 150)
			ColorCorrection.Contrast = 0.35
			ColorCorrection.Saturation = 0.5
			ColorCorrection.TintColor = Color3.fromRGB(180, 240, 255)
			Clouds.Cover = 0.8
			Clouds.Color = Color3.fromRGB(200, 40, 140)
		end
	}
})

CreatePresetBar({
	{
		Name = "Cyberpunk Teal",
		Callback = function()
			Lighting.ClockTime = 14.0
			Atmosphere.Density = 0.2
			Atmosphere.Haze = 0.5
			Atmosphere.Color = Color3.fromRGB(0, 200, 200)
			Atmosphere.Decay = Color3.fromRGB(255, 100, 0)
			ColorCorrection.Contrast = 0.25
			ColorCorrection.Saturation = 0.25
			ColorCorrection.TintColor = Color3.fromRGB(230, 255, 250)
			Clouds.Cover = 0.4
			Clouds.Color = Color3.fromRGB(255, 255, 255)
		end
	},
	{
		Name = "Mad Max Desert",
		Callback = function()
			Lighting.ClockTime = 12.0
			Atmosphere.Density = 0.45
			Atmosphere.Haze = 3.5
			Atmosphere.Glare = 2.0
			Atmosphere.Color = Color3.fromRGB(240, 170, 100)
			Atmosphere.Decay = Color3.fromRGB(180, 90, 30)
			ColorCorrection.Contrast = 0.3
			ColorCorrection.Saturation = 0.4
			ColorCorrection.TintColor = Color3.fromRGB(255, 200, 150)
			Clouds.Cover = 0.1
			Clouds.Color = Color3.fromRGB(230, 200, 180)
		end
	},
	{
		Name = "Ethereal Dream",
		Callback = function()
			Lighting.ClockTime = 10.5
			Lighting.ExposureCompensation = 0.8
			Atmosphere.Density = 0.28
			Atmosphere.Haze = 1.5
			Atmosphere.Color = Color3.fromRGB(220, 240, 255)
			Atmosphere.Decay = Color3.fromRGB(255, 220, 240)
			ColorCorrection.Contrast = -0.05
			ColorCorrection.Saturation = 0.1
			ColorCorrection.TintColor = Color3.fromRGB(255, 255, 255)
			Clouds.Cover = 0.75
			Clouds.Density = 0.3
			Clouds.Color = Color3.fromRGB(255, 255, 255)
		end
	}
})

CreatePresetBar({
	{
		Name = "Wasteland",
		Callback = function()
			Lighting.ClockTime = 15.5
			Atmosphere.Density = 0.5
			Atmosphere.Haze = 2.8
			Atmosphere.Color = Color3.fromRGB(150, 155, 130)
			Atmosphere.Decay = Color3.fromRGB(110, 115, 90)
			ColorCorrection.Contrast = 0.2
			ColorCorrection.Saturation = -0.55
			ColorCorrection.TintColor = Color3.fromRGB(210, 215, 190)
			Clouds.Cover = 0.85
			Clouds.Density = 0.8
			Clouds.Color = Color3.fromRGB(150, 150, 140)
		end
	},
	{
		Name = "Winter Chill",
		Callback = function()
			Lighting.ClockTime = 4.5
			Atmosphere.Density = 0.3
			Atmosphere.Haze = 1.8
			Atmosphere.Color = Color3.fromRGB(40, 80, 140)
			Atmosphere.Decay = Color3.fromRGB(15, 30, 70)
			ColorCorrection.Contrast = 0.18
			ColorCorrection.Saturation = -0.15
			ColorCorrection.TintColor = Color3.fromRGB(190, 220, 255)
			Clouds.Cover = 0.6
			Clouds.Color = Color3.fromRGB(180, 200, 220)
		end
	},
	{
		Name = "Classic Noir",
		Callback = function()
			Lighting.ClockTime = 0.5
			Lighting.ExposureCompensation = -0.2
			Atmosphere.Density = 0.15
			Atmosphere.Haze = 0.5
			Atmosphere.Color = Color3.fromRGB(100, 100, 100)
			Atmosphere.Decay = Color3.fromRGB(50, 50, 50)
			ColorCorrection.Contrast = 0.45
			ColorCorrection.Saturation = -1.0
			ColorCorrection.TintColor = Color3.fromRGB(255, 255, 255)
			Clouds.Cover = 0.5
			Clouds.Color = Color3.fromRGB(100, 100, 100)
		end
	}
})

CreatePresetBar({
	{
		Name = "Biolume",
		Callback = function()
			Lighting.ClockTime = 1.0
			Atmosphere.Density = 0.35
			Atmosphere.Haze = 2.2
			Atmosphere.Color = Color3.fromRGB(10, 50, 90)
			Atmosphere.Decay = Color3.fromRGB(5, 15, 40)
			ColorCorrection.Contrast = 0.25
			ColorCorrection.Saturation = 0.45
			ColorCorrection.TintColor = Color3.fromRGB(140, 255, 230)
			Clouds.Cover = 0.4
			Clouds.Color = Color3.fromRGB(20, 80, 120)
		end
	},
	{
		Name = "Synthwave",
		Callback = function()
			Lighting.ClockTime = 18.5
			Atmosphere.Density = 0.32
			Atmosphere.Haze = 2.0
			Atmosphere.Color = Color3.fromRGB(255, 20, 140)
			Atmosphere.Decay = Color3.fromRGB(40, 0, 80)
			ColorCorrection.Contrast = 0.22
			ColorCorrection.Saturation = 0.6
			ColorCorrection.TintColor = Color3.fromRGB(255, 180, 255)
			Clouds.Cover = 0.5
			Clouds.Color = Color3.fromRGB(120, 20, 140)
		end
	},
	{
		Name = "Interstellar",
		Callback = function()
			Lighting.ClockTime = 23.0
			Atmosphere.Density = 0.15
			Atmosphere.Haze = 0.8
			Atmosphere.Color = Color3.fromRGB(15, 5, 35)
			Atmosphere.Decay = Color3.fromRGB(5, 0, 15)
			ColorCorrection.Contrast = 0.3
			ColorCorrection.Saturation = 0.2
			ColorCorrection.TintColor = Color3.fromRGB(160, 150, 240)
			Clouds.Cover = 0.25
			Clouds.Color = Color3.fromRGB(60, 30, 90)
		end
	}
})

-- -------------------------------------------------------------
-- INITIALIZE DEFAULT VALUE FOR SEAMLESS FIRST RUN EXECUTION
-- -------------------------------------------------------------
task.spawn(function()
	Lighting.ClockTime = 17.4
	Lighting.GeographicLatitude = 23.5
	Lighting.ExposureCompensation = 0.5
	Atmosphere.Density = 0.35
	Atmosphere.Offset = 0.3
	Atmosphere.Haze = 2.5
	Atmosphere.Glare = 1.5
	Atmosphere.Color = Color3.fromRGB(255, 170, 90)
	Atmosphere.Decay = Color3.fromRGB(230, 80, 20)
	ColorCorrection.Contrast = 0.15
	ColorCorrection.Saturation = 0.3
	Clouds.Enabled = true
	Clouds.Cover = 0.55
	Clouds.Density = 0.6
	Clouds.Color = Color3.fromRGB(255, 215, 150)
	workspace.GlobalWind = Vector3.new(40, 0, 10)
	local sky = Lighting:FindFirstChildOfClass("Sky")
	if sky then sky.StarCount = 3000 end
	Lighting.EnvironmentSpecularScale = 1.0
	Lighting.EnvironmentDiffuseScale = 1.0
end)

-- =============================================================
-- CELESTIAL SUN RAYS GRAPHICS REPAIR MATRIX
-- =============================================================

local Lighting = game:GetService("Lighting")
local SunRays = Lighting:FindFirstChildOfClass("SunRaysEffect")

-- Force-create SunRays instance if it got deleted or doesn't exist
if not SunRays then
	SunRays = Instance.new("SunRaysEffect")
	SunRays.Name = "ZenithSunRays"
	SunRays.Parent = Lighting
end

-- Force Sun Rays ON and calibrated by default
task.spawn(function()
	SunRays.Enabled = true
	SunRays.Intensity = 0.25
	SunRays.Spread = 0.75
end)

-- =============================================================
-- CELESTIAL SUN RAYS SHADER REPAIR PIPELINE
-- =============================================================

local Lighting = game:GetService("Lighting")
-- Hook directly into your script's original SunRays object name
local SunRays = Lighting:FindFirstChild("ZenithRays") or Lighting:FindFirstChildOfClass("SunRaysEffect")

-- Fallback creation ONLY if it was completely missing
if not SunRays then
	SunRays = Instance.new("SunRaysEffect")
	SunRays.Name = "ZenithRays"
	SunRays.Parent = Lighting
end

-- Force Sun Rays configuration active in the workspace
task.spawn(function()
	SunRays.Enabled = true
	SunRays.Intensity = 0.25
	SunRays.Spread = 0.75
	
	-- Note: To see the rays instantly, make sure your camera is looking up at the sun!
	if Lighting.ClockTime > 18 or Lighting.ClockTime < 6 then
		Lighting.ClockTime = 16.5 -- Force golden hour afternoon so the sun is visible and active
	end
end)

CreateSectionHeader("Sun Rays Calibration Engine")

CreateToggle("Enable Volumetric Sun Rays", true, function(state)
	SunRays.Enabled = state
end)

CreateSlider("Sun Ray Intensity Scale", 0, 100, 25, function(val)
	SunRays.Intensity = val / 100
end)

CreateSlider("Sun Ray Dispersion Spread", 0, 100, 75, function(val)
	SunRays.Spread = val / 100
end)

-- GLOBAL AUTOMATION SUITE
CreateSectionHeader("GLOBAL AUTOMATION SUITE")
CreatePresetBar({
	{Name = "[ WARNING: CHAOS MATRIX (RANDOMIZE ALL) ]", Callback = function()
		for _, randomizerFunc in ipairs(GlobalRandomizers) do
			pcall(randomizerFunc)
		end
	end}
})

-- Initialize Default State Framework
ApplySkyboxPreset("Sunny")

Features & Information

WARNING: this script is made with a bit of help by AI RTX features, View bobbing 15+ presets Atmosphere settings sky and Night settings Bloom settings Blur features and 89 more features!
#Free#Universal#Shaders#keyless#RTX

Community Comments (1)

kgbcatkgbcatSep 5, 2026

this works nicely

More Scripts for Universal Scripts