Bloxshade
Key RequiredUniversal

Bloxshade

Universal ScriptANUBISSANUBISS 2.3K views 1.2K executesUpdated Jan 23, 2026
5.0/ 5(2 votes)
20100% Positive
Lua Script•770 lines (28002 chars)
-- 🌞 BLOXSHADE ULTRA RTX GUI EDITION v4.5 (Circular Sun Control)
-- Меню управления освещением (открывается на F5)
--[[ 
    
    scripter: Telegram: evlichek| Discord: evlick
]]

local Lighting = game:GetService("Lighting")
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local HttpService = game:GetService("HttpService")
local Workspace = game:GetService("Workspace")
local Terrain = Workspace:WaitForChild("Terrain")
local TweenService = game:GetService("TweenService")
local player = Players.LocalPlayer

---------------------------------------------------------------------
-- Config Auto-Save
---------------------------------------------------------------------
local hasFS = (typeof(writefile) == "function" and typeof(readfile) == "function" and typeof(isfile) == "function")
local SAVE_PATH = "BLOXSHADE_Config_v4.json"

local defaultConfig = {
    clockTime = 15,
    brightness = 1.6,
    globalShadows = true,
    bloomIntensity = 0.34,
    godrays = true,
    dof = true,
    rain = false,
    fog = false,
    fogDensity = 0.1,
    saturation = 0.26,
    contrast = 0.24,
    exposure = -0.05
}

local currentConfig = defaultConfig

-- Auto-load config
if hasFS and isfile(SAVE_PATH) then
    local ok, data = pcall(function()
        return HttpService:JSONDecode(readfile(SAVE_PATH))
    end)
    if ok and data then 
        currentConfig = data
        print("✅ Config auto-loaded")
    end
end

local function AutoSaveConfig()
    if hasFS then
        local ok, err = pcall(function()
            writefile(SAVE_PATH, HttpService:JSONEncode(currentConfig))
        end)
        if ok then
            print("💾 Config auto-saved")
        else
            warn("AutoSave error: ", err)
        end
    end
end

