Eclipsium
Key RequiredUniversal

Eclipsium

Universal ScriptColdSnowColdSnow 378 views 12 executesUpdated Jan 26, 2026
5.0/ 5(3 votes)
30100% Positive
Lua Script•875 lines (36345 chars)
-- ─────────────── ✦ Universal - Eclipsium ✦ ───────────────
--  Created by: primesto.fx
--  Maintained by: primesto.fx
--  DM on Discord for requests: primesto.fx
-- ────────────────────────────────────────────────────────────────


-- ------------------------------- Configuration ----------------------------------


local Eclipsium = {}

-- Whether to enable pick scripts GUI when true; otherwise scripts run in order
Eclipsium.pickscript = true

Eclipsium.scripts = {
    {
        id = "placeholder",
        name = "Placeholder",
        enabled = true,
        url = "placeholder",
        delay = 3,
    },
    {
        id = "placeholder2",
        name = "Placeholder",
        enabled = true,
        url = "placeholder",
        delay = 3,
    },
}


--[[ You can add more scripts to the list above by following the structure
 Each script should have:
    - id: A unique identifier for the script.
    - name: A name for the script that will be displayed.
    - enabled: A boolean indicating whether to load this script.
    - url: The direct URL to the raw Lua script.
    - delay: (optional) Number of seconds to wait before loading the script, recommend using this.
]]

------------------------------- Color Palette ----------------------------------

local UI = {}

UI.colors = {
    deep_purple = "#450a53",
    pink = "#410038",
        overlay = "#0B0710",
    container = "#3A1A3A",
    container_highlight = "#140418",
    text = "#E6E6E6",
    divider = "#262028",
    shadow = "#1B1218",
    accent = "#FF2D95",
    prog_glow = "#FF5AAE",
    container_border = "#2F1A2F",
    accent_dark = "#C01A7A",
    subtitle = "#bb8dbb",
    rose = "#C51B50",
    picker_bg = "#0F0810",
    picker_border = "#340615",
}

-- Modify the colors above to change how the UI looks.


------------------------------- Color Helper ----------------------------------
local function hexToColor3(hex)
    local fallback = (UI and UI.colors and UI.colors.text) or "#E6E6E6"
    if not hex then hex = fallback end
    if typeof(hex) == "Color3" then return hex end
    if type(hex) ~= "string" then hex = fallback end
    local s = hex:gsub("#", "")
    if #s ~= 6 then hex = fallback; s = hex:gsub("#", "") end
    local r = tonumber("0x"..s:sub(1,2))
    local g = tonumber("0x"..s:sub(3,4))
    local b = tonumber("0x"..s:sub(5,6))
    if not (r and g and b) then
        local sf = (UI and UI.colors and UI.colors.text) or "E6E6E6"
        local ss = sf:gsub("#", "")
        return Color3.fromRGB(tonumber("0x"..ss:sub(1,2)), tonumber("0x"..ss:sub(3,4)), tonumber("0x"..ss:sub(5,6)))
    end
    return Color3.fromRGB(r, g, b)
end



local RECENT_NOTIFS = setmetatable({}, { __mode = "k" })
local ACTIVE_NOTIF_COUNT = 0
local SCRIPTS_REMAINING = 0
local CURRENT_OVERLAY = nil
CURRENT_OVERLAY = nil
-- ------------------------------- Services & Utilities -------------------------------
local Services = {}
Services.Players = game:GetService("Players")
Services.CoreGui = game:GetService("CoreGui")
Services.TweenService = game:GetService("TweenService")
Services.Lighting = game:GetService("Lighting")

local function sleep(sec)
    if not sec or sec <= 0 then return end
    if type(task) == "table" and type(task.wait) == "function" then
        task.wait(sec)
    elseif type(wait) == "function" then
        wait(sec)
    else
        local t0 = os.clock()
        while os.clock() - t0 < sec do end
    end
end


-- ------------------------------- Notification Helper Code -------------------------------
local function getParentGui(parent)
    local Players = Services.Players
    local CoreGui = Services.CoreGui
    local lp = Players and Players.LocalPlayer
    if parent and parent ~= gui then
        return parent
    end
    local existing = CoreGui:FindFirstChild("Eclipsium_Notifications")
    local playerGui = lp and lp:FindFirstChild("PlayerGui")
    if not existing and playerGui then existing = playerGui:FindFirstChild("Eclipsium_Notifications") end
    if existing then return existing end
    local created = Instance.new("ScreenGui")
    created.Name = "Eclipsium_Notifications"
    created.ResetOnSpawn = false
    created.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
    created.IgnoreGuiInset = true
    if lp and lp:FindFirstChild("PlayerGui") then
        created.Parent = lp:WaitForChild("PlayerGui")
    else
        created.Parent = CoreGui
    end
    created.DisplayOrder = 10000
    return created
end


