
4.7k Views
935 Executions
AutoFarm Universal
Universal Script π
mpopeesayshiFirst script
2 years ago
Please login to perform these actions:Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
This GUI is keyless, Type the name of the item and press AutoFarm Toggle to start farmin!
Updates
Script edited: Create script
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
local runService = game:GetService("RunService")
local autoFarm = false
local targetName = ""
-- Create GUI
local screenGui = Instance.new("ScreenGui")
screenGui.Parent = player.PlayerGui
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 300, 0, 150)
frame.Position = UDim2.new(0.5, -150, 0.2, 0)
frame.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
frame.Parent = screenGui
local toggleButton = Instance.new("TextButton")
toggleButton.Size = UDim2.new(0, 280, 0, 50)
toggleButton.Position = UDim2.new(0, 10, 0, 10)
toggleButton.Text = "Start Auto Farm"
toggleButton.BackgroundColor3 = Color3.new(0, 1, 0)
toggleButton.Parent = frame
local inputBox = Instance.new("TextBox")
inputBox.Size = UDim2.new(0, 280, 0, 50)
inputBox.Position = UDim2.new(0, 10, 0, 70)
inputBox.PlaceholderText = "Enter Object Name"
inputBox.Parent = frame
-- Function to find the nearest object by name
local function findClosestObject()
local closest = nil
local shortestDistance = math.huge
for _, obj in pairs(workspace:GetChildren()) do
if obj:IsA("Part") and string.find(obj.Name:lower(), targetName:lower()) then
local distance = (humanoidRootPart.Position - obj.Position).Magnitude
if distance < shortestDistance then
shortestDistance = distance









do it work with jji?