Auto Farm
Key Required Verified

Auto Farm

Smoothie Factory Tycoon 🏭BvvNBvvN 86.3K views 413 executesUpdated Mar 2, 2025
4.0/ 5(5 votes)
4180% Positive
Lua Script•160 lines (5952 chars)
local Config = {
    AutoPurchase = true,
    ObbyFarm = true,
    CrateFarm = true,
    AutoRebirth = true,
    OpenDoors = true,
    AutoBlender = true,
    PurchaseTimer = 1
}

-- Services
local Players = game:GetService("Players")
local Workspace = game:GetService("Workspace")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
 
-- Locals/Assets
local LocalPlayer = Players.LocalPlayer
local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
local Event = ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("Event")
local FactoryComp = Event:WaitForChild("Factory Components")
local Rebirths = LocalPlayer:WaitForChild("leaderstats"):WaitForChild("Rebirths")
local Crates = Workspace:WaitForChild("RandomCrateDropsFolder")
local Tycoons = Workspace:WaitForChild("Tycoons")
local ClaimedPlot = LocalPlayer:WaitForChild("Values"):WaitForChild("ClaimedPlot")
local OwnedTycoon, TycoonFound = nil, false

-- Obby Stuff
local Obbies = Workspace:WaitForChild("Obbies")
local ObbyData = {
    {Obbies:WaitForChild("EasyObby"), 0},
    {Obbies:WaitForChild("HardObby"), 0},
    {Obbies:WaitForChild("GravityTowerObby"), 21},
    {Obbies:WaitForChild("IceCavernObby"), 41},
    {Obbies:WaitForChild("VolcanoObby"), 81}
}

-- Remotes
local BuyRemote = Event:WaitForChild("PurchaseButton")
local RebirthRemote = FactoryComp:WaitForChild("S_Rebirth")

-- Functions
local function OnCharacterAdded(NewCharacter)
    Character = NewCharacter
    HumanoidRootPart = NewCharacter:WaitForChild("HumanoidRootPart")
end

local function CheckTycoonOwnership()
    for _, v in pairs(Tycoons:GetDescendants()) do
        if v:IsA("ObjectValue") and v.Name == "Owner" and v.Value == LocalPlayer then
            OwnedTycoon, TycoonFound = v.Parent.Name, true
            break
        end
    end
end

local function PurchaseItems()
    for _, container in pairs({"PurchaseButtons", "UpgradeButtons"}) do
        for _, v in pairs(Tycoons[OwnedTycoon][container]:GetDescendants()) do
            if v:IsA("TextLabel") and v.Name == "Price" and v.TextColor3 == Color3.fromRGB(114, 255, 112) then
                BuyRemote:FireServer(v.Parent.Parent.Parent.ButtonBase.Parent.Name)
                wait(Config.PurchaseTimer)
            end
        end
    end
end

local function Rebirth()
    for _, v in pairs(Tycoons[OwnedTycoon].RebirthButtons:GetDescendants()) do
        if v:IsA("TextLabel") and v.Name == "Price" and v.TextColor3 == Color3.fromRGB(114, 255, 112) then
            RebirthRemote:FireServer()
        end
    end
end

local function ActivateBlenders()
    for _, v in pairs(Tycoons[OwnedTycoon].Purchases:GetDescendants()) do
        if v.Name == "ActivationLight" and v.Color == Color3.fromRGB(0, 255, 0) then
            fireproximityprompt(v.Parent.Button.Attachment.ActivateBlender)
        end
    end
end

local function OpenFactoryDoors(factoryModels)
    for _, model in pairs(factoryModels) do
        for _, v in pairs(Tycoons[OwnedTycoon].ProcessingMachines:GetDescendants()) do
            if v:IsA("Model") and v.Name == model then
                for _, button in pairs(v:GetDescendants()) do
                    if button:IsA("ProximityPrompt") and button.Name == "OpenDoorPrompt" and button.Enabled == true then
                        wait(1)
                        fireproximityprompt(button)
                    end
                end
            end
        end
    end
end

local function OpenPackagerDoors(packagerModels)
    for _, model in pairs(packagerModels) do
        for _, v in pairs(Tycoons[OwnedTycoon].ProcessingMachines:GetDescendants()) do
            if v:IsA("Model") and v.Name == model then
                for _, arrow in pairs(v:GetDescendants()) do
                    if arrow:IsA("BillboardGui") and arrow.Name == "Arrow" then
                        fireproximityprompt(arrow.Parent.Parent.Attachment.OpenDoorPrompt)
                    end
                end
            end
        end
    end
end

local function FarmObbies()
    for _, data in ipairs(ObbyData) do
        local obby, rebirthReq = data[1], data[2]
        if obby.Finish.Button and not obby.Decorations.ObbySign.Border.CanCollide and Rebirths.Value >= rebirthReq then
            local OldPos = HumanoidRootPart.CFrame
            firetouchinterest(obby.Finish.Button, HumanoidRootPart, 0)
            firetouchinterest(obby.Finish.Button, HumanoidRootPart, 1)
            task.wait(.4)
            HumanoidRootPart.CFrame = OldPos
        end
    end