---------------------------------------------------------------------
-- Apply Graphics
---------------------------------------------------------------------
function ApplyGraphics()
    for _, v in pairs(Lighting:GetChildren()) do
        if v:IsA("PostEffect") or v:IsA("Sky") or v:IsA("Atmosphere") then
            v:Destroy()
        end
    end
    for _, v in pairs(Terrain:GetChildren()) do
        if v:IsA("Clouds") then v:Destroy() end
    end

    Lighting.ClockTime = currentConfig.clockTime
    Lighting.GlobalShadows = currentConfig.globalShadows
    Lighting.Technology = Enum.Technology.Future
    Lighting.EnvironmentDiffuseScale = 1.2
    Lighting.EnvironmentSpecularScale = 1.8
    Lighting.ExposureCompensation = currentConfig.exposure
    
    -- Fog settings
    if currentConfig.fog then
        Lighting.FogStart = 50
        Lighting.FogEnd = 500
        Lighting.FogColor = currentConfig.rain and Color3.fromRGB(80, 85, 95) or Color3.fromRGB(140, 160, 200)
    else
        Lighting.FogStart = 100000
        Lighting.FogEnd = 100000
    end
    
    if currentConfig.rain then
        Lighting.Brightness = 0.8
        local sky = Instance.new("Sky", Lighting)
        sky.SkyboxBk = "rbxassetid://15131587743"
        sky.SkyboxDn = "rbxassetid://15131587743"
        sky.SkyboxFt = "rbxassetid://15131587743"
        sky.SkyboxLf = "rbxassetid://15131587743"
        sky.SkyboxRt = "rbxassetid://15131587743"
        sky.SkyboxUp = "rbxassetid://15131587743"
        sky.SunAngularSize = 0
        
        local atm = Instance.new("Atmosphere", Lighting)
        atm.Density = 0.55
        atm.Offset = 0
        atm.Color = Color3.fromRGB(80, 85, 95)
        atm.Decay = Color3.fromRGB(40, 40, 50)
        atm.Glare = 0
        atm.Haze = 5
        
        local clouds = Instance.new("Clouds", Terrain)
        clouds.Cover = 0.95
        clouds.Density = 0.8
        clouds.Color = Color3.fromRGB(100, 100, 110)
    else
        Lighting.Brightness = currentConfig.brightness
        local sky = Instance.new("Sky", Lighting)
        sky.SkyboxBk = "rbxassetid://15131587743"
        sky.SkyboxDn = "rbxassetid://15131587743"
        sky.SkyboxFt = "rbxassetid://15131587743"
        sky.SkyboxLf = "rbxassetid://15131587743"
        sky.SkyboxRt = "rbxassetid://15131587743"
        sky.SkyboxUp = "rbxassetid://15131587743"
        sky.SunAngularSize = 7

        local atm = Instance.new("Atmosphere", Lighting)
        atm.Density = 0.24
        atm.Offset = 0.14
        atm.Color = Color3.fromRGB(190, 220, 255)
        atm.Decay = Color3.fromRGB(255, 225, 190)
        atm.Glare = 0.22
        atm.Haze = 1.7
        
        local clouds = Instance.new("Clouds", Terrain)
        clouds.Cover = 0.4
        clouds.Density = 0.5
        clouds.Color = Color3.fromRGB(255, 255, 255)
    end

    local bloom = Instance.new("BloomEffect", Lighting)
    bloom.Intensity = currentConfig.rain and 0.1 or currentConfig.bloomIntensity
    bloom.Threshold = 0.86
    bloom.Size = 20

    if currentConfig.godrays and not currentConfig.rain then
        local rays = Instance.new("SunRaysEffect", Lighting)
        rays.Intensity = 0.2
        rays.Spread = 0.75
    end

    if currentConfig.dof then
        local dof = Instance.new("DepthOfFieldEffect", Lighting)
        dof.FocusDistance = currentConfig.rain and 20 or 40
        dof.InFocusRadius = 200
        dof.FarIntensity = currentConfig.rain and 0.5 or 0.36
        dof.NearIntensity = 0.14
    end
    
    local cc = Instance.new("ColorCorrectionEffect", Lighting)
    if currentConfig.rain then
        cc.Brightness = -0.05
        cc.Contrast = currentConfig.contrast * 0.5
        cc.Saturation = currentConfig.saturation - 0.3
        cc.TintColor = Color3.fromRGB(200, 210, 255)
    else
        cc.Brightness = 0.0
        cc.Contrast = currentConfig.contrast
        cc.Saturation = currentConfig.saturation
        cc.TintColor = Color3.fromRGB(255, 248, 235)
    end
    
    AutoSaveConfig() -- Auto-save after applying graphics
end

ApplyGraphics()

---------------------------------------------------------------------
-- Global Rain System
---------------------------------------------------------------------
local rainFolder = Instance.new("Folder", Workspace)
rainFolder.Name = "BloxShade_Rain"

local rainEmitters = {}

local function CreateRainEmitters()
    for _, emitter in pairs(rainFolder:GetChildren()) do
        emitter:Destroy()
    end
    rainEmitters = {}
    
    local gridSize = 256
    local height = 120
    
    for x = -2, 2 do
        for z = -2, 2 do
            local rainEmitterPart = Instance.new("Part", rainFolder)
            rainEmitterPart.Name = "RainEmitter_" .. tostring(x) .. "_" .. tostring(z)
            rainEmitterPart.CanCollide = false
            rainEmitterPart.Anchored = true
            rainEmitterPart.CanQuery = false
            rainEmitterPart.CFrame = CFrame.new(x * gridSize, height, z * gridSize)
            rainEmitterPart.Transparency = 1
            rainEmitterPart.Size = Vector3.new(300, 1, 300)
            
            local attachment = Instance.new("Attachment", rainEmitterPart)
            
            local rainParticles = Instance.new("ParticleEmitter", attachment)
            rainParticles.Rate = 400
            rainParticles.Lifetime = NumberRange.new(1.5, 2.5)
            rainParticles.Speed = NumberRange.new(70, 90)
            rainParticles.VelocitySpread = 180
            rainParticles.SpreadAngle = Vector2.new(60, 60)
            rainParticles.Acceleration = Vector3.new(0, -150, 0)
            rainParticles.Rotation = NumberRange.new(0, 360)
            rainParticles.RotSpeed = NumberRange.new(-30, 30)
            
            rainParticles.Texture = "rbxassetid://6035282889"
            rainParticles.Transparency = NumberSequence.new({
                NumberSequenceKeypoint.new(0, 0.2),
                NumberSequenceKeypoint.new(0.3, 0.1),
                NumberSequenceKeypoint.new(0.7, 0.1),
                NumberSequenceKeypoint.new(1, 1)
            })
            
            rainParticles.Color = ColorSequence.new(Color3.fromRGB(180, 200, 255))
            rainParticles.Size = NumberSequence.new({
                NumberSequenceKeypoint.new(0, 0.15),
                NumberSequenceKeypoint.new(0.3, 0.12),
                NumberSequenceKeypoint.new(0.7, 0.12),
                NumberSequenceKeypoint.new(1, 0.08)
            })
            
            rainParticles.LightEmission = 0.05
            rainParticles.LightInfluence = 0
            rainParticles.Enabled = currentConfig.rain
            
            table.insert(rainEmitters, {part = rainEmitterPart, emitter = rainParticles})
        end
    end
