local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local HttpService = game:GetService("HttpService")

repeat task.wait() until writefile and readfile and isfile

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

local ReadyRemote = ReplicatedStorage:WaitForChild("Systems"):WaitForChild("Waves"):WaitForChild("Ready")
local VoteRemote = ReplicatedStorage:WaitForChild("Systems"):WaitForChild("Voting"):WaitForChild("Vote")

local RoundEnd = player:WaitForChild("PlayerGui"):WaitForChild("RoundEnd")

local rewardsList = RoundEnd
    :WaitForChild("Frame")
    :WaitForChild("Contents")
    :WaitForChild("Rewards")
    :WaitForChild("List")

local FILE_NAME = "SummonHeroesResult.json"

local function ReadData()
    if not isfile(FILE_NAME) then
        writefile(FILE_NAME, "{}")
    end

    local success, data = pcall(function()
        return HttpService:JSONDecode(readfile(FILE_NAME))
    end)

    if not success then
        warn("[File] Corrupted JSON, resetting.")
        writefile(FILE_NAME, "{}")
        return {}
    end

    return data
end

local sessionData = ReadData()

local function AddItem(itemName, amount)
    sessionData[itemName] = (sessionData[itemName] or 0) + amount
    print("[File] Added:", itemName, "Total:", sessionData[itemName])
end

local function Save()
    writefile(FILE_NAME, HttpService:JSONEncode(sessionData))
end

local chestsFolder = workspace:WaitForChild("Map"):WaitForChild("BonusChests")

for _, chest in ipairs(chestsFolder:GetChildren()) do
    local attachment = chest:FindFirstChild("Attachment")
    if not attachment then continue end

    local prompt = attachment:FindFirstChildOfClass("ProximityPrompt")
    if not prompt then continue end

    hrp.CFrame = attachment.WorldCFrame + Vector3.new(0, 3, 0)
    task.wait(0.25)

    fireproximityprompt(prompt)
    task.wait(0.2)
end

local function CollectRewardsFromUI()
    print("[Rewards] Collecting from UI...")

    for _, item in ipairs(rewardsList:GetChildren()) do
        if not item:IsA("TextButton") then continue end

        local container = item:FindFirstChild("Container")
        if not container then continue end

        local countLabel = container:FindFirstChild("InventoryCount")
        if not countLabel then continue end

        local rawCount = countLabel.Text or ""
        local digits = string.gsub(rawCount, "%D", "")
        local amount = tonumber(digits) or 1

        local itemName = item.Name

        if itemName ~= "" then
            AddItem(itemName, amount)
        end
    end
end

task.wait(2)
ReadyRemote:FireServer()

task.wait(1)

RoundEnd:GetPropertyChangedSignal("Enabled"):Connect(function()
    if RoundEnd.Enabled then
        task.wait(0.5)

        CollectRewardsFromUI()

        Save()

        task.wait(0.2)

        VoteRemote:FireServer("Retry")
    end
end)
Summon Heroes [Anime🎌] Auto Farm (OPENSOURCE)
937 views
6 months ago

Auto Farm (OPENSOURCE)

WORKING
Free

Description

🧰 Auto Chest Collection – Collects all bonus chests automatically

🚪 Auto Ready – Sends ready signal without manual input

🎁 Auto Reward Detection – Reads rewards directly from the result UI

📊 Reward Tracker – Tracks collected items and their amounts

💾 JSON File Save – Saves summon results into a local file

🔄 Session Data Loading – Loads previous saved reward data automatically

🛠️ Corrupted File Reset – Resets broken JSON data safely

🔁 Auto Retry Vote – Automatically votes retry after round end

📦 Summon Result Logger – Logs all collected reward items

⚡ Fully Automated Loop – Chest collect, ready, save, and retry in one flow

Features

  • AUTO FARM

Related Scripts