local function ensureHolder(parentGui)
    local holder = parentGui:FindFirstChild("EclipsiumNotificationsHolder")
    if holder then return holder end
    holder = Instance.new("Frame")
    holder.Name = "EclipsiumNotificationsHolder"
    holder.Size = UDim2.new(0, 600, 0, 200)
    holder.AnchorPoint = Vector2.new(0.5, 0)
    holder.Position = UDim2.new(0.5, 0, 0, 12)
    holder.BackgroundTransparency = 1
    holder.ZIndex = 1000
    holder.Parent = parentGui
    local layout = Instance.new("UIListLayout")
    layout.Name = "EclipsiumNotificationsLayout"
    layout.SortOrder = Enum.SortOrder.LayoutOrder
    layout.Padding = UDim.new(0, 8)
    layout.VerticalAlignment = Enum.VerticalAlignment.Top
    layout.HorizontalAlignment = Enum.HorizontalAlignment.Center
    layout.Parent = holder
    local pad = Instance.new("UIPadding") pad.Parent = holder
    pad.PaddingLeft = UDim.new(0, 0)
    pad.PaddingTop = UDim.new(0, 0)
    return holder
end


local function ensureOverlayAndBlur(parentGui)
    local TweenService = Services.TweenService
    local overlay = nil
    local CoreGui = Services.CoreGui
    local Players = Services.Players
    local lp = Players and Players.LocalPlayer
    local playerGui = lp and lp:FindFirstChild("PlayerGui")
    overlay = parentGui:FindFirstChild("EclipsiumNotificationOverlay")
    if not overlay and CoreGui then overlay = CoreGui:FindFirstChild("EclipsiumNotificationOverlay") end
    if not overlay and playerGui then overlay = playerGui:FindFirstChild("EclipsiumNotificationOverlay") end
    if overlay then
        if overlay.Parent ~= parentGui then
            overlay.Parent = parentGui
        end
        overlay.BackgroundColor3 = hexToColor3(UI.colors.overlay)
        overlay.ZIndex = (parentGui:FindFirstChild("EclipsiumNotificationsHolder") and parentGui.EclipsiumNotificationsHolder.ZIndex or 1000) - 1
        TweenService:Create(overlay, TweenInfo.new(0.12, Enum.EasingStyle.Quad), {BackgroundTransparency = 0.1}):Play()
        CURRENT_OVERLAY = overlay
    else
        overlay = Instance.new("Frame")
        overlay.Name = "EclipsiumNotificationOverlay"
        overlay.Size = UDim2.new(1, 0, 1, 0)
        overlay.AnchorPoint = Vector2.new(0, 0)
        overlay.Position = UDim2.new(0, 0, 0, 0)
        overlay.BackgroundTransparency = 1
        overlay.BackgroundColor3 = hexToColor3(UI.colors.overlay)
        overlay.BorderSizePixel = 0
        overlay.ZIndex = (parentGui:FindFirstChild("EclipsiumNotificationsHolder") and parentGui.EclipsiumNotificationsHolder.ZIndex or 1000) - 1
        overlay.Parent = parentGui
        TweenService:Create(overlay, TweenInfo.new(0.18, Enum.EasingStyle.Quad), {BackgroundTransparency = 0.1}):Play()
        CURRENT_OVERLAY = overlay
    end
    local Lighting = Services.Lighting
    local existing = Lighting:FindFirstChild("EclipsiumNotifBlur")
    if not existing then
        local blur = Instance.new("BlurEffect")
        blur.Name = "EclipsiumNotifBlur"
        blur.Size = 0
        blur.Enabled = true
        blur.Parent = Lighting
        TweenService:Create(blur, TweenInfo.new(0.18, Enum.EasingStyle.Quad), {Size = 12}):Play()
    end
    return overlay
end


