Run it
Copy the script and paste it into your executor.
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 =
screenGui = .()
screenGui.Parent = player.PlayerGui
frame = .()
frame.Size = .(, , , )
frame.Position = .(, -, , )
frame.BackgroundColor3 = .(, , )
frame.Parent = screenGui
toggleButton = .()
toggleButton.Size = .(, , , )
toggleButton.Position = .(, , , )
toggleButton.Text =
toggleButton.BackgroundColor3 = .(, , )
toggleButton.Parent = frame
inputBox = .()
inputBox.Size = .(, , , )
inputBox.Position = .(, , , )
inputBox.PlaceholderText =
inputBox.Parent = frame
()
closest =
shortestDistance = .huge
_, obj (:())
obj:() .(obj.Name:(), targetName:())
distance = (humanoidRootPart.Position - obj.Position).Magnitude
distance < shortestDistance
shortestDistance = distance
closest = obj
closest
()
autoFarm
target = ()
target
targetPosition = target.Position - .(, , )
humanoidRootPart.CFrame = humanoidRootPart.CFrame:(.(targetPosition), )
()
toggleButton.MouseButton1Click:(()
autoFarm = autoFarm
toggleButton.Text = autoFarm
toggleButton.BackgroundColor3 = autoFarm .(, , ) .(, , )
targetName = inputBox.Text
autoFarm
()
)This GUI is keyless, Type the name of the item and press AutoFarm Toggle to start farmin!

Universal