Universal Script πŸ“Œ
4.7k Views
935 Executions

AutoFarm Universal

Universal Script πŸ“Œ
mpopeesayshi
mpopeesayshiFirst script
2 years ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No 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

  1. Script edited: Create script

View Raw
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


Comments

1
Log in to join the conversation. Login
jjhonson9220's profile picture
jjhonson92202 years ago(edited)

do it work with jji?

1

More universal scripts

See all
Script hub
33.1k
298.2k
Bumped 2 hours ago
Script hub
23.6k
5.2k
Bumped 2 hours ago
Key System
Paid
High QualityΒ Offering
Universal Script πŸ“Œ
213
596
Bumped 2 hours ago
Universal Script πŸ“Œ
1.6k
30.3k
Bumped 2 hours ago
Script hub
4.1M
558.8k
Bumped 3 hours ago
Key System

Script hub

Hall of Fame #3

Verified script badgeOverflow 35 Supported Games

Script hub
5.5k
29.1k
Bumped 3 hours ago
Key System
Script hub
14.0k
28.6k
Bumped 5 hours ago