OP Auto Farm
Key Required

OP Auto Farm

Homeless SimulatorMetalMetal 522 views 11 executesUpdated Dec 20, 2025
5.0/ 5(4 votes)
40100% Positive
Lua Script•135 lines (3927 chars)
setclipboard("https://discord.gg/TR3quUFgT6")

local players = game:GetService("Players")
local runservice = game:GetService("RunService")
local rs = game:GetService("ReplicatedStorage")
local uis = game:GetService("UserInputService")

local lp = players.LocalPlayer

local gui = Instance.new("ScreenGui")
gui.Name = "autofarm_ui"
gui.ResetOnSpawn = false
gui.Parent = lp:WaitForChild("PlayerGui")

local frame = Instance.new("Frame")
frame.Size = UDim2.fromOffset(240, 170)
frame.Position = UDim2.fromScale(0.5, 0.5)
frame.AnchorPoint = Vector2.new(0.5, 0.5)
frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
frame.Parent = gui
Instance.new("UICorner", frame).CornerRadius = UDim.new(0, 8)

local dragging, dragInput, dragStart, startPos

local function update(input)
	local delta = input.Position - dragStart
	frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
end

frame.InputBegan:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseButton1 then
		dragging = true
		dragStart = input.Position
		startPos = frame.Position
		input.Changed:Connect(function()
			if input.UserInputState == Enum.UserInputState.End then
				dragging = false
			end
		end)
	end
end)

frame.InputChanged:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseMovement then
		dragInput = input
	end
end)

uis.InputChanged:Connect(function(input)
	if input == dragInput and dragging then
		update(input)
	end
end)

local title = Instance.new("TextLabel")
title.Size = UDim2.new(1, 0, 0, 30)
title.BackgroundTransparency = 1
title.Text = "auto farm"
title.TextColor3 = Color3.fromRGB(255, 255, 255)
title.Font = Enum.Font.SourceSansBold
title.TextScaled = true
title.Parent = frame

local minbtn = Instance.new("TextButton")
minbtn.Size = UDim2.new(0, 30, 0, 30)
minbtn.Position = UDim2.new(1, -32, 0, 0)
minbtn.Text = "_"
minbtn.TextColor3 = Color3.fromRGB(255, 255, 255)
minbtn.Font = Enum.Font.SourceSansBold
minbtn.TextScaled = true
minbtn.BackgroundTransparency = 0.3
minbtn.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
minbtn.Parent = frame
Instance.new("UICorner", minbtn).CornerRadius = UDim.new(0, 6)

local minimized = false
minbtn.MouseButton1Click:Connect(function()
	minimized = not minimized
	for _, v in ipairs(frame:GetChildren()) do
		if v ~= title and v ~= minbtn and v:IsA("GuiObject") then
			v.Visible = not minimized
		end
	end
	if minimized then
		frame.Size = UDim2.fromOffset(240, 30)
	else
		frame.Size = UDim2.fromOffset(240, 170)
	end
end)

local warning = Instance.new("TextLabel")
warning.Size = UDim2.new(1, -20, 0, 30)
warning.Position = UDim2.new(0, 10, 0, 30)
warning.BackgroundTransparency = 1
warning.Text = "u need to equip your tongs for this to work"
warning.TextColor3 = Color3.fromRGB(200, 200, 200)
warning.Font = Enum.Font.SourceSans
warning.TextScaled = true
warning.TextWrapped = true
warning.Parent = frame

local toggle = Instance.new("TextButton")
toggle.Size = UDim2.new(1, -20, 0, 40)
toggle.Position = UDim2.new(0, 10, 0, 80)
toggle.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
toggle.Text = "off"
toggle.TextColor3 = Color3.fromRGB(255, 255, 255)
toggle.Font = Enum.Font.SourceSansBold
toggle.TextScaled = true
toggle.Parent = frame
Instance.new("UICorner", toggle).CornerRadius = UDim.new(0, 6)

local enabled = false
toggle.MouseButton1Click:Connect(function()
	enabled = not enabled
	if enabled then
		toggle.Text = "on"
		toggle.BackgroundColor3 = Color3.fromRGB(80, 140, 80)
	else
		toggle.Text = "off"
		toggle.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
	end
end)

local trashloot = rs:WaitForChild("TrashLoot")
local sellall = rs:WaitForChild("SellAllItems")

runservice.RenderStepped:Connect(function()
	if not enabled then return end

	trashloot:FireServer("Trash Can")
	trashloot:FireServer("Trash Bag")
	trashloot:FireServer("Present Pile")
	sellall:FireServer()
end)

Features & Information

uuuh auto farm ig made by me open sourced keyless
#free#op#auto farm#auto#farm

Community Comments (0)

No comments yet for this script.

More Scripts for Homeless Simulator