end

CreateRainEmitters()

local lastUpdate = 0
RunService.Heartbeat:Connect(function()
    if tick() - lastUpdate < 0.1 then return end
    lastUpdate = tick()
    
    if rainFolder and rainFolder.Parent and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
        local playerPos = player.Character.HumanoidRootPart.Position
        local gridSize = 256
        
        local centerX = math.round(playerPos.X / gridSize) * gridSize
        local centerZ = math.round(playerPos.Z / gridSize) * gridSize
        
        local idx = 1
        for x = -2, 2 do
            for z = -2, 2 do
                if rainEmitters[idx] and rainEmitters[idx].part then
                    rainEmitters[idx].part.CFrame = CFrame.new(centerX + x * gridSize, 120, centerZ + z * gridSize)
                end
                idx = idx + 1
            end
        end
    end
end)

---------------------------------------------------------------------
-- Beautiful GUI with Circular Sun Control (Fixed Position)
---------------------------------------------------------------------
local gui = Instance.new("ScreenGui")
gui.Name = "BloxShadeV4"
gui.Parent = player:WaitForChild("PlayerGui")
gui.Enabled = false
gui.ResetOnSpawn = false
gui.IgnoreGuiInset = true

-- Color palette
local C_BG = Color3.fromRGB(10, 12, 18)
local C_BG2 = Color3.fromRGB(20, 22, 28)
local C_BORDER = Color3.fromRGB(45, 47, 60)
local C_TEXT = Color3.fromRGB(240, 240, 245)
local C_TEXT_DIM = Color3.fromRGB(150, 155, 165)
local C_ACCENT = Color3.fromRGB(96, 165, 250)
local C_ACCENT2 = Color3.fromRGB(59, 130, 246)
local C_YELLOW = Color3.fromRGB(250, 204, 21)
local C_ORANGE = Color3.fromRGB(249, 115, 22)
local C_PURPLE = Color3.fromRGB(192, 132, 252)
local C_GREEN = Color3.fromRGB(52, 211, 153)
local C_RED = Color3.fromRGB(248, 113, 113)

local mainFrame = Instance.new("Frame")
mainFrame.Size = UDim2.new(0, 480, 0, 680)
mainFrame.Position = UDim2.new(0.5, -240, 0.5, -340) -- Fixed center position
mainFrame.BackgroundColor3 = C_BG
mainFrame.BorderSizePixel = 0
mainFrame.Active = true
mainFrame.Draggable = false -- Убрано перетаскивание!
mainFrame.ClipsDescendants = true
mainFrame.Parent = gui

-- Glass morphism effect
Instance.new("UICorner", mainFrame).CornerRadius = UDim.new(0, 20)
local stroke = Instance.new("UIStroke", mainFrame)
stroke.Color = C_BORDER
stroke.Thickness = 2
stroke.Transparency = 0.7

