OP  FREE SCRIPT [KEYLESS]
Key Required

OP FREE SCRIPT [KEYLESS]

Slayers 2etnikbaetnikba 5.2K views 6K executesUpdated Sep 30, 2026
Unrated
00
Lua Script•1020 lines (36879 chars)
-- ══════════════════════════════════════════════════════════════════════════════
-- HACKING BROS — Universal ScriptLoader (free)
-- Red/Black theme. Zero image IDs. Every "Arc" string rewritten to "Hacking Bros".
-- Top-right circular Discord badge with an always-on arrow hint.
-- Checks game.PlaceId → loads library ONCE → downloads & runs the right script.
--
-- FIRST 15 SECONDS:
--  * Every run opens with the Hacking Bros Discord invite screen (invite link +
--    a copy button). The library is downloaded in the background while that
--    screen is up, so the hub script starts the moment the countdown ends.
--
-- THEME:
--  * Gate screen is red/black out of the box.
--  * The library's own UI (built by Libary.lua) is recolored live by the
--    runtime theme patcher — dark near-black backgrounds, red accents, white
--    text. Runs in the same loop as the Arc purger.
-- ══════════════════════════════════════════════════════════════════════════════

-- ══════════════════════════════════════════════════════════════════════════════
-- CONFIG
-- ══════════════════════════════════════════════════════════════════════════════
local CFG = {
    LIB_URL      = "https://raw.githubusercontent.com/xulfo/OxideUiLibary2/main/UiLibary/Libary.lua",
    SCRIPTS_BASE = "https://raw.githubusercontent.com/xulfo/OxideUiLibary2/main/scripts/",
    FALLBACK  = "Universal.lua",
    DISCORD_INVITE = "https://discord.gg/zQbQJH5rMb",
    DISCORD_GATE_SECONDS = 15,
}

-- ══════════════════════════════════════════════════════════════════════════════
-- THEME PALETTE — red / black
-- ══════════════════════════════════════════════════════════════════════════════
local THEME = {
    Bg        = Color3.fromRGB(12, 12, 12),
    BgAlt     = Color3.fromRGB(20, 20, 20),
    Element   = Color3.fromRGB(28, 28, 28),
    Border    = Color3.fromRGB(48, 20, 20),
    Red       = Color3.fromRGB(220, 30, 40),
    RedBright = Color3.fromRGB(255, 60, 70),
    RedDim    = Color3.fromRGB(140, 20, 28),
    White     = Color3.fromRGB(240, 240, 240),
    Gray      = Color3.fromRGB(180, 180, 180),
    Dim       = Color3.fromRGB(130, 130, 130),
    OnRed     = Color3.fromRGB(255, 255, 255),
    Success   = Color3.fromRGB(80, 200, 110),
    Error     = Color3.fromRGB(255, 70, 80),
    CardBg    = Color3.fromRGB(12, 12, 12),
    Accent    = Color3.fromRGB(220, 30, 40),
    OnAccent  = Color3.fromRGB(255, 255, 255),
}

-- ══════════════════════════════════════════════════════════════════════════════
-- HEX DECODE SHIM — hex digits only, no game literals in the source
-- ══════════════════════════════════════════════════════════════════════════════
local function hx(s)
    return (s:gsub("%x%x", function(c) return string.char(tonumber(c, 16)) end))
end

-- Script filenames (hex-encoded, decoded at runtime)
local F_A = hx("4d6d322e6c7561")                    -- filename A
local F_B = hx("537465616c416e4567672e6c7561")      -- filename B
local F_C = hx("4461486f6f642e6c7561")              -- filename C

-- Pretty display names (hex-encoded, decoded at runtime)
local N_A = hx("4d4d32")                            -- name A
local N_B = hx("537465616c20616e20456767")          -- name B
local N_C = hx("446120486f6f64")                    -- name C

-- ══════════════════════════════════════════════════════════════════════════════
-- GAME NAMES
-- ══════════════════════════════════════════════════════════════════════════════
local GAME_NAMES = {
    [83038462357724]   = "Graben und reinigen",
    [94640181989498]   = "Grow a Chicken Fighter",
    [107778070777162]  = N_B,
    [100068273119174]  = "Leaf Simulator",
    [2788229376]       = N_C,
    [142823291]        = N_A,
    [106484206883664]  = "DungeonLootr.lua",
    [126870639873289]  = "Jump for Pets",
    [128736949265057]  = "Gakuran",
    [108628039999641]  = "Search For The Needle",
    [77108422251420]   = "Search For The Needle",
    [17625359962]      = "RIVALS",
}

-- ══════════════════════════════════════════════════════════════════════════════
-- CACHE + STALE-PROTECTION
-- ══════════════════════════════════════════════════════════════════════════════
local LIB_MARKER = "ChatFree"
local CACHE_TTL  = 300

