local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") local INTERVAL = 0.2 local flags = { Dumplings = true, Deposit = true, Money = true, Buy1 = false, Buy5 = true, Buy25 = false, Buy100 = false, Processing = true, -- UpgradeProcessing (per second) Merge = true, } local BUY_MAP = { Buy1 = "+1Bowl", Buy5 = "+5Bowl", Buy25 = "+25Bowl", Buy100 = "+100Bowl", } local running = false local loopThread local function getHRP() local char = player.Character if not char then return end return char:FindFirstChild("HumanoidRootPart") end local function touch(part, hrp) firetouchinterest(part, hrp, 0) task.wait() firetouchinterest(part, hrp, 1) end local function touchButton(model, hrp) if not model then return end local btn = model:FindFirstChild("Button") if btn and btn:IsA("BasePart") then pcall(touch, btn, hrp) end end local function getMyPlot() local plots = workspace:FindFirstChild("Plots") if not plots then return end local hrp = getHRP() local best, bestDist for _, plot in ipairs(plots:GetChildren()) do if not string.find(plot.Name, "Empty", 1, true) then if plot:FindFirstChild("Buttons") then local spawn = plot:FindFirstChildWhichIsA("SpawnLocation") if spawn and hrp then local d = (spawn.Position - hrp.Position).Magnitude if not bestDist or d < bestDist then best = plot bestDist = d end elseif not best then best = plot end end end end return best end local function collectDumplings(plot, hrp) local visual = plot:FindFirstChild("DumplingVisual") if not visual then return end for _, obj in ipairs(visual:GetChildren()) do if obj:IsA("BasePart") and obj:FindFirstChild("TouchInterest") then pcall(touch, obj, hrp) end end end local function pressNamed(plot, hrp, name) local buttons = plot:FindFirstChild("Buttons") if not buttons then return end touchButton(buttons:FindFirstChild(name), hrp) end local function buySelected(plot, hrp) local buttons = plot:FindFirstChild("Buttons") if not buttons then return end for flagKey, btnName in pairs(BUY_MAP) do if flags[flagKey] then touchButton(buttons:FindFirstChild(btnName), hrp) end end end local function tickFarm() local hrp = getHRP() if not hrp then return end local plot = getMyPlot() if not plot then return end if flags.Dumplings then collectDumplings(plot, hrp) end if flags.Deposit then pressNamed(plot, hrp, "Deposit") end if flags.Money then pressNamed(plot, hrp, "CollectMoney") end buySelected(plot, hrp) if flags.Processing then pressNamed(plot, hrp, "UpgradeProcessing") end if flags.Merge then pressNamed(plot, hrp, "Merge") end end local function setRunning(state) running = state if running then if loopThread then return end loopThread = task.spawn(function() while running do pcall(tickFarm) task.wait(INTERVAL) end loopThread = nil end) end end -- ===================== UI ===================== local gui = Instance.new("ScreenGui") gui.Name = "AutoFarmUI" gui.ResetOnSpawn = false gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling gui.Parent = playerGui local frame = Instance.new("Frame") frame.Size = UDim2.fromOffset(240, 390) frame.Position = UDim2.new(0.5, -120, 0.08, 0) frame.BackgroundColor3 = Color3.fromRGB(28, 28, 32) frame.BorderSizePixel = 0 frame.Active = true frame.Parent = gui Instance.new("UICorner", frame).CornerRadius = UDim.new(0, 10) local stroke = Instance.new("UIStroke", frame) stroke.Color = Color3.fromRGB(55, 55, 62) local title = Instance.new("TextLabel") title.Size = UDim2.new(1, -16, 0, 28) title.Position = UDim2.fromOffset(12, 6) title.BackgroundTransparency = 1 title.Font = Enum.Font.GothamBold title.TextSize = 16 title.TextXAlignment = Enum.TextXAlignment.Left title.TextColor3 = Color3.fromRGB(230, 230, 235) title.Text = "Auto Farm" title.Parent = frame local plotLabel = Instance.new("TextLabel") plotLabel.Size = UDim2.new(1, -16, 0, 16) plotLabel.Position = UDim2.fromOffset(12, 30) plotLabel.BackgroundTransparency = 1 plotLabel.Font = Enum.Font.Gotham plotLabel.TextSize = 12 plotLabel.TextXAlignment = Enum.TextXAlignment.Left plotLabel.TextColor3 = Color3.fromRGB(140, 140, 150) plotLabel.Text = "Plot: ..." plotLabel.Parent = frame local function makeSection(text, y) local label = Instance.new("TextLabel") label.Size = UDim2.new(1, -16, 0, 18) label.Position = UDim2.fromOffset(12, y) label.BackgroundTransparency = 1 label.Font = Enum.Font.GothamMedium label.TextSize = 11 label.TextXAlignment = Enum.TextXAlignment.Left label.TextColor3 = Color3.fromRGB(110, 110, 120) label.Text = text label.Parent = frame end local function makeToggle(name, y, key) local label = Instance.new("TextLabel") label.Size = UDim2.new(1, -70, 0, 26) label.Position = UDim2.fromOffset(14, y) label.BackgroundTransparency = 1 label.Font = Enum.Font.Gotham label.TextSize = 13 label.TextXAlignment = Enum.TextXAlignment.Left label.TextColor3 = Color3.fromRGB(200, 200, 210) label.Text = name label.Parent = frame local btn = Instance.new("TextButton") btn.Size = UDim2.fromOffset(36, 20) btn.Position = UDim2.new(1, -48, 0, y + 3) btn.BackgroundColor3 = Color3.fromRGB(55, 55, 62) btn.Text = "" btn.AutoButtonColor = false btn.Parent = frame Instance.new("UICorner", btn).CornerRadius = UDim.new(1, 0) local knob = Instance.new("Frame") knob.Size = UDim2.fromOffset(14, 14) knob.Position = UDim2.fromOffset(3, 3) knob.BackgroundColor3 = Color3.fromRGB(240, 240, 245) knob.BorderSizePixel = 0 knob.Parent = btn Instance.new("UICorner", knob).CornerRadius = UDim.new(1, 0) local function refresh() if flags[key] then btn.BackgroundColor3 = Color3.fromRGB(70, 180, 100) knob.Position = UDim2.fromOffset(19, 3) else btn.BackgroundColor3 = Color3.fromRGB(55, 55, 62) knob.Position = UDim2.fromOffset(3, 3) end end btn.MouseButton1Click:Connect(function() flags[key] = not flags[key] refresh() end) refresh() end makeSection("FARM", 48) makeToggle("Dumplings", 66, "Dumplings") makeToggle("Deposit", 92, "Deposit") makeToggle("Money", 118, "Money") makeSection("BUY BOWLS", 148) makeToggle("Buy +1", 166, "Buy1") makeToggle("Buy +5", 192, "Buy5") makeToggle("Buy +25", 218, "Buy25") makeToggle("Buy +100", 244, "Buy100") makeSection("UPGRADES", 274) makeToggle("Processing (per sec)", 292, "Processing") makeToggle("Auto Merge", 318, "Merge") local master = Instance.new("TextButton") master.Size = UDim2.new(1, -24, 0, 32) master.Position = UDim2.fromOffset(12, 348) master.BackgroundColor3 = Color3.fromRGB(55, 55, 62) master.Font = Enum.Font.GothamMedium master.TextSize = 14 master.TextColor3 = Color3.fromRGB(230, 230, 235) master.Text = "Start" master.AutoButtonColor = false master.Parent = frame Instance.new("UICorner", master).CornerRadius = UDim.new(0, 8) master.MouseButton1Click:Connect(function() setRunning(not running) if running then master.Text = "Stop" master.BackgroundColor3 = Color3.fromRGB(180, 70, 70) else master.Text = "Start" master.BackgroundColor3 = Color3.fromRGB(55, 55, 62) end end) task.spawn(function() while frame.Parent do local p = getMyPlot() plotLabel.Text = "Plot: " .. (p and p.Name or "?") task.wait(1) end end) local dragging, dragStart, startPos frame.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = frame.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) UserInputService.InputChanged:Connect(function(input) if not dragging then return end if input.UserInputType ~= Enum.UserInputType.MouseMovement and input.UserInputType ~= Enum.UserInputType.Touch then return end local delta = input.Position - dragStart frame.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y ) end) print("[AutoFarm] ready — buy/processing/merge settings")