--[[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=6a2771bfe7651c33d4d90462"))() end) end) --[[rscripts:analytics:end]] local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))() local LP = game:GetService("Players").LocalPlayer local RS = game:GetService("ReplicatedStorage") local Workspace = game:GetService("Workspace") local VirtualUser = game:GetService("VirtualUser") 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) local BigNumModule = RS:WaitForChild("NukeShared"):WaitForChild("BigNum") local safeRequire do if pcall(require, BigNumModule) 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 BigNum = safeRequire(BigNumModule) -- canAfford: both cash and cost are serialized BigNum strings ("m|e"). local function canAfford(cashStr, costStr) if type(cashStr) ~= "string" or type(costStr) ~= "string" then return false end local ok, result = pcall(function() return BigNum.gte(BigNum.deserialize(cashStr), BigNum.deserialize(costStr)) end) return ok and result == true end local NukeRemotes = RS:WaitForChild("NukeRemotes") local PickUp = NukeRemotes:WaitForChild("PickUp") local MergeRequest = NukeRemotes:WaitForChild("MergeRequest") local Drop = NukeRemotes:WaitForChild("Drop") local HoldStarted = NukeRemotes:WaitForChild("HoldStarted") local PurchaseUpgrade = NukeRemotes:WaitForChild("PurchaseUpgrade") local RequestState = NukeRemotes:WaitForChild("RequestState") local StateUpdate = NukeRemotes:WaitForChild("StateUpdate") local RedeemCode = NukeRemotes:WaitForChild("RedeemCode") local RequestLockBase = NukeRemotes:WaitForChild("RequestLockBase") local LockStateUpdate = NukeRemotes:WaitForChild("LockStateUpdate") local lockStatus = nil local lockRemaining = 0 LockStateUpdate.OnClientEvent:Connect(function(status, remaining) lockStatus = status lockRemaining = tonumber(remaining) or 0 end) local heldTier = nil HoldStarted.OnClientEvent:Connect(function(t) heldTier = t end) NukeRemotes:WaitForChild("HoldEnded").OnClientEvent:Connect(function() heldTier = nil end) local function formatCash(raw) if type(raw) ~= "string" then return tostring(raw) end local m, e = raw:match("^([%d%.%-]+)|(%d+)$") if not m then return raw end m = tonumber(m); e = tonumber(e) if not m or not e then return raw end local suffixes = { "", "K", "M", "B", "T", "Qa", "Qi", "Sx", "Sp", "Oc", "No", "Dc" } local group = math.floor(e / 3) local mant = m * (10 ^ (e - group * 3)) local suf = suffixes[group + 1] if suf then return string.format("%.2f%s", mant, suf) end return string.format("%.2fe%d", m, e) end local latestState = nil StateUpdate.OnClientEvent:Connect(function(state) if type(state) == "table" then latestState = state end end) local function fetchState(timeout) latestState = nil RequestState:FireServer() local t = 0 timeout = timeout or 2 while not latestState and t < timeout do task.wait(0.1); t = t + 0.1 end return latestState end local cachedNukes = nil local function findMyNukesFolder() if cachedNukes and cachedNukes.Parent then return cachedNukes end cachedNukes = nil local bases = Workspace:FindFirstChild("Bases") if not bases then return nil end for _, base in ipairs(bases:GetChildren()) do local folder = base:FindFirstChild("Nukes") if folder then for _, nuke in ipairs(folder:GetChildren()) do if nuke:GetAttribute("OwnerUserId") == LP.UserId then cachedNukes = folder return folder end end end end return nil end -- Group mergeable nukes (on the floor / based) by tier. local function nukesByTier() local folder = findMyNukesFolder() local tiers = {} if not folder then return tiers end for _, n in ipairs(folder:GetChildren()) do if n:IsA("BasePart") then local st = n:GetAttribute("State") if st == "floor" or st == "based" then local t = n:GetAttribute("Tier") if t then tiers[t] = tiers[t] or {} table.insert(tiers[t], n) end end end end return tiers end local autoMerge = false local HOLD_TIMEOUT = 0.7 -- max wait for HoldStarted after PickUp local MERGE_DELAY = 0.2 -- pacing between merges local savedCFrame = nil -- restored when auto-merge stops local function getHRP() local char = LP.Character return char and char:FindFirstChild("HumanoidRootPart") end local function waitForHold(timeout) local t = 0 while heldTier == nil and t < timeout do task.wait(0.05); t = t + 0.05 end return heldTier end local function mergePair(a, b) local hrp = getHRP() if not (hrp and a and a.Parent and b and b.Parent) then return false end heldTier = nil Drop:FireServer(hrp.CFrame) -- clear anything we're already holding task.wait(0.15) hrp.CFrame = CFrame.new(a.Position + Vector3.new(0, 3, 0)) task.wait(0.2) PickUp:FireServer(a) if not waitForHold(HOLD_TIMEOUT) then return false end MergeRequest:FireServer(b) task.wait(MERGE_DELAY) return true end local function mergeOnce() local tiers = nukesByTier() local merged = 0 -- lowest tier first so the tree cascades upward local order = {} for t in pairs(tiers) do order[#order + 1] = t end table.sort(order) for _, t in ipairs(order) do local list = tiers[t] local i = 1 while i + 1 <= #list do if not autoMerge then return merged end if mergePair(list[i], list[i + 1]) then merged = merged + 1 end i = i + 2 end end return merged end local function startAutoMerge() task.spawn(function() local hrp = getHRP() savedCFrame = hrp and hrp.CFrame or nil while autoMerge do local n = mergeOnce() if n == 0 then task.wait(1) end -- nothing to merge; let nukes respawn end -- restore position when toggled off local h = getHRP() if h and savedCFrame then h.CFrame = savedCFrame end end) end local UPGRADES = { { key = "TIER", label = "Spawn Tier" }, { key = "MAX", label = "Max Spawn" }, { key = "LOCKBASE", label = "Lock Base" }, } local autoUpgrade = {} -- [key] = bool local autoUpgradeRunning = false local function startAutoUpgrade() if autoUpgradeRunning then return end autoUpgradeRunning = true task.spawn(function() while true do local anyEnabled = false for _, def in ipairs(UPGRADES) do if autoUpgrade[def.key] then anyEnabled = true break end end if not anyEnabled then break end local state = fetchState() if state and state.upgrades then for _, def in ipairs(UPGRADES) do if autoUpgrade[def.key] then local up = state.upgrades[def.key] if up and not up.maxed and canAfford(state.cash, up.cost) then PurchaseUpgrade:FireServer(def.key) task.wait(0.3) end end end end task.wait(1.5) end autoUpgradeRunning = false end) end local autoLock = false local function startAutoLock() task.spawn(function() while autoLock do -- re-lock when not locked, or about to expire if lockStatus ~= "locked" or lockRemaining <= 2 then RequestLockBase:FireServer() task.wait(1.5) end task.wait(1) end end) end local Window = Rayfield:CreateWindow({ Name = "Merge a Nuke - Fabron's Hub", LoadingTitle = "Loading...", LoadingSubtitle = "Fabron's Hub is loading, please wait..", ConfigurationSaving = { Enabled = true, FolderName = "Merge a Nuke", FileName = "Config" }, KeySystem = false, }) local MainTab = Window:CreateTab("Main", nil) MainTab:CreateToggle({ Name = "Auto Merge (headless)", CurrentValue = false, Flag = "AutoMerge", Callback = function(v) autoMerge = v if v then startAutoMerge() end end, }) MainTab:CreateToggle({ Name = "Auto Lock Base", CurrentValue = false, Flag = "AutoLock", Callback = function(v) autoLock = v if v then startAutoLock() end end, }) local cashLabel = MainTab:CreateLabel("Cash: ...") task.spawn(function() while true do local state = fetchState() if state then local tierLvl = state.upgrades and state.upgrades.TIER and state.upgrades.TIER.value or "?" local maxLvl = state.upgrades and state.upgrades.MAX and state.upgrades.MAX.value or "?" cashLabel:Set(("Cash: $%s | Tier cap: %s | Max nukes: %s") :format(formatCash(state.cash), tostring(tierLvl), tostring(maxLvl))) end task.wait(3) end end) local UpgradesTab = Window:CreateTab("Upgrades", nil) for _, def in ipairs(UPGRADES) do UpgradesTab:CreateToggle({ Name = "Auto Upgrade: " .. def.label, CurrentValue = false, Flag = "AutoUpgrade_" .. def.key, Callback = function(v) autoUpgrade[def.key] = v if v then startAutoUpgrade() end end, }) UpgradesTab:CreateButton({ Name = "Buy " .. def.label, Callback = function() PurchaseUpgrade:FireServer(def.key) Rayfield:Notify({ Title = "Merge a Nuke", Content = "Bought " .. def.label, Duration = 2 }) end, }) end local CodesTab = Window:CreateTab("Codes", nil) CodesTab:CreateButton({ Name = "Redeem All Known Codes", Callback = function() for _, code in ipairs({ "BOOM", "UPDATE", "UPDATE2" }) do local ok, res = pcall(function() return RedeemCode:InvokeServer(code) end) local reason = (type(res) == "table" and res.reason) or "?" Rayfield:Notify({ Title = code, Content = ok and tostring(reason) or "failed", Duration = 2 }) task.wait(0.3) end end, })