local function buildNotificationCard(parentGui, text)
    local container = Instance.new("Frame")
    container.Name = "EclipsiumNotification"
    container.Size = UDim2.new(0, 0, 0, 0)
    container.BackgroundColor3 = hexToColor3(UI.colors.container)
    container.BackgroundTransparency = 0
    container.BorderSizePixel = 0
    container.AnchorPoint = Vector2.new(0.5, 0.5)
    container.Position = UDim2.new(0.5, 0, 0.05, 0)
    container.ZIndex = 10002
    container.Parent = parentGui

    ACTIVE_NOTIF_COUNT = ACTIVE_NOTIF_COUNT + 1
    RECENT_NOTIFS[container] = true
    local finalSize = UDim2.new(0, 640, 0, 96)

    local shadow = Instance.new("Frame")
    shadow.Name = "EclipsiumNotificationShadow"
    shadow.Size = UDim2.new(0, finalSize.X.Offset + 16, 0, finalSize.Y.Offset + 8)
    shadow.AnchorPoint = Vector2.new(0.5, 0.5)
    shadow.Position = UDim2.new(0.5, 0, 0.05, 8)
    shadow.BackgroundColor3 = hexToColor3(UI.colors.shadow)
    shadow.BackgroundTransparency = 1
    shadow.ZIndex = container.ZIndex - 1
    shadow.Parent = parentGui
    local shadowCorner = Instance.new("UICorner") shadowCorner.CornerRadius = UDim.new(0,12) shadowCorner.Parent = shadow
    local cCorner = Instance.new("UICorner") cCorner.CornerRadius = UDim.new(0,12) cCorner.Parent = container
    local cStroke = Instance.new("UIStroke")
    cStroke.Color = hexToColor3(UI.colors.container_border)
    cStroke.Thickness = 1
    cStroke.Parent = container

    local inner = Instance.new("Frame")
    inner.Size = UDim2.new(1, -28, 1, -20)
    inner.Position = UDim2.new(0, 14, 0, 10)
    inner.BackgroundTransparency = 1
    inner.BackgroundColor3 = hexToColor3(UI.colors.container_highlight)
    inner.ZIndex = container.ZIndex + 1
    inner.Parent = container
    local innerCorner = Instance.new("UICorner") innerCorner.CornerRadius = UDim.new(0,10) innerCorner.Parent = inner
    local innerStroke = Instance.new("UIStroke") innerStroke.Color = hexToColor3(UI.colors.container_border) innerStroke.Thickness = 0.6 innerStroke.Transparency = 0.7 innerStroke.Parent = inner

    local label = Instance.new("TextLabel")
    label.Size = UDim2.new(1, -140, 0, 28)
    label.Position = UDim2.new(0, 80, 0, 6)
    label.BackgroundTransparency = 1
    label.Font = Enum.Font.GothamBold
    label.TextSize = 20
    label.Text = tostring(text or "Notification")
    label.TextColor3 = hexToColor3(UI.colors.text)
    label.TextXAlignment = Enum.TextXAlignment.Left
    label.ZIndex = inner.ZIndex + 1
    label.Parent = inner

    local subtitle = Instance.new("TextLabel")
    subtitle.Size = UDim2.new(1, -140, 0, 20)
    subtitle.Position = UDim2.new(0, 80, 0, 36)
    subtitle.BackgroundTransparency = 1
    subtitle.Font = Enum.Font.Gotham
    subtitle.TextSize = 14
    subtitle.Text = "Loading — please wait"
    subtitle.TextColor3 = hexToColor3(UI.colors.subtitle)
    subtitle.TextXAlignment = Enum.TextXAlignment.Left
    subtitle.ZIndex = inner.ZIndex + 1
    subtitle.Parent = inner

    local icon = Instance.new("TextLabel")
    icon.Size = UDim2.new(0, 56, 0, 56)
    icon.Position = UDim2.new(0, 12, 0, 10)
    icon.BackgroundTransparency = 1
    icon.Font = Enum.Font.GothamBold
    icon.TextSize = 28
    icon.Text = "⚡"
    icon.TextColor3 = hexToColor3(UI.colors.accent)
    icon.ZIndex = inner.ZIndex + 2
    icon.Parent = inner

    local barHolder = Instance.new("Frame")
    barHolder.Size = UDim2.new(1, -24, 0, 8)
    barHolder.Position = UDim2.new(0, 12, 1, -14)
    barHolder.BackgroundTransparency = 1
    barHolder.ZIndex = container.ZIndex + 1
    barHolder.Parent = container
    local progGlow = Instance.new("Frame")
    progGlow.Name = "ProgGlow"
    progGlow.AnchorPoint = Vector2.new(0, 0)
    progGlow.Position = UDim2.new(0, 0, 0, 0)
    progGlow.Size = UDim2.new(0, 0, 1, 0)
    progGlow.BackgroundColor3 = hexToColor3(UI.colors.prog_glow)
    progGlow.BackgroundTransparency = 1
    progGlow.ZIndex = container.ZIndex + 1
    progGlow.Parent = barHolder
    local pgc = Instance.new("UICorner") pgc.CornerRadius = UDim.new(0,4) pgc.Parent = progGlow

    local prog = Instance.new("Frame")
    prog.AnchorPoint = Vector2.new(0, 0)
    prog.Position = UDim2.new(0, 0, 0, 0)
    prog.Size = UDim2.new(0, 0, 1, 0)
    prog.BackgroundColor3 = hexToColor3(UI.colors.accent)
    prog.BorderSizePixel = 0
    prog.ZIndex = container.ZIndex + 2
    prog.Parent = barHolder
    local progCorner = Instance.new("UICorner") progCorner.CornerRadius = UDim.new(0,4) progCorner.Parent = prog
    local progStroke = Instance.new("UIStroke") progStroke.Color = hexToColor3(UI.colors.accent) progStroke.Thickness = 1 progStroke.Transparency = 0.6 progStroke.Parent = prog
    local g = Instance.new("UIGradient")
    g.Rotation = 0
    g.Color = ColorSequence.new({
            ColorSequenceKeypoint.new(0, hexToColor3(UI.colors.accent)),
            ColorSequenceKeypoint.new(1, hexToColor3(UI.colors.accent_dark))
        })
    g.Parent = prog

    local cg = Instance.new("UIGradient")
    cg.Rotation = 90
    cg.Color = ColorSequence.new({
        ColorSequenceKeypoint.new(0, hexToColor3(UI.colors.deep_purple)),
        ColorSequenceKeypoint.new(1, hexToColor3(UI.colors.deep_purple))
    })
    cg.Parent = container

    local top = Instance.new("Frame")
    top.Size = UDim2.new(1, 0, 0, 6)
    top.Position = UDim2.new(0, 0, 0, 0)
    top.BackgroundColor3 = hexToColor3(UI.colors.deep_purple)
    top.BackgroundTransparency = 0.9
    top.BorderSizePixel = 0
    top.ZIndex = container.ZIndex + 3
    top.Parent = container
    local tcorner = Instance.new("UICorner") tcorner.CornerRadius = UDim.new(0,6) tcorner.Parent = top

    return {
        container = container,
        shadow = shadow,
        inner = inner,
        label = label,
        subtitle = subtitle,
        icon = icon,
        prog = prog,
        progGlow = progGlow,
        finalSize = finalSize,
    }