end

local function FarmCrates()
    for _, v in pairs(Crates:GetDescendants()) do
        if v:IsA("TouchTransmitter") then
            firetouchinterest(v.Parent, HumanoidRootPart, 0)
            firetouchinterest(v.Parent, HumanoidRootPart, 1)
        end
    end
end

-- Connections
LocalPlayer.CharacterAdded:Connect(OnCharacterAdded)
if ClaimedPlot.Value then CheckTycoonOwnership() end
ClaimedPlot:GetPropertyChangedSignal("Value"):Connect(function()
    if ClaimedPlot.Value then
        task.wait(1)
        CheckTycoonOwnership()
    end
end)

-- Main Loop
while true do
    task.wait()
    if TycoonFound then
        if Config.AutoPurchase then PurchaseItems() end
        if Config.AutoRebirth then Rebirth() end
        if Config.AutoBlender then ActivateBlenders() end
        if Config.OpenDoors then
            OpenFactoryDoors({"Main_JarFactory", "Basement_JarFactory", "Moon_JarFactory1", "Moon_JarFactory2", "Mars_JarFactory1", "Mars_JarFactory2", "Venus_JarFactory1", "Venus_JarFactory2"})
            OpenPackagerDoors({"Main_JarPackager", "Basement_JarPackager", "Moon_JarPackager1", "Moon_JarPackager2", "Mars_JarPackager1", "Mars_JarPackager2", "Venus_JarPackager1", "Venus_JarPackager2"})
        end
    end

    if Config.ObbyFarm and HumanoidRootPart then FarmObbies() end
    if Config.CrateFarm and HumanoidRootPart then FarmCrates() end
end

Features & Information

Apparently people been having issues with the script, I haven't had time look into it with school and stuff, I will try to look into the issues soon -Auto Purchase -Obby Farm - Crate Farm - Auto Rebirth - OpenDoors - Auto Blender Requires: fireproximityprompt & firetouchinterest You can make the PurchaseTimer lower, but the game tends to bug out and not spawn in Buttons and having to rejoin, to avoid that issue just leave it as is, It wont be as fast but it'll still work Tested only on Awp.gg If you have any problems, Just leave a commit, I check frequently.

Community Comments (16)

ZRUCSZRUCSMar 3, 2025(edited)

is there a way, to only buy thing for rebirth only, so you dont need to buy unnecessary upgrades

Replying to @ZRUCS

@ZRUCS you have to buy everything in order to rebirth

Replying to @saifullahrangraje66
BvvNBvvNSep 19, 2025

@saifullahrangraje66 That is incorrect, Tho I would recommend just purchasing everything to make life easier, I don't have a executor and don't know any reliable ones to update the script to allow for only rebirth only purchases rather then all buttons

BvvNBvvNMar 4, 2025(edited)

@ZRUCS To my knowledge, there's nothing in the folders that indicate if its a button required for rebirth or not, I can look to see if I can skim through it, but I don't believe so, If there is, ill add a toggle up like like the other ones :)

ZRUCSZRUCSMar 4, 2025(edited)

@BvvN like add ignore buttons for orange button, according to the fandom "In order to rebirth, you have to buy every purchasable buttons with money on your factory except for the orange buttons"

BvvNBvvNMar 4, 2025(edited)

@ZRUCS I'm about to head to sleep, when I wake up, I'll look into it for you, If its that simple, I should be able to pushout a update in the evening for you

ZRUCSZRUCSMar 4, 2025(edited)

@BvvN that would be great, thank you!!

midoriwolfmidoriwolfMar 7, 2025(edited)

@BvvN do you think anything mining related script is possible?

ZRUCSZRUCSMar 7, 2025(edited)

yeah, a mining feature will be cool too

BvvNBvvNMar 8, 2025(edited)

@midoriwolf, I haven't looked into the mining stuff yet as I've wanted to make sure the who point of script (The main Tycoon portion) was working properly, and it seems I've had done so, I'll look into the mining stuff soon, Been busy past few days and still have yet to work on @ZRUCS request.

ZRUCSZRUCSMar 15, 2025(edited)

@BvvN is okay man, take your time

kopewmlgtop1kopewmlgtop1Mar 20, 2025(edited)

bro youre the only one who made an new script for this game, i hope youll keep making scripts for future updates and even better with some ui 🙏

kopewmlgtop1kopewmlgtop1Mar 20, 2025(edited)

I have a problem: auto-blenders are not working. When I inject the script, everything seems to work, but the blenders don’t turn on automatically. I have to get really close to each one for it to activate.

kopewmlgtop1kopewmlgtop1Mar 20, 2025(edited)

and after rebirth, the script stops working

BvvNBvvNMar 24, 2025(edited)

@kopewmlgtop1 I'm unsure why that is happening for both of those reasoning, I'll look into it when i wake up

kopewmlgtop1kopewmlgtop1Mar 31, 2025

@BvvN sorry it was becaouse i used xeno, now im using swift and everything works fine ! tysm

More Scripts for Smoothie Factory Tycoon 🏭