Self Leak Open Source
Key Required

Self Leak Open Source

[🎄] Trade a BrainrotCatBoyyCatBoyy 2.5K views 258 executesUpdated Nov 13, 2025
1.7/ 5(3 votes)
1233% Positive
Lua Script•534 lines (19880 chars)
-- this is a old source from me sorry if its ass coded :sob:

local start_tick = tick()

local replicated_storage = game:GetService("ReplicatedStorage")
local virtual_user = game:GetService("VirtualUser")
local worskpace = game:GetService("Workspace")
local players = game:GetService("Players")

local local_player = players.LocalPlayer
local user_status = (LRM_IsUserPremium ~= nil and "Member") or "Developer"

local game_objects = workspace:WaitForChild("GameObjects")
local brainrots = game_objects:WaitForChild("Brainrots")
local plots = game_objects:WaitForChild("Plots")
local plot

for _, v in plots:GetChildren() do
    if (v:GetAttribute("Owner") == local_player.Name) then
        plot = v
        break
    end
end

if (not plot) then
    return local_player:Kick("Plot not found")
end

local logic = plot:WaitForChild("Logic")
local player_eggs = logic:WaitForChild("Eggs")
local customers = logic:WaitForChild("Customers")
local brainrot_slots = logic:WaitForChild("BrainrotSlots")

local packages = replicated_storage:WaitForChild("Packages")
local info = replicated_storage:WaitForChild("Info")
local game_info = info:WaitForChild("Game")

local eggs_module = require(game_info:WaitForChild("Eggs"))
local knit_module = require(packages:WaitForChild("Knit"))

local data_controller = knit_module.GetController("DataController")

local sell_brainrot_service = knit_module.GetService("SellBrainrotService")
local npc_trade_service = knit_module.GetService("NpcTradeService")
local spin_service = knit_module.GetService("SpinService")
local egg_service = knit_module.GetService("EggService")

local selected_eggs = {}
local avaible_fonts = {}
local trade_options = {}
local eggs = {}
gui_config = {
    Color = Color3.fromRGB(255, 192, 203),
    Keybind = Enum.KeyCode.Insert,
    Assets = false,
    MinHeight = 100,
    MaxHeight = 600,
    InitialHeight = 400,
    MinWidth = 300,
    MaxWidth = 800,
    InitialWidth = 500
}

for _, v in Enum.Font:GetEnumItems() do
    table.insert(avaible_fonts, v.Name)
end

for v in eggs_module.List do
    table.insert(eggs, v)
end

table.insert(trade_options, "Accept")
table.insert(trade_options, "AddMore")
table.insert(trade_options, "Decline")

function get_egg_price(egg_name)
    return tonumber(eggs_module.List[egg_name].Price)
end

function held_brainrot()
    local brainrot
    for _, v in brainrots:GetChildren() do
        if (v.Name:find(local_player.Name)) then
            brainrot = v
            break
        end
    end
    return brainrot
end

function get_spins(wheel)
    for i, v in data_controller:GetReplica().Data.Spins do
        if (i == wheel) then
            return v
        end
    end
end

function join_server(access_code)
    return game.RobloxReplicatedStorage.ContactListIrisInviteTeleport:FireServer(game.PlaceId, "", access_code)
end

function get_money()
    return math.round(data_controller:GetReplica().Data.Currency.Cash)
end

local config = getfenv().gui_config or nil
local library = loadstring(game:HttpGet("https://raw.githubusercontent.com/nfpw/XXSCRIPT/refs/heads/main/Library/Module.lua"))()
local window = library:CreateWindow(config, gethui())
local window_name = library:SetWindowName("Astolfo Ware | "..user_status.." | "..game:GetService("MarketplaceService"):GetProductInfo(game.PlaceId).Name)

local tabs = {
    main = window:CreateTab("Main"),
    settings = window:CreateTab("Settings")
}