local backgroundGlow = Instance.new("ImageLabel", mainFrame)
backgroundGlow.Size = UDim2.new(1, 40, 1, 40)
backgroundGlow.Position = UDim2.new(0, -20, 0, -20)
backgroundGlow.BackgroundTransparency = 1
backgroundGlow.Image = "rbxassetid://8992230675"
backgroundGlow.ImageColor3 = Color3.fromRGB(0, 0, 0)
backgroundGlow.ScaleType = Enum.ScaleType.Slice
backgroundGlow.SliceScale = 0.1
backgroundGlow.ImageTransparency = 0.8
backgroundGlow.ZIndex = -1

-- Header
local header = Instance.new("Frame", mainFrame)
header.Size = UDim2.new(1, 0, 0, 80)
header.BackgroundTransparency = 1

local titleContainer = Instance.new("Frame", header)
titleContainer.Size = UDim2.new(1, -40, 1, 0)
titleContainer.Position = UDim2.new(0, 20, 0, 0)
titleContainer.BackgroundTransparency = 1

local title = Instance.new("TextLabel", titleContainer)
title.Size = UDim2.new(1, 0, 0.6, 0)
title.BackgroundTransparency = 1
title.Text = "BLOXSHADE ULTRA"
title.Font = Enum.Font.GothamBlack
title.TextColor3 = C_TEXT
title.TextSize = 24
title.TextXAlignment = Enum.TextXAlignment.Left

local subtitle = Instance.new("TextLabel", titleContainer)
subtitle.Size = UDim2.new(1, 0, 0.4, 0)
subtitle.Position = UDim2.new(0, 0, 0.6, 0)
subtitle.BackgroundTransparency = 1
subtitle.Text = "RTX ENHANCEMENT SUITE • v4.5"
subtitle.Font = Enum.Font.GothamMedium
subtitle.TextColor3 = C_TEXT_DIM
subtitle.TextSize = 11
subtitle.TextXAlignment = Enum.TextXAlignment.Left

local headerStrip = Instance.new("Frame", header)
headerStrip.Size = UDim2.new(1, -40, 0, 3)
headerStrip.Position = UDim2.new(0, 20, 1, -8)
headerStrip.BorderSizePixel = 0
local grad = Instance.new("UIGradient", headerStrip)
grad.Color = ColorSequence.new({
    ColorSequenceKeypoint.new(0, C_YELLOW),
    ColorSequenceKeypoint.new(0.3, C_ORANGE),
    ColorSequenceKeypoint.new(0.6, C_PURPLE),
    ColorSequenceKeypoint.new(1, C_ACCENT)
})
grad.Rotation = 90

-- Circular Sun Control
local sunControlContainer = Instance.new("Frame", mainFrame)
sunControlContainer.Size = UDim2.new(1, -40, 0, 140)
sunControlContainer.Position = UDim2.new(0, 20, 0, 90)
sunControlContainer.BackgroundColor3 = C_BG2
sunControlContainer.BorderSizePixel = 0
Instance.new("UICorner", sunControlContainer).CornerRadius = UDim.new(0, 16)

local sunControlLabel = Instance.new("TextLabel", sunControlContainer)
sunControlLabel.Size = UDim2.new(1, 0, 0, 30)
sunControlLabel.BackgroundTransparency = 1
sunControlLabel.Text = "SUN POSITION"
sunControlLabel.Font = Enum.Font.GothamBold
sunControlLabel.TextColor3 = C_TEXT
sunControlLabel.TextSize = 14

-- Circular track
local circleTrack = Instance.new("Frame", sunControlContainer)
circleTrack.Size = UDim2.new(0, 100, 0, 100)
circleTrack.Position = UDim2.new(0.5, -50, 0.5, -40)
circleTrack.BackgroundTransparency = 1

local circleOuter = Instance.new("ImageLabel", circleTrack)
circleOuter.Size = UDim2.new(1, 0, 1, 0)
circleOuter.BackgroundTransparency = 1
circleOuter.Image = "rbxassetid://5533216692"
circleOuter.ImageColor3 = C_BORDER
circleOuter.ImageTransparency = 0.6

local circleInner = Instance.new("ImageLabel", circleTrack)
circleInner.Size = UDim2.new(0.8, 0, 0.8, 0)
circleInner.Position = UDim2.new(0.1, 0, 0.1, 0)
circleInner.BackgroundTransparency = 1
circleInner.Image = "rbxassetid://5533216692"
circleInner.ImageColor3 = C_BG
circleInner.ImageTransparency = 0