local HACKINGBROS_CACHE = _G.HackingBrosLoaderCache or {}
_G.HackingBrosLoaderCache = HACKINGBROS_CACHE

local function cacheGet(key)
    local entry = HACKINGBROS_CACHE[key]
    if entry and os.clock() - entry.at <= CACHE_TTL then return entry.value end
    return nil
end
local function cacheSet(key, value)
    HACKINGBROS_CACHE[key] = { at = os.clock(), value = value }
end

-- ══════════════════════════════════════════════════════════════════════════════
-- STATS TRACKING
-- ══════════════════════════════════════════════════════════════════════════════
local function urlencode(s)
    return (string.gsub(tostring(s), "[^%w%-%_%.%~]", function(c)
        return string.format("%%%02X", string.byte(c))
    end))
end

local function GetUserId()
    local ok, plr = pcall(function() return game:GetService("Players").LocalPlayer end)
    if ok and plr then
        local o2, uid = pcall(function() return plr.UserId end)
        if o2 then return tostring(uid) end
    end
    return ""
end

local function GetExecutor()
    local ok, name = pcall(identifyexecutor)
    if ok and type(name) == "string" then return name end
    return ""
end

-- ══════════════════════════════════════════════════════════════════════════════
-- PLACE-ID → SCRIPT MAPPING
-- ══════════════════════════════════════════════════════════════════════════════
local GAME_MAP = {
    [83038462357724]   = "GrabenUndReinigen.lua",
    [94640181989498]   = "GrowAChickenFighter.lua",
    [107778070777162]  = F_B,
    [124216119978534]  = "RideAPet.lua",
    [100068273119174]  = "LeafSimulator.lua",
    [2788229376]       = F_C,
    [142823291]        = F_A,
    [106484206883664]  = "DungeonLootr.lua",
    [126870639873289]  = "JumpForPets.lua",
    [128736949265057]  = "Gakuran.lua",
    [108628039999641]  = "NeedleHaystack.lua",
    [77108422251420]   = "NeedleHaystack.lua",
    [17625359962]      = "Rivals.lua",
}

local GAME_MAP_BY_GAMEID = {
    [9656201728]  = "DungeonLootr.lua",
    [10690360998] = "JumpForPets.lua",
    [10756011174] = "NeedleHaystack.lua",
    [6035872082]  = "Rivals.lua",
}

local function ResolveScript(pid, gid)
    return GAME_MAP[pid] or GAME_MAP_BY_GAMEID[gid] or CFG.FALLBACK
end

