1local player = game:GetService("Players").LocalPlayer2local workspaceMap = workspace:WaitForChild("Map", 5)3local plotsFolder = workspaceMap:WaitForChild("Plots", 5)4local remotes = game:GetService("ReplicatedStorage"):WaitForChild("Remotes", 5)56local Settings = {7 AutoBuyPlots = false, 8 AutoUpgrade = true, 9 AutoSell = false,10}1112local getMyPlot = function()13 for _, p in plotsFolder:GetChildren() do 14 if p:FindFirstChild("OwnerSign") then15 local textLabel = p.OwnerSign:FindFirstChild("TextLabel", true)16 if textLabel and textLabel.Text == player.DisplayName then 17 return p 18 end19 end 20 end21 return nil22end2324task.defer(function()25 while task.wait(1) do26 if Settings.AutoSell and remotes:FindFirstChild("SellCrates") then27 remotes.SellCrates:FireServer()28 end29 end30end)3132task.defer(function()33 while task.wait() do34 local Plot = getMyPlot()35 36 if Plot and Plot:FindFirstChild("FarmPlot") then37 for _, farmSubPlot in Plot.FarmPlot:GetChildren() do38 if farmSubPlot:FindFirstChild("Dirt") then39 local isUnlocked = farmSubPlot:GetAttribute("Unlocked")40 local plantName = farmSubPlot.Dirt:GetAttribute("PlantName")4142 if Settings.AutoBuyPlots and isUnlocked == false and remotes:FindFirstChild("UnlockPlot") then43 remotes.UnlockPlot:FireServer(farmSubPlot.Dirt)44 break 45 end4647 if Settings.AutoUpgrade and remotes:FindFirstChild("UpgradePlant") then48 if plantName then49 remotes.UpgradePlant:InvokeServer(farmSubPlot.Dirt)50 end51 end52 end53 end54 end55 end56end)
Comments
Loading comments…