-- Sun indicator
local sunIndicator = Instance.new("Frame", circleTrack)
sunIndicator.Size = UDim2.new(0, 16, 0, 16)
sunIndicator.BackgroundColor3 = C_YELLOW
sunIndicator.BorderSizePixel = 0
Instance.new("UICorner", sunIndicator).CornerRadius = UDim.new(1, 0)

local sunGlow = Instance.new("ImageLabel", sunIndicator)
sunGlow.Size = UDim2.new(2, 0, 2, 0)
sunGlow.Position = UDim2.new(-0.5, 0, -0.5, 0)
sunGlow.BackgroundTransparency = 1
sunGlow.Image = "rbxassetid://8992230675"
sunGlow.ImageColor3 = C_YELLOW
sunGlow.ScaleType = Enum.ScaleType.Slice
sunGlow.SliceScale = 0.1
sunGlow.ImageTransparency = 0.8
sunGlow.ZIndex = -1

-- Time display
local timeDisplay = Instance.new("TextLabel", sunControlContainer)
timeDisplay.Size = UDim2.new(1, 0, 0, 20)
timeDisplay.Position = UDim2.new(0, 0, 1, -25)
timeDisplay.BackgroundTransparency = 1
timeDisplay.Text = "15:00"
timeDisplay.Font = Enum.Font.GothamBold
timeDisplay.TextColor3 = C_ACCENT
timeDisplay.TextSize = 16

-- Time labels
local timeLabels = {
    {text = "6:00", position = UDim2.new(0.1, 0, 0.1, 0)},   -- Sunrise
    {text = "12:00", position = UDim2.new(0.8, 0, 0.1, 0)}, -- Noon
    {text = "18:00", position = UDim2.new(0.8, 0, 0.8, 0)}, -- Sunset
    {text = "0:00", position = UDim2.new(0.1, 0, 0.8, 0)}   -- Midnight
}

for _, labelInfo in ipairs(timeLabels) do
    local label = Instance.new("TextLabel", circleTrack)
    label.Size = UDim2.new(0, 40, 0, 20)
    label.Position = labelInfo.position
    label.BackgroundTransparency = 1
    label.Text = labelInfo.text
    label.Font = Enum.Font.GothamMedium
    label.TextColor3 = C_TEXT_DIM
    label.TextSize = 10
    label.TextXAlignment = Enum.TextXAlignment.Center
end

-- Circular slider logic
local function UpdateSunPosition(clockTime)
    local angle = (clockTime / 24) * math.pi * 2 - math.pi/2
    local radius = 35
    local center = Vector2.new(50, 50)
    
    local x = center.x + math.cos(angle) * radius
    local y = center.y + math.sin(angle) * radius
    
    sunIndicator.Position = UDim2.new(0, x - 8, 0, y - 8)
    
    -- Update time display
    local hours = math.floor(clockTime)
    local minutes = math.floor((clockTime - hours) * 60)
    timeDisplay.Text = string.format("%02d:%02d", hours, minutes)
    
    -- Update lighting
    currentConfig.clockTime = clockTime
    Lighting.ClockTime = clockTime
    AutoSaveConfig()
end

-- Initialize sun position
UpdateSunPosition(currentConfig.clockTime)

-- Make sun draggable
local sunDragging = false

sunIndicator.InputBegan:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton1 then
        sunDragging = true
    end
end)

UserInputService.InputEnded:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton1 then
        sunDragging = false
    end
end)

UserInputService.InputChanged:Connect(function(input)
    if sunDragging and input.UserInputType == Enum.UserInputType.MouseMovement then
        local mousePos = UserInputService:GetMouseLocation()
        local circleAbsPos = circleTrack.AbsolutePosition
        local circleAbsSize = circleTrack.AbsoluteSize
        
        local center = Vector2.new(circleAbsPos.x + circleAbsSize.x/2, circleAbsPos.y + circleAbsSize.y/2)
        local relative = Vector2.new(mousePos.x - center.x, mousePos.y - center.y)
        
        local angle = math.atan2(relative.y, relative.x) + math.pi/2
        if angle < 0 then angle = angle + math.pi * 2 end
        
        local clockTime = (angle / (math.pi * 2)) * 24
        UpdateSunPosition(clockTime)
    end
end)