local sections = {
    trade_section = tabs.main:CreateSection("Trade Section", "left"),
    plot_section = tabs.main:CreateSection("Plot Section", "right"),
    egg_section = tabs.main:CreateSection("Egg Section", "right"),
    sell_section = tabs.main:CreateSection("Sell Section", "right"),
    player_section = tabs.main:CreateSection("Player Section", "left"),
    misc_section = tabs.main:CreateSection("Misc Section", "right"),
    gui_section = tabs.settings:CreateSection("Gui Section", "right")
}

local_player.Idled:Connect(function()
    if (library.flags.anti_afk) then
        virtual_user:CaptureController()
        virtual_user:ClickButton2(Vector2.new())
    end
end)

function notify(title, context, cooldown)
    window:Notify(title, context, cooldown)
end

sections.trade_section:CreateToggle("Auto Trade", false, function(value)
    library.flags.auto_trade = value
    if (library.flags.auto_trade) then
        repeat
            local brainrots = 0
            for _, v in customers:GetChildren() do
                local head = v:FindFirstChild("Head")
                if (not head) then
                    continue
                end
                local trade_gui = head:FindFirstChild("Trade")
                if (not trade_gui) then
                    continue
                end
                if (not trade_gui.Enabled) then
                    continue
                end
                local trade_brainrot_gui = trade_gui:FindFirstChild("Trade")
                if (not trade_brainrot_gui) then
                    continue
                end
                local npc_offer = trade_brainrot_gui:FindFirstChild("Frame"):FindFirstChild("Them")
                if (not npc_offer) then
                    continue
                end
                local trade_text = trade_gui:FindFirstChild("FairnessMeter"):FindFirstChild("TradeFairness"):FindFirstChild("TextLabel")
                if (not trade_text) then
                    continue
                end
                for _, v in npc_offer:GetChildren() do
                    if (not v:IsA("Frame")) then
                        continue
                    end
                    if (v.Name == "Icon") or (v.Name == "Seperator") then
                        continue
                    end
                    brainrots = brainrots + 1
                end
                if (brainrots > library.flags.max_decline) then
                    notify("Auto Trade", "Declined trade because too many brainrots", 4)
                    npc_trade_service:Clicked("Decline")
                    continue
                end
                if (trade_text.Text == "Good Trade") or (trade_text.Parent.Position.X.Scale > 0.5) then
                    notify("Auto Trade", "Accepted trade", 4)
                    npc_trade_service:Clicked("Accept")
                    continue
                elseif (trade_text.Text == "Fair Trade") then
                    notify("Auto Trade", "Requested "..library.flags.fair_option, 4)
                    npc_trade_service:Clicked(library.flags.fair_option)
                    continue
                elseif (trade_text.Text == "Bad Trade") then
                    notify("Auto Trade", "Requested "..library.flags.bad_option, 4)
                    npc_trade_service:Clicked(library.flags.bad_option)
                    continue
                end
            end
            task.wait(library.flags.auto_trade_delay)
        until (not library.flags.auto_trade)
    end
end)

sections.trade_section:CreateDropdown("If Fair Trade Then:", trade_options, function(value) library.flags.fair_option = value end, "AddMore", false)
sections.trade_section:CreateDropdown("If Bad Trade Then:", trade_options, function(value) library.flags.bad_option = value end, "AddMore", false)
sections.trade_section:CreateSlider("Decline If Over:", 1, 4, 1, true, function(value) library.flags.max_decline = value end)
sections.trade_section:CreateSlider("Auto Trade Delay:", 1, 60, 1, true, function(value) library.flags.auto_trade_delay = value end)

sections.plot_section:CreateToggle("Auto Collect Cash", false, function(value)
    library.flags.auto_collect_cash = value
    if (library.flags.auto_collect_cash) then
        repeat
            for _, v in brainrot_slots:GetChildren() do
                local item_folder = v:FindFirstChild("Item")
                if (not item_folder) then
                    continue
                end
                if (not item_folder:FindFirstChild("Brainrot")) then
                    continue
                end
                local cash_collect = v:FindFirstChild("CashCollect")
                if (not cash_collect) then
                    continue
                end
                firetouchinterest(local_player.Character.PrimaryPart, cash_collect, 0)
                firetouchinterest(local_player.Character.PrimaryPart, cash_collect, 1)
            end
            task.wait(library.flags.auto_collect_cash_delay)
        until (not library.flags.auto_collect_cash)
    end
end)

