{"id":"5FMT9tXwqR","url":"https://pastebin.ca/5FMT9tXwqR","raw_url":"https://raw.anybin.ca/5FMT9tXwqR","visibility":"public","access":"public","created_at":1794667180467,"expires_at":1802443180467,"fetch_limit":null,"fetches_used":0,"reads_remaining":null,"size_bytes":55224,"syntax_hint":null,"title":null,"filename":null,"change_note":null,"cipher":null,"cipher_meta":null,"parent_id":null,"root_id":"5FMT9tXwqR","version":1,"owner_id":null,"recipient_id":null,"body":"--[[\n    CHILLI HUB  //  STEAL AN EGG  //  v6.0 FINAL\n    Execute while in Steal An Egg.\n    Right Shift = menu.  End = panic.  Orb = reopen.\n\n    Root parent is resolved once through a verified chain and\n    asserted before any UI is built, so the menu always appears.\n]]\n\nlocal Players = game:GetService(\"Players\")\nlocal RunService = game:GetService(\"RunService\")\nlocal UserInputService = game:GetService(\"UserInputService\")\nlocal ReplicatedStorage = game:GetService(\"ReplicatedStorage\")\nlocal TweenService = game:GetService(\"TweenService\")\nlocal TeleportService = game:GetService(\"TeleportService\")\nlocal VirtualUser = game:GetService(\"VirtualUser\")\nlocal HttpService = game:GetService(\"HttpService\")\nlocal StarterGui = game:GetService(\"StarterGui\")\nlocal Lighting = game:GetService(\"Lighting\")\nlocal CoreGui = game:GetService(\"CoreGui\")\n\nlocal env = getfenv()\nlocal firetouchinterest = rawget(env, \"firetouchinterest\")\nlocal gethui = rawget(env, \"gethui\")\nlocal setclipboard = rawget(env, \"setclipboard\")\nlocal writefile = rawget(env, \"writefile\")\nlocal readfile = rawget(env, \"readfile\")\nlocal isfile = rawget(env, \"isfile\")\nlocal Drawing = rawget(env, \"Drawing\")\n\nlocal player = Players.LocalPlayer\nlocal camera = workspace.CurrentCamera\nlocal playerGui = player:FindFirstChildOfClass(\"PlayerGui\") or player:WaitForChild(\"PlayerGui\")\n\n-- ============================================================\n-- CONFIG\n-- ============================================================\nlocal CFG = {\n    accent = Color3.fromRGB(226, 62, 62),\n    bg = Color3.fromRGB(15, 15, 17),\n    panel = Color3.fromRGB(23, 23, 26),\n    card = Color3.fromRGB(28, 28, 32),\n    elem = Color3.fromRGB(37, 37, 42),\n    text = Color3.fromRGB(240, 240, 244),\n    dim = Color3.fromRGB(136, 136, 144),\n    ok = Color3.fromRGB(92, 190, 122),\n    warn = Color3.fromRGB(226, 176, 72),\n    bad = Color3.fromRGB(226, 88, 88),\n}\n\nlocal State = {\n    autoSteal = false, autoHatch = false, autoPlace = false,\n    autoCollect = false, autoRift = false, autoSell = false,\n    autoDeposit = false, autoBuy = false, autoMerge = false,\n    autoRebirth = false, autoDaily = false, instantSteal = false,\n    eggESP = false, playerESP = false, tracers = false,\n    eggNotify = false, distLabels = false, fullbright = false,\n    godMode = false, speedHack = false, fly = false,\n    noclip = false, infJump = false, freeze = false,\n    walkSpeed = 16, flySpeed = 90, stealRange = 400,\n    minRarity = \"Any\", notifyRarity = \"Legendary\",\n    priority = \"Nearest\", biome = \"None\",\n    espMode = \"Highlight\", cacheTTL = 1.2, uiParent = \"PlayerGui\",\n}\n\nlocal AC = {\n    rubberband = true, stateGuard = true, speedClamp = true,\n    antiTrap = true, antiRagdoll = true, throttle = true,\n    jitter = true, smoothTP = true, netOwner = true,\n    antiAfk = true, randomNames = true, coreGui = false,\n    throttleMs = 90, clampMax = 120,\n    rbCount = 0, trapCount = 0, lastFire = 0,\n}\n\nlocal LAYERS = {\n    \"rubberband\", \"stateGuard\", \"speedClamp\", \"antiTrap\",\n    \"antiRagdoll\", \"throttle\", \"jitter\", \"smoothTP\",\n    \"netOwner\", \"antiAfk\", \"randomNames\", \"coreGui\",\n}\n\nlocal RarityRank = {\n    Any = 0, Common = 1, Uncommon = 2, Rare = 3, Epic = 4,\n    Legendary = 5, Mythic = 6, Cosmic = 7, Secret = 8,\n    Eternal = 9, Divine = 10,\n}\n\nlocal BIOMES = {\n    \"Forest\", \"Lake\", \"Desert\", \"Jungle\", \"Snow\", \"Volcano\",\n    \"Abyss Ocean\", \"Prehistoric\", \"Cosmic\", \"Cherry Blossom\",\n    \"Titan Temple\", \"Angel\", \"Demon\", \"Alien Planet\", \"Void\",\n}\n\nlocal NAMES = { \"Link\", \"Node\", \"Anchor\", \"Handler\", \"Relay\", \"Pivot\", \"Sync\" }\nlocal function pickName() return NAMES[math.random(#NAMES)] end\n\nlocal gen = 0\nlocal conns = {}\nlocal flyAtt, flyLV, flyAO\nlocal loopRunning = false\nlocal guardBusy = false\nlocal savedWalk = 16\nlocal savedBrightness = Lighting.Brightness\n\nlocal function track(c)\n    conns[#conns + 1] = c\n    return c\nend\n\nlocal function untrackAll()\n    for _, c in ipairs(conns) do pcall(function() c:Disconnect() end) end\n    table.clear(conns)\nend\n\nlocal function char() return player.Character end\nlocal function hum()\n    local c = char()\n    return c and c:FindFirstChildOfClass(\"Humanoid\")\nend\nlocal function root()\n    local c = char()\n    return c and c:FindFirstChild(\"HumanoidRootPart\")\nend\n\nlocal function notify(t, b)\n    pcall(function()\n        StarterGui:SetCore(\"SendNotification\", { Title = t, Text = b, Duration = 4 })\n    end)\nend\n\n-- ============================================================\n-- ROOT  (resolved once, verified, asserted)\n-- ============================================================\nlocal function resolveParent()\n    if State.uiParent == \"CoreGui\" then\n        if gethui then\n            local ok, h = pcall(gethui)\n            if ok and typeof(h) == \"Instance\" and h.Parent ~= nil then\n                return h\n            end\n        end\n        local ok, cg = pcall(function()\n            return CoreGui:FindFirstChild(\"RobloxGui\") or CoreGui\n        end)\n        if ok and cg then return cg end\n    end\n    return playerGui\nend\n\nlocal gui = Instance.new(\"ScreenGui\")\ngui.Name = pickName()\ngui.ResetOnSpawn = false\ngui.IgnoreGuiInset = true\ngui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling\ngui.DisplayOrder = 2147483647\ngui.Enabled = true\n\nlocal okParent = pcall(function() gui.Parent = resolveParent() end)\nif not okParent or not gui.Parent then\n    gui.Parent = playerGui\nend\n\nassert(gui.Parent, \"Chilli Hub: could not parent GUI\")\n\n-- re-parent only if the root is genuinely orphaned\ntask.spawn(function()\n    while gui do\n        task.wait(1.5)\n        if not gui.Parent then\n            pcall(function() gui.Parent = resolveParent() end)\n            if not gui.Parent then gui.Parent = playerGui end\n        end\n    end\nend)\n\nlocal function corner(i, r)\n    local c = Instance.new(\"UICorner\")\n    c.CornerRadius = UDim.new(0, r or 6)\n    c.Parent = i\n    return c\nend\n\nlocal function stroke(i, col, t)\n    local s = Instance.new(\"UIStroke\")\n    s.Color = col or Color3.fromRGB(55, 55, 62)\n    s.Thickness = 1\n    s.Transparency = t or 0.35\n    s.Parent = i\n    return s\nend\n\n-- ============================================================\n-- TOASTS\n-- ============================================================\nlocal toastHolder = Instance.new(\"Frame\")\ntoastHolder.Size = UDim2.new(0, 250, 0, 320)\ntoastHolder.Position = UDim2.new(1, -266, 0, 20)\ntoastHolder.BackgroundTransparency = 1\ntoastHolder.ZIndex = 50\ntoastHolder.Parent = gui\n\nlocal toastList = Instance.new(\"UIListLayout\")\ntoastList.Padding = UDim.new(0, 6)\ntoastList.SortOrder = Enum.SortOrder.LayoutOrder\ntoastList.Parent = toastHolder\n\nlocal toastOrder = 0\nlocal function toast(text, color)\n    toastOrder += 1\n    local f = Instance.new(\"Frame\")\n    f.Size = UDim2.new(1, 0, 0, 30)\n    f.BackgroundColor3 = CFG.card\n    f.BorderSizePixel = 0\n    f.LayoutOrder = toastOrder\n    f.ZIndex = 50\n    f.Parent = toastHolder\n    corner(f, 6)\n    stroke(f, color or CFG.accent, 0.2)\n\n    local bar = Instance.new(\"Frame\")\n    bar.Size = UDim2.new(0, 3, 1, -8)\n    bar.Position = UDim2.new(0, 5, 0, 4)\n    bar.BackgroundColor3 = color or CFG.accent\n    bar.BorderSizePixel = 0\n    bar.Parent = f\n    corner(bar, 2)\n\n    local t = Instance.new(\"TextLabel\")\n    t.Size = UDim2.new(1, -22, 1, 0)\n    t.Position = UDim2.new(0, 14, 0, 0)\n    t.BackgroundTransparency = 1\n    t.Text = text\n    t.TextColor3 = CFG.text\n    t.Font = Enum.Font.GothamMedium\n    t.TextSize = 11\n    t.TextXAlignment = Enum.TextXAlignment.Left\n    t.TextTruncate = Enum.TextTruncate.AtEnd\n    t.ZIndex = 51\n    t.Parent = f\n\n    task.delay(3.2, function()\n        TweenService:Create(f, TweenInfo.new(0.25), { BackgroundTransparency = 1 }):Play()\n        TweenService:Create(t, TweenInfo.new(0.25), { TextTransparency = 1 }):Play()\n        task.wait(0.3)\n        f:Destroy()\n    end)\nend\n\n-- ============================================================\n-- WINDOW\n-- ============================================================\nlocal main = Instance.new(\"Frame\")\nmain.Name = \"Window\"\nmain.Size = UDim2.new(0, 600, 0, 460)\nmain.Position = UDim2.new(0.5, -300, 0.5, -230)\nmain.BackgroundColor3 = CFG.bg\nmain.BorderSizePixel = 0\nmain.Active = true\nmain.Visible = true\nmain.ZIndex = 10\nmain.Parent = gui\ncorner(main, 12)\nstroke(main, Color3.fromRGB(58, 58, 64), 0.15)\n\nlocal topBar = Instance.new(\"Frame\")\ntopBar.Size = UDim2.new(1, 0, 0, 40)\ntopBar.BackgroundColor3 = CFG.panel\ntopBar.BorderSizePixel = 0\ntopBar.ZIndex = 11\ntopBar.Parent = main\ncorner(topBar, 12)\n\nlocal topFix = Instance.new(\"Frame\")\ntopFix.Size = UDim2.new(1, 0, 0, 16)\ntopFix.Position = UDim2.new(0, 0, 1, -16)\ntopFix.BackgroundColor3 = CFG.panel\ntopFix.BorderSizePixel = 0\ntopFix.ZIndex = 11\ntopFix.Parent = topBar\n\nlocal logo = Instance.new(\"TextLabel\")\nlogo.Size = UDim2.new(0, 200, 1, 0)\nlogo.Position = UDim2.new(0, 16, 0, 0)\nlogo.BackgroundTransparency = 1\nlogo.Text = \"CHILLI HUB\"\nlogo.TextColor3 = CFG.accent\nlogo.Font = Enum.Font.GothamBold\nlogo.TextSize = 15\nlogo.TextXAlignment = Enum.TextXAlignment.Left\nlogo.ZIndex = 12\nlogo.Parent = topBar\n\nlocal ver = Instance.new(\"TextLabel\")\nver.Size = UDim2.new(0, 140, 1, 0)\nver.Position = UDim2.new(0, 128, 0, 0)\nver.BackgroundTransparency = 1\nver.Text = \"SAE v6.0 FINAL\"\nver.TextColor3 = CFG.dim\nver.Font = Enum.Font.Gotham\nver.TextSize = 10\nver.TextXAlignment = Enum.TextXAlignment.Left\nver.ZIndex = 12\nver.Parent = topBar\n\nlocal statusDot = Instance.new(\"TextLabel\")\nstatusDot.Size = UDim2.new(0, 190, 1, 0)\nstatusDot.Position = UDim2.new(1, -270, 0, 0)\nstatusDot.BackgroundTransparency = 1\nstatusDot.Text = \"STEALTH\"\nstatusDot.TextColor3 = CFG.ok\nstatusDot.Font = Enum.Font.GothamBold\nstatusDot.TextSize = 10\nstatusDot.TextXAlignment = Enum.TextXAlignment.Right\nstatusDot.ZIndex = 12\nstatusDot.Parent = topBar\n\nlocal minBtn = Instance.new(\"TextButton\")\nminBtn.Size = UDim2.new(0, 26, 0, 26)\nminBtn.Position = UDim2.new(1, -66, 0, 7)\nminBtn.BackgroundColor3 = CFG.elem\nminBtn.Text = \"-\"\nminBtn.TextColor3 = CFG.text\nminBtn.Font = Enum.Font.GothamBold\nminBtn.TextSize = 14\nminBtn.ZIndex = 12\nminBtn.Parent = topBar\ncorner(minBtn, 6)\n\nlocal closeBtn = Instance.new(\"TextButton\")\ncloseBtn.Size = UDim2.new(0, 26, 0, 26)\ncloseBtn.Position = UDim2.new(1, -36, 0, 7)\ncloseBtn.BackgroundColor3 = CFG.elem\ncloseBtn.Text = \"X\"\ncloseBtn.TextColor3 = CFG.text\ncloseBtn.Font = Enum.Font.GothamBold\ncloseBtn.TextSize = 12\ncloseBtn.ZIndex = 12\ncloseBtn.Parent = topBar\ncorner(closeBtn, 6)\n\nlocal dragging, dragStart, startPos = false, nil, nil\ntopBar.InputBegan:Connect(function(i)\n    if i.UserInputType == Enum.UserInputType.MouseButton1\n        or i.UserInputType == Enum.UserInputType.Touch then\n        dragging = true\n        dragStart = i.Position\n        startPos = main.Position\n    end\nend)\nUserInputService.InputChanged:Connect(function(i)\n    if not dragging then return end\n    if i.UserInputType == Enum.UserInputType.MouseMovement\n        or i.UserInputType == Enum.UserInputType.Touch then\n        local d = i.Position - dragStart\n        main.Position = UDim2.new(\n            startPos.X.Scale, startPos.X.Offset + d.X,\n            startPos.Y.Scale, startPos.Y.Offset + d.Y)\n    end\nend)\nUserInputService.InputEnded:Connect(function(i)\n    if i.UserInputType == Enum.UserInputType.MouseButton1\n        or i.UserInputType == Enum.UserInputType.Touch then\n        dragging = false\n    end\nend)\n\n-- ============================================================\n-- SIDEBAR + CONTENT\n-- ============================================================\nlocal sidebar = Instance.new(\"Frame\")\nsidebar.Size = UDim2.new(0, 124, 1, -58)\nsidebar.Position = UDim2.new(0, 12, 0, 48)\nsidebar.BackgroundTransparency = 1\nsidebar.ZIndex = 11\nsidebar.Parent = main\n\nlocal sideList = Instance.new(\"UIListLayout\")\nsideList.Padding = UDim.new(0, 4)\nsideList.SortOrder = Enum.SortOrder.LayoutOrder\nsideList.Parent = sidebar\n\nlocal content = Instance.new(\"Frame\")\ncontent.Size = UDim2.new(1, -150, 1, -58)\ncontent.Position = UDim2.new(0, 138, 0, 48)\ncontent.BackgroundTransparency = 1\ncontent.ClipsDescendants = true\ncontent.ZIndex = 11\ncontent.Parent = main\n\nlocal pages, tabButtons, pageOrder = {}, {}, {}\n\nlocal function makePage(name)\n    local scroll = Instance.new(\"ScrollingFrame\")\n    scroll.Name = name\n    scroll.Size = UDim2.new(1, 0, 1, 0)\n    scroll.BackgroundTransparency = 1\n    scroll.BorderSizePixel = 0\n    scroll.ScrollBarThickness = 3\n    scroll.ScrollBarImageColor3 = CFG.accent\n    scroll.CanvasSize = UDim2.new(0, 0, 0, 0)\n    scroll.AutomaticCanvasSize = Enum.AutomaticSize.Y\n    scroll.ScrollingDirection = Enum.ScrollingDirection.Y\n    scroll.Visible = false\n    scroll.ZIndex = 11\n    scroll.Parent = content\n\n    local list = Instance.new(\"UIListLayout\")\n    list.Padding = UDim.new(0, 6)\n    list.SortOrder = Enum.SortOrder.LayoutOrder\n    list.Parent = scroll\n\n    local pad = Instance.new(\"UIPadding\")\n    pad.PaddingRight = UDim.new(0, 10)\n    pad.PaddingBottom = UDim.new(0, 16)\n    pad.Parent = scroll\n\n    pageOrder[name] = 0\n    pages[name] = scroll\n    return scroll\nend\n\nlocal function ord(page)\n    pageOrder[page.Name] += 1\n    return pageOrder[page.Name]\nend\n\nlocal function selectTab(name)\n    for n, pg in pairs(pages) do\n        pg.Visible = (n == name)\n        local b = tabButtons[n]\n        b.BackgroundColor3 = (n == name) and CFG.accent or CFG.elem\n        b.TextColor3 = (n == name) and Color3.new(1, 1, 1) or CFG.dim\n    end\nend\n\nlocal function makeTab(name)\n    local b = Instance.new(\"TextButton\")\n    b.Size = UDim2.new(1, 0, 0, 32)\n    b.BackgroundColor3 = CFG.elem\n    b.Text = name\n    b.TextColor3 = CFG.dim\n    b.Font = Enum.Font.GothamMedium\n    b.TextSize = 12\n    b.LayoutOrder = #tabButtons + 1\n    b.ZIndex = 12\n    b.Parent = sidebar\n    corner(b, 7)\n    tabButtons[name] = b\n    makePage(name)\n    b.MouseButton1Click:Connect(function() selectTab(name) end)\n    return b\nend\n\n-- ============================================================\n-- ELEMENTS\n-- ============================================================\nlocal renderers = {}\n\nlocal function section(page, text)\n    local l = Instance.new(\"TextLabel\")\n    l.Size = UDim2.new(1, 0, 0, 18)\n    l.BackgroundTransparency = 1\n    l.Text = string.upper(text)\n    l.TextColor3 = CFG.accent\n    l.Font = Enum.Font.GothamBold\n    l.TextSize = 10\n    l.TextXAlignment = Enum.TextXAlignment.Left\n    l.LayoutOrder = ord(page)\n    l.ZIndex = 12\n    l.Parent = page\n    return l\nend\n\nlocal function card(page)\n    local c = Instance.new(\"Frame\")\n    c.Size = UDim2.new(1, 0, 0, 0)\n    c.AutomaticSize = Enum.AutomaticSize.Y\n    c.BackgroundColor3 = CFG.card\n    c.BorderSizePixel = 0\n    c.LayoutOrder = ord(page)\n    c.ZIndex = 12\n    c.Parent = page\n    corner(c, 8)\n\n    local pad = Instance.new(\"UIPadding\")\n    pad.PaddingTop = UDim.new(0, 5)\n    pad.PaddingBottom = UDim.new(0, 5)\n    pad.PaddingLeft = UDim.new(0, 5)\n    pad.PaddingRight = UDim.new(0, 5)\n    pad.Parent = c\n\n    local list = Instance.new(\"UIListLayout\")\n    list.Padding = UDim.new(0, 4)\n    list.SortOrder = Enum.SortOrder.LayoutOrder\n    list.Parent = c\n\n    return c\nend\n\nlocal function toggle(parent, label, key, cb, tbl)\n    local store = tbl or State\n    local row = Instance.new(\"Frame\")\n    row.Size = UDim2.new(1, 0, 0, 30)\n    row.BackgroundColor3 = CFG.panel\n    row.BorderSizePixel = 0\n    row.LayoutOrder = ord(parent)\n    row.ZIndex = 13\n    row.Parent = parent\n    corner(row, 6)\n\n    local t = Instance.new(\"TextLabel\")\n    t.Size = UDim2.new(1, -62, 1, 0)\n    t.Position = UDim2.new(0, 10, 0, 0)\n    t.BackgroundTransparency = 1\n    t.Text = label\n    t.TextColor3 = CFG.text\n    t.Font = Enum.Font.Gotham\n    t.TextSize = 12\n    t.TextXAlignment = Enum.TextXAlignment.Left\n    t.TextTruncate = Enum.TextTruncate.AtEnd\n    t.ZIndex = 14\n    t.Parent = row\n\n    local btn = Instance.new(\"TextButton\")\n    btn.Size = UDim2.new(0, 38, 0, 18)\n    btn.Position = UDim2.new(1, -48, 0.5, -9)\n    btn.BackgroundColor3 = CFG.elem\n    btn.Text = \"\"\n    btn.ZIndex = 14\n    btn.Parent = row\n    corner(btn, 9)\n\n    local knob = Instance.new(\"Frame\")\n    knob.Size = UDim2.new(0, 14, 0, 14)\n    knob.Position = UDim2.new(0, 2, 0.5, -7)\n    knob.BackgroundColor3 = CFG.dim\n    knob.BorderSizePixel = 0\n    knob.ZIndex = 15\n    knob.Parent = btn\n    corner(knob, 7)\n\n    local function render()\n        local on = store[key]\n        TweenService:Create(btn, TweenInfo.new(0.14), {\n            BackgroundColor3 = on and CFG.accent or CFG.elem }):Play()\n        TweenService:Create(knob, TweenInfo.new(0.14), {\n            Position = on and UDim2.new(1, -16, 0.5, -7) or UDim2.new(0, 2, 0.5, -7),\n            BackgroundColor3 = on and Color3.new(1, 1, 1) or CFG.dim }):Play()\n    end\n\n    btn.MouseButton1Click:Connect(function()\n        store[key] = not store[key]\n        render()\n        if cb then pcall(cb, store[key]) end\n    end)\n\n    renderers[key] = render\n    render()\n    return row\nend\n\nlocal function slider(parent, label, key, min, max, suffix, tbl)\n    local store = tbl or State\n    local holder = Instance.new(\"Frame\")\n    holder.Size = UDim2.new(1, 0, 0, 46)\n    holder.BackgroundColor3 = CFG.panel\n    holder.BorderSizePixel = 0\n    holder.LayoutOrder = ord(parent)\n    holder.ZIndex = 13\n    holder.Parent = parent\n    corner(holder, 6)\n\n    local t = Instance.new(\"TextLabel\")\n    t.Size = UDim2.new(1, -20, 0, 18)\n    t.Position = UDim2.new(0, 10, 0, 4)\n    t.BackgroundTransparency = 1\n    t.Text = label .. \": \" .. tostring(store[key]) .. (suffix or \"\")\n    t.TextColor3 = CFG.text\n    t.Font = Enum.Font.Gotham\n    t.TextSize = 12\n    t.TextXAlignment = Enum.TextXAlignment.Left\n    t.ZIndex = 14\n    t.Parent = holder\n\n    local bar = Instance.new(\"Frame\")\n    bar.Size = UDim2.new(1, -20, 0, 5)\n    bar.Position = UDim2.new(0, 10, 0, 30)\n    bar.BackgroundColor3 = CFG.elem\n    bar.BorderSizePixel = 0\n    bar.ZIndex = 14\n    bar.Parent = holder\n    corner(bar, 3)\n\n    local fill = Instance.new(\"Frame\")\n    fill.Size = UDim2.new((store[key] - min) / (max - min), 0, 1, 0)\n    fill.BackgroundColor3 = CFG.accent\n    fill.BorderSizePixel = 0\n    fill.ZIndex = 15\n    fill.Parent = bar\n    corner(fill, 3)\n\n    local function setX(x)\n        local rel = math.clamp((x - bar.AbsolutePosition.X) / bar.AbsoluteSize.X, 0, 1)\n        local v = math.floor(min + (max - min) * rel + 0.5)\n        store[key] = v\n        fill.Size = UDim2.new(rel, 0, 1, 0)\n        t.Text = label .. \": \" .. tostring(v) .. (suffix or \"\")\n    end\n\n    local held = false\n    bar.InputBegan:Connect(function(i)\n        if i.UserInputType == Enum.UserInputType.MouseButton1\n            or i.UserInputType == Enum.UserInputType.Touch then\n            held = true\n            setX(i.Position.X)\n        end\n    end)\n    UserInputService.InputChanged:Connect(function(i)\n        if held and (i.UserInputType == Enum.UserInputType.MouseMovement\n            or i.UserInputType == Enum.UserInputType.Touch) then\n            setX(i.Position.X)\n        end\n    end)\n    UserInputService.InputEnded:Connect(function(i)\n        if i.UserInputType == Enum.UserInputType.MouseButton1\n            or i.UserInputType == Enum.UserInputType.Touch then\n            held = false\n        end\n    end)\n    return holder\nend\n\nlocal function dropdown(parent, label, options, key, cb, tbl)\n    local store = tbl or State\n    local holder = Instance.new(\"Frame\")\n    holder.Size = UDim2.new(1, 0, 0, 30)\n    holder.BackgroundColor3 = CFG.panel\n    holder.BorderSizePixel = 0\n    holder.ClipsDescendants = true\n    holder.LayoutOrder = ord(parent)\n    holder.ZIndex = 13\n    holder.Parent = parent\n    corner(holder, 6)\n\n    local head = Instance.new(\"TextButton\")\n    head.Size = UDim2.new(1, 0, 0, 30)\n    head.BackgroundTransparency = 1\n    head.Text = \"\"\n    head.ZIndex = 14\n    head.Parent = holder\n\n    local t = Instance.new(\"TextLabel\")\n    t.Size = UDim2.new(1, -20, 0, 30)\n    t.Position = UDim2.new(0, 10, 0, 0)\n    t.BackgroundTransparency = 1\n    t.Text = label .. \": \" .. tostring(store[key])\n    t.TextColor3 = CFG.text\n    t.Font = Enum.Font.Gotham\n    t.TextSize = 12\n    t.TextXAlignment = Enum.TextXAlignment.Left\n    t.TextTruncate = Enum.TextTruncate.AtEnd\n    t.ZIndex = 14\n    t.Parent = holder\n\n    local arrow = Instance.new(\"TextLabel\")\n    arrow.Size = UDim2.new(0, 20, 0, 30)\n    arrow.Position = UDim2.new(1, -26, 0, 0)\n    arrow.BackgroundTransparency = 1\n    arrow.Text = \"v\"\n    arrow.TextColor3 = CFG.dim\n    arrow.Font = Enum.Font.GothamBold\n    arrow.TextSize = 11\n    arrow.ZIndex = 14\n    arrow.Parent = holder\n\n    local open = false\n    local function rebuild()\n        holder.Size = open and UDim2.new(1, 0, 0, 34 + #options * 24) or UDim2.new(1, 0, 0, 30)\n        for _, c in ipairs(holder:GetChildren()) do\n            if c:IsA(\"TextButton\") and c ~= head then c:Destroy() end\n        end\n        if not open then return end\n        for i, opt in ipairs(options) do\n            local o = Instance.new(\"TextButton\")\n            o.Size = UDim2.new(1, -16, 0, 22)\n            o.Position = UDim2.new(0, 8, 0, 32 + (i - 1) * 24)\n            o.BackgroundColor3 = CFG.elem\n            o.Text = opt\n            o.TextColor3 = CFG.text\n            o.Font = Enum.Font.Gotham\n            o.TextSize = 11\n            o.ZIndex = 15\n            o.Parent = holder\n            corner(o, 4)\n            o.MouseButton1Click:Connect(function()\n                store[key] = opt\n                t.Text = label .. \": \" .. opt\n                open = false\n                arrow.Text = \"v\"\n                rebuild()\n                if cb then pcall(cb, opt) end\n            end)\n        end\n    end\n\n    head.MouseButton1Click:Connect(function()\n        open = not open\n        arrow.Text = open and \"^\" or \"v\"\n        rebuild()\n    end)\n    return holder\nend\n\nlocal function button(parent, text, cb, color)\n    local b = Instance.new(\"TextButton\")\n    b.Size = UDim2.new(1, 0, 0, 30)\n    b.BackgroundColor3 = color or CFG.elem\n    b.Text = text\n    b.TextColor3 = CFG.text\n    b.Font = Enum.Font.GothamMedium\n    b.TextSize = 12\n    b.LayoutOrder = ord(parent)\n    b.ZIndex = 14\n    b.Parent = parent\n    corner(b, 6)\n    b.MouseButton1Click:Connect(function() pcall(cb) end)\n    return b\nend\n\nlocal function label(parent, text, h)\n    local l = Instance.new(\"TextLabel\")\n    l.Size = UDim2.new(1, 0, 0, h or 40)\n    l.BackgroundTransparency = 1\n    l.Text = text\n    l.TextColor3 = CFG.dim\n    l.Font = Enum.Font.Gotham\n    l.TextSize = 11\n    l.TextWrapped = true\n    l.TextXAlignment = Enum.TextXAlignment.Left\n    l.TextYAlignment = Enum.TextYAlignment.Top\n    l.LayoutOrder = ord(parent)\n    l.ZIndex = 14\n    l.Parent = parent\n    return l\nend\n\n-- ============================================================\n-- REMOTE INDEX\n-- ============================================================\nlocal remoteIndex = {}\nlocal remoteIndexAt = 0\n\nlocal function buildRemoteIndex()\n    table.clear(remoteIndex)\n    for _, container in ipairs({ ReplicatedStorage, char() }) do\n        if container then\n            for _, obj in ipairs(container:GetDescendants()) do\n                if obj:IsA(\"RemoteEvent\") or obj:IsA(\"RemoteFunction\") then\n                    local k = obj.Name:lower()\n                    local bucket = remoteIndex[k]\n                    if not bucket then\n                        bucket = {}\n                        remoteIndex[k] = bucket\n                    end\n                    bucket[#bucket + 1] = obj\n                end\n            end\n        end\n    end\n    remoteIndexAt = os.clock()\nend\n\nlocal function fire(names, ...)\n    if AC.throttle then\n        local now = os.clock() * 1000\n        local gate = AC.throttleMs\n        if AC.jitter then gate = gate * (0.7 + math.random() * 0.6) end\n        if now - AC.lastFire < gate then return end\n        AC.lastFire = now\n    end\n    if os.clock() - remoteIndexAt > 20 then buildRemoteIndex() end\n\n    local args = table.pack(...)\n    for _, n in ipairs(names) do\n        local needle = n:lower()\n        for k, bucket in pairs(remoteIndex) do\n            if k:find(needle, 1, true) then\n                for _, obj in ipairs(bucket) do\n                    if obj.Parent then\n                        pcall(function()\n                            if obj:IsA(\"RemoteEvent\") then\n                                obj:FireServer(table.unpack(args, 1, args.n))\n                            else\n                                obj:InvokeServer(table.unpack(args, 1, args.n))\n                            end\n                        end)\n                    end\n                end\n            end\n        end\n    end\nend\n\n-- ============================================================\n-- EGG CACHE\n-- ============================================================\nlocal eggCache = {}\nlocal eggCacheAt = 0\n\nlocal function refreshEggs()\n    local r = root()\n    if not r then return eggCache end\n    local now = os.clock()\n    if now - eggCacheAt < State.cacheTTL then return eggCache end\n    eggCacheAt = now\n\n    table.clear(eggCache)\n    local origin = r.Position\n    local range = State.stealRange\n\n    for _, obj in ipairs(workspace:GetDescendants()) do\n        if obj:IsA(\"Model\") or obj:IsA(\"BasePart\") then\n            local n = obj.Name:lower()\n            if n:find(\"egg\", 1, true) and not n:find(\"spawn\", 1, true)\n                and not n:find(\"config\", 1, true) then\n                local part = obj:IsA(\"BasePart\") and obj\n                    or obj:FindFirstChildWhichIsA(\"BasePart\")\n                if part and part.Parent then\n                    local d = (part.Position - origin).Magnitude\n                    if d <= range then\n                        eggCache[#eggCache + 1] = { inst = obj, part = part, dist = d }\n                    end\n                end\n            end\n        end\n    end\n    if State.priority == \"Nearest\" then\n        table.sort(eggCache, function(a, b) return a.dist < b.dist end)\n    else\ntable.sort(eggCache, function(a, b) return a.dist > b.dist end)\n    end\n    return eggCache\nend\n\nlocal function eggRarity(egg)\n    local hay = egg.inst.Name\n    for _, m in ipairs(egg.inst:GetDescendants()) do\n        if m:IsA(\"StringValue\") then\n            hay ..= \" \" .. m.Value .. \" \" .. m.Name\n        elseif m:IsA(\"TextLabel\") then\n            hay ..= \" \" .. m.Text\n        end\n    end\n    hay = hay:lower()\n    for r in pairs(RarityRank) do\n        if r ~= \"Any\" and hay:find(r:lower(), 1, true) then return r end\n    end\n    return \"Common\"\nend\n\nlocal function passes(egg)\n    local min = RarityRank[State.minRarity] or 0\n    if min == 0 then return true end\n    return (RarityRank[eggRarity(egg)] or 1) >= min\nend\n\nlocal function touchEgg(part)\n    local r = root()\n    if not r or not part then return end\n    if firetouchinterest then\n        pcall(function()\n            firetouchinterest(r, part, 0)\n            task.wait(0.02)\n            firetouchinterest(r, part, 1)\n        end)\n    end\nend\n\nlocal function smoothTP(target)\n    local r = root()\n    if not r or not target then return end\n    if not AC.smoothTP then\n        r.CFrame = target\n        return\n    end\n    local dist = (r.Position - target.Position).Magnitude\n    local dur = math.clamp(dist / 1100, 0.03, 0.28)\n    local tw = TweenService:Create(r, TweenInfo.new(dur, Enum.EasingStyle.Linear), {\n        CFrame = target })\n    tw:Play()\n    tw.Completed:Wait()\nend\n\n-- ============================================================\n-- STATUS\n-- ============================================================\nlocal function setStatus()\n    local n = 0\n    for _, k in ipairs(LAYERS) do\n        if AC[k] then n += 1\n    end\n    if n >= 9 then\n        statusDot.Text = \"STEALTH \" .. n .. \"/\" .. #LAYERS\n        statusDot.TextColor3 = CFG.ok\n    elseif n >= 5 then\n        statusDot.Text = \"GUARDED \" .. n .. \"/\" .. #LAYERS\n        statusDot.TextColor3 = CFG.warn\n    else\n        statusDot.Text = \"EXPOSED \" .. n .. \"/\" .. #LAYERS\n        statusDot.TextColor3 = CFG.bad\n    end\nend\n\n-- ============================================================\n-- STATE GUARD\n-- ============================================================\nlocal function startStateGuard()\n    local h = hum()\n    if not h then return end\n    track(h.StateChanged:Connect(function(_, new)\n        if not State.fly or guardBusy then return end\n        if new == Enum.HumanoidStateType.Physics then return end\n        if new == Enum.HumanoidStateType.Ragdoll and not AC.antiRagdoll then return end\n        if not AC.stateGuard and new ~= Enum.HumanoidStateType.Ragdoll then return end\n        guardBusy = true\n        task.defer(function()\n            local hh = hum()\n            if hh and State.fly then\n                pcall(function() hh:ChangeState(Enum.HumanoidStateType.Physics) end)\n            end\n            guardBusy = false\n        end)\n    end))\nend\n\n-- ============================================================\n-- FEATURES\n-- ============================================================\nlocal function doSteal()\n    local eggs = refreshEggs()\n    for _, egg in ipairs(eggs) do\n        if passes(egg) then\n            local rank = RarityRank[eggRarity(egg)] or 0\n            if State.eggNotify and rank >= (RarityRank[State.notifyRarity] or 99) then\n                toast(\"Nearby: \" .. egg.inst.Name, CFG.warn)\n            end\n            if State.instantSteal then\n                smoothTP(egg.part.CFrame + Vector3.new(0, 3, 0))\n            end\n            touchEgg(egg.part)\n            fire({ \"Steal\", \"stealEgg\", \"Pickup\", \"CollectEgg\", \"Grab\" }, egg.inst)\n            if not State.instantSteal then break end\n        end\n    end\nend\n\nlocal function doHatch() fire({ \"Hatch\", \"hatchEgg\", \"OpenEgg\" }) end\nlocal function doPlace() fire({ \"Place\", \"placeEgg\", \"Equip\", \"Deploy\" }) end\nlocal function doCollect() fire({ \"Collect\", \"collectReward\", \"ClaimReward\" }) end\nlocal function doRift() fire({ \"Rift\", \"Sacrifice\", \"Void\", \"Offer\" }) end\nlocal function doSell() fire({ \"Sell\", \"sellEgg\", \"SellAll\" }) end\nlocal function doDeposit() fire({ \"Deposit\", \"Store\", \"Bank\" }) end\nlocal function doBuy() fire({ \"Buy\", \"purchase\", \"BuyEgg\" }) end\nlocal function doMerge() fire({ \"Merge\", \"Combine\", \"Fuse\" }) end\nlocal function doRebirth() fire({ \"Rebirth\", \"Prestige\", \"Reset\" }) end\nlocal function doDaily() fire({ \"Daily\", \"ClaimDaily\", \"Login\" }) end\n\nlocal function applyGod(on)\n    local h = hum()\n    if not h then return end\n    if on then\n        h.MaxHealth = math.huge\n        h.Health = math.huge\n    else\n        h.MaxHealth = 100\n        h.Health = 100\n    end\nend\n\nlocal function applyFullbright(on)\n    if on then\n        savedBrightness = Lighting.Brightness\n        Lighting.Brightness = 3\n        Lighting.ClockTime = 14\n        Lighting.FogEnd = 100000\n        Lighting.GlobalShadows = false\n    else\n        Lighting.Brightness = savedBrightness\n        Lighting.GlobalShadows = true\n    end\nend\n\n-- ============================================================\n-- FLY\n-- ============================================================\nlocal function startFly()\n    local c, h, r = char(), hum(), root()\n    if not c or not h or not r then return end\n\n    savedWalk = h.WalkSpeed\n    h.AutoRotate = false\n    pcall(function() h:ChangeState(Enum.HumanoidStateType.Physics) end)\n\n    if AC.netOwner then\n        pcall(function() r:SetNetworkOwner(player) end)\n    end\n\n    local att = Instance.new(\"Attachment\")\n    att.Name = AC.randomNames and pickName() or \"FlyAttach\"\n    att.Parent = r\n    flyAtt = att\n\n    local lv = Instance.new(\"LinearVelocity\")\n    lv.Name = AC.randomNames and pickName() or \"FlyVelocity\"\n    lv.Attachment0 = att\n    lv.RelativeTo = Enum.ActuatorRelativeTo.World\n    lv.MaxForce = math.huge\n    lv.VectorVelocity = Vector3.zero\n    lv.Parent = r\n    flyLV = lv\n\n    local ao = Instance.new(\"AlignOrientation\")\n    ao.Name = AC.randomNames and pickName() or \"FlyAlign\"\n    ao.Mode = Enum.OrientationAlignmentMode.OneAttachment\n    ao.Attachment0 = att\n    ao.MaxTorque = math.huge\n    ao.RigidityEnabled = true\n    ao.Parent = r\n    flyAO = ao\n\n    startStateGuard()\n\n    local cam = camera\n    local lastPos = r.Position\n    local streak = 0\n    local myGen = gen\n\n    track(RunService.RenderStepped:Connect(function(dt)\n        if not State.fly or myGen ~= gen or not r.Parent then return end\n\n        att.CFrame = r.CFrame:ToObjectSpace(cam.CFrame)\n\n        local mv = Vector3.zero\n        if UserInputService:IsKeyDown(Enum.KeyCode.W) then mv += cam.CFrame.LookVector end\n        if UserInputService:IsKeyDown(Enum.KeyCode.S) then mv -= cam.CFrame.LookVector end\n        if UserInputService:IsKeyDown(Enum.KeyCode.A) then mv -= cam.CFrame.RightVector end\n        if UserInputService:IsKeyDown(Enum.KeyCode.D) then mv += cam.CFrame.RightVector end\n        if UserInputService:IsKeyDown(Enum.KeyCode.Space) then mv += Vector3.yAxis end\n        if UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) then mv -= Vector3.yAxis end\n        if mv.Magnitude > 0 then mv = mv.Unit end\n\n        local spd = State.flySpeed\n        if AC.speedClamp then spd = math.min(spd, AC.clampMax) end\n        local target = mv * spd\n        lv.VectorVelocity = target\n\n        if AC.rubberband then\n            local moved = (r.Position - lastPos).Magnitude\n            local expect = target.Magnitude * dt\n            if expect > 5 and moved < expect * 0.25 then\n                streak += 1\n                if streak >= 3 then\n                    r.CFrame = r.CFrame + target * dt\n                    streak = 0\n                    AC.rbCount += 1\n                end\n            else\n                streak = 0\n            end\n            lastPos = r.Position\n        end\n    end))\nend\n\nlocal function stopFly()\n    local h = hum()\n    if h then\n        h.AutoRotate = true\n        h.WalkSpeed = savedWalk\n        pcall(function() h:ChangeState(Enum.HumanoidStateType.Freefall) end)\n    end\n    if flyLV then flyLV:Destroy() flyLV = nil end\n    if flyAO then flyAO:Destroy() flyAO = nil end\n    if flyAtt then flyAtt:Destroy() flyAtt = nil end\nend\n\n-- ============================================================\n-- ESP\n-- ============================================================\nlocal espLive = {}\nlocal espGui = Instance.new(\"Folder\")\nespGui.Name = pickName()\nespGui.Parent = gui\n\nlocal tracerLines = {}\n\nlocal function clearTracer(part)\n    local d = tracerLines[part]\n    if d then\n        pcall(function() d:Remove() end)\n        tracerLines[part] = nil\n    end\nend\n\nlocal function clearOne(part)\n    local e = espLive[part]\n    if not e then return end\n    pcall(function() e.obj:Destroy() end)\n    pcall(function() e.bb:Destroy() end)\n    clearTracer(part)\n    espLive[part] = nil\nend\n\nlocal function addOne(part, color, text)\n    if espLive[part] then return end\n    local obj\n    if State.espMode == \"Highlight\" then\n        obj = Instance.new(\"Highlight\")\n        obj.Name = pickName()\n        obj.Adornee = part\n        obj.FillColor = color\n        obj.OutlineColor = color\n        obj.FillTransparency = 0.72\n        obj.OutlineTransparency = 0.1\n        obj.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop\n        obj.Parent = espGui\n    else\n        local box = Instance.new(\"BoxHandleAdornment\")\n        box.Size = part.Size + Vector3.new(0.4, 0.4, 0.4)\n        box.Adornee = part\n        box.AlwaysOnTop = true\n        box.Transparency = 0.6\n        box.Color3 = color\n        box.ZIndex = 5\n        box.Parent = espGui\n        obj = box\n    end\n\n    local bb = Instance.new(\"BillboardGui\")\n    bb.Size = UDim2.new(0, 140, 0, 22)\n    bb.StudsOffset = Vector3.new(0, part.Size.Y / 2 + 1.4, 0)\n    bb.AlwaysOnTop = true\n    bb.Parent = part\n\n    local tl = Instance.new(\"TextLabel\")\n    tl.Size = UDim2.new(1, 0, 1, 0)\n    tl.BackgroundTransparency = 1\n    tl.Text = text\n    tl.TextColor3 = color\n    tl.Font = Enum.Font.GothamBold\n    tl.TextSize = 12\n    tl.TextStrokeTransparency = 0.35\n    tl.Parent = bb\n\n    espLive[part] = { obj = obj, bb = bb }\n\n    if State.tracers and Drawing then\n        local d = Drawing.new(\"Line\")\n        d.Thickness = 1\n        d.Color = color\n        d.Transparency = 0.7\n        tracerLines[part] = d\n    end\nend\n\nlocal function syncESP()\n    local wanted = {}\n\n    if State.eggESP then\n        for _, egg in ipairs(refreshEggs()) do\n            local txt = egg.inst.Name .. \" [\" .. eggRarity(egg) .. \"]\"\n            if State.distLabels then\n                txt ..= \" \" .. math.floor(egg.dist) .. \"m\"\n            end\n            wanted[egg.part] = { CFG.accent, txt }\n        end\n    end\n    if State.playerESP then\n        for _, p in ipairs(Players:GetPlayers()) do\n            if p ~= player and p.Character then\n                local pr = p.Character:FindFirstChild(\"HumanoidRootPart\")\n                if pr then\n                    wanted[pr] = { Color3.fromRGB(90, 160, 240), p.Name }\n                end\n            end\n        end\n    end\n\n    for part in pairs(espLive) do\n        if not wanted[part] then clearOne(part) end\n    end\n    for part, info in pairs(wanted) do\n        addOne(part, info[1], info[2])\n    end\nend\n\nlocal function clearESP()\n    for part in pairs(espLive) do clearOne(part) end\n    table.clear(espLive)\n    for part in pairs(tracerLines) do clearTracer(part) end\nend\n\ntask.spawn(function()\n    while gui.Parent do\n        if State.tracers and Drawing then\n            local r = root()\n            if r then\n                local vp = camera.ViewportSize\n                for part, d in pairs(tracerLines) do\n                    if part.Parent then\n                        local sp, on = camera:WorldToViewportPoint(part.Position)\n                        if on then\n                            d.From = Vector2.new(vp.X / 2, vp.Y)\n                            d.To = Vector2.new(sp.X, sp.Y)\n                            d.Visible = true\n                        else\n                            d.Visible = false\n                        end\n                    else\n                        pcall(function() d:Remove() end)\n                        tracerLines[part] = nil\n                    end\n                end\n            end\n            task.wait(0.03)\n        else\n            task.wait(0.2)\n        end\n    end\nend)\n\n-- ============================================================\n-- MAIN LOOP\n-- ============================================================\nlocal function startLoop()\n    if loopRunning then return end\n    loopRunning = true\n    task.spawn(function()\n        local beat = 0\n        while loopRunning do\n            beat += 1\n\n            if State.autoSteal then pcall(doSteal) end\n            if beat % 2 == 0 and State.autoHatch then pcall(doHatch) end\n            if beat % 3 == 0 and State.autoPlace then pcall(doPlace) end\n            if beat % 4 == 0 and State.autoCollect then pcall(doCollect) end\n            if beat % 5 == 0 and State.autoSell then pcall(doSell) end\n            if beat % 6 == 0 and State.autoDeposit then pcall(doDeposit) end\n            if beat % 7 == 0 and State.autoBuy then pcall(doBuy) end\n            if beat % 8 == 0 and State.autoMerge then pcall(doMerge) end\n            if beat % 12 == 0 and State.autoRift then pcall(doRift) end\n            if beat % 20 == 0 and State.autoRebirth then pcall(doRebirth) end\n            if beat % 30 == 0 and State.autoDaily then pcall(doDaily) end\n\n            if State.speedHack then\n                local h = hum()\n                if h then\n                    local s = State.walkSpeed\n                    if AC.speedClamp then s = math.min(s, AC.clampMax) end\n                    h.WalkSpeed = s\n                end\n            end\n\n            if AC.antiTrap then\n                local r = root()\n                if r and r.Position.Y < -400 then\n                    AC.trapCount += 1\n                    r.CFrame = CFrame.new(0, 80, 0)\n                end\n            end\n\n            local wait = 0.12\n            if AC.jitter then wait = wait * (0.75 + math.random() * 0.5) end\n            task.wait(wait)\n        end\n    end)\nend\n\ntrack(player.Idled:Connect(function()\n    if not AC.antiAfk then return end\n    pcall(function()\n        VirtualUser:CaptureController()\n        VirtualUser:ClickButton2(Vector2.new())\n    end)\nend))\n\ntask.spawn(function()\n    while gui.Parent do\n        if State.noclip then\n            local c = char()\n            if c then\n                for _, p in ipairs(c:GetDescendants()) do\n                    if p:IsA(\"BasePart\") and p.CanCollide then p.CanCollide = false end\n                end\n            end\n        end\n        if State.godMode then\n            local h = hum()\n            if h then h.MaxHealth = math.huge h.Health = math.huge end\n        end\n        task.wait(0.25)\n    end\nend)\n\n-- ============================================================\n-- BUILD UI\n-- ============================================================\nmakeTab(\"Farm\")\nmakeTab(\"Visuals\")\nmakeTab(\"Movement\")\nmakeTab(\"Stealth\")\nmakeTab(\"Misc\")\n\nlocal farm = pages.Farm\nlocal vis = pages.Visuals\nlocal move = pages.Movement\nlocal stl = pages.Stealth\nlocal misc = pages.Misc\n\n-- FARM\nsection(farm, \"Egg Automation\")\nlocal c1 = card(farm)\ntoggle(c1, \"Auto Steal Egg\", \"autoSteal\", function(on)\n    if on then startLoop() end\nend)\ntoggle(c1, \"Instant Steal (teleports)\", \"instantSteal\")\ntoggle(c1, \"Notify On Rare Egg\", \"eggNotify\")\n\nsection(farm, \"Filters\")\nlocal c2 = card(farm)\ndropdown(c2, \"Min Rarity To Steal\", {\n    \"Any\", \"Common\", \"Uncommon\", \"Rare\", \"Epic\", \"Legendary\",\n    \"Mythic\", \"Cosmic\", \"Secret\", \"Eternal\", \"Divine\",\n}, \"minRarity\")\ndropdown(c2, \"Notify At Rarity\", {\n    \"Common\", \"Uncommon\", \"Rare\", \"Epic\", \"Legendary\",\n    \"Mythic\", \"Cosmic\", \"Secret\", \"Eternal\", \"Divine\",\n}, \"notifyRarity\")\ndropdown(c2, \"Target Priority\", { \"Nearest\", \"Farthest\" }, \"priority\")\nslider(c2, \"Steal Range\", \"stealRange\", 50, 2000, \" studs\")\n\nsection(farm, \"Other Automation\")\nlocal c3 = card(farm)\ntoggle(c3, \"Auto Hatch\", \"autoHatch\", function(on)\n    if on then startLoop() end\nend)\ntoggle(c3, \"Auto Place\", \"autoPlace\", function(on)\n    if on then startLoop() end\nend)\ntoggle(c3, \"Auto Collect Reward\", \"autoCollect\", function(on)\n    if on then startLoop() end\nend)\ntoggle(c3, \"Auto Sell\", \"autoSell\", function(on)\n    if on then startLoop() end\nend)\ntoggle(c3, \"Auto Deposit\", \"autoDeposit\", function(on)\n    if on then startLoop() end\nend)\ntoggle(c3, \"Auto Buy\", \"autoBuy\", function(on)\n    if on then startLoop() end\nend)\ntoggle(c3, \"Auto Merge\", \"autoMerge\", function(on)\n    if on then startLoop() end\nend)\ntoggle(c3, \"Auto Rift Sacrifice\", \"autoRift\", function(on)\n    if on then startLoop() end\nend)\ntoggle(c3, \"Auto Rebirth\", \"autoRebirth\", function(on)\n    if on then startLoop() end\nend)\ntoggle(c3, \"Auto Daily Claim\", \"autoDaily\", function(on)\n    if on then startLoop() end\nend)\n\nsection(farm, \"One Shot\")\nlocal c4 = card(farm)\nbutton(c4, \"Steal Nearest Now\", doSteal, CFG.accent)\nbutton(c4, \"Hatch All\", doHatch)\nbutton(c4, \"Collect Rewards\", doCollect)\nbutton(c4, \"Sell All\", doSell)\nbutton(c4, \"Deposit All\", doDeposit)\n\n-- VISUALS\nsection(vis, \"ESP\")\nlocal v1 = card(vis)\ndropdown(v1, \"Render Mode\", { \"Highlight\", \"Box\" }, \"espMode\", function()\n    clearESP()\n    syncESP()\nend)\ntoggle(v1, \"Egg ESP\", \"eggESP\", syncESP)\ntoggle(v1, \"Player ESP\", \"playerESP\", syncESP)\ntoggle(v1, \"Tracer Lines\", \"tracers\", function(on)\n    if not on then\n        for part in pairs(tracerLines) do clearTracer(part) end\n    end\nend)\ntoggle(v1, \"Distance Labels\", \"distLabels\", syncESP)\nbutton(v1, \"Refresh ESP\", syncESP)\nbutton(v1, \"Clear ESP\", clearESP)\n\nsection(vis, \"World\")\nlocal v2 = card(vis)\ntoggle(v2, \"Fullbright\", \"fullbright\", applyFullbright)\n\nsection(vis, \"Survival\")\nlocal v3 = card(vis)\ntoggle(v3, \"God Mode\", \"godMode\", applyGod)\n\n-- MOVEMENT\nsection(move, \"Speed\")\nlocal m1 = card(move)\ntoggle(m1, \"Speed Hack\", \"speedHack\", function(on)\n    if on then startLoop() end\n    local h = hum()\n    if h and not on then h.WalkSpeed = 16 end\nend)\nslider(m1, \"Walk Speed\", \"walkSpeed\", 16, 500)\n\nsection(move, \"Flight\")\nlocal m2 = card(move)\ntoggle(m2, \"Fly\", \"fly\", function(on)\n    if on then startFly() else stopFly() end\nend)\nslider(m2, \"Fly Speed\", \"flySpeed\", 20, 500)\ntoggle(m2, \"Noclip\", \"noclip\", function(on)\n    if not on then\n        local c = char()\n        if c then\n            for _, p in ipairs(c:GetDescendants()) do\n                if p:IsA(\"BasePart\") then p.CanCollide = true end\n            end\n        end\n    end\nend)\ntoggle(m2, \"Infinite Jump\", \"infJump\")\n\nsection(move, \"Teleport\")\nlocal m3 = card(move)\ndropdown(m3, \"Biome\", BIOMES, \"biome\")\nbutton(m3, \"Go To Biome\", function()\n    if State.biome == \"None\" then return toast(\"Pick a biome first\", CFG.warn) end\n    local found\n    for _, o in ipairs(workspace:GetDescendants()) do\n        if (o:IsA(\"Model\") or o:IsA(\"BasePart\"))\n            and o.Name:lower():find(State.biome:lower(), 1, true) then\n            found = o:IsA(\"BasePart\") and o or o:FindFirstChildWhichIsA(\"BasePart\")\n            if found then break end\n        end\n    end\n    if found then\n        smoothTP(found.CFrame + Vector3.new(0, 10, 0))\n        toast(\"Moved to \" .. State.biome, CFG.ok)\n    else\n        toast(State.biome .. \" not found here\", CFG.warn)\n    end\nend)\nbutton(m3, \"Go To Spawn\", function()\n    local sp = workspace:FindFirstChild(\"SpawnLocation\")\n    if sp then smoothTP(sp.CFrame + Vector3.new(0, 6, 0)) end\nend)\n\n-- STEALTH\nsection(stl, \"Detection Layers\")\nlocal s1 = card(stl)\ntoggle(s1, \"Anti Rubberband\", \"rubberband\", setStatus, AC)\ntoggle(s1, \"Humanoid State Guard\", \"stateGuard\", setStatus, AC)\ntoggle(s1, \"Speed Clamp\", \"speedClamp\", setStatus, AC)\ntoggle(s1, \"Anti Trap\", \"antiTrap\", setStatus, AC)\ntoggle(s1, \"Anti Ragdoll\", \"antiRagdoll\", setStatus, AC)\ntoggle(s1, \"Remote Throttle\", \"throttle\", setStatus, AC)\ntoggle(s1, \"Timing Jitter\", \"jitter\", setStatus, AC)\ntoggle(s1, \"Smooth Teleport\", \"smoothTP\", setStatus, AC)\ntoggle(s1, \"Network Ownership\", \"netOwner\", setStatus, AC)\ntoggle(s1, \"Anti AFK\", \"antiAfk\", setStatus, AC)\n\nsection(stl, \"Footprint\")\nlocal s2 = card(stl)\ntoggle(s2, \"Random Instance Names\", \"randomNames\", setStatus, AC)\ntoggle(s2, \"CoreGui Parenting\", \"coreGui\", function()\n    pcall(function() gui.Parent = resolveParent() end)\n    if not gui.Parent then gui.Parent = playerGui end\n    setStatus()\nend, AC)\n\nsection(stl, \"Tuning\")\nlocal s3 = card(stl)\nslider(s3, \"Clamp Max Speed\", \"clampMax\", 40, 500, \"\", AC)\nslider(s3, \"Throttle\", \"throttleMs\", 20, 400, \"ms\", AC)\nslider(s3, \"Egg Cache TTL\", \"cacheTTL\", 0.2, 4, \"s\")\n\nsection(stl, \"Counters\")\nlocal s4 = card(stl)\nlocal rbLabel = label(s4, \"Rubberbands corrected: 0\", 18)\nlocal tpLabel = label(s4, \"Trap rescues: 0\", 18)\n\ntask.spawn(function()\n    while gui.Parent do\n        rbLabel.Text = \"Rubberbands corrected: \" .. AC.rbCount\n        tpLabel.Text = \"Trap rescues: \" .. AC.trapCount\n        task.wait(0.4)\n    end\nend)\n\nsection(stl, \"Reading The Score\")\nlocal s5 = card(stl)\nlabel(s5, \"The header counts active layers. 9 or more reads STEALTH, 5 to 8 reads GUARDED, under 5 reads EXPOSED.\\n\\nOnly switch a layer off if it is actively fighting the game, then put it back once you move somewhere else.\", 84)\n\n-- MISC\nsection(misc, \"Server\")\nlocal x1 = card(misc)\nbutton(x1, \"Server Hop (lowest ping)\", function()\n    local best, bestPing = nil, math.huge\n    local ok, data = pcall(function()\n        local url = \"https://games.roblox.com/v1/games/\" .. game.PlaceId\n            .. \"/servers/Public?sortOrder=Asc&limit=100\"\n        return HttpService:JSONDecode(game:HttpGet(url))\n    end)\n    if ok and data and data.data then\n        for _, s in ipairs(data.data) do\n            if s.playing < s.maxPlayers and s.id ~= game.JobId\n                and (s.ping or 999) < bestPing then\n                best, bestPing = s.id, s.ping or 999\n            end\n        end\n    end\n    if best then\n        TeleportService:TeleportToPlaceInstance(game.PlaceId, best, player)\n    else\n        toast(\"No server found, rejoining\", CFG.warn)\n        TeleportService:Teleport(game.PlaceId, player)\n    end\nend)\nbutton(x1, \"Rejoin\", function()\n    TeleportService:Teleport(game.PlaceId, player)\nend)\nbutton(x1, \"Copy Job ID\", function()\n    if setclipboard then\n        pcall(function() setclipboard(game.JobId) end)\n        toast(\"Job ID copied\", CFG.ok)\n    else\n        toast(game.JobId, CFG.dim)\n    end\nend)\n\nsection(misc, \"Interface\")\nlocal x2 = card(misc)\nbutton(x2, \"Reset Window\", function()\n    main.Position = UDim2.new(0.5, -300, 0.5, -230)\n    main.Size = UDim2.new(0, 600, 0, 460)\n    toast(\"Window reset\", CFG.ok)\nend)\nbutton(x2, \"Save Settings\", function()\n    if not writefile then return toast(\"No file API on this executor\", CFG.warn) end\n    local dump = HttpService:JSONEncode({ state = State, ac = AC })\n    pcall(function() writefile(\"chilli_sae.json\", dump) end)\n    toast(\"Settings saved\", CFG.ok)\nend)\nbutton(x2, \"Load Settings\", function()\n    if not (readfile and isfile) then return toast(\"No file API on this executor\", CFG.warn) end\n    local ok, raw = pcall(function()\n        if isfile(\"chilli_sae.json\") then return readfile(\"chilli_sae.json\") end\n    end)\n    if not ok or not raw then return toast(\"No saved file\", CFG.warn) end\n    local dec, data = pcall(function() return HttpService:JSONDecode(raw) end)\n    if not dec or not data then return toast(\"File unreadable\", CFG.bad) end\n    for k, v in pairs(data.state or {}) do\n        if State[k] ~= nil and type(v) == type(State[k]) then State[k] = v end\n    end\n    for k, v in pairs(data.ac or {}) do\n        if AC[k] ~= nil and type(v) == type(AC[k]) then AC[k] = v end\n    end\n    for _, r in pairs(renderers) do pcall(r) end\n    setStatus()\n    toast(\"Settings loaded\", CFG.ok)\nend)\n\nsection(misc, \"Maintenance\")\nlocal x3 = card(misc)\nbutton(x3, \"Rebuild Remote Index\", function()\n    buildRemoteIndex()\n    local n = 0\n    for _ in pairs(remoteIndex) do n += 1 end\n    toast(\"Indexed \" .. n .. \" remote names\", CFG.ok)\nend)\nbutton(x3, \"Drop Egg Cache\", function()\n    table.clear(eggCache)\n    eggCacheAt = 0\n    toast(\"Egg cache cleared\", CFG.ok)\nend)\n\nsection(misc, \"Panic\")\nlocal x4 = card(misc)\nbutton(x4, \"Disable Everything\", function()\n    for k, v in pairs(State) do\n        if type(v) == \"boolean\" and v then\n            State[k] = false\n            local r = renderers[k]\n            if r then pcall(r) end\n        end\n    end\n    loopRunning = false\n    stopFly()\n    clearESP()\n    local h = hum()\n    if h then\n        h.WalkSpeed = 16\n        h.MaxHealth = 100\n        h.Health = 100\n    end\n    toast(\"All features off, layers kept\", CFG.warn)\nend, CFG.warn)\n\nsection(misc, \"Info\")\nlocal x5 = card(misc)\nlabel(x5, \"Right Shift toggles the menu. End is panic.\\nWASD plus Space and Left Shift while flying.\\nThe orb reopens the menu if you close it.\", 60)\n\nselectTab(\"Farm\")\n\n-- ============================================================\n-- ORB\n-- ============================================================\nlocal orb = Instance.new(\"TextButton\")\norb.Size = UDim2.new(0, 44, 0, 44)\norb.Position = UDim2.new(0, 20, 0.5, -22)\norb.BackgroundColor3 = CFG.accent\norb.Text = \"C\"\norb.TextColor3 = Color3.new(1, 1, 1)\norb.Font = Enum.Font.GothamBold\norb.TextSize = 16\norb.Visible = false\norb.ZIndex = 40\norb.Parent = gui\ncorner(orb, 22)\nstroke(orb, Color3.new(1, 1, 1), 0.6)\n\nlocal orbDrag, orbStart, orbPos = false, nil, nil\norb.InputBegan:Connect(function(i)\n    if i.UserInputType == Enum.UserInputType.MouseButton1\n        or i.UserInputType == Enum.UserInputType.Touch then\n        orbDrag = true\n        orbStart = i.Position\n        orbPos = orb.Position\n    end\nend)\nUserInputService.InputChanged:Connect(function(i)\n    if not orbDrag then return end\n    if i.UserInputType == Enum.UserInputType.MouseMovement\n        or i.UserInputType == Enum.UserInputType.Touch then\n        local d = i.Position - orbStart\n        if d.Magnitude > 4 then\n            orb.Position = UDim2.new(\n                orbPos.X.Scale, orbPos.X.Offset + d.X,\n                orbPos.Y.Scale, orbPos.Y.Offset + d.Y)\n        end\n    end\nend)\nUserInputService.InputEnded:Connect(function(i)\n    if i.UserInputType == Enum.UserInputType.MouseButton1\n        or i.UserInputType == Enum.UserInputType.Touch then\n        orbDrag = false\n    end\nend)\n\n-- ============================================================\n-- VISIBILITY  (single owner)\n-- ============================================================\nlocal function showMenu()\n    gui.Enabled = true\n    main.Visible = true\n    orb.Visible = false\nend\n\nlocal function hideMenu()\n    main.Visible = false\n    orb.Visible = true\nend\n\norb.MouseButton1Click:Connect(showMenu)\nminBtn.MouseButton1Click:Connect(hideMenu)\ncloseBtn.MouseButton1Click:Connect(hideMenu)\n\nlocal function panic()\n    for k, v in pairs(State) do\n        if type(v) == \"boolean\" and v then\n            State[k] = false\n            local r = renderers[k]\n            if r then pcall(r) end\n        end\n    end\n    loopRunning = false\n    stopFly()\n    clearESP()\n    local h = hum()\n    if h then\n        h.WalkSpeed = 16\n        h.MaxHealth = 100\n        h.Health = 100\n    end\n    toast(\"Panic: everything off\", CFG.bad)\nend\n\nUserInputService.InputBegan:Connect(function(input, processed)\n    if processed then return end\n    if input.KeyCode == Enum.KeyCode.RightShift then\n        if main.Visible then hideMenu() else showMenu() end\n    elseif input.KeyCode == Enum.KeyCode.End then\n        panic()\n    end\nend)\n\nUserInputService.JumpRequest:Connect(function()\n    if not State.infJump then return end\n    local h = hum()\n    if h then\n        h:ChangeState(Enum.HumanoidStateType.Jumping)\n    end\nend)\n\n-- ============================================================\n-- LOOPS\n-- ============================================================\ntask.spawn(function()\n    while gui.Parent do\n        if State.eggESP or State.playerESP then\n            syncESP()\n            task.wait(0.6)\n        else\n            task.wait(0.8)\n        end\n    end\nend)\n\ntask.spawn(function()\n    while gui.Parent do\n        if State.freeze then\n            local r = root()\n            if r then r.Anchored = true end\n        else\n            local r = root()\n            if r and r.Anchored and not State.fly then r.Anchored = false end\n        end\n        task.wait(0.2)\n    end\nend)\n\n-- ============================================================\n-- LIFECYCLE\n-- ============================================================\nplayer.CharacterAdded:Connect(function()\n    gen += 1\n    untrackAll()\n    if State.fly then\n        State.fly = false\n        local r = renderers.fly\n        if r then pcall(r) end\n    end\n    stopFly()\n    clearESP()\n    table.clear(eggCache)\n    eggCacheAt = 0\n    task.wait(1.2)\n    buildRemoteIndex()\n    if State.autoSteal then startLoop() end\n    setStatus()\nend)\n\nplayer.CharacterRemoving:Connect(function()\n    gen += 1\n    untrackAll()\n    stopFly()\n    clearESP()\nend)\n\n-- ============================================================\n-- BOOT\n-- ============================================================\nbuildRemoteIndex()\nsetStatus()\nshowMenu()\ntoast(\"Chilli Hub loaded\", CFG.accent)\nnotify(\"Chilli Hub\", \"Right Shift toggles the menu.\")"}