-- Settings container
local settingsContainer = Instance.new("ScrollingFrame", mainFrame)
settingsContainer.Size = UDim2.new(1, -40, 1, -250)
settingsContainer.Position = UDim2.new(0, 20, 0, 250)
settingsContainer.BackgroundTransparency = 1
settingsContainer.ScrollBarThickness = 4
settingsContainer.ScrollBarImageColor3 = C_BORDER
settingsContainer.CanvasSize = UDim2.new(0, 0, 0, 600)
settingsContainer.AutomaticCanvasSize = Enum.AutomaticSize.Y

local layout = Instance.new("UIListLayout", settingsContainer)
layout.SortOrder = Enum.SortOrder.LayoutOrder
layout.Padding = UDim.new(0, 12)

-- Function to create beautiful sliders
local function CreateSlider(parent, label, minVal, maxVal, currentVal, callback)
    local sliderContainer = Instance.new("Frame", parent)
    sliderContainer.Size = UDim2.new(1, 0, 0, 52)
    sliderContainer.BackgroundTransparency = 1
    sliderContainer.LayoutOrder = #parent:GetChildren()

    local labelContainer = Instance.new("Frame", sliderContainer)
    labelContainer.Size = UDim2.new(1, 0, 0, 20)
    labelContainer.BackgroundTransparency = 1

    local labelText = Instance.new("TextLabel", labelContainer)
    labelText.Size = UDim2.new(0.7, 0, 1, 0)
    labelText.BackgroundTransparency = 1
    labelText.Text = label
    labelText.Font = Enum.Font.GothamMedium
    labelText.TextColor3 = C_TEXT
    labelText.TextSize = 13
    labelText.TextXAlignment = Enum.TextXAlignment.Left

    local valueText = Instance.new("TextLabel", labelContainer)
    valueText.Size = UDim2.new(0.3, 0, 1, 0)
    valueText.Position = UDim2.new(0.7, 0, 0, 0)
    valueText.BackgroundTransparency = 1
    valueText.Text = string.format("%.2f", currentVal)
    valueText.Font = Enum.Font.GothamBold
    valueText.TextColor3 = C_ACCENT
    valueText.TextSize = 13
    valueText.TextXAlignment = Enum.TextXAlignment.Right

    local sliderBack = Instance.new("Frame", sliderContainer)
    sliderBack.Size = UDim2.new(1, 0, 0, 6)
    sliderBack.Position = UDim2.new(0, 0, 0, 30)
    sliderBack.BackgroundColor3 = C_BORDER
    sliderBack.BorderSizePixel = 0
    Instance.new("UICorner", sliderBack).CornerRadius = UDim.new(1, 0)

    local sliderFill = Instance.new("Frame", sliderBack)
    sliderFill.Size = UDim2.new((currentVal - minVal) / (maxVal - minVal), 0, 1, 0)
    sliderFill.BackgroundColor3 = C_ACCENT
    sliderFill.BorderSizePixel = 0
    Instance.new("UICorner", sliderFill).CornerRadius = UDim.new(1, 0)

    local sliderGlow = Instance.new("ImageLabel", sliderFill)
    sliderGlow.Size = UDim2.new(1, 10, 1, 10)
    sliderGlow.Position = UDim2.new(-0.1, -5, -0.1, -5)
    sliderGlow.BackgroundTransparency = 1
    sliderGlow.Image = "rbxassetid://8992230675"
    sliderGlow.ImageColor3 = C_ACCENT
    sliderGlow.ScaleType = Enum.ScaleType.Slice
    sliderGlow.SliceScale = 0.1
    sliderGlow.ImageTransparency = 0.9
    sliderGlow.ZIndex = -1

    local sliderButton = Instance.new("TextButton", sliderBack)
    sliderButton.Size = UDim2.new(0, 16, 0, 16)
    sliderButton.Position = UDim2.new((currentVal - minVal) / (maxVal - minVal), -8, 0.5, -8)
    sliderButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
    sliderButton.Text = ""
    sliderButton.BorderSizePixel = 0
    Instance.new("UICorner", sliderButton).CornerRadius = UDim.new(1, 0)
    local buttonStroke = Instance.new("UIStroke", sliderButton)
    buttonStroke.Color = C_ACCENT2
    buttonStroke.Thickness = 2

    local dragging = false
    
    local function updateSlider(value)
        local normalized = math.clamp((value - minVal) / (maxVal - minVal), 0, 1)
        sliderFill.Size = UDim2.new(normalized, 0, 1, 0)
        sliderButton.Position = UDim2.new(normalized, -8, 0.5, -8)
        valueText.Text = string.format("%.2f", value)
        callback(value)
        AutoSaveConfig()
    end

    sliderButton.MouseButton1Down:Connect(function()
        dragging = true
    end)

    UserInputService.InputEnded:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 then
            dragging = false
        end
    end)

    UserInputService.InputChanged:Connect(function(input)
        if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
            local mousePos = UserInputService:GetMouseLocation()
            local absolutePos = sliderBack.AbsolutePosition
            local absoluteSize = sliderBack.AbsoluteSize
            local relativeX = (mousePos.X - absolutePos.X) / absoluteSize.X
            local value = minVal + (relativeX * (maxVal - minVal))
            updateSlider(math.clamp(value, minVal, maxVal))
        end
    end)

    return { update = updateSlider }
