Auto forage
Key Required

Auto forage

[7.5] Chasing Immortality [OPEN TEST]Himothy_Himothy_ 3.2K views 281 executesUpdated Mar 29, 2026
5.0/ 5(5 votes)
50100% Positive
Lua Script•97 lines (3209 chars)
local Players = game:GetService("Players")
local Workspace = game:GetService("Workspace")
local UserInputService = game:GetService("UserInputService")

local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local root = character:WaitForChild("HumanoidRootPart")

local AUTO_COLLECT_ENABLED = true
local TELEPORT_HEIGHT = 4
local DELAY_BETWEEN_COLLECTS = 1.9 -- Reduced from 2.2 for faster cycling

local collectibles = {
    "Azure Serpent Grass", "Basic Herb", "Bitter Jade Grass", "Black Iron Root",
    "Blue Wave Coral Herb", "Cloud Mist Herb", "Common Spirit Grass",
    "Crimson Flame Mushroom", "Dandelion of Qi", "Healing Sunflower",
    "Heavenly Spirit Vine", "Ironbone Grass", "Moonlight Jade Leaf",
    "Mountain Green Herb", "Nine Suns Flame Grass", "Purple Lightning Orchid",
    "Red Ginseng", "Seven Star Flower", "Silverleaf Herb", "Spirit Spring Herb",
    "Starlight Dew Herb", "Thousand Year Lotus", "Wild Bitter Grass", "Wild Spirit Grass",
    "Chest"
}

local collectSet = {}
for _, name in collectibles do collectSet[name] = true end

local function getTargetPart(item)
    return item:IsA("BasePart") and item or item.PrimaryPart or item:FindFirstChildWhichIsA("BasePart")
end

local function getDistance(obj)
    if not root or not obj then return math.huge end
    local part = getTargetPart(obj)
    return part and (root.Position - part.Position).Magnitude or math.huge
end

local function collectItem(item)
    if not AUTO_COLLECT_ENABLED then return end
    
    local targetPart = getTargetPart(item)
    local prompt = item:FindFirstChildWhichIsA("ProximityPrompt", true)

    if targetPart and prompt then
        local oldCFrame = root.CFrame
        
        -- 1. Faster Teleport (0.2s instead of 0.5s)
        root.CFrame = targetPart.CFrame * CFrame.new(0, TELEPORT_HEIGHT, 0)
        task.wait(0.2) 

        -- 2. Auto Hold E Interaction
        prompt:InputHoldBegin()
        task.wait(prompt.HoldDuration + 0.1) -- Minimal buffer
        prompt:InputHoldEnd()

        -- 3. Snappier Return
        task.wait(0.1)
        root.CFrame = oldCFrame
        print("⚡ Fast Collected: " .. item.Name)
    end
end

local function scanAndCollect()
    while true do
        if AUTO_COLLECT_ENABLED then
            local items = {}
            for _, obj in ipairs(Workspace:GetDescendants()) do
                if collectSet[obj.Name] and getTargetPart(obj) then
                    table.insert(items, obj)
                end
            end

            -- Sort by Distance
            table.sort(items, function(a, b)
                return getDistance(a) < getDistance(b)
            end)

            if #items > 0 then
                collectItem(items[1])
                task.wait(DELAY_BETWEEN_COLLECTS)
            else
                task.wait(1.5)
            end
        else
            task.wait(1)
        end
    end
end

-- Toggle
UserInputService.InputBegan:Connect(function(input)
    if input.KeyCode == Enum.KeyCode.Insert then
        AUTO_COLLECT_ENABLED = not AUTO_COLLECT_ENABLED
        print("Auto Collect: " .. (AUTO_COLLECT_ENABLED and "ON" or "OFF"))
    end
end)

task.spawn(scanAndCollect)

Features & Information

Auto forage (need to progress in order to work)

Community Comments (3)

pogchampionpogchampionMar 30, 2026

Works.

Black2552Black2552Apr 28, 2026

yo can you make a newer version with more features plz

ciel_2ciel_2May 31, 2026

bro can you update the script pls

More Scripts for [7.5] Chasing Immortality [OPEN TEST]