sections.plot_section:CreateSlider("Auto Collect Cash Delay:", 1, 60, 1, true, function(value) library.flags.auto_collect_cash_delay = value end)

sections.egg_section:CreateToggle("Auto Buy Eggs", false, function(value)
    library.flags.auto_buy_eggs = value
    if (library.flags.auto_buy_eggs) then
        repeat
            for _, v in player_eggs:GetChildren() do
                local egg_name = v:FindFirstChild("Hitbox"):FindFirstChild("TopAttachment"):FindFirstChild("EggPurchase"):FindFirstChild("Frame"):FindFirstChild("EggName")
                if (not egg_name) then
                    continue
                end
                for _, v2 in ipairs(selected_eggs) do
                    if (egg_name.Text ~= v2) then
                        continue
                    end
                    local egg_cost = get_egg_price(v2)
                    if (get_money() < egg_cost) then
                        continue
                    end
                    egg_service:BuyEgg(v.Name)
                end
            end
            task.wait(library.flags.auto_buy_eggs_delay)
        until (not library.flags.auto_buy_eggs)
    end
end)

sections.egg_section:CreateSlider("Auto Buy Eggs Delay:", 1, 60, 1, true, function(value) library.flags.auto_buy_eggs_delay = value end)
sections.egg_section:CreateDropdown("Select Eggs:", eggs, function(value) selected_eggs = value end, {}, true)

sections.sell_section:CreateButton("Sell Held Brainrot", function()
    local brainrot = held_brainrot()
    if (not brainrot) then
        return notify("Error", "Not holding a brainrot", 4)
    end
    notify("Success", "Sold brainrot", 4)
    sell_brainrot_service:Sell():await()
end)

sections.sell_section:CreateButton("Sell All Brainrots", function()
    notify("Success", "Sold all brainrot", 4)
    sell_brainrot_service:SellAll():await()
end)

sections.player_section:CreateToggle("Anti AFK", false, function(value) library.flags.anti_afk = value end)

sections.player_section:CreateLabel("Join a VIP server for free, where no one else can enter. Lasts until you leave. Credits to HeardKometa on v3rmn.", true)

