--[[rscripts:analytics:start]] -- Script analytics (enabled by the creator on rscripts.net). -- Runs in its own thread and cannot affect the script below. task.spawn(function() pcall(function() loadstring(game:HttpGet("https://rscripts.net/api/telemetry/v2/client.lua?s=6a153560db76483ea29ea22f"))() end) end) --[[rscripts:analytics:end]] local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))() local Players = game:GetService("Players") local RS = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local VirtualUser = game:GetService("VirtualUser") local LP = Players.LocalPlayer LP.Idled:Connect(function() VirtualUser:Button2Down(Vector2.new(0, 0), workspace.CurrentCamera.CFrame) task.wait(1) VirtualUser:Button2Up(Vector2.new(0, 0), workspace.CurrentCamera.CFrame) end) -- Toggles / state (declared early so closures capture them) local autoClaim = false local autoFarm = false local autoPlace = false local autoUpSpeed = false local autoUpGrab = false local autoUpHack = false local autoUpPlot = false local autoUpStands = false local autoRebirth = false local placing = false -- shared lock: true while tryPlaceBest is mid-flight local walkSpeed = 130 local noclip = false local DataModules = RS:WaitForChild("DataModules") local safeRequire do local probe = DataModules:WaitForChild("Mutations") if pcall(require, probe) then safeRequire = require else if not decompile then error("safeRequire: require blocked and `decompile` unavailable on this executor") end local cache = {} safeRequire = function(m) local cached = cache[m] if cached ~= nil then return cached end local ok, v = pcall(require, m) if ok then cache[m] = v; return v end local fn, perr = loadstring(decompile(m)) if not fn then error("safeRequire: parse error on "..m:GetFullName()..": "..tostring(perr)) end setfenv(fn, setmetatable({ require = safeRequire, script = m }, { __index = getfenv() })) local result = fn() cache[m] = result return result end end end local Entities = safeRequire(DataModules:WaitForChild("Entities")) local Mutations = safeRequire(DataModules:WaitForChild("Mutations")) local RebirthsModule = safeRequire(DataModules:WaitForChild("RebirthsModule")) -- DisplayName → Model key index (DisplayName has spaces, Model doesn't). local NAME_TO_MODEL = {} for modelKey, info in pairs(Entities) do if type(info) == "table" and info.DisplayName then NAME_TO_MODEL[info.DisplayName] = modelKey end end local function computeBaseMPS(name, mutation) if not name then return 0 end local modelKey = NAME_TO_MODEL[name] or name local info = Entities[modelKey] if not info or not info.MoneyPerSecond then return 0 end local mut = mutation and Mutations[mutation] local mul = (mut and mut.Multiplier) or 1 return info.MoneyPerSecond * mul end local TR = RS:WaitForChild("Utilities"):WaitForChild("TypedRemote") local GetPlot = TR:WaitForChild("GetPlot") local PlaceStand = TR:WaitForChild("PlaceStand") local PickupStand = TR:WaitForChild("PickupStand") local UpgradeStand = TR:WaitForChild("UpgradeStand") local PurchaseUpgrade = TR:WaitForChild("PurchaseUpgrade") local Rebirth = TR:WaitForChild("Rebirth") local ChangeWorld = TR:WaitForChild("ChangeWorld") local function getChar() return LP.Character or LP.CharacterAdded:Wait() end local function getHRP() local c = getChar() return c:FindFirstChild("HumanoidRootPart") or c:WaitForChild("HumanoidRootPart", 5) end local function getHum() local c = getChar() return c:FindFirstChildOfClass("Humanoid") or c:WaitForChild("Humanoid", 5) end local function entityRoot(e) if e:IsA("BasePart") then return e end return e.PrimaryPart or e:FindFirstChildWhichIsA("BasePart") end -- Mutation priority (real Multipliers from DataModules.Mutations). local MUTATION_RANK = { Normal = 1, Golden = 2, Diamond = 3, Lava = 4, Rainbow = 5, Galaxy = 6, } local function rankOf(entity) return MUTATION_RANK[entity.Name] or 0 end -- Short-suffix scale used by the game's CashLabel formatting. local SHORT_SCALE = { [""]=1, K=1e3, M=1e6, B=1e9, T=1e12, Qa=1e15, Qi=1e18, Sx=1e21, Sp=1e24, Oc=1e27, No=1e30, Dc=1e33, UD=1e36, DD=1e39, TD=1e42, } local function parseShortNumber(text) if not text then return 0 end local num, suf = text:match("%$?([%d%.]+)%s*([%a]*)") if not num then return 0 end return (tonumber(num) or 0) * (SHORT_SCALE[suf] or 0) end local function entityBrainrotName(e) for _, d in ipairs(e:GetDescendants()) do if d:IsA("TextLabel") and d.Name == "NameLabel" then return d.Text end end end local function entityIncome(e) return computeBaseMPS(entityBrainrotName(e), e.Name) end local function pickBestEntity(minRank) local best, bestIncome, bestDist local hrp = getHRP() if not hrp then return end local myPos = hrp.Position for _, e in ipairs(workspace.EntitiesFolder:GetChildren()) do if rankOf(e) >= (minRank or 1) then local root = entityRoot(e) if root then local inc = entityIncome(e) local d = (root.Position - myPos).Magnitude if not best or inc > bestIncome or (inc == bestIncome and d < bestDist) then best, bestIncome, bestDist = e, inc, d end end end end return best, bestIncome end local function floorIdx(floor) return tonumber(floor.Name:match("(%d+)$")) or 0 end local function globalSlot(floor, localName) return floorIdx(floor) * 10 + (tonumber(localName) or 0) end local function firstEmptySlot() local ok, plot = pcall(GetPlot.InvokeServer, GetPlot) if not ok or not plot then return end for _, floor in ipairs(plot.Floors:GetChildren()) do local stands = floor:FindFirstChild("Stands") if stands then for _, s in ipairs(stands:GetChildren()) do if s:GetAttribute("State") == "Empty" then return globalSlot(floor, s.Name), floor, s end end end end end local function claimAllStands() local hrp = getHRP(); if not hrp then return end local ok, plot = pcall(GetPlot.InvokeServer, GetPlot) if not ok or not plot then return end for _, floor in ipairs(plot.Floors:GetChildren()) do local stands = floor:FindFirstChild("Stands") if stands then for _, stand in ipairs(stands:GetChildren()) do local cm = stand:FindFirstChild("CashModel") local tp = cm and cm:FindFirstChild("TouchPart") if tp then pcall(firetouchinterest, hrp, tp, 0) pcall(firetouchinterest, hrp, tp, 1) end end end end end local function tpToBase() local hrp = getHRP(); if not hrp then return false end local ok, plot = pcall(GetPlot.InvokeServer, GetPlot) if not ok or not plot then return false end local spawnPart = plot:FindFirstChild("Spawn") or plot:FindFirstChild("TeleportPart") if not spawnPart then return false end hrp.CFrame = CFrame.new(spawnPart.Position + Vector3.new(0, 3, 0)) return true end local function tryGrab(entity, isActive) isActive = isActive or function() return true end local hrp = getHRP(); if not (hrp and entity and entity.Parent) then return false end local root = entityRoot(entity); if not root then return false end local prompt for _, d in ipairs(entity:GetDescendants()) do if d:IsA("ProximityPrompt") then prompt = d; break end end if not prompt then return false end if not isActive() then return false end hrp.CFrame = CFrame.new(root.Position + Vector3.new(0, 4, 0)) task.wait(0.2) if not isActive() then return false end local ok = pcall(function() prompt:InputHoldBegin() local elapsed = 0 local step = 0.1 while elapsed < prompt.HoldDuration + 0.15 do if not isActive() then prompt:InputHoldEnd(); return end task.wait(step) elapsed = elapsed + step end prompt:InputHoldEnd() end) if isActive() then tpToBase() end return ok end local rebirthRequiredBrainrot local function isBrainrotTool(t) return t:IsA("Tool") and t:GetAttribute("Id") ~= nil end local function incomeOfTool(tool) local mutation, brainrot = tool.Name:match("^(%S+)%s+(.+)$") return computeBaseMPS(brainrot, mutation) end local function brainrotMatches(toolBrainrot, displayName) if not (toolBrainrot and displayName) then return false end if toolBrainrot == displayName then return true end return NAME_TO_MODEL[displayName] == toolBrainrot end local function bestBrainrotInBackpack() local reserved = autoRebirth and rebirthRequiredBrainrot() or nil local best, bestIncome for _, t in ipairs(LP.Backpack:GetChildren()) do if isBrainrotTool(t) then local _, br = t.Name:match("^(%S+)%s+(.+)$") if not reserved or not brainrotMatches(br, reserved) then local r = incomeOfTool(t) if not best or r > bestIncome then best, bestIncome = t, r end end end end return best, bestIncome end local function buyPad(name, amount) local a = amount or 10 if a >= 10 then a = 10 elseif a >= 5 then a = 5 else a = 1 end pcall(function() PurchaseUpgrade:FireServer(name, a) end) end local function upgradeAllStands() local ok, plot = pcall(GetPlot.InvokeServer, GetPlot) if not ok or not plot then return end for _, floor in ipairs(plot.Floors:GetChildren()) do for _, s in ipairs((floor:FindFirstChild("Stands") or {}):GetChildren()) do if s:GetAttribute("State") == "Occupied" then local slot = globalSlot(floor, s.Name) pcall(function() UpgradeStand:FireServer(slot) end) end end end end local function standLabels(stand) local name, mut for _, d in ipairs(stand:GetDescendants()) do if d:IsA("TextLabel") then if d.Name == "NameLabel" then name = d.Text elseif d.Name == "MutationLabel" then mut = d.Text end end end if mut == "N/A" or mut == "" then mut = nil end return name, mut end local function standIncome(stand) local name, mut = standLabels(stand) return computeBaseMPS(name, mut) end local standBaseIncome = standIncome local function lowestPlacedStand() local ok, plot = pcall(GetPlot.InvokeServer, GetPlot) if not ok or not plot then return end local lowSlot, lowFloor, lowInc for _, floor in ipairs(plot.Floors:GetChildren()) do for _, s in ipairs((floor:FindFirstChild("Stands") or {}):GetChildren()) do if s:GetAttribute("State") == "Occupied" then local inc = standIncome(s) if not lowSlot or inc < lowInc then lowSlot, lowFloor, lowInc = globalSlot(floor, s.Name), floor, inc end end end end return lowSlot, lowFloor, lowInc end local function lowestPlacedBaseIncome() local ok, plot = pcall(GetPlot.InvokeServer, GetPlot) if not ok or not plot then return end local low for _, floor in ipairs(plot.Floors:GetChildren()) do for _, s in ipairs((floor:FindFirstChild("Stands") or {}):GetChildren()) do if s:GetAttribute("State") == "Occupied" then local inc = standBaseIncome(s) if not low or inc < low then low = inc end end end end return low end local function placeIntoSlot(tool, slot, floor) local hum = getHum(); if not hum then return false end hum:EquipTool(tool) task.wait(0.15) local hrp = getHRP() local localName = tostring(slot - floorIdx(floor) * 10) local spawnPart = floor.StandSpawns:FindFirstChild(localName) if hrp and spawnPart then hrp.CFrame = CFrame.new(spawnPart.Position + Vector3.new(0, 4, 0)) task.wait(0.15) end local ok = pcall(PlaceStand.InvokeServer, PlaceStand, slot) task.wait(0.3) return ok end local function swapIntoSlot(tool, slot, floor) local hum = getHum(); if not hum then return false end hum:EquipTool(tool) task.wait(0.15) local hrp = getHRP() local localName = tostring(slot - floorIdx(floor) * 10) local spawnPart = floor.StandSpawns:FindFirstChild(localName) if hrp and spawnPart then hrp.CFrame = CFrame.new(spawnPart.Position + Vector3.new(0, 4, 0)) task.wait(0.15) end local ok = pcall(PickupStand.InvokeServer, PickupStand, slot) task.wait(0.3) return ok end local function allEmptySlots() local out = {} local ok, plot = pcall(GetPlot.InvokeServer, GetPlot) if not ok or not plot then return out end for _, floor in ipairs(plot.Floors:GetChildren()) do for _, s in ipairs((floor:FindFirstChild("Stands") or {}):GetChildren()) do if s:GetAttribute("State") == "Empty" then table.insert(out, { slot = globalSlot(floor, s.Name), floor = floor }) end end end return out end local function hasPlacementWork() local _, bpIncome = bestBrainrotInBackpack() if not bpIncome then return false end if #allEmptySlots() > 0 then return true end local _, _, lowInc = lowestPlacedStand() return lowInc ~= nil and bpIncome > lowInc end local function rebirthProgress() local ok, lbl = pcall(function() return LP.PlayerGui.MainGui.Frames.RebirthFrame.Container.Bar.TextLabel end) if not ok or not lbl then return nil, nil end local cur, req = tostring(lbl.Text):match("(%d+)%s*/%s*(%d+)") return tonumber(cur), tonumber(req) end function rebirthRequiredBrainrot() local cur = LP.leaderstats:FindFirstChild("Rebirths") local nextTier = (cur and cur.Value or 0) + 1 local data = RebirthsModule.Rebirths and RebirthsModule.Rebirths[nextTier] if not data or not data.Requirements then return end local list = data.Requirements.Brainrots if type(list) ~= "table" or #list == 0 then return end local first = list[1] return type(first) == "string" and first or (type(first) == "table" and (first.Name or first.DisplayName)) end local function ownsBrainrot(displayName) if not displayName then return false end for _, t in ipairs(LP.Backpack:GetChildren()) do if isBrainrotTool(t) then local _, br = t.Name:match("^(%S+)%s+(.+)$") if brainrotMatches(br, displayName) then return true end end end -- Check character (equipped tool counts as owned). local c = LP.Character if c then for _, t in ipairs(c:GetChildren()) do if t:IsA("Tool") and t:GetAttribute("Id") then local _, br = t.Name:match("^(%S+)%s+(.+)$") if brainrotMatches(br, displayName) then return true end end end end -- Placed: scan stand NameLabels (always DisplayName). local ok, plot = pcall(GetPlot.InvokeServer, GetPlot) if ok and plot then for _, floor in ipairs(plot.Floors:GetChildren()) do for _, s in ipairs((floor:FindFirstChild("Stands") or {}):GetChildren()) do if s:GetAttribute("State") == "Occupied" then local name = standLabels(s) if name == displayName then return true end end end end end return false end local function tryPlaceBest() local placedAny = false -- Phase 1: drain backpack into every empty slot (best brainrot first). for _, e in ipairs(allEmptySlots()) do if not autoPlace then return placedAny end local tool = bestBrainrotInBackpack() if not tool then break end if placeIntoSlot(tool, e.slot, e.floor) then placedAny = true end end while autoPlace do local bpTool, bpIncome = bestBrainrotInBackpack() if not bpTool then break end local lowSlot, lowFloor, lowInc = lowestPlacedStand() if not lowSlot or bpIncome <= (lowInc or 0) then break end if not swapIntoSlot(bpTool, lowSlot, lowFloor) then break end placedAny = true end return placedAny end -- WalkSpeed enforcement local function applySpeed() local hum = getHum() if hum then hum.WalkSpeed = walkSpeed end end LP.CharacterAdded:Connect(function() task.wait(0.5) applySpeed() end) task.spawn(function() while true do applySpeed() task.wait(1) end end) -- Noclip loop RunService.Stepped:Connect(function() if not noclip then return end local c = LP.Character if not c then return end for _, p in ipairs(c:GetDescendants()) do if p:IsA("BasePart") and p.CanCollide then p.CanCollide = false end end end) -- Auto-claim loop task.spawn(function() while true do if autoClaim then pcall(claimAllStands) end task.wait(1) end end) task.spawn(function() while true do local shouldYield = placing or (autoPlace and hasPlacementWork()) if autoFarm and not shouldYield then pcall(function() local target, targetInc = pickBestEntity(1) if not target then return end local hasEmpty = #allEmptySlots() > 0 if not hasEmpty then local lowBase = lowestPlacedBaseIncome() if lowBase and targetInc <= lowBase then return end end tryGrab(target, function() return autoFarm end) end) end task.wait(0.4) end end) -- Auto-place loop: place highest-income brainrot from backpack into first empty slot task.spawn(function() while true do if autoPlace then placing = true pcall(tryPlaceBest) placing = false end task.wait(0.6) end end) local function currentPower() local cur = rebirthProgress() return cur or 0 end local function findWildByName(displayName) for _, e in ipairs(workspace.EntitiesFolder:GetChildren()) do if entityBrainrotName(e) == displayName then return e end end end task.spawn(function() while true do if autoRebirth then pcall(function() local reqName = rebirthRequiredBrainrot() if not reqName then return end local data = RebirthsModule.Rebirths[(LP.leaderstats.Rebirths.Value or 0) + 1] local reqPower = data and data.Requirements and data.Requirements.Power or 0 while autoRebirth and currentPower() < reqPower do buyPad("HackingUpgrade", 10) task.wait(0.15) end if not autoRebirth then return end if not ownsBrainrot(reqName) then local target = findWildByName(reqName) if target then tryGrab(target, function() return autoRebirth end) end return end pcall(Rebirth.InvokeServer, Rebirth) end) end task.wait(1.5) end end) -- Auto-upgrade loop: each toggle fires its own remote (server gates by cost) task.spawn(function() while true do if autoUpSpeed then buyPad("SpeedUpgrade") end if autoUpGrab then buyPad("GrabUpgrade") end if autoUpHack then buyPad("HackingUpgrade") end if autoUpPlot then buyPad("StandUpgrade") end if autoUpStands then pcall(upgradeAllStands) end task.wait(1.2) end end) local Window = Rayfield:CreateWindow({ Name = "Hack Vault for Brainrot - Fabron's Hub", LoadingTitle = "Loading...", LoadingSubtitle = "Fabron's Hub is loading, please wait..", ConfigurationSaving = { Enabled = true, FolderName = "Hack Vault for Brainrot", FileName = "Config" }, KeySystem = false, }) local FarmTab = Window:CreateTab("Farm") FarmTab:CreateToggle({ Name = "Auto Claim Cash", CurrentValue = false, Flag = "AutoClaim", Callback = function(v) autoClaim = v end, }) FarmTab:CreateToggle({ Name = "Auto Grab (Best Mutation)", CurrentValue = false, Flag = "AutoFarm", Callback = function(v) autoFarm = v end, }) FarmTab:CreateToggle({ Name = "Auto Place Best (by income)", CurrentValue = false, Flag = "AutoPlace", Callback = function(v) autoPlace = v end, }) local UpgradeTab = Window:CreateTab("Upgrade") UpgradeTab:CreateToggle({ Name = "Auto Upgrade Speed", CurrentValue = false, Flag = "AutoUpSpeed", Callback = function(v) autoUpSpeed = v end, }) UpgradeTab:CreateToggle({ Name = "Auto Upgrade Grab", CurrentValue = false, Flag = "AutoUpGrab", Callback = function(v) autoUpGrab = v end, }) UpgradeTab:CreateToggle({ Name = "Auto Upgrade Hacking", CurrentValue = false, Flag = "AutoUpHack", Callback = function(v) autoUpHack = v end, }) UpgradeTab:CreateToggle({ Name = "Auto Upgrade Plot/Base", CurrentValue = false, Flag = "AutoUpPlot", Callback = function(v) autoUpPlot = v end, }) UpgradeTab:CreateToggle({ Name = "Auto Upgrade All Placed Brainrots", CurrentValue = false, Flag = "AutoUpStands", Callback = function(v) autoUpStands = v end, }) UpgradeTab:CreateToggle({ Name = "Auto Rebirth (buy power + grab required)", CurrentValue = false, Flag = "AutoRebirth", Callback = function(v) autoRebirth = v end, }) local WorldTab = Window:CreateTab("World") WorldTab:CreateDropdown({ Name = "Teleport to World", Options = { "Normal", "Space" }, CurrentOption = { LP:GetAttribute("World") or "Normal" }, Flag = "World", Callback = function(opt) local name = type(opt) == "table" and opt[1] or opt pcall(function() ChangeWorld:FireServer(name) end) end, }) local MoveTab = Window:CreateTab("Movement") MoveTab:CreateSlider({ Name = "WalkSpeed", Range = { 16, 250 }, Increment = 2, CurrentValue = 130, Flag = "WalkSpeed", Callback = function(v) walkSpeed = v; applySpeed() end, }) MoveTab:CreateToggle({ Name = "Noclip", CurrentValue = false, Flag = "Noclip", Callback = function(v) noclip = v if not v then local c = LP.Character if c then for _, p in ipairs(c:GetDescendants()) do if p:IsA("BasePart") and p.Name ~= "HumanoidRootPart" then p.CanCollide = true end end end end end, })