end

-- Function to create beautiful toggle buttons
local function CreateToggle(parent, label, currentState, callback)
    local toggleContainer = Instance.new("Frame", parent)
    toggleContainer.Size = UDim2.new(1, 0, 0, 36)
    toggleContainer.BackgroundTransparency = 1

    local labelText = Instance.new("TextLabel", toggleContainer)
    labelText.Size = UDim2.new(1, -60, 1, 0)
    labelText.BackgroundTransparency = 1
    labelText.Text = label
    labelText.Font = Enum.Font.GothamMedium
    labelText.TextColor3 = C_TEXT
    labelText.TextSize = 13
    labelText.TextXAlignment = Enum.TextXAlignment.Left

    local toggleButton = Instance.new("TextButton", toggleContainer)
    toggleButton.Size = UDim2.new(0, 44, 0, 20)
    toggleButton.Position = UDim2.new(1, -44, 0.5, -10)
    toggleButton.BackgroundColor3 = currentState and C_GREEN or Color3.fromRGB(60, 60, 70)
    toggleButton.Text = ""
    toggleButton.BorderSizePixel = 0
    Instance.new("UICorner", toggleButton).CornerRadius = UDim.new(1, 0)

    local toggleKnob = Instance.new("Frame", toggleButton)
    toggleKnob.Size = UDim2.new(0, 16, 0, 16)
    toggleKnob.Position = UDim2.new(currentState and 0.6 or 0, 2, 0.5, -8)
    toggleKnob.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
    toggleKnob.BorderSizePixel = 0
    Instance.new("UICorner", toggleKnob).CornerRadius = UDim.new(1, 0)

    toggleButton.MouseButton1Click:Connect(function()
        local newState = not currentState
        currentState = newState
        toggleButton.BackgroundColor3 = newState and C_GREEN or Color3.fromRGB(60, 60, 70)
        
        local tweenInfo = TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
        local tween = TweenService:Create(toggleKnob, tweenInfo, {
            Position = UDim2.new(newState and 0.6 or 0, 2, 0.5, -8)
        })
        tween:Play()
        
        callback(newState)
        AutoSaveConfig()
    end)

    return { update = function(state) 
        currentState = state
        toggleButton.BackgroundColor3 = state and C_GREEN or Color3.fromRGB(60, 60, 70)
        toggleKnob.Position = UDim2.new(state and 0.6 or 0, 2, 0.5, -8)
    end }
end

-- Create sliders
local brightnessSlider = CreateSlider(settingsContainer, "BRIGHTNESS", 0.1, 3, currentConfig.brightness, function(value)
    currentConfig.brightness = value
    Lighting.Brightness = currentConfig.rain and 0.8 or value
end)

