local Modal = loadstring(game:HttpGet("https://github.com/BloxCrypto/Modal/releases/download/v1.0-beta/main.lua"))() local Window = Modal:CreateWindow({ Title = "Plant Farmer", SubTitle = "By: TheBoyWhoCried", Size = UDim2.fromOffset(400, 300), MinimumSize = Vector2.new(250, 200), Transparency = 0.35, Icon = "https://www.roblox.com/headshot-thumbnail/image?userId=" .. game.Players.LocalPlayer.UserId .. "&width=420&height=420&format=png", }) local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local RunService = game:GetService("RunService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local Connections = {} local function FarmPlants() return RunService.Heartbeat:Connect(function() local character = LocalPlayer.Character if character and character:FindFirstChild("HumanoidRootPart") then local myCFrame = character.HumanoidRootPart.CFrame if workspace:FindFirstChild("Plants") then for _, plant in pairs(workspace.Plants:GetChildren()) do local playerAttribute = plant:GetAttribute("Player") if playerAttribute == LocalPlayer.Name then local hitbox = plant:FindFirstChild("Hitbox") if hitbox then local targetPosition = myCFrame * CFrame.new(0, 0, -3) hitbox.CFrame = targetPosition ReplicatedStorage:WaitForChild("Events"):WaitForChild("UseTool"):FireServer() end end end end end end) end local Main = Window:AddTab("Main") Main:New("Toggle")({ Title = "Farm Plants", Description = "Automatically farm plants", DefaultValue = false, Callback = function(Value) if Connections["Farm Plants"] then Connections["Farm Plants"]:Disconnect() Connections["Farm Plants"] = nil end if Value then Connections["Farm Plants"] = FarmPlants() end end, }) Window:SetTab("Main") Window:SetTheme("Dark")