-- [[ Rscripts Risk Notice ]] -- This script is not verified by rscripts.net. Deal with caution. -- -- Stay safe: -- • Never log in on unofficial Roblox sites or lookalike domains. -- • Real Roblox links use roblox.com (check the .com ending). -- • Treat fake Roblox login / "claim reward" pages as phishing. -- [[ End Rscripts Risk Notice ]] getgenv().AutoBonbon = true -- Clean up any previous session before starting if getgenv()._BonbonSession then getgenv()._BonbonSession:Stop() end if not getgenv().AutoBonbon then print("[Bonbon Harvester] Disabled. All tasks stopped.") return end local CollectionService = game:GetService("CollectionService") local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local Config = { Tag = "Bonbon", PickedAttribute = "Collected", FolderName = "Bonbons", TouchDelay = 0.03, SweepInterval = 1.5 -- Fallback periodic sweep for missed candies } local Session = { Active = true, Connections = {}, Collected = 0 } -- Target and character verification local function getRootPart() local char = LocalPlayer.Character if not char then return nil end local hum = char:FindFirstChildOfClass("Humanoid") if not hum or hum.Health <= 0 then return nil end return char:FindFirstChild("HumanoidRootPart") end local function isTargetValid(part) return part and part:IsA("BasePart") and part.CanTouch == true and part:GetAttribute(Config.PickedAttribute) ~= true and part:FindFirstChildWhichIsA("TouchTransmitter", true) ~= nil end local function harvest(part, root) if not isTargetValid(part) then return false end root = root or getRootPart() if not root then return false end firetouchinterest(root, part, 0) task.wait(Config.TouchDelay) if part and part.Parent then firetouchinterest(root, part, 1) end return true end -- Collection sweeps local function sweep() if not Session.Active or not getgenv().AutoBonbon then return end local root = getRootPart() if not root then return end local folder = workspace:FindFirstChild(Config.FolderName) local targets = {} if folder then for _, child in ipairs(folder:GetChildren()) do if isTargetValid(child) then table.insert(targets, child) end end end for _, tagged in ipairs(CollectionService:GetTagged(Config.Tag)) do if isTargetValid(tagged) and not table.find(targets, tagged) then table.insert(targets, tagged) end end for _, target in ipairs(targets) do if not Session.Active or not getgenv().AutoBonbon then break end if isTargetValid(target) and harvest(target, root) then Session.Collected = Session.Collected + 1 end end end local function onTargetAdded(child) task.defer(function() if not Session.Active or not getgenv().AutoBonbon then return end if isTargetValid(child) then local root = getRootPart() if root and harvest(child, root) then Session.Collected = Session.Collected + 1 end end end) end -- Event Bindings local function hookContainer(folder) table.insert(Session.Connections, folder.ChildAdded:Connect(onTargetAdded)) end local currentFolder = workspace:FindFirstChild(Config.FolderName) if currentFolder then hookContainer(currentFolder) end table.insert(Session.Connections, workspace.ChildAdded:Connect(function(child) if child.Name == Config.FolderName then hookContainer(child) task.spawn(sweep) end end)) table.insert(Session.Connections, CollectionService:GetInstanceAddedSignal(Config.Tag):Connect(onTargetAdded)) -- Fallback polling loop (handles round switches & respawns) local loopThread = task.spawn(function() while Session.Active and getgenv().AutoBonbon do sweep() task.wait(Config.SweepInterval) end if Session.Active then Session:Stop() end end) -- Cleanup handler function Session:Stop() Session.Active = false for _, conn in ipairs(Session.Connections) do if conn and conn.Connected then conn:Disconnect() end end table.clear(Session.Connections) pcall(task.cancel, loopThread) getgenv()._BonbonSession = nil print(string.format("[Bonbon Harvester] Stopped. Total collected this session: %d", Session.Collected)) end getgenv()._BonbonSession = Session print("[Bonbon Harvester] Headless collector running. To stop, run: getgenv().AutoBonbon = false") -- Initial map sweep task.spawn(sweep)