--// This script is mainly just for some quick cash at the start of each tier and to complete harvest quests. To make lots of money you need to set up your factory. --// Settings _G.Running = false --// Set to false to disable the script. _G.AutoPickup = true --// Set to false to disable auto pickup. _G.AutoSell = true --// Set to false to disable auto sell. _G.Target = "Tree" --// Type item you want to harvest here. --// All possible items to harvest. \\-- --// Tier 0: Tree, Rock --// Tier 1: CopperOre, Sand --// Tier 2: GoldOre, IronOre, HardwoodTree --// Tier 3: SuperwoodTree, ResiniteOre, TitaniumOre, Diamond, UraniumOre --// Tier 4: UltrawoodTree, IceCrystal, RedmetalOre, BluemetalOre, LaveCrystal, TungstenOre --// Don't edit anything below this point unless you know what you are doing \\-- --// Find our grid local MyGrid for _,Grids in pairs(workspace.Grids:GetDescendants()) do if Grids.Name == "Owner" and Grids.Value == game.Players.LocalPlayer then MyGrid = Grids.Parent end end local Material = loadstring(game:HttpGet("https://raw.githubusercontent.com/Kinlei/MaterialLua/master/Module.lua"))() local X = Material.Load({ Title = "Made By: Guybrush#8178", Style = 3, SizeX = 250, SizeY = 350, Theme = "Dark" }) local Y = X.New({ Title = "Factory Simulator [OVERHAUL]" }) local A = Y.Toggle({ Text = "Enabled", Callback = function(Value) _G.Running = Value end, Enabled = false }) local B = Y.Toggle({ Text = "Auto_Pickup", Callback = function(Value) _G.AutoPickup = Value end, Enabled = true }) local C = Y.Toggle({ Text = "Auto_Sell", Callback = function(Value) _G.AutoSell = Value end, Enabled = true }) local D = Y.Dropdown({ Text = "Resource:", Callback = function(Value) _G.Target = Value end, Options = {"Tree", "Rock", "CopperOre", "Sand", "GoldOre", "IronOre", "HardwoodTree", "SuperwoodTree", "ResiniteOre", "TitaniumOre", "Diamond", "UraniumOre", "UltrawoodTree", "IceCrystal", "RedmetalOre", "BluemetalOre", "LaveCrystal", "TungstenOre" }, }) while true do wait() pcall(function() for _,Cut in pairs(workspace.Harvestable:GetDescendants()) do --// Auto harvest when near. if _G.Running and Cut:IsA("Model") and Cut.Name == _G.Target and Cut.Parent.Parent.Name == "Harvestable" then game.Players.LocalPlayer.Character:MoveTo(Cut:FindFirstChildWhichIsA("BasePart").Position) wait(.25) if game.Players.LocalPlayer:DistanceFromCharacter(Cut:FindFirstChildWhichIsA("BasePart").Position) <= 50 then game:GetService("ReplicatedStorage").Events.Harvest.Harvest:FireServer(Cut) wait(.5) end --// Auto pickup when near. You can only carry one type of item and only 15 of that type. (Vehicles hold more but this is not currently set up to use them) if _G.AutoPickup then for _,Pickitup in pairs(MyGrid.Entities:GetChildren()) do if Pickitup:IsA("BasePart") then if game.Players.LocalPlayer:DistanceFromCharacter(Pickitup.Position) <= 50 then game:GetService("ReplicatedStorage").Events.Inventory.PickUp:FireServer(Pickitup) wait(.5) --// Auto sell harvested items when at capacity. (Requires a sellzone on your grid) if _G.AutoSell then for _,Sellit in pairs(MyGrid.PlacedObjects:GetChildren()) do local Carried = game.Players.LocalPlayer.Character:FindFirstChild("CarriedItem") if Sellit.Name == "SellZone" and Carried and tonumber(Carried.Handle.AmountGui.Amount.Text) >= 15 then game.Players.LocalPlayer.Character:MoveTo(Sellit:FindFirstChildWhichIsA("BasePart").Position) wait(1) game:GetService("ReplicatedStorage").Events.Inventory.PickUp:FireServer(Carried.Handle) wait(1) end end end end end end end end end end) end