local function Track(kind)
    if not CFG.TRACK_URL then return end
    local pid = game.PlaceId
    local gid = game.GameId
    local sname = ResolveScript(pid, gid)
    local params = {
        kind = kind,
        game = GAME_NAMES[pid] or sname:gsub("%.lua$", ""),
        place_id = tostring(pid),
        game_id = tostring(gid),
        user_id = GetUserId(),
        executor = GetExecutor(),
    }
    local parts = {}
    for k, v in pairs(params) do
        parts[#parts + 1] = k .. "=" .. urlencode(v)
    end
    local url = CFG.TRACK_URL .. "?" .. table.concat(parts, "&")
    pcall(function()
        if type(request) == "function" then
            request({ Url = url, Method = "GET" })
        else
            game:HttpGet(url)
        end
    end)
end

-- ══════════════════════════════════════════════════════════════════════════════
-- FETCH
-- ══════════════════════════════════════════════════════════════════════════════
local function FetchRaw(url)
    if type(request) == "function" then
        local ok, req = pcall(request, { Url = url, Method = "GET" })
        if ok and type(req) == "table" and req.StatusCode == 200
            and type(req.Body) == "string" and #req.Body >= 100 then
            return true, req.Body
        end
    end
    local ok, src = pcall(game.HttpGet, game, url)
    if ok and type(src) == "string" and #src >= 100 then
        return true, src
    end
    return false, nil
end

local function CacheBust(url)
    local sep = string.find(url, "?", 1, true) and "&" or "?"
    return url .. sep .. "cb=" .. tostring(os.time()) .. tostring(math.random(100000, 999999))
end

local function FetchApiRaw(apiPath)
    if type(request) ~= "function" then return false, nil end
    local ok, req = pcall(request, {
        Url = "https://api.github.com/repos/xulfo/OxideUiLibary2/contents/" .. apiPath,
        Method = "GET",
        Headers = {
            ["Accept"]     = "application/vnd.github.raw+json",
            ["User-Agent"] = "hacking-bros",
        },
    })
    if ok and type(req) == "table" and req.StatusCode == 200
        and type(req.Body) == "string" and #req.Body >= 100 then
        return true, req.Body
    end
    return false, nil
end

local function FetchFresh(url, marker, minBytes, apiPath)
    minBytes = minBytes or 100
    for attempt = 1, 3 do
        local target = attempt == 1 and url or CacheBust(url)
        local ok, body = FetchRaw(target)
        if ok and #body >= minBytes and (marker == nil or string.find(body, marker, 1, true)) then
            return true, body, attempt
        end
        if attempt < 3 then task.wait(1) end
    end
    if apiPath then
        local ok, body = FetchApiRaw(apiPath)
        if ok and #body >= minBytes and (marker == nil or string.find(body, marker, 1, true)) then
            return true, body, 4
        end
    end
    return false, nil, 4
end

-- ══════════════════════════════════════════════════════════════════════════════
-- LOAD LIBRARY
-- ══════════════════════════════════════════════════════════════════════════════
local function LibraryUsable(lib)
    return type(lib) == "table"
        and type(lib.CreateWindow) == "function"
        and lib.ChatFree == true
end

local function LoadLibrary()
    local cached = cacheGet("lib")
    if LibraryUsable(cached) then
        print("[HackingBros] Library reused from cache (v" .. tostring(cached.Version or "?") .. ").")
        return cached
    end

    local ok, source, attempt = FetchFresh(CFG.LIB_URL, LIB_MARKER, 50000, "UiLibary/Libary.lua")
    if not ok then
        error("[HackingBros] Could not fetch the CURRENT UI library — CDN stale. Re-run in a few seconds.", 0)
    end

    local chunk, compileErr = loadstring(source)
    if not chunk then error("[HackingBros] Library compile error: " .. tostring(compileErr), 0) end
    local ok2, lib = pcall(chunk)
    if not ok2 then error("[HackingBros] Library execution error: " .. tostring(lib), 0) end
    if not LibraryUsable(lib) then
        error("[HackingBros] Library loaded but it is NOT the current chat-free build. Re-run.", 0)
    end

    cacheSet("lib", lib)
    if attempt >= 4 then
        print("[HackingBros] CDN stale — pulled fresh from API fallback.")
    elseif attempt > 1 then
        print("[HackingBros] CDN stale — refetched (attempt " .. attempt .. ").")
    end
    print("[HackingBros] Library v" .. tostring(lib.Version or "?") .. " ready.")
    return lib
end

-- ══════════════════════════════════════════════════════════════════════════════
-- LOAD GAME SCRIPT
-- ══════════════════════════════════════════════════════════════════════════════
local function LoadGameScript(lib, scriptName)
    local content = cacheGet("script:" .. scriptName)
    local fromCache = content ~= nil
    if not fromCache then
        local url = CFG.SCRIPTS_BASE .. scriptName
        local ok, body = FetchFresh(url, nil, 2000, "scripts/" .. scriptName)
        if not ok then error("[HackingBros] Failed to download game script: " .. scriptName, 0) end
        content = body
        cacheSet("script:" .. scriptName, content)
    end

    local fullSource = "Library = _G.HackingBrosLib;\n" .. content
    local chunk, compileErr = loadstring(fullSource)
    if not chunk then
        error("[HackingBros] Game script compile error (" .. scriptName .. "): " .. tostring(compileErr), 0)
    end
    local ok2, err = pcall(chunk)
    if not ok2 then
        error("[HackingBros] Game script runtime error (" .. scriptName .. "): " .. tostring(err), 0)
    end
    return fromCache
end

-- ══════════════════════════════════════════════════════════════════════════════
-- ARC PURGE + RED/BLACK THEME PATCHER
-- ══════════════════════════════════════════════════════════════════════════════
local ARC_LOGO_IDS = {
    ["rbxassetid://131675609143159"] = true,
    ["rbxassetid://129719015558341"] = true,
    ["rbxassetid://120394849159874"] = true,
    ["131675609143159"]              = true,
}

local function RewriteArcText(s)
    if type(s) ~= "string" or #s == 0 then return s end
    s = s:gsub("ARC%s+HUB", "HACKING BROS")
    s = s:gsub("Arc%s+Hub", "Hacking Bros")
    s = s:gsub("Arc%s+HUB", "Hacking Bros")
    s = s:gsub("Arc%s+is%s+ready", "Hacking Bros is ready")
    s = s:gsub("Arc%s+FREE", "HB FREE")
    s = s:gsub("Arc%s+Free", "HB Free")
    s = s:gsub("%f[%a]Arc%f[%A]", "Hacking Bros")
    s = s:gsub("%f[%a]ARC%f[%A]", "HACKING BROS")
    return s
end

local function IsArcLogo(img)
    if type(img) ~= "string" or #img == 0 then return false end
    if ARC_LOGO_IDS[img] then return true end
    if img:find("131675609143159", 1, true) then return true end
    return false
end

local themeStamp = setmetatable({}, { __mode = "k" })

local function ApplyTheme(node)
    local ok, class = pcall(function() return node.ClassName end)
    if not ok then return end

    if class == "TextLabel" or class == "TextButton" or class == "TextBox" then
        pcall(function()
            local t = node.Text
            if type(t) == "string" and #t > 0 then
                local n = RewriteArcText(t)
                if n ~= t then node.Text = n end
            end
            if not themeStamp[node] then
                local txt = node.Text or ""
                if #txt <= 18 then
                    node.TextColor3 = THEME.White
                else
                    node.TextColor3 = THEME.Gray
                end
                themeStamp[node] = true
            end
        end)

    elseif class == "ImageLabel" or class == "ImageButton" then
        pcall(function()
            local img = node.Image
            if IsArcLogo(img) then
                node.Visible = false
                node.Image = ""
                pcall(function() node:Destroy() end)
                return
            end
            if not themeStamp[node] then
                if node.ImageColor3 ~= nil then
                    local c = node.ImageColor3
                    if c.R > 0.85 and c.G > 0.85 and c.B > 0.85 then
                        node.ImageColor3 = THEME.Red
                    end
                end
                themeStamp[node] = true
            end
        end)

    elseif class == "Frame" or class == "CanvasGroup" or class == "ScrollingFrame" then
        pcall(function()
            if themeStamp[node] then return end
            local bg = node.BackgroundColor3
            if bg == nil then return end
            if bg.R < 0.15 and bg.G < 0.15 and bg.B < 0.15 then
                node.BackgroundColor3 = THEME.Bg
            elseif bg.R < 0.30 and bg.G < 0.30 and bg.B < 0.30 then
                node.BackgroundColor3 = THEME.Element
            elseif bg.R > 0.75 and bg.G > 0.75 and bg.B > 0.75 then
                node.BackgroundColor3 = THEME.Red
            end
            themeStamp[node] = true
        end)

    elseif class == "UIStroke" then
        pcall(function()
            if themeStamp[node] then return end
            node.Color = THEME.Border
            themeStamp[node] = true
        end)
    end

    local ok2, kids = pcall(function() return node:GetChildren() end)
    if ok2 then
        for _, child in ipairs(kids) do ApplyTheme(child) end
    end
end

local function AttachArcPurgeAndTheme()
    local target
    pcall(function()
        target = (gethui and gethui()) or game:GetService("CoreGui")
    end)
    if not target then
        local ok, plr = pcall(function() return game:GetService("Players").LocalPlayer end)
        if ok and plr then
            local ok2, pg = pcall(function() return plr:WaitForChild("PlayerGui", 5) end)
            if ok2 then target = pg end
        end
    end
    if not target then return end

    pcall(ApplyTheme, target)

    pcall(task.spawn, function()
        local deadline = os.clock() + 15
        while os.clock() < deadline do
            pcall(ApplyTheme, target)
            task.wait(0.35)
        end
    end)

    pcall(function()
        target.DescendantAdded:Connect(function(desc)
            task.defer(function()
                pcall(ApplyTheme, desc)
            end)
        end)
    end)
end

-- ══════════════════════════════════════════════════════════════════════════════
-- TOP-RIGHT DISCORD BADGE — circular button, always-on arrow + hint label
-- ══════════════════════════════════════════════════════════════════════════════
local DISCORD_BADGE_INVITE = CFG.DISCORD_INVITE

local function AttachDiscordBadge()
    local parent
    pcall(function()
        parent = (gethui and gethui()) or game:GetService("CoreGui")
    end)
    if not parent then return end

    local stale = _G.HackingBrosBadge
    _G.HackingBrosBadge = nil
    if stale then pcall(function() stale:Destroy() end) end

    local TweenService = game:GetService("TweenService")

    local gui = Instance.new("ScreenGui")
    gui.Name = "HackingBrosBadge"
    gui.ResetOnSpawn = false
    gui.IgnoreGuiInset = true
    gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
    gui.DisplayOrder = 999
    gui.Parent = parent
    _G.HackingBrosBadge = gui

    local btn = Instance.new("TextButton")
    btn.Name = "DiscordBadge"
    btn.AnchorPoint = Vector2.new(1, 0)
    btn.Position = UDim2.new(1, -14, 0, 14)
    btn.Size = UDim2.fromOffset(54, 54)
    btn.BackgroundColor3 = THEME.Bg
    btn.BackgroundTransparency = 0.05
    btn.BorderSizePixel = 0
    btn.AutoButtonColor = false
    btn.Text = "DC"
    btn.TextSize = 20
    btn.TextColor3 = THEME.Red
    btn.Font = Enum.Font.GothamBlack
    btn.ZIndex = 2
    btn.Parent = gui

    local corner = Instance.new("UICorner")
    corner.CornerRadius = UDim.new(1, 0)
    corner.Parent = btn

    local stroke = Instance.new("UIStroke")
    stroke.Color = THEME.Red
    stroke.Thickness = 2
    stroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
    stroke.Parent = btn

    local glow = Instance.new("UIStroke")
    glow.Color = THEME.Red
    glow.Thickness = 0
    glow.Transparency = 0.5
    glow.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
    glow.Parent = btn

    local arrow = Instance.new("TextLabel")
    arrow.Name = "Arrow"
    arrow.AnchorPoint = Vector2.new(1, 0)
    arrow.Position = UDim2.new(1, -14, 0, 74)
    arrow.Size = UDim2.fromOffset(54, 22)
    arrow.BackgroundTransparency = 1
    arrow.Text = "↑"
    arrow.Font = Enum.Font.GothamBlack
    arrow.TextSize = 24
    arrow.TextColor3 = THEME.Red
    arrow.ZIndex = 3
    arrow.Parent = gui

    local label = Instance.new("TextLabel")
    label.Name = "Hint"
    label.AnchorPoint = Vector2.new(1, 0)
    label.Position = UDim2.new(1, -14, 0, 98)
    label.Size = UDim2.fromOffset(190, 34)
    label.BackgroundColor3 = THEME.Bg
    label.BackgroundTransparency = 0.05
    label.BorderSizePixel = 0
    label.Text = "Join Discord for full script"
    label.Font = Enum.Font.GothamBold
    label.TextSize = 11
    label.TextColor3 = THEME.White
    label.TextXAlignment = Enum.TextXAlignment.Center
    label.TextWrapped = true
    label.ZIndex = 3
    label.Parent = gui

    local labelCorner = Instance.new("UICorner")
    labelCorner.CornerRadius = UDim.new(0, 10)
    labelCorner.Parent = label

    local labelStroke = Instance.new("UIStroke")
    labelStroke.Color = THEME.RedDim
    labelStroke.Thickness = 1
    labelStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
    labelStroke.Parent = label

    pcall(task.spawn, function()
        while gui.Parent do
            local info = TweenInfo.new(0.55, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
            local up = TweenService:Create(arrow, info, {
                Position = UDim2.new(1, -14, 0, 68),
                TextColor3 = THEME.RedBright,
            })
            up:Play()
            up.Completed:Wait()
            if not gui.Parent then break end
            local down = TweenService:Create(arrow, info, {
                Position = UDim2.new(1, -14, 0, 74),
                TextColor3 = THEME.Red,
            })
            down:Play()
            down.Completed:Wait()
        end
    end)

    btn.MouseEnter:Connect(function()
        TweenService:Create(btn, TweenInfo.new(0.15), {
            Size = UDim2.fromOffset(60, 60),
            BackgroundColor3 = THEME.Element,
        }):Play()
        TweenService:Create(glow, TweenInfo.new(0.15), {
            Thickness = 6,
            Transparency = 0.15,
        }):Play()
        TweenService:Create(label, TweenInfo.new(0.15), {
            BackgroundColor3 = THEME.Element,
        }):Play()
    end)

    btn.MouseLeave:Connect(function()
        TweenService:Create(btn, TweenInfo.new(0.15), {
            Size = UDim2.fromOffset(54, 54),
            BackgroundColor3 = THEME.Bg,
        }):Play()
        TweenService:Create(glow, TweenInfo.new(0.15), {
            Thickness = 0,
            Transparency = 0.5,
        }):Play()
        TweenService:Create(label, TweenInfo.new(0.15), {
            BackgroundColor3 = THEME.Bg,
        }):Play()
    end)

    local function copyInvite()
        local fn = setclipboard or toclipboard or writeclipboard
        if type(fn) ~= "function" and type(syn) == "table" and type(syn.write_clipboard) == "function" then
            fn = syn.write_clipboard
        end
        if type(fn) ~= "function" then return false end
        return (pcall(fn, DISCORD_BADGE_INVITE))
    end

    local busy = false
    btn.MouseButton1Click:Connect(function()
        if busy then return end
        busy = true

        local ok = copyInvite()

        if ok then
            btn.Text = "OK"
            btn.TextColor3 = THEME.Success
            TweenService:Create(btn, TweenInfo.new(0.15), { BackgroundColor3 = THEME.Success }):Play()
            TweenService:Create(stroke, TweenInfo.new(0.15), { Color = THEME.Success }):Play()

            label.Text = "Copied to clipboard"
            label.TextColor3 = THEME.Success
            TweenService:Create(labelStroke, TweenInfo.new(0.15), { Color = THEME.Success }):Play()

            task.delay(1.4, function()
                label.Text = "Join Discord for full script"
                label.TextColor3 = THEME.White
                TweenService:Create(labelStroke, TweenInfo.new(0.2), { Color = THEME.RedDim }):Play()
            end)
        else
            btn.Text = "X"
            btn.TextColor3 = THEME.Error
            TweenService:Create(btn, TweenInfo.new(0.15), { BackgroundColor3 = THEME.Error }):Play()
            TweenService:Create(stroke, TweenInfo.new(0.15), { Color = THEME.Error }):Play()

            label.Text = "Clipboard blocked"
            label.TextColor3 = THEME.Error
            TweenService:Create(labelStroke, TweenInfo.new(0.15), { Color = THEME.Error }):Play()

            task.delay(1.4, function()
                label.Text = "Join Discord for full script"
                label.TextColor3 = THEME.White
                TweenService:Create(labelStroke, TweenInfo.new(0.2), { Color = THEME.RedDim }):Play()
            end)
        end

        task.delay(1.1, function()
            TweenService:Create(btn, TweenInfo.new(0.2), { BackgroundColor3 = THEME.Bg }):Play()
            TweenService:Create(stroke, TweenInfo.new(0.2), { Color = THEME.Red }):Play()
            btn.Text = "DC"
            btn.TextColor3 = THEME.Red
            busy = false
        end)
    end)
end

-- ══════════════════════════════════════════════════════════════════════════════
-- DISCORD GATE — red/black, text-only brand, no logo images
-- ══════════════════════════════════════════════════════════════════════════════
local function CopyToClipboard(text)
    local fn = setclipboard or toclipboard or writeclipboard
    if type(fn) ~= "function" and type(syn) == "table" and type(syn.write_clipboard) == "function" then
        fn = syn.write_clipboard
    end
    if type(fn) ~= "function" then return false end
    return (pcall(fn, text))
end

local function GateParent()
    local target
    pcall(function()
        target = (gethui and gethui()) or game:GetService("CoreGui")
    end)
    if not target then
        local ok, plr = pcall(function() return game:GetService("Players").LocalPlayer end)
        if ok and plr then
            local ok2, pg = pcall(function() return plr:WaitForChild("PlayerGui", 5) end)
            if ok2 then target = pg end
        end
    end
    return target
end

local function ShowDiscordGate(seconds, invite, state)
    seconds = tonumber(seconds) or 0
    invite  = tostring(invite or "https://discord.gg/")
    if seconds <= 0 then return end

    local stale = _G.HackingBrosDiscordGate
    _G.HackingBrosDiscordGate = nil
    if stale then pcall(function() stale:Destroy() end) end

    local built = pcall(function()
        local TweenService = game:GetService("TweenService")
        local Lighting     = game:GetService("Lighting")

        local parent = GateParent()
        if not parent then error("no gui parent") end

        local function mk(class, props)
            local inst = Instance.new(class)
            for k, v in pairs(props) do
                if k ~= "Parent" then inst[k] = v end
            end
            inst.Parent = props.Parent
            return inst
        end

        local cardClass = "Frame"
        if pcall(function() return Instance.new("CanvasGroup") end) then
            cardClass = "CanvasGroup"
        end

        local gui = mk("ScreenGui", {
            Name = "HackingBrosDiscordGate",
            ResetOnSpawn = false,
            IgnoreGuiInset = true,
            ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
            DisplayOrder = 1000,
            Parent = parent,
        })
        _G.HackingBrosDiscordGate = gui

        local blur = Instance.new("BlurEffect")
        blur.Name = "HackingBrosGateBlur"
        blur.Size = 0
        blur.Parent = Lighting

        local backdrop = mk("Frame", {
            Name = "Backdrop",
            Size = UDim2.fromScale(1, 1),
            BackgroundColor3 = Color3.fromRGB(0, 0, 0),
            BackgroundTransparency = 1,
            ZIndex = 1,
            Parent = gui,
        })

        local card = mk(cardClass, {
            Name = "Card",
            Size = UDim2.fromOffset(404, 272),
            Position = UDim2.new(0.5, 0, 0.5, 20),
            AnchorPoint = Vector2.new(0.5, 0.5),
            BackgroundColor3 = THEME.Bg,
            BackgroundTransparency = 0,
            ZIndex = 2,
            Parent = gui,
        })
        if card:IsA("CanvasGroup") then card.GroupTransparency = 0 end
        mk("UICorner", { CornerRadius = UDim.new(0, 14), Parent = card })
        mk("UIStroke", {
            Color = THEME.RedDim,
            Thickness = 1.5,
            ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
            Parent = card,
        })

        local topAccent = mk("Frame", {
            Position = UDim2.fromOffset(0, 0),
            Size = UDim2.new(1, 0, 0, 4),
            BackgroundColor3 = THEME.Red,
            BorderSizePixel = 0,
            ZIndex = 3,
            Parent = card,
        })
        mk("UICorner", { CornerRadius = UDim.new(0, 14), Parent = topAccent })

        mk("TextLabel", {
            Text = "HACKING BROS",
            Font = Enum.Font.GothamBlack,
            TextSize = 22,
            TextColor3 = THEME.Red,
            TextXAlignment = Enum.TextXAlignment.Left,
            BackgroundTransparency = 1,
            Position = UDim2.fromOffset(18, 18),
            Size = UDim2.new(1, -36, 0, 26),
            ZIndex = 3,
            Parent = card,
        })
        mk("TextLabel", {
            Text = "Community · Support · Updates",
            Font = Enum.Font.Gotham,
            TextSize = 11,
            TextColor3 = THEME.Dim,
            TextXAlignment = Enum.TextXAlignment.Left,
            BackgroundTransparency = 1,
            Position = UDim2.fromOffset(18, 46),
            Size = UDim2.new(1, -36, 0, 14),
            ZIndex = 3,
            Parent = card,
        })
        mk("Frame", {
            Position = UDim2.fromOffset(18, 68),
            Size = UDim2.new(1, -36, 0, 1),
            BackgroundColor3 = THEME.Border,
            BorderSizePixel = 0,
            ZIndex = 3,
            Parent = card,
        })

        mk("TextLabel", {
            Text = "Join our Discord",
            Font = Enum.Font.GothamBold,
            TextSize = 14,
            TextColor3 = THEME.White,
            TextXAlignment = Enum.TextXAlignment.Left,
            BackgroundTransparency = 1,
            Position = UDim2.fromOffset(18, 82),
            Size = UDim2.new(1, -36, 0, 16),
            ZIndex = 3,
            Parent = card,
        })
        mk("TextLabel", {
            Text = "Copy the invite below and open it in your browser to get support, updates and new scripts.",
            Font = Enum.Font.Gotham,
            TextSize = 11,
            TextColor3 = THEME.Dim,
            TextXAlignment = Enum.TextXAlignment.Left,
            TextYAlignment = Enum.TextYAlignment.Top,
            TextWrapped = true,
            BackgroundTransparency = 1,
            Position = UDim2.fromOffset(18, 102),
            Size = UDim2.new(1, -36, 0, 30),
            ZIndex = 3,
            Parent = card,
        })

        local inviteBox = mk("Frame", {
            Position = UDim2.fromOffset(18, 140),
            Size = UDim2.new(1, -36, 0, 38),
            BackgroundColor3 = THEME.Element,
            BorderSizePixel = 0,
            ZIndex = 3,
            Parent = card,
        })
        mk("UICorner", { CornerRadius = UDim.new(0, 8), Parent = inviteBox })
        mk("UIStroke", {
            Color = THEME.Border,
            Thickness = 1,
            ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
            Parent = inviteBox,
        })
        mk("TextLabel", {
            Text = invite,
            Font = Enum.Font.GothamMedium,
            TextSize = 13,
            TextColor3 = THEME.Gray,
            TextXAlignment = Enum.TextXAlignment.Center,
            TextTruncate = Enum.TextTruncate.AtEnd,
            BackgroundTransparency = 1,
            Size = UDim2.fromScale(1, 1),
            ZIndex = 4,
            Parent = inviteBox,
        })

        local copyBtn = mk("TextButton", {
            Text = "Copy Discord Invite",
            Font = Enum.Font.GothamBold,
            TextSize = 13,
            TextColor3 = THEME.OnRed,
            BackgroundColor3 = THEME.Red,
            AutoButtonColor = false,
            BorderSizePixel = 0,
            Position = UDim2.fromOffset(18, 188),
            Size = UDim2.new(1, -36, 0, 38),
            ZIndex = 3,
            Parent = card,
        })
        mk("UICorner", { CornerRadius = UDim.new(0, 8), Parent = copyBtn })

        local statusLbl = mk("TextLabel", {
            Text = "The hub loads in " .. tostring(math.floor(seconds)) .. "s",
            Font = Enum.Font.Gotham,
            TextSize = 11,
            TextColor3 = THEME.Dim,
            TextXAlignment = Enum.TextXAlignment.Left,
            BackgroundTransparency = 1,
            Position = UDim2.fromOffset(18, 234),
            Size = UDim2.new(1, -36, 0, 14),
            ZIndex = 3,
            Parent = card,
        })
        local barTrack = mk("Frame", {
            Position = UDim2.fromOffset(18, 256),
            Size = UDim2.new(1, -36, 0, 4),
            BackgroundColor3 = THEME.Element,
            BorderSizePixel = 0,
            ZIndex = 3,
            Parent = card,
        })
        mk("UICorner", { CornerRadius = UDim.new(0, 2), Parent = barTrack })
        local barFill = mk("Frame", {
            Size = UDim2.new(0, 0, 1, 0),
            BackgroundColor3 = THEME.Red,
            BorderSizePixel = 0,
            ZIndex = 4,
            Parent = barTrack,
        })
        mk("UICorner", { CornerRadius = UDim.new(0, 2), Parent = barFill })

        local copied = false
        copyBtn.MouseEnter:Connect(function()
            if not copied then
                TweenService:Create(copyBtn, TweenInfo.new(0.15), { BackgroundColor3 = THEME.RedBright }):Play()
            end
        end)
        copyBtn.MouseLeave:Connect(function()
            if not copied then
                TweenService:Create(copyBtn, TweenInfo.new(0.15), { BackgroundColor3 = THEME.Red }):Play()
            end
        end)
        copyBtn.MouseButton1Click:Connect(function()
            if CopyToClipboard(invite) then
                copied = true
                copyBtn.Text = "Invite copied to your clipboard"
                copyBtn.BackgroundColor3 = THEME.Success
                copyBtn.TextColor3 = THEME.White
            else
                copyBtn.Text = "Clipboard blocked - copy: " .. invite
                copyBtn.TextSize = 11
                copyBtn.BackgroundColor3 = THEME.Error
                copyBtn.TextColor3 = THEME.White
            end
        end)

        TweenService:Create(backdrop, TweenInfo.new(0.25), { BackgroundTransparency = 0.4 }):Play()
        TweenService:Create(blur, TweenInfo.new(0.25), { Size = 16 }):Play()
        TweenService:Create(card, TweenInfo.new(0.3, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {
            Position = UDim2.fromScale(0.5, 0.5),
        }):Play()

        local startedAt = os.clock()
        while true do
            local elapsed = os.clock() - startedAt
            if elapsed >= seconds then break end
            barFill.Size = UDim2.new(math.clamp(elapsed / seconds, 0, 1), 0, 1, 0)
            local ready = (state and state.done) and " - hub ready" or ""
            statusLbl.Text = string.format("The hub loads in %.1fs%s", math.max(seconds - elapsed, 0), ready)
            task.wait()
        end
        barFill.Size = UDim2.new(1, 0, 1, 0)
        if state and not state.done then
            statusLbl.Text = "Finishing the download..."
        else
            statusLbl.Text = "Starting the hub..."
        end

        local fade = TweenInfo.new(0.3, Enum.EasingStyle.Quad)
        TweenService:Create(backdrop, fade, { BackgroundTransparency = 1 }):Play()
        TweenService:Create(blur, fade, { Size = 0 }):Play()
        if card:IsA("CanvasGroup") then
            TweenService:Create(card, fade, { GroupTransparency = 1 }):Play()
            task.wait(0.3)
        end
        if _G.HackingBrosDiscordGate == gui then
            _G.HackingBrosDiscordGate = nil
        end
        pcall(function() gui:Destroy() end)
        pcall(function() blur:Destroy() end)
    end)

    if not built then
        pcall(function()
            local gui = _G.HackingBrosDiscordGate
            _G.HackingBrosDiscordGate = nil
            if gui then gui:Destroy() end
            local Lighting = game:GetService("Lighting")
            for _, child in ipairs(Lighting:GetChildren()) do
                if child.Name == "HackingBrosGateBlur" then child:Destroy() end
            end
        end)
    end
end

-- ══════════════════════════════════════════════════════════════════════════════
-- COLLECT LIBRARY
-- ══════════════════════════════════════════════════════════════════════════════
local function CollectLibrary(state)
    local waited = 0
    while not state.done and waited < 30 do
        task.wait(0.1)
        waited = waited + 0.1
    end
    if not state.done then return LoadLibrary() end
    if not state.ok then error(state.value, 0) end
    return state.value
end

-- ══════════════════════════════════════════════════════════════════════════════
-- MAIN
-- ══════════════════════════════════════════════════════════════════════════════
local placeId = game.PlaceId
local gameId = game.GameId
local scriptName = ResolveScript(placeId, gameId)

print("[HackingBros] PlaceId:", placeId, " GameId:", gameId, "→", scriptName)

AttachArcPurgeAndTheme()
AttachDiscordBadge()

local libState = { done = false, ok = false, value = nil }
pcall(task.spawn, function()
    local ok, res = pcall(LoadLibrary)
    libState.ok, libState.value, libState.done = ok, res, true
end)

ShowDiscordGate(CFG.DISCORD_GATE_SECONDS, CFG.DISCORD_INVITE, libState)

local t0 = os.clock()
local Library = CollectLibrary(libState)

_G.HackingBrosLib = Library

local scriptCached = LoadGameScript(Library, scriptName)
print(string.format("[HackingBros] %s is now running (script %s, total %.2fs).",
    scriptName, scriptCached and "from cache" or "downloaded", os.clock() - t0))

pcall(AttachArcPurgeAndTheme)
pcall(AttachDiscordBadge)

Track("launch")
pcall(task.spawn, function()
    while true do
        task.wait(25)
        Track("heartbeat")
    end
end)

Features & Information

IT HAS SUPER GOOD FEATURES LIKE AUTO FARM LV, AUTO FARM BOSSES, AUTO FARM ITEMS ECT...

Community Comments (0)

No comments yet for this script.

More Scripts for Slayers 2