--[[ HUMA Shaders ]] --// Services local Players = game:GetService("Players") local Lighting = game:GetService("Lighting") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local Workspace = game:GetService("Workspace") local player = Players.LocalPlayer if not player then warn("[Shader Pack ULTRA] LocalPlayer is not available. Run this from a client executor.") return end repeat task.wait() until Workspace.CurrentCamera local camera = Workspace.CurrentCamera local terrain = Workspace.Terrain local playerGui = player:WaitForChild("PlayerGui") -- Executor-safe GUI parent: prefer the executor's hidden UI container when exposed, -- otherwise use PlayerGui. No exploit-only functions are required for shader effects. local guiParent = playerGui if type(gethui) == "function" then local ok, hiddenGui = pcall(gethui) if ok and hiddenGui then guiParent = hiddenGui end end -- Remove older copies so re-running the script does not stack interfaces/effects. for _, container in ipairs({guiParent, playerGui, Lighting}) do for _, name in ipairs({"SP_UI", "SP_Vignette", "SP_Bars", "SP_Flare", "SP_Rain", "SP_Bloom", "SP_Grade", "SP_SunRays", "SP_DOF", "SP_Atmosphere", "SP_MotionBlur", "SP_WaterGrade", "SP_WaterBlur", "SP_LightningFlash"}) do local old = container:FindFirstChild(name) if old then pcall(function() old:Destroy() end) end end end --// Settings you can tweak ------------------------------------------------------ local TRANSITION_SPEED = 2.5 -- preset blend speed (higher = faster) local WEATHER_SPEED = 0.6 -- weather blend speed local FOCUS_SPEED = 6 -- auto-focus snap speed local MAX_FOCUS = 400 -- max auto-focus distance (studs) local MOTION_BLUR_STRENGTH = 3 -- camera-turn -> blur multiplier local MOTION_BLUR_MAX = 12 -- max blur size local CLOCK_SPEED = 0.25 -- in-game hours per real second (day/night cycle) local RAIN_DROPS = 90 -- screen-space rain streaks local AUTO_WEATHER_MIN = 90 -- seconds between automatic weather changes local AUTO_WEATHER_MAX = 180 local REPLACE_EXISTING_EFFECTS = true -- hide the game's own post effects while shaders are on -- Adaptive client rendering budget. This scales cosmetic work; it cannot bypass -- Roblox engine, GPU, server, or device limits. local qualityScale = 0.65 local qualityMode = "BALANCED" local autoQuality = true local fpsAverage = 60 local qualityCheckTimer = 0 local fpsUiTimer = 0 --// Colors used by the dynamic systems local WHITE = Color3.new(1, 1, 1) local COOL_GREY = Color3.fromRGB(200, 210, 225) local GOLDEN_TINT = Color3.fromRGB(255, 185, 130) local NIGHT_TINT = Color3.fromRGB(150, 175, 255) local GREY_AMBIENT = Color3.fromRGB(95, 100, 110) local NIGHT_AMBIENT = Color3.fromRGB(14, 18, 38) local NIGHT_OUTDOOR = Color3.fromRGB(24, 34, 70) local WARM_SUN = Color3.fromRGB(255, 170, 100) local WARM_BOUNCE = Color3.fromRGB(110, 70, 45) local GREY_FOG = Color3.fromRGB(150, 160, 172) local GREY_DECAY = Color3.fromRGB(90, 95, 105) local GOLD_FOG = Color3.fromRGB(255, 165, 115) local GOLD_DECAY = Color3.fromRGB(190, 100, 60) local NIGHT_FOG = Color3.fromRGB(18, 26, 55) local NIGHT_DECAY = Color3.fromRGB(10, 14, 30) local WATER_FOG = Color3.fromRGB(20, 95, 135) local WATER_DECAY = Color3.fromRGB(10, 50, 80) local CLOUD_GOLD = Color3.fromRGB(255, 170, 125) local CLOUD_NIGHT = Color3.fromRGB(35, 42, 75) local CLOUD_GLOOM = Color3.fromRGB(110, 115, 125) local GREY_WATER = Color3.fromRGB(60, 75, 85) --// Feature toggles (each one becomes a button in the panel) ----------------------- local config = { Master = true } local FEATURES = { { group = "POST FX", key = "Bloom", label = "Bloom / Glow", on = true }, { group = "POST FX", key = "ColorGrade", label = "Color Grading", on = true }, { group = "POST FX", key = "SunRays", label = "God Rays", on = true }, { group = "POST FX", key = "DepthOfField", label = "Depth of Field", on = true }, { group = "POST FX", key = "AutoFocus", label = "Auto-Focus", on = true }, { group = "POST FX", key = "Vignette", label = "Vignette", on = true }, { group = "POST FX", key = "LensFlare", label = "Lens Flare", on = true }, { group = "POST FX", key = "Letterbox", label = "Cinematic Bars", on = false }, { group = "CAMERA", key = "MotionBlur", label = "Motion Blur", on = true }, { group = "CAMERA", key = "AutoExposure", label = "Auto Exposure", on = true }, { group = "CAMERA", key = "CameraSway", label = "Handheld Camera", on = false }, { group = "CAMERA", key = "SpeedFOV", label = "Speed FOV", on = false }, { group = "WORLD", key = "Atmosphere", label = "Atmosphere / Haze", on = true }, { group = "WORLD", key = "Clouds", label = "Volumetric Clouds", on = true }, { group = "WORLD", key = "Celestial", label = "Stars, Sun & Moon", on = true }, { group = "WORLD", key = "WaterFX", label = "Water Shader", on = true }, { group = "WORLD", key = "TimeGrade", label = "Time-of-Day Colors", on = true }, { group = "WORLD", key = "NightAdapt", label = "Night Adapt", on = true }, { group = "WORLD", key = "DayNightCycle", label = "Day/Night Cycle", on = false }, { group = "WEATHER", key = "Weather", label = "Weather System", on = true }, { group = "WEATHER", key = "AutoWeather", label = "Auto Weather", on = false }, { group = "EXTRAS", key = "UnderwaterFX", label = "Underwater FX", on = true }, { group = "EXTRAS", key = "LowHealthFX", label = "Low-Health FX", on = true }, { group = "EXTRAS", key = "RainbowTint", label = "Rainbow Tint", on = false }, } local features = {} for _, f in ipairs(FEATURES) do features[f.key] = f.on end --// Presets ------------------------------------------------------------------------- local function merge(base, over) local out = {} for k, v in pairs(base) do out[k] = (type(v) == "table") and merge(v, {}) or v end for k, v in pairs(over) do if type(v) == "table" then out[k] = merge(out[k] or {}, v) else out[k] = v end end return out end local DEFAULT = { Lighting = { Brightness = 2.5, ExposureCompensation = 0, EnvironmentDiffuseScale = 1, EnvironmentSpecularScale = 0.7, -- rain pushes this up for a wet look ShadowSoftness = 0.3, Ambient = Color3.fromRGB(70, 70, 70), OutdoorAmbient = Color3.fromRGB(110, 110, 120), ColorShift_Top = Color3.fromRGB(255, 240, 220), ColorShift_Bottom = Color3.fromRGB(0, 0, 0), }, Bloom = { Intensity = 0.35, Size = 24, Threshold = 1.0 }, Color = { Brightness = 0, Contrast = 0.1, Saturation = 0.1, TintColor = Color3.fromRGB(255, 252, 247) }, SunRays = { Intensity = 0.12, Spread = 0.8 }, DOF = { FarIntensity = 0.15, NearIntensity = 0, InFocusRadius = 60, FocusDistance = 60 }, Atmosphere = { Density = 0.3, Offset = 0.2, Glare = 0.25, Haze = 1.2, Color = Color3.fromRGB(199, 215, 235), Decay = Color3.fromRGB(106, 112, 125), }, Water = { WaterColor = Color3.fromRGB(24, 98, 110), WaterReflectance = 0.85, WaterTransparency = 0.85, WaterWaveSize = 0.2, WaterWaveSpeed = 12, }, Vignette = 0.25, } local PRESETS = { Realistic = DEFAULT, Cinematic = merge(DEFAULT, { Lighting = { Brightness = 2.2, ExposureCompensation = -0.2 }, Bloom = { Intensity = 0.6, Size = 30, Threshold = 0.85 }, Color = { Contrast = 0.25, Saturation = -0.05, TintColor = Color3.fromRGB(255, 235, 210) }, SunRays = { Intensity = 0.2 }, DOF = { FarIntensity = 0.35, NearIntensity = 0.1, InFocusRadius = 30 }, Atmosphere = { Density = 0.35, Haze = 1.5 }, Water = { WaterColor = Color3.fromRGB(18, 80, 95), WaterWaveSize = 0.25 }, Vignette = 0.55, }), Vibrant = merge(DEFAULT, { Lighting = { Brightness = 2.8, ExposureCompensation = 0.1 }, Bloom = { Intensity = 0.5 }, Color = { Brightness = 0.03, Contrast = 0.15, Saturation = 0.45, TintColor = Color3.fromRGB(255, 250, 240) }, SunRays = { Intensity = 0.25 }, DOF = { FarIntensity = 0.05 }, Atmosphere = { Density = 0.2, Haze = 0.8, Color = Color3.fromRGB(170, 210, 255) }, Water = { WaterColor = Color3.fromRGB(20, 165, 190), WaterTransparency = 0.9, WaterWaveSpeed = 14 }, Vignette = 0.15, }), Noir = merge(DEFAULT, { Lighting = { Brightness = 2, ExposureCompensation = -0.3 }, Bloom = { Intensity = 0.3, Threshold = 0.9 }, Color = { Brightness = -0.05, Contrast = 0.4, Saturation = -1, TintColor = Color3.fromRGB(240, 240, 255) }, SunRays = { Intensity = 0.05 }, DOF = { FarIntensity = 0.25 }, Atmosphere = { Density = 0.4, Color = Color3.fromRGB(160, 160, 165), Decay = Color3.fromRGB(80, 80, 85) }, Water = { WaterColor = Color3.fromRGB(70, 75, 80), WaterReflectance = 1, WaterTransparency = 0.7 }, Vignette = 0.7, }), Cyberpunk = merge(DEFAULT, { Lighting = { Brightness = 1.8, ExposureCompensation = 0.1, EnvironmentDiffuseScale = 0.8, Ambient = Color3.fromRGB(60, 30, 90), OutdoorAmbient = Color3.fromRGB(80, 40, 120), ColorShift_Top = Color3.fromRGB(0, 200, 255), ColorShift_Bottom = Color3.fromRGB(120, 20, 160), }, Bloom = { Intensity = 1.2, Size = 40, Threshold = 0.7 }, Color = { Contrast = 0.3, Saturation = 0.5, TintColor = Color3.fromRGB(230, 180, 255) }, SunRays = { Intensity = 0.1 }, Atmosphere = { Density = 0.45, Glare = 0.5, Haze = 2, Color = Color3.fromRGB(120, 60, 200), Decay = Color3.fromRGB(60, 20, 120), }, Water = { WaterColor = Color3.fromRGB(70, 30, 170), WaterReflectance = 1, WaterTransparency = 0.75, WaterWaveSize = 0.3, WaterWaveSpeed = 18, }, Vignette = 0.45, }), Sunset = merge(DEFAULT, { Lighting = { Brightness = 2.2, Ambient = Color3.fromRGB(120, 80, 70), OutdoorAmbient = Color3.fromRGB(180, 120, 90), ColorShift_Top = Color3.fromRGB(255, 160, 90), }, Bloom = { Intensity = 0.7, Threshold = 0.8 }, Color = { Contrast = 0.15, Saturation = 0.3, TintColor = Color3.fromRGB(255, 190, 140) }, SunRays = { Intensity = 0.45, Spread = 1 }, Atmosphere = { Density = 0.35, Glare = 0.8, Haze = 1.8, Color = Color3.fromRGB(255, 170, 120), Decay = Color3.fromRGB(180, 100, 70), }, Water = { WaterColor = Color3.fromRGB(70, 115, 135), WaterReflectance = 1 }, Vignette = 0.35, }), Dreamy = merge(DEFAULT, { Lighting = { Brightness = 2.6 }, Bloom = { Intensity = 1.0, Size = 50, Threshold = 0.75 }, Color = { Brightness = 0.05, Contrast = -0.05, Saturation = 0.2, TintColor = Color3.fromRGB(255, 225, 245) }, SunRays = { Intensity = 0.3 }, DOF = { FarIntensity = 0.4, NearIntensity = 0.2, InFocusRadius = 25 }, Atmosphere = { Density = 0.5, Haze = 2.2, Color = Color3.fromRGB(255, 220, 240) }, Water = { WaterColor = Color3.fromRGB(130, 175, 235), WaterTransparency = 0.9, WaterWaveSize = 0.1, WaterWaveSpeed = 6 }, Vignette = 0.3, }), Horror = merge(DEFAULT, { Lighting = { Brightness = 1, ExposureCompensation = -0.6, ShadowSoftness = 0.1, Ambient = Color3.fromRGB(15, 18, 20), OutdoorAmbient = Color3.fromRGB(30, 35, 40), ColorShift_Top = Color3.fromRGB(0, 0, 0), }, Bloom = { Intensity = 0.2 }, Color = { Brightness = -0.1, Contrast = 0.35, Saturation = -0.4, TintColor = Color3.fromRGB(200, 230, 210) }, SunRays = { Intensity = 0 }, DOF = { FarIntensity = 0.3, NearIntensity = 0.15, InFocusRadius = 20 }, Atmosphere = { Density = 0.55, Glare = 0, Haze = 3, Color = Color3.fromRGB(60, 75, 70), Decay = Color3.fromRGB(30, 40, 35), }, Water = { WaterColor = Color3.fromRGB(12, 32, 28), WaterReflectance = 0.3, WaterTransparency = 0.5, WaterWaveSize = 0.1, WaterWaveSpeed = 6, }, Vignette = 0.8, }), } local PRESET_ORDER = { "UltraRealism", "EcoGloom", "StarryNight", "Aurora", "Realistic", "Cinematic", "Vibrant", "Noir", "Cyberpunk", "Sunset", "Dreamy", "Horror" } PRESETS.UltraRealism = merge(DEFAULT, { Lighting = { Brightness = 2.15, ExposureCompensation = -0.12, EnvironmentDiffuseScale = 1, EnvironmentSpecularScale = 1, ShadowSoftness = 0.18, Ambient = Color3.fromRGB(48, 52, 62), OutdoorAmbient = Color3.fromRGB(105, 112, 128), ColorShift_Top = Color3.fromRGB(255, 245, 232), }, Bloom = { Intensity = 0.72, Size = 38, Threshold = 0.82 }, Color = { Brightness = -0.015, Contrast = 0.22, Saturation = 0.16, TintColor = Color3.fromRGB(255, 247, 235), }, SunRays = { Intensity = 0.28, Spread = 0.92 }, DOF = { FarIntensity = 0.18, NearIntensity = 0, InFocusRadius = 48 }, Atmosphere = { Density = 0.27, Offset = 0.18, Glare = 0.32, Haze = 1.05, Color = Color3.fromRGB(190, 210, 235), Decay = Color3.fromRGB(95, 105, 125), }, Water = { WaterColor = Color3.fromRGB(22, 92, 112), WaterReflectance = 0.92, WaterTransparency = 0.82, WaterWaveSize = 0.22, WaterWaveSpeed = 11, }, Vignette = 0.32, }) -- Extra atmosphere presets PRESETS.EcoGloom = merge(DEFAULT, { Lighting = { Brightness = 1.75, ExposureCompensation = -0.28, Ambient = Color3.fromRGB(52, 43, 55), OutdoorAmbient = Color3.fromRGB(88, 76, 94), ColorShift_Top = Color3.fromRGB(220, 185, 205), ColorShift_Bottom = Color3.fromRGB(30, 20, 34), ShadowSoftness = 0.22, }, Bloom = { Intensity = 0.38, Size = 26, Threshold = 1.05 }, Color = { Brightness = -0.035, Contrast = 0.2, Saturation = -0.08, TintColor = Color3.fromRGB(255, 222, 238) }, SunRays = { Intensity = 0.08, Spread = 0.75 }, Atmosphere = { Density = 0.38, Offset = 0.12, Glare = 0.08, Haze = 1.8, Color = Color3.fromRGB(190, 157, 180), Decay = Color3.fromRGB(76, 66, 88) }, Water = { WaterColor = Color3.fromRGB(65, 53, 78), WaterReflectance = 0.75, WaterTransparency = 0.78 }, Vignette = 0.48, }) PRESETS.UltraRealism = merge(PRESETS.UltraRealism, { Lighting = { Brightness = 2.25, ExposureCompensation = -0.08, ShadowSoftness = 0.12, EnvironmentDiffuseScale = 1, EnvironmentSpecularScale = 1, Ambient = Color3.fromRGB(62, 66, 76), OutdoorAmbient = Color3.fromRGB(118, 125, 140) }, Bloom = { Intensity = 0.52, Size = 30, Threshold = 0.95 }, Color = { Brightness = -0.01, Contrast = 0.26, Saturation = 0.12, TintColor = Color3.fromRGB(255, 250, 242) }, SunRays = { Intensity = 0.22, Spread = 0.88 }, Atmosphere = { Density = 0.23, Offset = 0.2, Glare = 0.22, Haze = 0.85, Color = Color3.fromRGB(205, 220, 238), Decay = Color3.fromRGB(105, 116, 132) }, Water = { WaterColor = Color3.fromRGB(28, 100, 119), WaterReflectance = 0.95, WaterTransparency = 0.84, WaterWaveSize = 0.18, WaterWaveSpeed = 9 }, Vignette = 0.22, }) PRESETS.StarryNight = merge(DEFAULT, { Lighting = { Brightness = 1.35, ExposureCompensation = -0.42, Ambient = Color3.fromRGB(20, 24, 48), OutdoorAmbient = Color3.fromRGB(28, 35, 70), ColorShift_Top = Color3.fromRGB(100, 120, 190), ColorShift_Bottom = Color3.fromRGB(8, 12, 35) }, Bloom = { Intensity = 0.58, Size = 34, Threshold = 0.8 }, Color = { Brightness = -0.06, Contrast = 0.28, Saturation = 0.16, TintColor = Color3.fromRGB(185, 200, 255) }, SunRays = { Intensity = 0.015, Spread = 0.7 }, Atmosphere = { Density = 0.32, Offset = 0.15, Glare = 0.04, Haze = 1.1, Color = Color3.fromRGB(65, 82, 145), Decay = Color3.fromRGB(12, 18, 48) }, Water = { WaterColor = Color3.fromRGB(12, 28, 70), WaterReflectance = 0.9, WaterTransparency = 0.82 }, Vignette = 0.5, }) PRESETS.Aurora = merge(PRESETS.StarryNight, { Lighting = { Ambient = Color3.fromRGB(28, 48, 58), OutdoorAmbient = Color3.fromRGB(42, 70, 82), ColorShift_Top = Color3.fromRGB(110, 220, 190) }, Bloom = { Intensity = 0.82, Size = 42, Threshold = 0.72 }, Color = { Brightness = -0.015, Contrast = 0.24, Saturation = 0.32, TintColor = Color3.fromRGB(190, 255, 235) }, Atmosphere = { Density = 0.36, Offset = 0.18, Glare = 0.22, Haze = 1.45, Color = Color3.fromRGB(95, 185, 165), Decay = Color3.fromRGB(35, 45, 105) }, Water = { WaterColor = Color3.fromRGB(20, 82, 100), WaterReflectance = 0.95 }, Vignette = 0.42, }) --// Weather ------------------------------------------------------------------------ -- cover/density = clouds, gloom = grey + dark, fog = thick haze, rain/snow = particles, storm = lightning + big waves local WEATHER_BASE = { cover = 0.25, density = 0.5, gloom = 0, fog = 0, rain = 0, snow = 0, storm = 0 } local WEATHER = { Clear = merge(WEATHER_BASE, {}), Cloudy = merge(WEATHER_BASE, { cover = 0.65, density = 0.7, gloom = 0.25 }), Overcast = merge(WEATHER_BASE, { cover = 0.9, density = 0.9, gloom = 0.5 }), Foggy = merge(WEATHER_BASE, { cover = 0.6, density = 0.7, gloom = 0.3, fog = 1 }), Rain = merge(WEATHER_BASE, { cover = 0.9, density = 0.95, gloom = 0.6, fog = 0.25, rain = 1 }), Storm = merge(WEATHER_BASE, { cover = 1, density = 1, gloom = 0.85, fog = 0.3, rain = 1, storm = 1 }), Snow = merge(WEATHER_BASE, { cover = 0.85, density = 0.9, gloom = 0.35, fog = 0.3, snow = 1 }), } local WEATHER_ORDER = { "Clear", "Cloudy", "Overcast", "Foggy", "Rain", "Storm", "Snow" } --// Runtime state --------------------------------------------------------------------- local currentPreset = "Cinematic" local currentWeather = "Clear" local strength = 1 -- global effect strength slider local wx = merge(WEATHER_BASE, {}) -- smoothed weather values local uw = 0 -- smoothed "underwater" amount local indoor, indoorTarget = 0, 0 -- how covered the camera is (0 open sky, 1 indoors) local sunVisible = true local eyeExposure = 0 local flash, pendingFlash, boltTimer = 0, nil, 6 local flareAmt = 0 local lastSunPx = Vector2.new(0, 0) local barCur = 0 local vig = 0 local fovTouched = false local baseFov = camera.FieldOfView local lastLook = camera.CFrame.LookVector local waterTimer, sampleTimer, timeUiTimer = 0, 0, 0 local underwater = false local weatherTimer = math.random(AUTO_WEATHER_MIN, AUTO_WEATHER_MAX) local refreshUI -- assigned in the UI section local timeSlider --// Remember original values so everything can be restored --------------------------------- local LIGHTING_PROPS = { "Brightness", "ExposureCompensation", "EnvironmentDiffuseScale", "EnvironmentSpecularScale", "ShadowSoftness", "Ambient", "OutdoorAmbient", "ColorShift_Top", "ColorShift_Bottom", } local original = {} for _, p in ipairs(LIGHTING_PROPS) do original[p] = Lighting[p] end local WATER_PROPS = { "WaterColor", "WaterReflectance", "WaterTransparency", "WaterWaveSize", "WaterWaveSpeed" } local waterOrig = {} for _, p in ipairs(WATER_PROPS) do waterOrig[p] = terrain[p] end --// Create the effects --------------------------------------------------------------------- local function make(className, name, props) local old = Lighting:FindFirstChild(name) if old then old:Destroy() end local inst = Instance.new(className) inst.Name = name for k, v in pairs(props) do inst[k] = v end inst.Parent = Lighting return inst end local bloom = make("BloomEffect", "SP_Bloom", { Intensity = 0, Size = 24, Threshold = 2 }) local grade = make("ColorCorrectionEffect", "SP_Grade", { Brightness = 0, Contrast = 0, Saturation = 0 }) local sunRays = make("SunRaysEffect", "SP_SunRays", { Intensity = 0, Spread = 0.5 }) local dof = make("DepthOfFieldEffect", "SP_DOF", { FarIntensity = 0, NearIntensity = 0, InFocusRadius = 100, FocusDistance = 100 }) local atmosphere = make("Atmosphere", "SP_Atmosphere", { Density = 0, Offset = 0, Glare = 0, Haze = 0 }) local motionBlur = make("BlurEffect", "SP_MotionBlur", { Size = 0, Enabled = false }) local waterGrade = make("ColorCorrectionEffect", "SP_WaterGrade", { Brightness = -0.08, Contrast = 0.1, Saturation = 0.2, TintColor = Color3.fromRGB(100, 175, 225), Enabled = false, }) local waterBlur = make("BlurEffect", "SP_WaterBlur", { Size = 10, Enabled = false }) local flashGrade = make("ColorCorrectionEffect", "SP_LightningFlash", { Brightness = 0, Contrast = 0, Saturation = 0, TintColor = Color3.fromRGB(220, 230, 255), Enabled = false, }) --// Overlays (all GUI based) --------------------------------------------------------------------- local function newGui(name, order) local g = Instance.new("ScreenGui") g.Name = name g.ResetOnSpawn = false g.IgnoreGuiInset = true g.DisplayOrder = order g.Parent = guiParent return g end -- Vignette: four gradient edges local vigGui = newGui("SP_Vignette", 50) local vigEdges = {} local function edge(anchor, position, size, rotation) local f = Instance.new("Frame") f.BorderSizePixel = 0 f.BackgroundColor3 = Color3.new(0, 0, 0) f.BackgroundTransparency = 1 f.AnchorPoint = anchor f.Position = position f.Size = size local g = Instance.new("UIGradient") g.Rotation = rotation g.Transparency = NumberSequence.new(0, 1) g.Parent = f f.Parent = vigGui table.insert(vigEdges, f) end edge(Vector2.new(0, 0), UDim2.fromScale(0, 0), UDim2.fromScale(1, 0.3), 90) edge(Vector2.new(0, 1), UDim2.fromScale(0, 1), UDim2.fromScale(1, 0.3), 270) edge(Vector2.new(0, 0), UDim2.fromScale(0, 0), UDim2.fromScale(0.2, 1), 0) edge(Vector2.new(1, 0), UDim2.fromScale(1, 0), UDim2.fromScale(0.2, 1), 180) local function setVignette(strengthValue) local t = 1 - math.clamp(strengthValue, 0, 1) for _, f in ipairs(vigEdges) do f.BackgroundTransparency = t end end -- Cinematic bars local barsGui = newGui("SP_Bars", 60) local function bar(anchorY) local f = Instance.new("Frame") f.BorderSizePixel = 0 f.BackgroundColor3 = Color3.new(0, 0, 0) f.AnchorPoint = Vector2.new(0, anchorY) f.Position = UDim2.fromScale(0, anchorY) f.Size = UDim2.fromScale(1, 0) f.Parent = barsGui return f end local barTop, barBottom = bar(0), bar(1) -- Lens flare: sun glow, ghosts along the sun->center axis, and an anamorphic streak local flareGui = newGui("SP_Flare", 40) local flareParts = {} local function flareElement(k, size, color, alpha, ring, streak) local f = Instance.new("Frame") f.AnchorPoint = Vector2.new(0.5, 0.5) f.BorderSizePixel = 0 f.BackgroundColor3 = color f.BackgroundTransparency = 1 local e = { frame = f, k = k, size = size, alpha = alpha, streak = streak } if streak then local g = Instance.new("UIGradient") g.Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.5, 0), NumberSequenceKeypoint.new(1, 1), }) g.Parent = f else local c = Instance.new("UICorner") c.CornerRadius = UDim.new(0.5, 0) c.Parent = f if ring then local s = Instance.new("UIStroke") s.Color = color s.Thickness = 3 s.Transparency = 1 s.Parent = f f.BackgroundTransparency = 1 e.stroke = s end end f.Parent = flareGui table.insert(flareParts, e) end -- sun glow (stacked circles fake a radial falloff) flareElement(0, 0.90, Color3.fromRGB(255, 230, 190), 0.07) flareElement(0, 0.50, Color3.fromRGB(255, 225, 170), 0.10) flareElement(0, 0.22, Color3.fromRGB(255, 245, 220), 0.16) flareElement(0, 0.08, Color3.fromRGB(255, 255, 255), 0.45) -- ghosts flareElement(0.35, 0.05, Color3.fromRGB(120, 190, 255), 0.20) flareElement(0.60, 0.10, Color3.fromRGB(255, 190, 120), 0.14, true) flareElement(0.90, 0.04, Color3.fromRGB(180, 255, 200), 0.22) flareElement(1.30, 0.16, Color3.fromRGB(255, 150, 200), 0.12, true) flareElement(1.70, 0.07, Color3.fromRGB(140, 170, 255), 0.16) -- anamorphic streak flareElement(0, 0, Color3.fromRGB(160, 200, 255), 0.5, false, true) -- Screen-space rain streaks local rainGui = newGui("SP_Rain", -5) local drops = {} for i = 1, RAIN_DROPS do local f = Instance.new("Frame") f.AnchorPoint = Vector2.new(0.5, 0.5) f.BorderSizePixel = 0 f.BackgroundColor3 = Color3.fromRGB(205, 220, 240) f.BackgroundTransparency = 0.6 + math.random() * 0.25 f.Size = UDim2.fromOffset(math.random(1, 2), math.random(26, 60)) f.Visible = false f.Parent = rainGui drops[i] = { frame = f, x = math.random() * 1.2 - 0.1, y = math.random(), speed = 1.1 + math.random() * 0.9, on = false, } end local function updateRain(dt, amount, slantDeg, vp) local count = math.floor(RAIN_DROPS * math.clamp(amount, 0, 1)) local drift = math.tan(math.rad(slantDeg)) * (vp.Y / math.max(vp.X, 1)) for i, d in ipairs(drops) do if i <= count then if not d.on then d.on = true d.frame.Visible = true end d.y += d.speed * dt d.x += d.speed * dt * drift if d.y > 1.1 then d.y = -0.1 d.x = math.random() * 1.2 - 0.1 end if d.x > 1.1 then d.x = -0.1 end d.frame.Position = UDim2.fromScale(d.x, d.y) d.frame.Rotation = -slantDeg elseif d.on then d.on = false d.frame.Visible = false end end end -- Snow (world-space particles that follow the camera) local snowPart = Instance.new("Part") snowPart.Name = "SP_SnowEmitter" snowPart.Anchored = true snowPart.CanCollide = false snowPart.CanQuery = false snowPart.CanTouch = false snowPart.CastShadow = false snowPart.Transparency = 1 snowPart.Size = Vector3.new(90, 1, 90) snowPart.Parent = Workspace local snowEmitter = Instance.new("ParticleEmitter") snowEmitter.Texture = "rbxasset://textures/particles/smoke_main.dds" snowEmitter.Rate = 0 snowEmitter.Lifetime = NumberRange.new(7, 9) snowEmitter.Speed = NumberRange.new(7, 12) snowEmitter.EmissionDirection = Enum.NormalId.Bottom snowEmitter.SpreadAngle = Vector2.new(25, 25) snowEmitter.Acceleration = Vector3.new(3, 0, 1) snowEmitter.Size = NumberSequence.new(0.2, 0.3) snowEmitter.Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.1, 0.2), NumberSequenceKeypoint.new(0.9, 0.2), NumberSequenceKeypoint.new(1, 1), }) snowEmitter.Color = ColorSequence.new(WHITE) snowEmitter.LightEmission = 0.3 snowEmitter.RotSpeed = NumberRange.new(-60, 60) snowEmitter.Parent = snowPart --// Character tracking ------------------------------------------------------------------------- local humanoid, rootPart local rayParams = RaycastParams.new() rayParams.FilterType = Enum.RaycastFilterType.Exclude local function bindCharacter(char) rayParams.FilterDescendantsInstances = { char } humanoid = char:WaitForChild("Humanoid") rootPart = char:WaitForChild("HumanoidRootPart") end if player.Character then task.spawn(bindCharacter, player.Character) end player.CharacterAdded:Connect(bindCharacter) --// Hide / restore the game's own post effects ------------------------------------------------------- local stashed = {} local function stashExisting() if not REPLACE_EXISTING_EFFECTS then return end for _, child in ipairs(Lighting:GetChildren()) do if (child:IsA("PostEffect") or child:IsA("Atmosphere")) and child.Name:sub(1, 3) ~= "SP_" then table.insert(stashed, child) child.Parent = nil end end end local function restoreStashed() for _, inst in ipairs(stashed) do inst.Parent = Lighting end table.clear(stashed) end --// Clouds / sky / water (capture originals, restore on disable) --------------------------------------- local clouds, cloudsOrig, cloudsOwn local function ensureClouds() if clouds and clouds.Parent then return end clouds = terrain:FindFirstChildOfClass("Clouds") cloudsOwn = false if clouds then cloudsOrig = { Cover = clouds.Cover, Density = clouds.Density, Color = clouds.Color, Enabled = clouds.Enabled } else clouds = Instance.new("Clouds") clouds.Name = "SP_Clouds" clouds.Parent = terrain cloudsOwn = true end end local function restoreClouds() if not (clouds and clouds.Parent) then return end if cloudsOwn then clouds:Destroy() clouds = nil else for k, v in pairs(cloudsOrig) do clouds[k] = v end end end local sky, skyOrig, skyOwn local function ensureSky() if sky and sky.Parent then return end sky = Lighting:FindFirstChildOfClass("Sky") skyOwn = false if sky then skyOrig = { StarCount = sky.StarCount, SunAngularSize = sky.SunAngularSize, MoonAngularSize = sky.MoonAngularSize, CelestialBodiesShown = sky.CelestialBodiesShown, } else sky = Instance.new("Sky") sky.Name = "SP_Sky" sky.Parent = Lighting skyOwn = true end end local function restoreSky() if not (sky and sky.Parent) then return end if skyOwn then sky:Destroy() sky = nil else for k, v in pairs(skyOrig) do sky[k] = v end end end local function restoreWater() for p, v in pairs(waterOrig) do terrain[p] = v end end --// Helpers --------------------------------------------------------------------------------------------- local function approach(inst, prop, target, a) local cur = inst[prop] if typeof(cur) == "Color3" then inst[prop] = cur:Lerp(target, a) else inst[prop] = cur + (target - cur) * a end end local function applyProps(inst, tbl, a) for prop, value in pairs(tbl) do approach(inst, prop, value, a) end end local scratch = { Lighting = {}, Bloom = {}, Color = {}, SunRays = {}, DOF = {}, Atmo = {}, Water = {} } local function fill(dst, src) for k in pairs(dst) do dst[k] = nil end for k, v in pairs(src) do dst[k] = v end return dst end local function isUnderwater(pos) local ok, result = pcall(function() local cell = terrain:WorldToCell(pos) local center = terrain:CellCenterToWorld(cell.X, cell.Y, cell.Z) local region = Region3.new(center - Vector3.one * 2, center + Vector3.one * 2) local materials, occupancy = terrain:ReadVoxels(region, 4) if materials[1][1][1] ~= Enum.Material.Water then return false end local surfaceY = (center.Y - 2) + occupancy[1][1][1] * 4 return pos.Y < surfaceY end) return ok and result or false end -- Checks how enclosed the camera is and whether the sun is visible (runs ~7x per second) local SKY_RAYS = { Vector3.new(0, 1, 0), Vector3.new(0.6, 1, 0).Unit, Vector3.new(-0.6, 1, 0).Unit, Vector3.new(0, 1, 0.6).Unit, Vector3.new(0, 1, -0.6).Unit, } local function sampleSurroundings() local origin = camera.CFrame.Position local hits = 0 for _, dir in ipairs(SKY_RAYS) do if Workspace:Raycast(origin, dir * 70, rayParams) then hits += 1 end end indoorTarget = hits / #SKY_RAYS local sunDir = Lighting:GetSunDirection() sunVisible = sunDir.Y > -0.05 and Workspace:Raycast(origin, sunDir * 1500, rayParams) == nil end local function refreshFlags() local m = config.Master bloom.Enabled = m and features.Bloom grade.Enabled = m and features.ColorGrade sunRays.Enabled = m and features.SunRays dof.Enabled = m and features.DepthOfField if not (m and features.MotionBlur) then motionBlur.Enabled = false motionBlur.Size = 0 end atmosphere.Parent = (m and features.Atmosphere) and Lighting or nil if not m then waterGrade.Enabled = false waterBlur.Enabled = false flashGrade.Enabled = false end vigGui.Enabled = m barsGui.Enabled = m rainGui.Enabled = m flareGui.Enabled = m and features.LensFlare end local function setWeather(name) currentWeather = name features.Weather = true if refreshUI then refreshUI() end end local function pickRandomWeather() local pool = {} for _, n in ipairs(WEATHER_ORDER) do if n ~= currentWeather then table.insert(pool, n) end end setWeather(pool[math.random(#pool)]) end local function updateFlare(dt, sunDir, vp) local target = 0 if features.LensFlare then local pos, onScreen = camera:WorldToViewportPoint(camera.CFrame.Position + sunDir * 1000) if onScreen and pos.Z > 0 and sunVisible then lastSunPx = Vector2.new(pos.X, pos.Y) local fromCenter = (lastSunPx - vp / 2).Magnitude / math.max(vp.Magnitude / 2, 1) target = math.clamp(1.3 - fromCenter * 1.3, 0, 1) target *= math.clamp(sunDir.Y * 6 + 0.3, 0, 1) target *= (1 - 0.85 * wx.cover) target *= (1 - uw) end end flareAmt += (target - flareAmt) * (1 - math.exp(-dt * 8)) flareGui.Enabled = flareAmt > 0.01 if not flareGui.Enabled then return end local axis = vp / 2 - lastSunPx for _, e in ipairs(flareParts) do local p = lastSunPx + axis * e.k e.frame.Position = UDim2.fromOffset(p.X, p.Y) if e.streak then e.frame.Size = UDim2.fromOffset(vp.X * 0.7, 5) else local s = e.size * vp.Y e.frame.Size = UDim2.fromOffset(s, s) end local tr = 1 - flareAmt * e.alpha if e.stroke then e.stroke.Transparency = tr else e.frame.BackgroundTransparency = tr end end end --// Main loop ------------------------------------------------------------------------------------------------- RunService.RenderStepped:Connect(function(rawDt) if not config.Master then return end local activeCamera = Workspace.CurrentCamera if not activeCamera then return end if camera ~= activeCamera then camera = activeCamera baseFov = camera.FieldOfView lastLook = camera.CFrame.LookVector fovTouched = false end local dt = math.min(rawDt, 0.1) local instantFPS = 1 / math.max(rawDt, 1 / 240) fpsAverage += (instantFPS - fpsAverage) * (1 - math.exp(-dt * 1.8)) qualityCheckTimer += dt if autoQuality and qualityCheckTimer >= 2 then qualityCheckTimer = 0 if fpsAverage < 42 then qualityScale = math.max(0.45, qualityScale - 0.10) elseif fpsAverage > 58 then qualityScale = math.min(0.72, qualityScale + 0.04) end if refreshUI then refreshUI() end end fpsUiTimer += dt local preset = PRESETS[currentPreset] local S = strength local a = 1 - math.exp(-dt * TRANSITION_SPEED) local fa = 1 - math.exp(-dt * FOCUS_SPEED) local vp = camera.ViewportSize -- Clock + sun if features.DayNightCycle then Lighting.ClockTime = (Lighting.ClockTime + dt * CLOCK_SPEED) % 24 end local sunDir = Lighting:GetSunDirection() local sunHeight = sunDir.Y local dayFactor = features.NightAdapt and math.clamp(sunHeight * 2 + 0.2, 0, 1) or 1 local night = math.clamp(-sunHeight * 3.5, 0, 1) local golden = math.clamp(1 - math.abs(sunHeight) / 0.3, 0, 1) local tg = features.TimeGrade and 1 or 0 timeUiTimer -= dt if timeUiTimer <= 0 and timeSlider then timeUiTimer = 0.25 timeSlider.set(Lighting.ClockTime) end -- Weather blending local wTarget = features.Weather and WEATHER[currentWeather] or WEATHER.Clear local wa = 1 - math.exp(-dt * WEATHER_SPEED) for k, v in pairs(wTarget) do wx[k] += (v - wx[k]) * wa end if features.AutoWeather then weatherTimer -= dt if weatherTimer <= 0 then weatherTimer = math.random(AUTO_WEATHER_MIN, AUTO_WEATHER_MAX) pickRandomWeather() end end -- Surroundings (indoors / sun visibility) sampleTimer -= dt if sampleTimer <= 0 then sampleTimer = 0.15 / math.max(qualityScale, 0.45) sampleSurroundings() end indoor += (indoorTarget - indoor) * (1 - math.exp(-dt * 3)) -- Underwater (checked 10x per second) waterTimer += dt if waterTimer > (0.1 / math.max(qualityScale, 0.45)) then waterTimer = 0 underwater = features.UnderwaterFX and isUnderwater(camera.CFrame.Position) end uw += ((underwater and 1 or 0) - uw) * (1 - math.exp(-dt * 4)) waterGrade.Enabled = underwater waterBlur.Enabled = underwater -- Low health amount (0 = healthy, 1 = nearly dead) local danger = 0 if features.LowHealthFX and humanoid and humanoid.Parent and humanoid.MaxHealth > 0 then local frac = humanoid.Health / humanoid.MaxHealth danger = math.clamp((0.35 - frac) / 0.35, 0, 1) end -- Lightning if features.Weather and wx.storm > 0.6 then boltTimer -= dt if boltTimer <= 0 then flash = 1 boltTimer = 4 + math.random() * 10 pendingFlash = (math.random() < 0.55) and 0.12 or nil end end if pendingFlash then pendingFlash -= dt if pendingFlash <= 0 then flash = math.max(flash, 0.75) pendingFlash = nil end end flash *= math.exp(-dt * 8) local flashAmt = flash * (1 - indoor * 0.7) flashGrade.Enabled = flashAmt > 0.01 if flashGrade.Enabled then flashGrade.Brightness = flashAmt * 0.35 flashGrade.Contrast = flashAmt * 0.25 end -- Auto exposure (eye adaptation): brighter indoors, darker when staring at the sun local exposureTarget = 0 if features.AutoExposure then exposureTarget += indoor * 0.5 * (0.4 + 0.6 * dayFactor) local facing = math.max(0, camera.CFrame.LookVector:Dot(sunDir)) ^ 6 exposureTarget -= facing * 0.55 * dayFactor * (sunVisible and 1 or 0) * (1 - 0.8 * wx.cover) end eyeExposure += (exposureTarget - eyeExposure) * (1 - math.exp(-dt * 1.2)) -- Lighting properties (+ weather + time of day) local lt = fill(scratch.Lighting, preset.Lighting) lt.Brightness = lt.Brightness * (1 - 0.4 * wx.gloom) lt.ExposureCompensation = lt.ExposureCompensation - 0.35 * wx.gloom + eyeExposure lt.EnvironmentSpecularScale = math.min(1, lt.EnvironmentSpecularScale + 0.3 * wx.rain) lt.Ambient = lt.Ambient:Lerp(GREY_AMBIENT, wx.gloom * 0.45) lt.OutdoorAmbient = lt.OutdoorAmbient:Lerp(GREY_AMBIENT, wx.gloom * 0.45) if tg > 0 then lt.Ambient = lt.Ambient:Lerp(NIGHT_AMBIENT, night * 0.55) lt.OutdoorAmbient = lt.OutdoorAmbient:Lerp(NIGHT_OUTDOOR, night * 0.7) lt.ColorShift_Top = lt.ColorShift_Top:Lerp(WARM_SUN, golden * 0.7) lt.ColorShift_Bottom = lt.ColorShift_Bottom:Lerp(WARM_BOUNCE, golden * 0.5) end applyProps(Lighting, lt, a) -- Bloom (stronger at night) if features.Bloom then local t = fill(scratch.Bloom, preset.Bloom) t.Intensity = t.Intensity * S * (1 + (1 - dayFactor) * 0.6) applyProps(bloom, t, a) end -- Color grading (strength, weather, time of day, rainbow, low health) if features.ColorGrade then local t = fill(scratch.Color, preset.Color) t.Brightness = t.Brightness * S t.Contrast = t.Contrast * S t.Saturation = t.Saturation * S t.TintColor = WHITE:Lerp(t.TintColor, math.min(S, 1)) t.Saturation = t.Saturation - 0.35 * wx.gloom - 0.2 * wx.snow t.TintColor = t.TintColor:Lerp(COOL_GREY, wx.gloom * 0.45 + wx.snow * 0.2) if tg > 0 then t.TintColor = t.TintColor:Lerp(GOLDEN_TINT, golden * 0.5) t.TintColor = t.TintColor:Lerp(NIGHT_TINT, night * 0.45) t.Saturation = t.Saturation + golden * 0.12 - night * 0.1 t.Contrast = t.Contrast + golden * 0.05 end if features.RainbowTint then t.TintColor = Color3.fromHSV((os.clock() * 0.05) % 1, 0.3, 1) end if danger > 0 then t.Saturation = t.Saturation - danger * 0.6 t.TintColor = t.TintColor:Lerp(Color3.fromRGB(255, 110, 110), danger * 0.6) end t.Saturation = math.clamp(t.Saturation, -1, 1) t.Contrast = math.clamp(t.Contrast, -1, 1) t.Brightness = math.clamp(t.Brightness, -1, 1) applyProps(grade, t, a) end -- God rays fade after sunset and behind clouds if features.SunRays then local t = fill(scratch.SunRays, preset.SunRays) t.Intensity = math.clamp(t.Intensity * S * dayFactor * (1 - 0.8 * wx.cover), 0, 1) applyProps(sunRays, t, a) end -- Atmosphere (weather fog, golden/blue hour, underwater fog) if features.Atmosphere then local t = fill(scratch.Atmo, preset.Atmosphere) t.Density = math.clamp(t.Density * S + 0.45 * wx.fog + 0.08 * wx.gloom + 0.45 * uw, 0, 1) t.Haze = t.Haze + 3 * wx.fog + wx.gloom t.Glare = t.Glare * (1 - 0.85 * wx.cover) if tg > 0 then t.Color = t.Color:Lerp(GOLD_FOG, golden * 0.6):Lerp(NIGHT_FOG, night * 0.8) t.Decay = t.Decay:Lerp(GOLD_DECAY, golden * 0.6):Lerp(NIGHT_DECAY, night * 0.8) t.Glare = t.Glare + golden * 0.6 end t.Color = t.Color:Lerp(GREY_FOG, wx.gloom * 0.7):Lerp(WATER_FOG, uw * 0.85) t.Decay = t.Decay:Lerp(GREY_DECAY, wx.gloom * 0.7):Lerp(WATER_DECAY, uw * 0.85) applyProps(atmosphere, t, a) end -- Depth of field with auto-focus (raycasts from the camera) if features.DepthOfField then local t = fill(scratch.DOF, preset.DOF) t.FarIntensity = t.FarIntensity * S t.NearIntensity = t.NearIntensity * S if features.AutoFocus then local origin = camera.CFrame.Position local hit = Workspace:Raycast(origin, camera.CFrame.LookVector * MAX_FOCUS, rayParams) local dist = hit and (hit.Position - origin).Magnitude or MAX_FOCUS t.FocusDistance = dist t.InFocusRadius = math.clamp(dist * 0.5, 8, 120) t.NearIntensity = 0 -- don't blur your own character end applyProps(dof, t, fa) end -- Volumetric clouds (cover/density from weather, color from time of day) if features.Clouds then ensureClouds() clouds.Enabled = true clouds.Cover = wx.cover clouds.Density = wx.density local cc = WHITE:Lerp(CLOUD_GOLD, golden * 0.8 * tg) cc = cc:Lerp(CLOUD_NIGHT, night * 0.9 * tg) cc = cc:Lerp(CLOUD_GLOOM, wx.gloom * 0.75) approach(clouds, "Color", cc, a) end -- Stars, sun and moon if features.Celestial then ensureSky() sky.CelestialBodiesShown = true sky.StarCount = math.floor(( ((currentPreset == "StarryNight") or (currentPreset == "Aurora")) and 9000 or 7000 ) * night * (1 - 0.55 * wx.cover)) sky.SunAngularSize = 21 + golden * 12 sky.MoonAngularSize = 15 end -- Water shader (waves get bigger in rain / storms) if features.WaterFX then local t = fill(scratch.Water, preset.Water) t.WaterWaveSize = math.min(1, t.WaterWaveSize + 0.35 * wx.storm + 0.12 * wx.rain) t.WaterWaveSpeed = t.WaterWaveSpeed + 14 * wx.storm + 5 * wx.rain t.WaterColor = t.WaterColor:Lerp(GREY_WATER, wx.gloom * 0.5) applyProps(terrain, t, a) end -- Motion blur from camera rotation speed local look = camera.CFrame.LookVector if features.MotionBlur then local angle = math.acos(math.clamp(lastLook:Dot(look), -1, 1)) local turnSpeed = angle / math.max(dt, 1 / 240) local target = math.clamp(turnSpeed * MOTION_BLUR_STRENGTH, 0, MOTION_BLUR_MAX) motionBlur.Size += (target - motionBlur.Size) * (1 - math.exp(-dt * 14)) motionBlur.Enabled = motionBlur.Size > 0.3 end lastLook = look -- Vignette (+ low-health pulse) local vigTarget = features.Vignette and (preset.Vignette * S + wx.gloom * 0.1) or 0 if danger > 0 then vigTarget += danger * 0.45 + math.sin(os.clock() * 7) * 0.08 * danger end vig += (vigTarget - vig) * a setVignette(vig) -- Cinematic bars (2.39:1) local barFrac = math.max(0, (1 - (vp.X / math.max(vp.Y, 1)) / 2.39) / 2) local barTarget = features.Letterbox and barFrac or 0 barCur += (barTarget - barCur) * math.min(1, a * 2) barTop.Size = UDim2.fromScale(1, barCur) barBottom.Size = UDim2.fromScale(1, barCur) -- Lens flare updateFlare(dt, sunDir, vp) -- Snow follows the camera; both snow and rain fade out when you're sheltered or underwater local shelter = (1 - indoor) * (1 - uw) snowPart.CFrame = CFrame.new(camera.CFrame.Position + Vector3.new(0, 35, 0)) snowEmitter.Rate = 300 * wx.snow * shelter * qualityScale updateRain(dt, wx.rain * shelter * qualityScale, 6 + 10 * wx.storm, vp) -- Speed FOV if features.SpeedFOV and rootPart and rootPart.Parent then local speed = rootPart.AssemblyLinearVelocity.Magnitude local target = baseFov + math.clamp((speed - 20) * 0.4, 0, 22) camera.FieldOfView += (target - camera.FieldOfView) * fa fovTouched = true elseif fovTouched then camera.FieldOfView += (baseFov - camera.FieldOfView) * a if math.abs(camera.FieldOfView - baseFov) < 0.05 then camera.FieldOfView = baseFov fovTouched = false end end end) --// Handheld camera sway (runs right after the default camera) --------------------------------------------------- local swaySeed = math.random() * 100 RunService:BindToRenderStep("SP_CameraSway", Enum.RenderPriority.Camera.Value + 1, function() if not (config.Master and features.CameraSway) then return end local cam = Workspace.CurrentCamera if not cam then return end local t = os.clock() + swaySeed local planar = 0 if rootPart and rootPart.Parent then local v = rootPart.AssemblyLinearVelocity planar = Vector3.new(v.X, 0, v.Z).Magnitude end local move = math.clamp(planar / 16, 0, 1) local amp = 0.0015 + move * 0.0035 + wx.storm * 0.004 local pitch = math.sin(t * 1.1) * amp + math.sin(t * 2.3) * amp * 0.4 local yaw = math.sin(t * 0.9 + 2) * amp local roll = math.sin(t * 0.7 + 4) * amp * 0.8 local bob = math.sin(t * 9) * 0.045 * move cam.CFrame = cam.CFrame * CFrame.new(0, bob, 0) * CFrame.Angles(pitch, yaw, roll) end) --// Control panel ------------------------------------------------------------------------------------------------------ local COL_ON = Color3.fromRGB(60, 160, 100) local COL_OFF = Color3.fromRGB(52, 52, 62) local COL_SEL = Color3.fromRGB(80, 120, 230) local gui = Instance.new("ScreenGui") gui.Name = "SP_UI" gui.ResetOnSpawn = false gui.DisplayOrder = 100 gui.Parent = guiParent local function round(inst, radius) local c = Instance.new("UICorner") c.CornerRadius = UDim.new(0, radius or 6) c.Parent = inst end local panel = Instance.new("Frame") panel.Name = "Panel" panel.AnchorPoint = Vector2.new(0, 0.5) panel.Position = UDim2.new(0, 12, 0.5, 0) panel.Size = UDim2.new(0, 300, 0.86, 0) panel.BackgroundColor3 = Color3.fromRGB(15, 18, 27) panel.BackgroundTransparency = 0.04 panel.Parent = gui round(panel, 10) local sizeLimit = Instance.new("UISizeConstraint") sizeLimit.MaxSize = Vector2.new(300, 720) sizeLimit.Parent = panel local title = Instance.new("TextLabel") title.BackgroundTransparency = 1 title.Position = UDim2.fromOffset(12, 6) title.Size = UDim2.new(1, -24, 0, 28) title.Font = Enum.Font.GothamBold title.TextSize = 16 title.TextColor3 = Color3.new(1, 1, 1) title.TextXAlignment = Enum.TextXAlignment.Left title.Text = "SHADER PACK // ULTRA" title.Parent = panel local statusLabel = Instance.new("TextLabel") statusLabel.BackgroundTransparency = 1 statusLabel.Position = UDim2.fromOffset(12, 34) statusLabel.Size = UDim2.new(1, -24, 0, 16) statusLabel.Font = Enum.Font.Gotham statusLabel.TextSize = 10 statusLabel.TextColor3 = Color3.fromRGB(145, 160, 185) statusLabel.TextXAlignment = Enum.TextXAlignment.Left statusLabel.Text = "CLIENT VISUALS • ADAPTIVE QUALITY" statusLabel.Parent = panel local titleLine = Instance.new("Frame") titleLine.BorderSizePixel = 0 titleLine.BackgroundColor3 = Color3.fromRGB(83, 150, 255) titleLine.Position = UDim2.new(0, 12, 0, 51) titleLine.Size = UDim2.new(1, -24, 0, 2) titleLine.Parent = panel local draggingPanel = false local panelDragStart, panelStartPosition title.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then draggingPanel = true panelDragStart = input.Position panelStartPosition = panel.Position end end) UserInputService.InputChanged:Connect(function(input) if draggingPanel and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then local delta = input.Position - panelDragStart panel.Position = UDim2.new( panelStartPosition.X.Scale, panelStartPosition.X.Offset + delta.X, panelStartPosition.Y.Scale, panelStartPosition.Y.Offset + delta.Y ) end end) UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then draggingPanel = false end end) local scroll = Instance.new("ScrollingFrame") scroll.BackgroundTransparency = 1 scroll.BorderSizePixel = 0 scroll.Position = UDim2.fromOffset(10, 58) scroll.Size = UDim2.new(1, -20, 1, -66) scroll.ScrollBarThickness = 4 scroll.CanvasSize = UDim2.new() scroll.AutomaticCanvasSize = Enum.AutomaticSize.Y scroll.Parent = panel local list = Instance.new("UIListLayout") list.Padding = UDim.new(0, 6) list.SortOrder = Enum.SortOrder.LayoutOrder list.Parent = scroll local order = 0 local function nextOrder() order += 1 return order end local function header(text) local l = Instance.new("TextLabel") l.BackgroundTransparency = 1 l.Size = UDim2.new(1, 0, 0, 18) l.Font = Enum.Font.GothamMedium l.TextSize = 12 l.TextColor3 = Color3.fromRGB(150, 150, 165) l.TextXAlignment = Enum.TextXAlignment.Left l.Text = text l.LayoutOrder = nextOrder() l.Parent = scroll end local function button(parent, text) local b = Instance.new("TextButton") b.BackgroundColor3 = COL_OFF b.Size = UDim2.new(1, 0, 0, 28) b.Font = Enum.Font.GothamMedium b.TextSize = 13 b.TextColor3 = Color3.new(1, 1, 1) b.Text = text round(b, 6) b.Parent = parent return b end local function makeGrid() local grid = Instance.new("Frame") grid.BackgroundTransparency = 1 grid.Size = UDim2.new(1, 0, 0, 0) grid.AutomaticSize = Enum.AutomaticSize.Y grid.LayoutOrder = nextOrder() grid.Parent = scroll local layout = Instance.new("UIGridLayout") layout.CellSize = UDim2.new(0.5, -3, 0, 28) layout.CellPadding = UDim2.fromOffset(6, 6) layout.SortOrder = Enum.SortOrder.LayoutOrder layout.Parent = grid return grid end local function makeSlider(text, minV, maxV, value, fmt, onChange) local holder = Instance.new("Frame") holder.BackgroundTransparency = 1 holder.Size = UDim2.new(1, 0, 0, 42) holder.LayoutOrder = nextOrder() holder.Parent = scroll local label = Instance.new("TextLabel") label.BackgroundTransparency = 1 label.Size = UDim2.new(1, 0, 0, 18) label.Font = Enum.Font.GothamMedium label.TextSize = 12 label.TextColor3 = Color3.fromRGB(200, 200, 215) label.TextXAlignment = Enum.TextXAlignment.Left label.Parent = holder local track = Instance.new("Frame") track.Position = UDim2.new(0, 0, 0, 28) track.Size = UDim2.new(1, 0, 0, 6) track.BackgroundColor3 = COL_OFF track.BorderSizePixel = 0 round(track, 3) track.Parent = holder local fillBar = Instance.new("Frame") fillBar.BackgroundColor3 = COL_SEL fillBar.BorderSizePixel = 0 fillBar.Size = UDim2.fromScale(0, 1) round(fillBar, 3) fillBar.Parent = track local knob = Instance.new("Frame") knob.AnchorPoint = Vector2.new(0.5, 0.5) knob.Size = UDim2.fromOffset(14, 14) knob.Position = UDim2.fromScale(0, 0.5) knob.BackgroundColor3 = WHITE knob.BorderSizePixel = 0 round(knob, 7) knob.Parent = track local hit = Instance.new("TextButton") hit.BackgroundTransparency = 1 hit.Text = "" hit.Position = UDim2.new(0, -6, 0, 20) hit.Size = UDim2.new(1, 12, 0, 22) hit.Parent = holder local dragging = false local function setValue(v, silent) local current = math.clamp(v, minV, maxV) local alpha = (current - minV) / (maxV - minV) fillBar.Size = UDim2.fromScale(alpha, 1) knob.Position = UDim2.fromScale(alpha, 0.5) label.Text = text .. ": " .. fmt(current) if not silent then onChange(current) end end local function fromInput(x) local alpha = math.clamp((x - track.AbsolutePosition.X) / math.max(track.AbsoluteSize.X, 1), 0, 1) setValue(minV + (maxV - minV) * alpha) end local function isPointer(input) return input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch end hit.InputBegan:Connect(function(input) if isPointer(input) then dragging = true scroll.ScrollingEnabled = false fromInput(input.Position.X) end end) UserInputService.InputChanged:Connect(function(input) if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then fromInput(input.Position.X) end end) UserInputService.InputEnded:Connect(function(input) if dragging and isPointer(input) then dragging = false scroll.ScrollingEnabled = true end end) setValue(value, true) return { set = function(v) if not dragging then setValue(v, true) end end, } end local presetButtons, weatherButtons, featureButtons, qualityButtons = {}, {}, {}, {} local masterButton refreshUI = function() masterButton.BackgroundColor3 = config.Master and COL_ON or Color3.fromRGB(170, 60, 60) masterButton.Text = config.Master and "Shaders: ON" or "Shaders: OFF" for name, b in pairs(presetButtons) do b.BackgroundColor3 = (name == currentPreset) and COL_SEL or COL_OFF end for name, b in pairs(weatherButtons) do b.BackgroundColor3 = (features.Weather and name == currentWeather) and COL_SEL or COL_OFF end local activeQuality = autoQuality and "AUTO" or qualityMode for name, b in pairs(qualityButtons) do b.BackgroundColor3 = (name == activeQuality) and COL_SEL or COL_OFF end for _, f in ipairs(FEATURES) do local b = featureButtons[f.key] b.BackgroundColor3 = features[f.key] and COL_ON or COL_OFF b.Text = (features[f.key] and "● " or "○ ") .. f.label end end local function setMaster(on) config.Master = on if on then stashExisting() else for p, v in pairs(original) do Lighting[p] = v end restoreStashed() restoreClouds() restoreSky() restoreWater() snowEmitter.Rate = 0 flash = 0 if fovTouched then camera.FieldOfView = baseFov fovTouched = false end end refreshFlags() refreshUI() end local function setPreset(name) currentPreset = name if name == "StarryNight" or name == "Aurora" then Lighting.ClockTime = 0.5 elseif name == "EcoGloom" then Lighting.ClockTime = 17.8 end refreshUI() end local function cycleList(listTable, current, step) local idx = table.find(listTable, current) or 1 return listTable[(idx - 1 + step) % #listTable + 1] end local QUALITY_VALUES = { ECO = 0.4, BALANCED = 0.68, ULTRA = 1 } local function setQuality(name) if name == "AUTO" then autoQuality = true qualityScale = math.clamp(qualityScale, 0.45, 0.72) else autoQuality = false qualityMode = name qualityScale = QUALITY_VALUES[name] or 1 end refreshUI() end -- master switch masterButton = button(scroll, "") masterButton.LayoutOrder = nextOrder() masterButton.MouseButton1Click:Connect(function() setMaster(not config.Master) end) -- presets header("PRESETS") local presetGrid = makeGrid() for i, name in ipairs(PRESET_ORDER) do local b = button(presetGrid, name) b.LayoutOrder = i presetButtons[name] = b b.MouseButton1Click:Connect(function() setPreset(name) end) end -- weather header("WEATHER") local weatherGrid = makeGrid() for i, name in ipairs(WEATHER_ORDER) do local b = button(weatherGrid, name) b.LayoutOrder = i weatherButtons[name] = b b.MouseButton1Click:Connect(function() setWeather(name) end) end -- adaptive rendering quality header("RENDER QUALITY") local qualityGrid = makeGrid() for i, name in ipairs({ "ECO", "BALANCED", "ULTRA", "AUTO" }) do local b = button(qualityGrid, name) b.LayoutOrder = i qualityButtons[name] = b b.MouseButton1Click:Connect(function() setQuality(name) end) end -- sliders header("SLIDERS") makeSlider("Effect strength", 0, 1.5, strength, function(v) return string.format("%d%%", math.floor(v * 100 + 0.5)) end, function(v) strength = v end) timeSlider = makeSlider("Time of day", 0, 24, Lighting.ClockTime, function(v) return string.format("%02d:%02d", math.floor(v) % 24, math.floor((v % 1) * 60)) end, function(v) Lighting.ClockTime = v end) -- feature toggles (grouped) local onDisabled = { Clouds = restoreClouds, Celestial = restoreSky, WaterFX = restoreWater, } local lastGroup for _, f in ipairs(FEATURES) do if f.group ~= lastGroup then header(f.group) lastGroup = f.group end local b = button(scroll, "") b.LayoutOrder = nextOrder() b.TextXAlignment = Enum.TextXAlignment.Left local pad = Instance.new("UIPadding") pad.PaddingLeft = UDim.new(0, 10) pad.Parent = b featureButtons[f.key] = b b.MouseButton1Click:Connect(function() features[f.key] = not features[f.key] if not features[f.key] and onDisabled[f.key] then onDisabled[f.key]() end refreshFlags() refreshUI() end) end -- small always-visible button (handy on mobile) local fxButton = Instance.new("TextButton") fxButton.Size = UDim2.fromOffset(46, 46) fxButton.Position = UDim2.fromOffset(12, 60) fxButton.BackgroundColor3 = Color3.fromRGB(22, 22, 28) fxButton.BackgroundTransparency = 0.1 fxButton.Font = Enum.Font.GothamBold fxButton.TextSize = 14 fxButton.TextColor3 = WHITE fxButton.Text = "✦" round(fxButton, 20) fxButton.Parent = gui local fxStroke = Instance.new("UIStroke") fxStroke.Color = Color3.fromRGB(83, 150, 255) fxStroke.Thickness = 1.5 fxStroke.Transparency = 0.12 fxStroke.Parent = fxButton fxButton.MouseButton1Click:Connect(function() panel.Visible = not panel.Visible end) panel.Visible = false -- hotkeys UserInputService.InputBegan:Connect(function(input, processed) if processed then return end local key = input.KeyCode if key == Enum.KeyCode.RightShift then panel.Visible = not panel.Visible elseif key == Enum.KeyCode.RightBracket then setPreset(cycleList(PRESET_ORDER, currentPreset, 1)) elseif key == Enum.KeyCode.LeftBracket then setPreset(cycleList(PRESET_ORDER, currentPreset, -1)) elseif key == Enum.KeyCode.Period then setWeather(cycleList(WEATHER_ORDER, currentWeather, 1)) elseif key == Enum.KeyCode.Comma then setWeather(cycleList(WEATHER_ORDER, currentWeather, -1)) end end) --// Start stashExisting() refreshFlags() refreshUI()