end

------------------------------- Animation Functions -------------------------------

local function animateEntrance(elems)
    local TweenService = Services.TweenService
    TweenService:Create(elems.container, TweenInfo.new(0.56, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {Size = elems.finalSize, Position = UDim2.new(0.5, 0, 0.12, 0)}):Play()
    TweenService:Create(elems.shadow, TweenInfo.new(0.48, Enum.EasingStyle.Quad), {Size = UDim2.new(0, elems.finalSize.X.Offset + 16, 0, elems.finalSize.Y.Offset + 8), Position = UDim2.new(0.5, 0, 0.12, 8), BackgroundTransparency = 0.88}):Play()
    TweenService:Create(elems.inner, TweenInfo.new(0.28, Enum.EasingStyle.Quad), {BackgroundTransparency = 0}):Play()
    TweenService:Create(elems.progGlow, TweenInfo.new(0.32, Enum.EasingStyle.Quad), {BackgroundTransparency = 0.7}):Play()
    elems.label.TextTransparency = 1
    elems.subtitle.TextTransparency = 1
    elems.icon.TextTransparency = 1
    TweenService:Create(elems.label, TweenInfo.new(0.28, Enum.EasingStyle.Quad), {TextTransparency = 0}):Play()
    TweenService:Create(elems.subtitle, TweenInfo.new(0.28, Enum.EasingStyle.Quad), {TextTransparency = 0}):Play()
    TweenService:Create(elems.icon, TweenInfo.new(0.28, Enum.EasingStyle.Quad), {TextTransparency = 0}):Play()
end


local function animateExitAndCleanup(elems, overlay, notifDone)
    local TweenService = Services.TweenService

    if elems and type(elems) == "table" then
        ACTIVE_NOTIF_COUNT = math.max(0, ACTIVE_NOTIF_COUNT - 1)

        if elems.label then TweenService:Create(elems.label, TweenInfo.new(0.14, Enum.EasingStyle.Quad), {TextTransparency = 1}):Play() end
        if elems.subtitle then TweenService:Create(elems.subtitle, TweenInfo.new(0.14, Enum.EasingStyle.Quad), {TextTransparency = 1}):Play() end
        if elems.icon then TweenService:Create(elems.icon, TweenInfo.new(0.14, Enum.EasingStyle.Quad), {TextTransparency = 1}):Play() end
        if elems.inner then TweenService:Create(elems.inner, TweenInfo.new(0.14, Enum.EasingStyle.Quad), {BackgroundTransparency = 1}):Play() end
        if elems.container then TweenService:Create(elems.container, TweenInfo.new(0.22, Enum.EasingStyle.Quad), {Position = UDim2.new(0.5,0,0.0,0), Size = UDim2.new(0, 40, 0, 20)}):Play() end
    end

    task.delay(0.28, function()
        if elems and type(elems) == "table" then
            if elems.label then TweenService:Create(elems.label, TweenInfo.new(0.14, Enum.EasingStyle.Quad), {TextTransparency = 1}):Play() end
            if elems.subtitle then TweenService:Create(elems.subtitle, TweenInfo.new(0.14, Enum.EasingStyle.Quad), {TextTransparency = 1}):Play() end
            if elems.icon then TweenService:Create(elems.icon, TweenInfo.new(0.14, Enum.EasingStyle.Quad), {TextTransparency = 1}):Play() end
            if elems.inner then TweenService:Create(elems.inner, TweenInfo.new(0.14, Enum.EasingStyle.Quad), {BackgroundTransparency = 1}):Play() end

            local contTween = elems.container and TweenService:Create(elems.container, TweenInfo.new(0.32, Enum.EasingStyle.Back, Enum.EasingDirection.In), {Position = UDim2.new(0.5,0,0.0,0), Size = UDim2.new(0, 40, 0, 20)}) or nil
            local shadowTween = elems.shadow and TweenService:Create(elems.shadow, TweenInfo.new(0.28, Enum.EasingStyle.Quad), {BackgroundTransparency = 1}) or nil
            if contTween then contTween:Play() end
            if shadowTween then shadowTween:Play() end

            local function do_cleanup()
                if elems and elems.progGlow and elems.progGlow.Parent then elems.progGlow:Destroy() end
                if elems and elems.container and elems.container.Parent then elems.container:Destroy() end
                if elems and elems.shadow and elems.shadow.Parent then elems.shadow:Destroy() end

                local toRemove = overlay or CURRENT_OVERLAY
                if ACTIVE_NOTIF_COUNT == 0 and SCRIPTS_REMAINING == 0 then
                    if toRemove and toRemove.Parent then
                        TweenService:Create(toRemove, TweenInfo.new(0.12, Enum.EasingStyle.Quad), {BackgroundTransparency = 1}):Play()
                        task.delay(0.14, function()
                            if toRemove and toRemove.Parent then toRemove:Destroy() end
                            if CURRENT_OVERLAY == toRemove then CURRENT_OVERLAY = nil end
                        end)
                    end
                    local b = Services.Lighting:FindFirstChild("EclipsiumNotifBlur")
                    if b then
                        TweenService:Create(b, TweenInfo.new(0.12, Enum.EasingStyle.Quad), {Size = 0}):Play()
                        task.delay(0.14, function()
                            local b2 = Services.Lighting:FindFirstChild("EclipsiumNotifBlur")
                            if b2 and b2.Parent then b2:Destroy() end
                        end)
                    end
                end
            end

            if contTween then
                contTween.Completed:Connect(function()
                    do_cleanup()
                    if notifDone and type(notifDone.Fire) == "function" then notifDone:Fire(true) end
                    if notifDone and type(notifDone.Destroy) == "function" then notifDone:Destroy() end
                end)
            else
                do_cleanup()
                if notifDone and type(notifDone.Fire) == "function" then notifDone:Fire(true) end
                if notifDone and type(notifDone.Destroy) == "function" then notifDone:Destroy() end
            end
        else
            if notifDone and type(notifDone.Fire) == "function" then notifDone:Fire(true) end
            if notifDone and type(notifDone.Destroy) == "function" then notifDone:Destroy() end
        end
    end)
end


local function runCallbackProgress(runCallback, elems, dur, overlay, notifDone)
    local TweenService = Services.TweenService
    if type(runCallback) == "function" then
        local doneEvent = Instance.new("BindableEvent")
        local finished = false
        local ok, err
        local conn = doneEvent.Event:Connect(function(a, b)
            finished = true
            ok = a; err = b
        end)

        task.wait(0)
        task.spawn(function()
            runCallback()
            doneEvent:Fire(true, nil)
        end)

        local progress = 0
        while not finished do
            progress = math.min(0.9, progress + 0.02)
            elems.prog.Size = UDim2.new(progress, 0, 1, 0)
            task.wait(0.05)
        end

        elems.prog.Size = UDim2.new(1, 0, 1, 0)
        task.wait(0.18)

        conn:Disconnect()
        doneEvent:Destroy()

        animateExitAndCleanup(elems, overlay, notifDone)
    else
        local progTween = TweenService:Create(elems.prog, TweenInfo.new(dur, Enum.EasingStyle.Linear), {Size = UDim2.new(1, 0, 1, 0)})
        progTween:Play()
        task.delay(dur, function()
            animateExitAndCleanup(elems, overlay, notifDone)
        end)
    end
end


local function makeNotification(text, duration, parent, runCallback)
    local dur = (type(duration) == "number" and duration > 0) and duration or 3
    local parentGui = getParentGui(parent)
    parentGui.IgnoreGuiInset = true
    parentGui.DisplayOrder = 10000

    if NOTIFICATIONS_ENABLED == false then return nil end

    local holder = ensureHolder(parentGui)
    local overlay = ensureOverlayAndBlur(parentGui)
    local elems = buildNotificationCard(parentGui, text)
    animateEntrance(elems)

    local completion = Instance.new("BindableEvent")
    task.spawn(function()
        runCallbackProgress(runCallback, elems, dur, overlay, completion)
    end)

    return elems.container, completion
end

local function forceNotify(text, duration, parent)
    local dur = (type(duration) == "number" and duration > 0) and duration or 4
    local parentGui = getParentGui(parent)
    parentGui.IgnoreGuiInset = true
    parentGui.DisplayOrder = 10000

    local holder = ensureHolder(parentGui)
    local overlay = ensureOverlayAndBlur(parentGui)
    local elems = buildNotificationCard(parentGui, text)
    animateEntrance(elems)

    local completion = Instance.new("BindableEvent")
    task.spawn(function()
        runCallbackProgress(nil, elems, dur, overlay, completion)
    end)

    return elems.container, completion
end


--------------------------------------- ** Loader Code Starts here ** --------------------------------------- 

local function convertToRawUrl(url)
    if type(url) ~= "string" then return url end
    url = url:gsub("^%s+",""):gsub("%s+$", "")
    -- conv common github.com blob URLs to raw.githubusercontent.com
    local github_blob = url:match("https?://github%.com/.+/.+/blob/.+")
    if github_blob then
        -- https://github.com/<user>/<repo>/blob/<branch>/path -> https://raw.githubusercontent.com/<user>/<repo>/<branch>/path
        url = url:gsub("https://github.com/", "https://raw.githubusercontent.com/")
        url = url:gsub("http://github.com/", "https://raw.githubusercontent.com/")
        url = url:gsub("/blob/", "/")
        return url
    end
    return url
end

local function isValidLink(url)
    if type(url) ~= "string" then return false end
    url = url:match("^%s*(.-)%s*$") or url
    if url:match("^https?://") then return true end
    if url:match("raw%.githubusercontent%.com") then return true end
    return false
end

------------------------------- Loader Main Function ----------------------------------

local function isEmpty(v)
    return v == nil or (type(v) == "string" and v:match("^%s*$"))
end

local function executeEntry(entry)
    local label = tostring((not isEmpty(entry.name) and entry.name) or (not isEmpty(entry.id) and entry.id) or "<unknown>")
    if isEmpty(entry.name) or isEmpty(entry.id) then
        forceNotify(("%s: You need to pass a name and ID for the script."):format(label), 6)
        SCRIPTS_REMAINING = math.max(0, SCRIPTS_REMAINING - 1)
        return
    end

    if not entry.url then
        forceNotify(("%s: You need to pass a proper link to load."):format(label), 6)
        SCRIPTS_REMAINING = math.max(0, SCRIPTS_REMAINING - 1)
        return
    end

    local url = convertToRawUrl(entry.url)
    if not isValidLink(url) then
        forceNotify(("%s: You need to pass a proper link to load."):format(label), 6)
        SCRIPTS_REMAINING = math.max(0, SCRIPTS_REMAINING - 1)
        return
    end

    local _, doneEvent = makeNotification(("Executing %s"):format(label), nil, nil, function()
        if type(entry.delay) == "number" and entry.delay > 0 then
            sleep(entry.delay)
        end

        local body = game:HttpGet(url)
        if not body or type(body) ~= "string" or body:match("^%s*$") or body:match("404") or body:match("Not Found") then
            forceNotify(("%s: Link didn't return anything to load"):format(label), 6)
            SCRIPTS_REMAINING = math.max(0, SCRIPTS_REMAINING - 1)
            return
        end

        local fn, loadErr = loadstring(body)
        if not fn then
            forceNotify(("%s: Link didn't return anything to load"):format(label), 6)
            SCRIPTS_REMAINING = math.max(0, SCRIPTS_REMAINING - 1)
            return
        end

        task.spawn(function()
            fn(true)
        end)

        SCRIPTS_REMAINING = math.max(0, SCRIPTS_REMAINING - 1)
    end)

    if doneEvent and doneEvent.Event then
        doneEvent.Event:Wait()
    end
end


function Eclipsium.run()
    local function sleep(sec)
        if not sec or sec <= 0 then return end
        if type(task) == "table" and type(task.wait) == "function" then
            task.wait(sec)
        elseif type(wait) == "function" then
            wait(sec)
        else
            local t0 = os.clock()
            while os.clock() - t0 < sec do end
        end
    end

    local enabledCount = 0
    for _, e in ipairs(Eclipsium.scripts) do
        if e.enabled ~= false then enabledCount = enabledCount + 1 end
    end

    -- if pickscript is enabled or disabled
    if Eclipsium.pickscript then
        local parentGui = getParentGui(nil)
        local overlay = ensureOverlayAndBlur(parentGui)

        do
            local b = Services.Lighting:FindFirstChild("EclipsiumNotifBlur")
            if b then
                Services.TweenService:Create(b, TweenInfo.new(0.18, Enum.EasingStyle.Quad), {Size = 18}):Play()
            end
        end

        local panel = Instance.new("Frame")
        panel.Name = "EclipsiumScriptPicker"
        panel.Size = UDim2.new(0, 640, 0, 420)
        panel.Position = UDim2.new(0.5, -320, 0.5, -210)
        panel.AnchorPoint = Vector2.new(0, 0)
        panel.BackgroundColor3 = hexToColor3(UI.colors.picker_bg)
        panel.BackgroundTransparency = 0.06
        panel.BorderSizePixel = 0
        panel.ZIndex = 10005
        panel.Parent = parentGui
        local panelCorner = Instance.new("UICorner") panelCorner.CornerRadius = UDim.new(0, 12) panelCorner.Parent = panel
        local panelStroke = Instance.new("UIStroke") panelStroke.Color = hexToColor3(UI.colors.rose) panelStroke.Thickness = 2 panelStroke.Parent = panel

        local title = Instance.new("TextLabel")
        title.Size = UDim2.new(1, -24, 0, 36)
        title.Position = UDim2.new(0, 12, 0, 12)
        title.BackgroundTransparency = 1
        title.Font = Enum.Font.GothamBold
        title.TextSize = 18
        title.Text = "Select scripts to run"
        title.TextColor3 = hexToColor3(UI.colors.text)
        title.TextXAlignment = Enum.TextXAlignment.Left
        title.Parent = panel

        local TweenService = Services.TweenService

        local list = Instance.new("ScrollingFrame")
        list.Name = "EclipsiumScriptList"
        list.Size = UDim2.new(1, -24, 1, -120)
        list.Position = UDim2.new(0, 12, 0, 56)
        list.BackgroundTransparency = 1
        list.ScrollBarThickness = 8
        list.CanvasSize = UDim2.new(0, 0, 0, 0)
        list.Parent = panel

        local listLayout = Instance.new("UIListLayout")
        listLayout.Parent = list
        listLayout.SortOrder = Enum.SortOrder.LayoutOrder
        listLayout.Padding = UDim.new(0, 8)
        local listPadding = Instance.new("UIPadding") listPadding.Parent = list
        listPadding.PaddingTop = UDim.new(0, 4)
        listPadding.PaddingBottom = UDim.new(0, 8)

        local selections = {}
        local buttons = {}
        local visibleIndices = {}
        for i, entry in ipairs(Eclipsium.scripts) do
            if entry and entry.enabled ~= false then
                table.insert(visibleIndices, i)
                local btn = Instance.new("TextButton")
            btn.Size = UDim2.new(1, 0, 0, 44)
            btn.BackgroundColor3 = hexToColor3(UI.colors.container_highlight)
            btn.BorderSizePixel = 0
            btn.Font = Enum.Font.Gotham
            btn.Text = ""
            btn.TextColor3 = hexToColor3(UI.colors.text)
            btn.AnchorPoint = Vector2.new(0, 0)
            btn.Parent = list

            local inner = Instance.new("Frame")
            inner.Size = UDim2.new(1, -12, 1, 0)
            inner.Position = UDim2.new(0, 8, 0, 0)
            inner.BackgroundTransparency = 1
            inner.Parent = btn

            local nameLabel = Instance.new("TextLabel")
            nameLabel.Size = UDim2.new(1, -56, 1, 0)
            nameLabel.Position = UDim2.new(0, 0, 0, 0)
            nameLabel.BackgroundTransparency = 1
            nameLabel.Font = Enum.Font.GothamBold
            nameLabel.TextSize = 16
            nameLabel.Text = tostring(entry.name or entry.id or ("Script %d"):format(i))
            nameLabel.TextColor3 = hexToColor3(UI.colors.text)
            nameLabel.TextXAlignment = Enum.TextXAlignment.Left
            nameLabel.Parent = inner

            local check = Instance.new("TextLabel")
            check.Size = UDim2.new(0, 36, 0, 36)
            check.Position = UDim2.new(1, -36, 0.5, -18)
            check.BackgroundTransparency = 1
            check.Font = Enum.Font.GothamBold
            check.TextSize = 20
            check.Text = ""
            check.TextColor3 = hexToColor3(UI.colors.text)
            check.Parent = inner

            local cc = Instance.new("UICorner") cc.CornerRadius = UDim.new(0,8) cc.Parent = btn
            local stroke = Instance.new("UIStroke")
            stroke.Color = hexToColor3(UI.colors.container_border)
            stroke.Thickness = 1
            stroke.Parent = btn

                local btnIndex = #visibleIndices
                buttons[btnIndex] = {button = btn, check = check, name = nameLabel, stroke = stroke}
                selections[btnIndex] = false

            btn.MouseEnter:Connect(function()
                TweenService:Create(btn, TweenInfo.new(0.12), {BackgroundColor3 = hexToColor3(UI.colors.container)}):Play()
            end)
            btn.MouseLeave:Connect(function()
                if selections[i] then
                    TweenService:Create(btn, TweenInfo.new(0.12), {BackgroundColor3 = hexToColor3(UI.colors.accent)}):Play()
                else
                    TweenService:Create(btn, TweenInfo.new(0.12), {BackgroundColor3 = hexToColor3(UI.colors.container_highlight)}):Play()
                end
            end)

                btn.MouseButton1Click:Connect(function()
                    selections[btnIndex] = not selections[btnIndex]
                    if selections[btnIndex] then
                        check.Text = "✓"
                        buttons[btnIndex].stroke.Color = hexToColor3(UI.colors.rose)
                        buttons[btnIndex].stroke.Thickness = 2
                        TweenService:Create(btn, TweenInfo.new(0.14), {BackgroundColor3 = hexToColor3(UI.colors.accent)}):Play()
                    else
                        check.Text = ""
                        buttons[btnIndex].stroke.Color = hexToColor3(UI.colors.container_border)
                        buttons[btnIndex].stroke.Thickness = 1
                        TweenService:Create(btn, TweenInfo.new(0.14), {BackgroundColor3 = hexToColor3(UI.colors.container_highlight)}):Play()
                    end
                end)
            end
        end

        task.spawn(function()
            task.wait(0.03)
            local total = 0
            for _, v in ipairs(list:GetChildren()) do
                if v:IsA("GuiObject") and v.Visible then
                    total = total + (v.AbsoluteSize.Y + 8)
                end
            end
            list.CanvasSize = UDim2.new(0, 0, 0, total)
        end)

        local confirm = Instance.new("TextButton")
        confirm.Size = UDim2.new(0.5, -18, 0, 44)
        confirm.Position = UDim2.new(0, 12, 1, -60)
        confirm.AnchorPoint = Vector2.new(0, 0)
        confirm.BackgroundColor3 = hexToColor3(UI.colors.accent)
        confirm.Font = Enum.Font.GothamBold
        confirm.TextSize = 16
        confirm.Text = "Confirm"
        confirm.TextColor3 = hexToColor3(UI.colors.text)
        confirm.Parent = panel
        local cCorner = Instance.new("UICorner") cCorner.CornerRadius = UDim.new(0,6) cCorner.Parent = confirm

        local cancel = Instance.new("TextButton")
        cancel.Size = UDim2.new(0.5, -18, 0, 44)
        cancel.Position = UDim2.new(0.5, 6, 1, -60)
        cancel.AnchorPoint = Vector2.new(0, 0)
        cancel.BackgroundColor3 = hexToColor3(UI.colors.container_border)
        cancel.Font = Enum.Font.GothamBold
        cancel.TextSize = 16
        cancel.Text = "Cancel"
        cancel.TextColor3 = hexToColor3(UI.colors.text)
        cancel.Parent = panel
        local xCorner = Instance.new("UICorner") xCorner.CornerRadius = UDim.new(0,6) xCorner.Parent = cancel

        local selEvent = Instance.new("BindableEvent")
        confirm.MouseButton1Click:Connect(function()
            local chosen = {}
            for btnIndex, sel in ipairs(selections) do
                if sel then
                    local orig = visibleIndices[btnIndex]
                    if orig and Eclipsium.scripts[orig] and Eclipsium.scripts[orig].enabled ~= false then
                        table.insert(chosen, orig)
                    end
                end
            end
            selEvent:Fire(chosen)
        end)
        cancel.MouseButton1Click:Connect(function()
            local TweenService = Services.TweenService
            if overlay and overlay.Parent then
                TweenService:Create(overlay, TweenInfo.new(0.12, Enum.EasingStyle.Quad), {BackgroundTransparency = 1}):Play()
                task.delay(0.14, function()
                    if overlay and overlay.Parent then overlay:Destroy() end
                    if CURRENT_OVERLAY == overlay then CURRENT_OVERLAY = nil end
                end)
            end
            local b = Services.Lighting:FindFirstChild("EclipsiumNotifBlur")
            if b then
                TweenService:Create(b, TweenInfo.new(0.12, Enum.EasingStyle.Quad), {Size = 0}):Play()
                task.delay(0.14, function()
                    local b2 = Services.Lighting:FindFirstChild("EclipsiumNotifBlur")
                    if b2 and b2.Parent then b2:Destroy() end
                end)
            end

            selEvent:Fire(nil)
        end)

        local chosen = selEvent.Event:Wait()
        panel:Destroy()

        if not chosen or #chosen == 0 then
            local TweenService = Services.TweenService
            if overlay and overlay.Parent then
                TweenService:Create(overlay, TweenInfo.new(0.12, Enum.EasingStyle.Quad), {BackgroundTransparency = 1}):Play()
                task.delay(0.14, function()
                    if overlay and overlay.Parent then overlay:Destroy() end
                    if CURRENT_OVERLAY == overlay then CURRENT_OVERLAY = nil end
                end)
            end
            local b = Services.Lighting:FindFirstChild("EclipsiumNotifBlur")
            if b then
                TweenService:Create(b, TweenInfo.new(0.12, Enum.EasingStyle.Quad), {Size = 0}):Play()
                task.delay(0.14, function()
                    local b2 = Services.Lighting:FindFirstChild("EclipsiumNotifBlur")
                    if b2 and b2.Parent then b2:Destroy() end
                end)
            end

            SCRIPTS_REMAINING = 0
            return
        end

        SCRIPTS_REMAINING = #chosen
        for _, idx in ipairs(chosen) do
            local entry = Eclipsium.scripts[idx]
            if entry then
                executeEntry(entry)
            end
        end
    else
        SCRIPTS_REMAINING = enabledCount
        for _, entry in ipairs(Eclipsium.scripts) do
            if entry.enabled ~= false then
                executeEntry(entry)
            end
        end
    end
end

Eclipsium.run()

return Eclipsium

Features & Information

An universal loader to use to load your scripts. Looks fancy, good UI and it's fully customizeable.
#universal#loader

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts