local player = game.Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") for _, gui in ipairs(playerGui:GetChildren()) do if gui.Name == "MoneyAutofarmGUI" then gui:Destroy() end end local TARGET_PLACE_ID = 13482468151 local screenGui = Instance.new("ScreenGui") screenGui.Name = "MoneyAutofarmGUI" screenGui.ResetOnSpawn = false screenGui.Parent = playerGui local mainFrame = Instance.new("Frame") mainFrame.Size = UDim2.new(0, 340, 0, 260) mainFrame.Position = UDim2.new(0.5, -170, 0.5, -130) mainFrame.BackgroundColor3 = Color3.fromRGB(28, 28, 34) mainFrame.BorderSizePixel = 0 mainFrame.Active = true mainFrame.Draggable = true mainFrame.Parent = screenGui local uiCorner = Instance.new("UICorner") uiCorner.CornerRadius = UDim.new(0, 14) uiCorner.Parent = mainFrame local titleBar = Instance.new("Frame") titleBar.Size = UDim2.new(1, 0, 0, 42) titleBar.BackgroundColor3 = Color3.fromRGB(18, 18, 24) titleBar.BorderSizePixel = 0 titleBar.Parent = mainFrame local titleCorner = Instance.new("UICorner") titleCorner.CornerRadius = UDim.new(0, 14) titleCorner.Parent = titleBar local titleLabel = Instance.new("TextLabel") titleLabel.Size = UDim2.new(1, -110, 1, 0) titleLabel.BackgroundTransparency = 1 titleLabel.Text = "Money autofarm" titleLabel.TextColor3 = Color3.fromRGB(255, 220, 60) titleLabel.TextScaled = true titleLabel.Font = Enum.Font.GothamBold titleLabel.Parent = titleBar local minimizeBtn = Instance.new("TextButton") minimizeBtn.Size = UDim2.new(0, 32, 0, 32) minimizeBtn.Position = UDim2.new(1, -78, 0, 5) minimizeBtn.BackgroundColor3 = Color3.fromRGB(65, 65, 75) minimizeBtn.Text = "−" minimizeBtn.TextColor3 = Color3.fromRGB(255, 255, 255) minimizeBtn.TextScaled = true minimizeBtn.Font = Enum.Font.GothamBold minimizeBtn.Parent = titleBar local minCorner = Instance.new("UICorner") minCorner.CornerRadius = UDim.new(0, 8) minCorner.Parent = minimizeBtn local closeBtn = Instance.new("TextButton") closeBtn.Size = UDim2.new(0, 32, 0, 32) closeBtn.Position = UDim2.new(1, -40, 0, 5) closeBtn.BackgroundColor3 = Color3.fromRGB(200, 40, 40) closeBtn.Text = "×" closeBtn.TextColor3 = Color3.fromRGB(255, 255, 255) closeBtn.TextScaled = true closeBtn.Font = Enum.Font.GothamBold closeBtn.Parent = titleBar local closeCorner = Instance.new("UICorner") closeCorner.CornerRadius = UDim.new(0, 8) closeCorner.Parent = closeBtn local contentFrame = Instance.new("Frame") contentFrame.Size = UDim2.new(1, -20, 1, -92) contentFrame.Position = UDim2.new(0, 10, 0, 52) contentFrame.BackgroundTransparency = 1 contentFrame.Parent = mainFrame local startBtn = Instance.new("TextButton") startBtn.Size = UDim2.new(0.9, 0, 0, 65) startBtn.Position = UDim2.new(0.05, 0, 0.15, 0) startBtn.BackgroundColor3 = Color3.fromRGB(0, 180, 90) startBtn.Text = "START" startBtn.TextColor3 = Color3.fromRGB(255, 255, 255) startBtn.TextScaled = true startBtn.Font = Enum.Font.GothamBold startBtn.Parent = contentFrame local btnCorner = Instance.new("UICorner") btnCorner.CornerRadius = UDim.new(0, 12) btnCorner.Parent = startBtn local warningLabel = Instance.new("TextLabel") warningLabel.Size = UDim2.new(1, -20, 0, 30) warningLabel.Position = UDim2.new(0, 10, 1, -35) warningLabel.BackgroundTransparency = 1 warningLabel.TextColor3 = Color3.fromRGB(255, 60, 60) warningLabel.TextScaled = true warningLabel.Font = Enum.Font.GothamBold warningLabel.Parent = mainFrame local isRunning = false local autoFarmConnection = nil local cameraConnection = nil local virtualUser = game:GetService("VirtualUser") local virtualInput = game:GetService("VirtualInputManager") local function isCorrectGame() return game.PlaceId == TARGET_PLACE_ID end if not isCorrectGame() then warningLabel.Text = "Game not support" startBtn.Text = "NOT SUPPORTED" startBtn.BackgroundColor3 = Color3.fromRGB(100, 100, 100) else warningLabel.Text = "" end local function findTreasureChest() local map = workspace:FindFirstChild("MapContents") if not map then return nil end local islands = map:FindFirstChild("Islands") if not islands then return nil end local tower = islands:FindFirstChild("IslandMagicTower") if not tower then return nil end local t = tower:FindFirstChild("Tower") if not t then return nil end local e = t:FindFirstChild("End") if not e then return nil end return e:FindFirstChild("TreasureChestModel") end local function findPrompt() local chest = findTreasureChest() if not chest then return nil end local light = chest:FindFirstChild("LightEffect") if light then return light:FindFirstChild("ProximityPrompt") end return chest:FindFirstChildWhichIsA("ProximityPrompt", true) end local function teleportAndFarm() local root = player.Character and player.Character:FindFirstChild("HumanoidRootPart") if not root then return end local chest = findTreasureChest() if not chest then return end local part = chest:FindFirstChildWhichIsA("BasePart") or chest.PrimaryPart if not part then return end local pos = part.Position + Vector3.new(2, 4, 2) root.CFrame = CFrame.new(pos) * CFrame.Angles(0, math.rad(180), 0) end local function lockCameraToPrompt() if cameraConnection then cameraConnection:Disconnect() end local prompt = findPrompt() if not prompt then return end local targetPos = prompt.Parent.Position + Vector3.new(0, 2, 0) local cam = workspace.CurrentCamera cameraConnection = game:GetService("RunService").RenderStepped:Connect(function() if not isRunning then cameraConnection:Disconnect() return end cam.CFrame = cam.CFrame:Lerp(CFrame.lookAt(cam.CFrame.Position, targetPos), 0.55) end) end local function simulateClick() local prompt = findPrompt() if not prompt then return end prompt.HoldDuration = 0 prompt:InputHoldBegin() task.wait(0.45) prompt:InputHoldEnd() end local function clickCard(card) task.wait(0.9) local rewardDetails = card:FindFirstChild("RewardDetails") or card local button = rewardDetails:FindFirstChildWhichIsA("TextButton", true) or rewardDetails:FindFirstChildWhichIsA("ImageButton", true) if button then pcall(function() button:Activate() end) end virtualUser:CaptureController() virtualUser:ClickButton1(Vector2.new(0,0)) local target = button or card local pos = target.AbsolutePosition + target.AbsoluteSize/2 pcall(function() virtualInput:SendMouseButtonEvent(pos.X, pos.Y, 0, true, game, 0) task.wait(0.07) virtualInput:SendMouseButtonEvent(pos.X, pos.Y, 0, false, game, 0) end) end local function autoSelectCard() if not isRunning then return end local rewardUi = playerGui:FindFirstChild("TowerRewardUI") or playerGui:FindFirstChild("TowerRewardUi") if not rewardUi then return end local bg = rewardUi:FindFirstChild("Background") if not bg then return end local cont = bg:FindFirstChild("Container") if not cont then return end local cardsFolder = cont:FindFirstChild("Cards") if not cardsFolder then return end for i = 1, 5 do local card = cardsFolder:FindFirstChild("Card_" .. i) if card and card.Visible then clickCard(card) return end end end local function startAutoFarm() if isRunning or not isCorrectGame() then return end isRunning = true startBtn.Text = "STOP" startBtn.BackgroundColor3 = Color3.fromRGB(200, 40, 40) lockCameraToPrompt() autoFarmConnection = game:GetService("RunService").Heartbeat:Connect(function() if not isRunning then return end teleportAndFarm() lockCameraToPrompt() spawn(function() local startTime = tick() while tick() - startTime < 10 and isRunning do simulateClick() task.wait(1.9) end end) end) spawn(function() while isRunning do autoSelectCard() task.wait(0.7) end end) end local function stopAutoFarm() isRunning = false if autoFarmConnection then autoFarmConnection:Disconnect() end if cameraConnection then cameraConnection:Disconnect() end startBtn.Text = "START" startBtn.BackgroundColor3 = Color3.fromRGB(0, 180, 90) end startBtn.MouseButton1Click:Connect(function() if isRunning then stopAutoFarm() else startAutoFarm() end end) minimizeBtn.MouseButton1Click:Connect(function() contentFrame.Visible = not contentFrame.Visible mainFrame.Size = contentFrame.Visible and UDim2.new(0, 340, 0, 260) or UDim2.new(0, 340, 0, 42) end) closeBtn.MouseButton1Click:Connect(function() stopAutoFarm() screenGui:Destroy() end)