Autofarm
Key Required

Autofarm

⛏️ Dig to Earth's CORE!1qu09x1qu09x 3.9K views 2 executesUpdated Jul 3, 2025
Unrated
00
Lua Script•83 lines (3219 chars)
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local player = Players.LocalPlayer
local TreasureFolder = workspace:WaitForChild("Treasure")

local screenGui = Instance.new("ScreenGui")
screenGui.Name = "TreasureAutoUI"
screenGui.ResetOnSpawn = false
screenGui.Parent = player:WaitForChild("PlayerGui")

local frame = Instance.new("Frame")
frame.Position = UDim2.new(0.5, -120, 0.5, -80)
frame.Size = UDim2.new(0, 240, 0, 110)
frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
frame.AnchorPoint = Vector2.new(0.5, 0.5)
frame.Active = true
frame.Draggable = true
frame.ZIndex = 2
frame.Parent = screenGui

Instance.new("UICorner", frame).CornerRadius = UDim.new(0, 12)

local treasureButton = Instance.new("TextButton")
treasureButton.Size = UDim2.new(1, -20, 0, 40)
treasureButton.Position = UDim2.new(0, 10, 0, 10)
treasureButton.BackgroundColor3 = Color3.fromRGB(50, 100, 200)
treasureButton.TextColor3 = Color3.new(1, 1, 1)
treasureButton.Font = Enum.Font.GothamBold
treasureButton.TextSize = 16
treasureButton.Text = "Auto Treasure"
treasureButton.Parent = frame
Instance.new("UICorner", treasureButton).CornerRadius = UDim.new(0, 8)

local autoMoneyButton = Instance.new("TextButton")
autoMoneyButton.Size = UDim2.new(1, -20, 0, 40)
autoMoneyButton.Position = UDim2.new(0, 10, 0, 60)
autoMoneyButton.BackgroundColor3 = Color3.fromRGB(0, 170, 100)
autoMoneyButton.TextColor3 = Color3.new(1, 1, 1)
autoMoneyButton.Font = Enum.Font.GothamBold
autoMoneyButton.TextSize = 16
autoMoneyButton.Text = "Auto Money"
autoMoneyButton.Parent = frame
Instance.new("UICorner", autoMoneyButton).CornerRadius = UDim.new(0, 8)

local treasureRunning = false
local moneyRunning = false

local function farmTreasure()
    local root = (player.Character or player.CharacterAdded:Wait()):WaitForChild("HumanoidRootPart")
    while treasureRunning do
        for _, obj in ipairs(TreasureFolder:GetDescendants()) do
            if obj:IsA("ProximityPrompt") then
                fireproximityprompt(obj)
            elseif obj:IsA("BasePart") and obj:FindFirstChildWhichIsA("TouchTransmitter") then
                firetouchinterest(root, obj, 0)
                firetouchinterest(root, obj, 1)
            end
        end
        task.wait(0.2)
    end
end

local function autoMoneyLoop()
    while moneyRunning do
        local args = { "hello" }
        ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("DigEvent"):FireServer(unpack(args))
        task.wait(0.2)
    end
end

treasureButton.MouseButton1Click:Connect(function()
    treasureRunning = not treasureRunning
    treasureButton.Text = treasureRunning and "Stop Treasure" or "Auto Treasure"
    treasureButton.BackgroundColor3 = treasureRunning and Color3.fromRGB(180, 50, 50) or Color3.fromRGB(50, 100, 200)
    if treasureRunning then task.spawn(farmTreasure) end
end)

autoMoneyButton.MouseButton1Click:Connect(function()
    moneyRunning = not moneyRunning
    autoMoneyButton.Text = moneyRunning and "Stop Money" or "Auto Money"
    autoMoneyButton.BackgroundColor3 = moneyRunning and Color3.fromRGB(180, 50, 50) or Color3.fromRGB(0, 170, 100)
    if moneyRunning then task.spawn(autoMoneyLoop) end
end)

Features & Information

auto money auto pet auto treasure

Community Comments (0)

No comments yet for this script.

More Scripts for ⛏️ Dig to Earth's CORE!