sections.player_section:CreateButton("Join Free Vip Server", function()
    local md5 = {}
    local hmac = {}
    local base64 = {}

    do
        local T = {
            0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, 0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501,
            0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be, 0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821,
            0xf61e2562, 0xc040b340, 0x265e5a51, 0xe9b6c7aa, 0xd62f105d, 0x02441453, 0xd8a1e681, 0xe7d3fbc8,
            0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed, 0xa9e3e905, 0xfcefa3f8, 0x676f02d9, 0x8d2a4c8a,
            0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c, 0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70,
            0x289b7ec6, 0xeaa127fa, 0xd4ef3085, 0x04881d05, 0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665,
            0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039, 0x655b59c3, 0x8f0ccc92, 0xffeff47d, 0x85845dd1,
            0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1, 0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391
        }

        local function add(a, b)
            local lsw = bit32.band(a, 0xFFFF) + bit32.band(b, 0xFFFF)
            local msw = bit32.rshift(a, 16) + bit32.rshift(b, 16) + bit32.rshift(lsw, 16)
            return bit32.bor(bit32.lshift(msw, 16), bit32.band(lsw, 0xFFFF))
        end

        local function rol(x, n)
            return bit32.bor(bit32.lshift(x, n), bit32.rshift(x, 32 - n))
        end

        local function F(x, y, z)
            return bit32.bor(bit32.band(x, y), bit32.band(bit32.bnot(x), z))
        end

        local function G(x, y, z)
            return bit32.bor(bit32.band(x, z), bit32.band(y, bit32.bnot(z)))
        end

        local function H(x, y, z)
            return bit32.bxor(x, bit32.bxor(y, z))
        end

        local function I(x, y, z)
            return bit32.bxor(y, bit32.bor(x, bit32.bnot(z)))
        end

        function md5.sum(message)
            local a, b, c, d = 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476

            local message_len = #message
            local padded_message = message .. "\128"
            while #padded_message % 64 ~= 56 do
                padded_message = padded_message .. "\0"
            end

            local len_bytes = ""
            local len_bits = message_len * 8
            for i = 0, 7 do
                len_bytes = len_bytes .. string.char(bit32.band(bit32.rshift(len_bits, i * 8), 0xFF))
            end
            padded_message = padded_message .. len_bytes

            for i = 1, #padded_message, 64 do
                local chunk = padded_message:sub(i, i + 63)
                local X = {}
                for j = 0, 15 do
                    local b1, b2, b3, b4 = chunk:byte(j * 4 + 1, j * 4 + 4)
                    X[j] = bit32.bor(b1, bit32.lshift(b2, 8), bit32.lshift(b3, 16), bit32.lshift(b4, 24))
                end

                local aa, bb, cc, dd = a, b, c, d
                local s = { 7, 12, 17, 22, 5, 9, 14, 20, 4, 11, 16, 23, 6, 10, 15, 21 }

                for j = 0, 63 do
                    local f, k, shift_index
                    if j < 16 then
                        f = F(b, c, d)
                        k = j
                        shift_index = j % 4
                    elseif j < 32 then
                        f = G(b, c, d)
                        k = (1 + 5 * j) % 16
                        shift_index = 4 + (j % 4)
                    elseif j < 48 then
                        f = H(b, c, d)
                        k = (5 + 3 * j) % 16
                        shift_index = 8 + (j % 4)
                    else
                        f = I(b, c, d)
                        k = (7 * j) % 16
                        shift_index = 12 + (j % 4)
                    end

                    local temp = add(a, f)
                    temp = add(temp, X[k])
                    temp = add(temp, T[j + 1])
                    temp = rol(temp, s[shift_index + 1])

                    local new_b = add(b, temp)
                    a, b, c, d = d, new_b, b, c
                end

                a = add(a, aa)
                b = add(b, bb)
                c = add(c, cc)
                d = add(d, dd)
            end

            local function to_le_hex(n)
                local s = ""
                for i = 0, 3 do
                    s = s .. string.char(bit32.band(bit32.rshift(n, i * 8), 0xFF))
                end
                return s
            end

            return to_le_hex(a) .. to_le_hex(b) .. to_le_hex(c) .. to_le_hex(d)
        end
    end

    do
        function hmac.new(key, msg, hash_func)
            if #key > 64 then
                key = hash_func(key)
            end

            local o_key_pad = ""
            local i_key_pad = ""
            for i = 1, 64 do
                local byte = (i <= #key and string.byte(key, i)) or 0
                o_key_pad = o_key_pad .. string.char(bit32.bxor(byte, 0x5C))
                i_key_pad = i_key_pad .. string.char(bit32.bxor(byte, 0x36))
            end

            return hash_func(o_key_pad .. hash_func(i_key_pad .. msg))
        end
    end

    do
        local b = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"

        function base64.encode(data)
            return (
                (data:gsub(".", function(x)
                    local r, b_val = "", x:byte()
                    for i = 8, 1, -1 do
                        r = r .. (b_val % 2 ^ i - b_val % 2 ^ (i - 1) > 0 and "1" or "0")
                    end
                    return r
                end) .. "0000"):gsub("%d%d%d?%d?%d?%d?", function(x)
                    if #x < 6 then return "" end
                    local c = 0
                    for i = 1, 6 do
                        c = c + (x:sub(i, i) == "1" and 2 ^ (6 - i) or 0)
                    end
                    return b:sub(c + 1, c + 1)
                end) .. ({ "", "==", "=" })[#data % 3 + 1]
            )
        end
    end

    local function GenerateReservedServerCode(placeId)
        local uuid = {}
        for i = 1, 16 do
            uuid[i] = math.random(0, 255)
        end

        uuid[7] = bit32.bor(bit32.band(uuid[7], 0x0F), 0x40) -- v4
        uuid[9] = bit32.bor(bit32.band(uuid[9], 0x3F), 0x80) -- RFC 4122

        local firstBytes = ""
        for i = 1, 16 do
            firstBytes = firstBytes .. string.char(uuid[i])
        end

        local gameCode = string.format(
            "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",
            table.unpack(uuid)
        )

        local placeIdBytes = ""
        local pIdRec = placeId
        for _ = 1, 8 do
            placeIdBytes = placeIdBytes .. string.char(pIdRec % 256)
            pIdRec = math.floor(pIdRec / 256)
        end

        local content = firstBytes .. placeIdBytes
        local SUPERDUPERSECRETROBLOXKEYTHATTHEYDIDNTCHANGEEVERSINCEFOREVER = "e4Yn8ckbCJtw2sv7qmbg"
        local signature = hmac.new(
            SUPERDUPERSECRETROBLOXKEYTHATTHEYDIDNTCHANGEEVERSINCEFOREVER,
            content,
            md5.sum
        )

        local accessCodeBytes = signature .. content
        local accessCode = base64.encode(accessCodeBytes)
        accessCode = accessCode:gsub("+", "-"):gsub("/", "_")

        local pdding = 0
        accessCode, _ = accessCode:gsub("=", function()
            pdding = pdding + 1
            return ""
        end)

        accessCode = accessCode .. tostring(pdding)
        return accessCode, gameCode
    end

    local accessCode, _ = GenerateReservedServerCode(game.PlaceId)
    setclipboard("Your access key: "..accessCode)
    notify("Success", "Copied access key to clipboard", 2)
    task.wait(2)
    join_server(accessCode)
end)

sections.player_section:CreateTextBox(
    "Reserved Code To Join:",
    "",
    false,
    function(value)
        notify("Success", "Joining "..value, 2)
        join_server(value)
    end
)

sections.misc_section:CreateToggle("Auto Wheel", false, function(value)
    library.flags.auto_wheel = value
    if (library.flags.auto_wheel) then
        repeat
            if (get_spins("Galaxy") > 0) then
                spin_service:Spin()
            end
            task.wait()
        until (not library.flags.auto_wheel)
    end
end)

sections.gui_section:CreateButton("Unload UI", function()
    library:Destroy()
end)

sections.gui_section:CreateDropdown("Select Font:", avaible_fonts, function(value) window:SetFont(value) end, "", false)

sections.gui_section:CreateToggle("Enable Particles", false, function(value)
    library.flags.effects = value
    window:CreateParticles(library.flags.effects)
end)

local config_manager = loadstring(game:HttpGet("https://raw.githubusercontent.com/nfpw/XXSCRIPT/refs/heads/main/Library/ConfigManager.lua"))()
config_manager:SetLibrary(library)
config_manager:SetWindow(window)
config_manager:SetFolder("Astolfo Ware")
config_manager:BuildConfigSection(tabs.settings)
config_manager:LoadAutoloadConfig()
window:SetBackground("rbxassetid://9327507243")
window:SetTileOffset(100)
window:SetTileScale(1)
window:SetBackgroundColor(Color3.fromRGB(40, 40, 40))
window:SetBackgroundTransparency(0)
notify("Success", "Loaded script in "..string.format("%.2f", tick() - start_tick).." seconds", 10)

Features & Information

Made by @kylosilly bad executors wont work on ts
#self leak#open source#Trade a Brainrot#Trade a Brainrot script#undetected

Community Comments (4)

reyreyriynonreyreyriynonNov 13, 2025

what does is do

Replying to @reyreyriynon
CatBoyyCatBoyyNov 13, 2025

@reyreyriynon Auto trade, auto sell auto rebirth and some other stuff

Replying to @CatBoyy
lolrandomlolrandomNov 14, 2025

@CatBoyy six COME

EasyiseEasyiseNov 17, 2025

doesnt work on delta

More Scripts for [🎄] Trade a Brainrot