local Fluent = loadstring(game:HttpGet("https://github.com/dawid-scripts/Fluent/releases/latest/download/main.lua"))() local HubConfig = { Running = true, AutoSpawners = false, AutoCoins = false, AutoSlimeballs = false, BatchSize = 150 -- Default set to 150 to manage lag smoothly } local Window = Fluent:CreateWindow({ Title = "Slimeball Hub", SubTitle = "Modular Auto Farmer", TabWidth = 160, Size = UDim2.fromOffset(580, 460), Acrylic = false, Theme = "Dark", MinimizeKey = Enum.KeyCode.LeftControl }) local Tabs = { Main = Window:AddTab({ Title = "Collection", Icon = "box" }), Settings = Window:AddTab({ Title = "Settings", Icon = "settings" }) } -- Core function to handle the actual item collection local function processPart(part, forceFire, rootPart, processedTable) if part and part:IsA("BasePart") and not processedTable[part] then processedTable[part] = true -- Bypass for Magnitude/Distance checks pcall(function() part.CanCollide = false part.CFrame = rootPart.CFrame end) local transmitter = part:FindFirstChildWhichIsA("TouchTransmitter") if transmitter or forceFire then -- Multithreading the touch sequence task.spawn(function() firetouchinterest(rootPart, part, 0) task.wait() firetouchinterest(rootPart, part, 1) end) return 1 end end return 0 end -- ========================================== -- MANUAL ACTIONS -- ========================================== Tabs.Main:AddParagraph({ Title = "Manual Collection", Content = "Click to collect specific items one time." }) Tabs.Main:AddButton({ Title = "Collect Spawners (Once)", Description = "Instantly harvests all nested Slimeball Spawners.", Callback = function() local rootPart = game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") if not rootPart then return end task.spawn(function() local count, batch, processed = 0, 0, {} local folder = workspace:FindFirstChild("Slimeball Spawners") if folder then for _, desc in ipairs(folder:GetDescendants()) do if desc:IsA("TouchTransmitter") then local added = processPart(desc.Parent, false, rootPart, processed) if added > 0 then count = count + added batch = batch + 1 if batch >= tonumber(HubConfig.BatchSize) then task.wait(); batch = 0 end end end end end Fluent:Notify({ Title = "Collected", Content = "Harvested " .. count .. " spawners.", Duration = 3 }) end) end }) Tabs.Main:AddButton({ Title = "Collect Coins (Once)", Description = "Sweeps the map for Invisible Coin Piles.", Callback = function() local rootPart = game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") if not rootPart then return end task.spawn(function() local count, batch, processed = 0, 0, {} for _, desc in ipairs(workspace:GetDescendants()) do if desc.Name == "InvisibleCoinPile" then for _, child in ipairs(desc:GetChildren()) do if child:IsA("BasePart") then local added = processPart(child, true, rootPart, processed) if added > 0 then count = count + added batch = batch + 1 if batch >= tonumber(HubConfig.BatchSize) then task.wait(); batch = 0 end end end end end end Fluent:Notify({ Title = "Collected", Content = "Attempted to grab " .. math.floor(count/2) .. " coin piles.", Duration = 3 }) end) end }) Tabs.Main:AddButton({ Title = "Collect Slimeballs (Once)", Description = "Collects loose Slimeballs from folders and the map.", Callback = function() local rootPart = game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") if not rootPart then return end task.spawn(function() local count, batch, processed = 0, 0, {} local folder = workspace:FindFirstChild("Slimeballs") if folder then for _, desc in ipairs(folder:GetDescendants()) do if desc:IsA("TouchTransmitter") then local added = processPart(desc.Parent, false, rootPart, processed) if added > 0 then count = count + added batch = batch + 1 if batch >= tonumber(HubConfig.BatchSize) then task.wait(); batch = 0 end end end end end for _, desc in ipairs(workspace:GetDescendants()) do if desc.Name == "Slimeball" then local added = processPart(desc, true, rootPart, processed) if added > 0 then count = count + added batch = batch + 1 if batch >= tonumber(HubConfig.BatchSize) then task.wait(); batch = 0 end end end end Fluent:Notify({ Title = "Collected", Content = "Grabbed " .. count .. " slimeballs.", Duration = 3 }) end) end }) -- ========================================== -- AUTO-FARM LOOPS -- ========================================== Tabs.Main:AddParagraph({ Title = "Auto-Farm Toggles", Content = "Enable to continuously collect these items in the background." }) Tabs.Main:AddToggle("ToggleSpawners", { Title = "Auto-Collect Spawners", Default = false }):OnChanged(function(Value) HubConfig.AutoSpawners = Value end) Tabs.Main:AddToggle("ToggleCoins", { Title = "Auto-Collect Coins", Default = false }):OnChanged(function(Value) HubConfig.AutoCoins = Value end) Tabs.Main:AddToggle("ToggleSlimeballs", { Title = "Auto-Collect Slimeballs", Default = false }):OnChanged(function(Value) HubConfig.AutoSlimeballs = Value end) -- ========================================== -- SETTINGS & PERFORMANCE -- ========================================== Tabs.Settings:AddParagraph({ Title = "Performance", Content = "Adjust collection limits to prevent lag." }) Tabs.Settings:AddSlider("BatchSlider", { Title = "Processing Batch Size", Description = "Higher = Faster collection but more lag. Lower = Smooth but slower.", Default = 150, Min = 10, Max = 500, Rounding = 1, Callback = function(Value) HubConfig.BatchSize = tonumber(Value) end }) Tabs.Settings:AddParagraph({ Title = "System", Content = "Manage script execution." }) Tabs.Settings:AddButton({ Title = "Force Unload Hub", Callback = function() HubConfig.Running = false Window:Destroy() end }) Window:SelectTab(1) -- ========================================== -- BACKGROUND OPTIMIZED LOOP -- ========================================== task.spawn(function() while HubConfig.Running do if HubConfig.AutoSpawners or HubConfig.AutoCoins or HubConfig.AutoSlimeballs then local player = game.Players.LocalPlayer local character = player.Character local rootPart = character and character:FindFirstChild("HumanoidRootPart") if rootPart then local processed = {} local batch = 0 local function handleBatch(added) if added > 0 then batch = batch + 1 if batch >= tonumber(HubConfig.BatchSize) then task.wait() batch = 0 end end end if HubConfig.AutoSpawners then local folder = workspace:FindFirstChild("Slimeball Spawners") if folder then for _, desc in ipairs(folder:GetDescendants()) do if not HubConfig.Running then break end if desc:IsA("TouchTransmitter") then handleBatch(processPart(desc.Parent, false, rootPart, processed)) end end end end if HubConfig.AutoSlimeballs then local folder = workspace:FindFirstChild("Slimeballs") if folder then for _, desc in ipairs(folder:GetDescendants()) do if not HubConfig.Running then break end if desc:IsA("TouchTransmitter") then handleBatch(processPart(desc.Parent, false, rootPart, processed)) end end end end if HubConfig.AutoCoins or HubConfig.AutoSlimeballs then for _, desc in ipairs(workspace:GetDescendants()) do if not HubConfig.Running then break end if HubConfig.AutoCoins and desc.Name == "InvisibleCoinPile" then for _, child in ipairs(desc:GetChildren()) do if child:IsA("BasePart") then handleBatch(processPart(child, true, rootPart, processed)) end end elseif HubConfig.AutoSlimeballs and desc.Name == "Slimeball" then handleBatch(processPart(desc, true, rootPart, processed)) end end end end end task.wait(1) end end)