local bloomSlider = CreateSlider(settingsContainer, "BLOOM INTENSITY", 0, 1, currentConfig.bloomIntensity, function(value)
    currentConfig.bloomIntensity = value
    ApplyGraphics()
end)

local saturationSlider = CreateSlider(settingsContainer, "SATURATION", -1, 1, currentConfig.saturation, function(value)
    currentConfig.saturation = value
    ApplyGraphics()
end)

local contrastSlider = CreateSlider(settingsContainer, "CONTRAST", -1, 1, currentConfig.contrast, function(value)
    currentConfig.contrast = value
    ApplyGraphics()
end)

local exposureSlider = CreateSlider(settingsContainer, "EXPOSURE", -1, 1, currentConfig.exposure, function(value)
    currentConfig.exposure = value
    Lighting.ExposureCompensation = value
end)

local fogSlider = CreateSlider(settingsContainer, "FOG DENSITY", 0, 0.5, currentConfig.fogDensity, function(value)
    currentConfig.fogDensity = value
    if currentConfig.fog then
        Lighting.FogStart = 50 / (value * 10 + 1)
        Lighting.FogEnd = 500 / (value * 2 + 1)
    end
end)

-- Create toggles
local shadowsToggle = CreateToggle(settingsContainer, "GLOBAL SHADOWS", currentConfig.globalShadows, function(state)
    currentConfig.globalShadows = state
    Lighting.GlobalShadows = state
end)

local godraysToggle = CreateToggle(settingsContainer, "GODRAYS", currentConfig.godrays, function(state)
    currentConfig.godrays = state
    ApplyGraphics()
end)

local dofToggle = CreateToggle(settingsContainer, "DEPTH OF FIELD", currentConfig.dof, function(state)
    currentConfig.dof = state
    ApplyGraphics()
end)

local fogToggle = CreateToggle(settingsContainer, "FOG", currentConfig.fog, function(state)
    currentConfig.fog = state
    ApplyGraphics()
end)

local rainToggle = CreateToggle(settingsContainer, "RAIN EFFECT", currentConfig.rain, function(state)
    currentConfig.rain = state
    for _, emitterData in pairs(rainEmitters) do
        emitterData.emitter.Enabled = state
    end
    ApplyGraphics()
end)

-- Close button
local closeBtn = Instance.new("TextButton", mainFrame)
closeBtn.Size = UDim2.new(0, 32, 0, 32)
closeBtn.Position = UDim2.new(1, -42, 0, 20)
closeBtn.BackgroundColor3 = C_BG2
closeBtn.Text = "×"
closeBtn.Font = Enum.Font.GothamBlack
closeBtn.TextColor3 = C_TEXT_DIM
closeBtn.TextSize = 20
closeBtn.AutoButtonColor = false
Instance.new("UICorner", closeBtn).CornerRadius = UDim.new(1, 0)

closeBtn.MouseEnter:Connect(function()
    closeBtn.BackgroundColor3 = C_RED
    closeBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
end)

closeBtn.MouseLeave:Connect(function()
    closeBtn.BackgroundColor3 = C_BG2
    closeBtn.TextColor3 = C_TEXT_DIM
end)

closeBtn.MouseButton1Click:Connect(function()
    gui.Enabled = false
end)

-- Input handling
UserInputService.InputBegan:Connect(function(input, gp)
    if not gp and input.KeyCode == Enum.KeyCode.F5 then
        gui.Enabled = not gui.Enabled
    end
end)

print("🎨 BLOXSHADE ULTRA v4.5 LOADED - PRESS F5")
print("💾 Auto-save enabled • ☀️ Circular sun control • 📌 Fixed position")

Features & Information

MENU OPEN F5 • Modern graphics enhancement GUI • Circular sun / time control • Advanced lighting & atmosphere • Bloom, Godrays & Depth of Field • Dynamic fog & global rain system • Color correction (brightness, contrast, saturation, exposure) • Auto-save configuration • Universal (works in any game)
#Graphics Lighting Visual Shader GUI Universal Atmo

Community Comments (1)

f6juf6juFeb 14, 2026

idk if this script is trusted but it does make some nice looking games look nicer

More Scripts for Universal Scripts