CCCPaste

[ROBLOX] Anime Card Clash Automation Script -...

--[[
    ROBLOX
    Anime Card Clash | Daily Automation script
    
    - by kaypop.
    
    Feel free to modify or distribute this file,
    The original author (kaypop.) is not responsible for any malicious insertions, actions, or consequences any version of this file may entail.
    
    Version (3.0.0) UPDATE 3.7 - HALLOWEEN ; 2025

	  slot 1 for DPS/Bosses/Tower/Events
	  slot 2 for infinite
--]]

--
--- Game Files / Information
local _GameEvents = {
    setInfinite = game.ReplicatedStorage["shared/network@eventDefinitions"]["fightInfinite"],
    setTower = game.ReplicatedStorage["shared/network@eventDefinitions"]["fightBattleTowerWave"],
    setBoss = game.ReplicatedStorage["shared/network@eventDefinitions"]["fightStoryBoss"],
    setPartySlot = game.ReplicatedStorage["shared/network@eventDefinitions"]["setDefaultPartySlot"],
    setSetting = game.ReplicatedStorage["shared/network@eventDefinitions"]["setSetting"],
    setExploration = game.ReplicatedStorage["shared/network@eventDefinitions"]["startExploration"],
    claimExploration = game.ReplicatedStorage["shared/network@eventDefinitions"]["claimExploration"],
    claimDaily = game.ReplicatedStorage["shared/network@eventDefinitions"]["claimDailyQuest"],
    forfeitBattle = game.ReplicatedStorage["shared/network@eventDefinitions"]["forfeitBattle"]
};
local _GameTowers = {
    "watery_depths",
    "frozen_landscape",
    "stone_citadel",
    "inferno_depths",
    "lunar_eclipse",
    "light_fairy"
};
local _GameTowersName = {
    "Water Tower",
    "Frozen Tower",
    "Stone Tower",
    "Inferno Tower",
    "Lunar Tower",
    "Light Fairy Tower"
};
local _GameBossesCodes = {
    -- SPECIAL EVENT CODES
    550, -- Soul School (Soul Eater; goated anime ngl)
    -- ENDOF SPECIAL EVENT CODES
    
    307, -- Bijuu Beast
    380, -- Freiza 
    329, -- Sukuna
    354, -- Eren
    454, -- Muzan
    346, -- Big Mom
    321, -- SJW, goodluck
    299, -- Cid, the goat
    365, -- Jigen?
    342 -- Ainz,
    
};
local _GameBossesNames = {
    -- EVENT
    "Soul School",
    -- ENDOF EVENT
    
    "Bijuu Beast",
    "Awakened Galactic Tyrant",
    "King of Curses",
    "Combat Giant",
    "Awakened Pale Demon Lord",
    "Soul Queen",
    "Awakened Shadow Monarch",
    "Lord of Eminence",
    "Celestial Sovereign",
    "Undead King"
    
};
local _GameBossesDifficulties = {
  "normal",
  "medium",
  "hard",
  "extreme"
};
local _GameExplorationTiers = {
    {tier="easy",{"crow_master:basic","crow_master:basic","crow_master:basic","crow_master:basic"}},
    {tier="medium",{"crow_master:gold","crow_master:gold","crow_master:gold","crow_master:gold"}},
    {tier="hard",{"awakened_galactic_tyrant:basic","awakened_galactic_tyrant:basic","awakened_galactic_tyrant:basic","awakened_galactic_tyrant:basic"}},
    {tier="extreme",{"awakened_pale_demon_lord:basic","awakened_pale_demon_lord:basic","awakened_pale_demon_lord:basic","awakened_pale_demon_lord:basic"}},
    {tier="nightmare",{"light_admiral:secret","light_admiral:secret","light_admiral:secret","light_admiral:secret"}},
    {tier="celestial",{"six_paths_of_pain:rainbow","six_paths_of_pain:rainbow","six_paths_of_pain:rainbow","six_paths_of_pain:rainbow"}}
};
--

--
--- User/Local Data
local _UserData = {
    wateryTowerIsEnabled = true,
    frozenTowerIsEnabled = true,
    stoneTowerIsEnabled = true,
    infernoTowerIsEnabled = true,
    lunarTowerIsEnabled = true,
    
    bossesAreEnabled = true,
    
    infiniteIsEnabled = true,
    
    towerSlot = 1,
    infiniteSlot = 1,
    bossesSlot = 1
};
--

--
--- Script Environment Data
local promise = {};
promise._positive_promises = {};
promise._negative_promises = {};

function promise:Init()
    local function promiseAutomation(k)
        return function(d)
            if d.ClassName == "TextLabel" then
                local t = d.ContentText:lower()
                
                if t:match("you're already in battle.") or t:match("show battle") or t:match("hide battle") or t:match("on cooldown") then
                    for _, v in ipairs(self[k]) do
                        task.spawn(v)
                    end
                end
            end
        end
    end
    
    game.Players.LocalPlayer.PlayerGui.react.DescendantAdded:Connect(promiseAutomation("_positive_promises"))
    game.Players.LocalPlayer.PlayerGui.react.DescendantRemoving:Connect(promiseAutomation("_positive_promises"))

end

function promise.NewPositiveActionPromise(f)
    table.insert(promise._positive_promises, f)
end
function promise.NewNegativeActionPromise(f)
    table.insert(promise._negative_promises, f)
end

function promise.NewPositiveActionPromiseWait(limit)
    local c;
    local o = nil
    local retv;
    local tt = tick()
    c = game.Players.LocalPlayer.PlayerGui.react.DescendantAdded:Connect(function(d)
        if d.ClassName == "TextLabel" then
            local t = d.ContentText:lower()
            
            if t:match("you're already in battle.") or t:match("show battle") or t:match("hide battle") or t:match("on cooldown") then
                if o then return end
                retv = t
                o = true
            end
        end
    end)
    
    repeat wait() until o or (tick() - tt > limit)
    
    return retv or false
end
function promise.NewNegativeActionPromiseWait(limit, txt)
    local c;
    local o = nil
    local retv;
    local tt = tick()
    c = game.Players.LocalPlayer.PlayerGui.react.DescendantRemoving:Connect(function(d)
        if d.ClassName == "TextLabel" then
            local t = d.ContentText:lower()
            
            if t:match(txt) then
                if o then return end
                retv = t
                o = true
            end
        end
    end)
    
    repeat wait() until o or (tick() - tt > limit)
    
    return retv or false
end
function promise.NewPositiveActionPromiseWait2(limit, txt)
    local c;
    local o = nil
    local retv;
    local tt = tick()
    c = game.Players.LocalPlayer.PlayerGui.react.DescendantAdded:Connect(function(d)
        if d.ClassName == "TextLabel" then
            local t = d.ContentText:lower()
            
            if t:match(txt) then
                if o then return end
                retv = t
                o = true
            end
        end
    end)
    
    repeat wait() until o or (tick() - tt > limit)
    
    return retv or false
end


function communicate(msg, len)
    local g=Instance.new("Message");g.Text=msg;g.Parent=game.Workspace;game:GetService("Debris"):AddItem(g, len)
end

function doDailyBosses()
    _GameEvents.setPartySlot:FireServer("slot_1")
    wait(3)
    for i, bossCodes in ipairs(_GameBossesCodes) do
        if not _UserData.bossesAreEnabled then repeat wait(2) until _UserData.bossesAreEnabled end
        for j, diff in ipairs(_GameBossesDifficulties) do
            if not _UserData.bossesAreEnabled then repeat wait(2) until _UserData.bossesAreEnabled end
            local isInBattle = true;
            
            
            if isInBattle then
                repeat
                    local result; task.spawn(function() result = promise.NewPositiveActionPromiseWait(2) end);
                    _GameEvents.setBoss:FireServer(bossCodes, diff)
                    repeat wait() until result ~= nil
                    
                    if not result or result:match("on cooldown") then
                        communicate(string.format("Boss %s | [%s] is on cooldown/already in battle", _GameBossesNames[i], _GameBossesDifficulties[j]), 2)
                        break
                    else
                        communicate(string.format("Attempting to fight boss %s | [%s]", _GameBossesNames[i], _GameBossesDifficulties[j]), 2)
                    end
                    
                    local result = promise.NewNegativeActionPromiseWait(99999999, "show battle")
                    isInBattle = false
                    wait()
                until not isInBattle
            end
            wait(2.025)
        end
    end
end

function doDailyTowers()
    _GameEvents.setPartySlot:FireServer("slot_1")
    wait(3)
    for i, towers in ipairs(_GameTowers) do
        for j = 5, 25, 5 do
            local isInBattle = true;
            local timesBeaten = 0
            
            if isInBattle then
                repeat
                    local result; task.spawn(function() result = promise.NewPositiveActionPromiseWait(2) end);
                    _GameEvents.setTower:FireServer(towers, j)
                    repeat wait() until result ~= nil
                    
                    if not result then
                        communicate(string.format("%s | Floor %d is on cooldown.", _GameTowersName[i], j), 2)
                        break
                    else
                        communicate(string.format("Attempting to fight %s | Floor %d", _GameTowersName[i], j), 2)
                    end
                    
                    local result = promise.NewNegativeActionPromiseWait(99999999, "show battle")
                    isInBattle = false

                until not isInBattle
            end
            
            wait(2.025)
        end
    end
end

function doHardcoreTower()
    communicate("Preparing for ***** tower.", 3)
    _GameEvents.setPartySlot:FireServer("slot_2")
    wait()
    _GameEvents.forfeitBattle:FireServer()
    wait(2)
    _GameEvents.setSetting:FireServer("auto_repeat_infinite", true)
    wait(1)
    _GameEvents.setInfinite:FireServer("halloween_2025")
    
    communicate("Doing ***** tower. restarting schedule in 6 hours..", 3)
end

function doQuestClaim()
    communicate("collecting quests...", 1.5)
    for i = 1, 6 do
        pcall(function() _GameEvents.claimDaily:FireServer(i) end)
        wait()
    end
end

function doExploration()
    --spawn(function()
        for _, exploration in ipairs(_GameExplorationTiers) do
            pcall(function()
                communicate("collecting/restarting exploration (if able) tier: " .. exploration.tier, 1.5)
                _GameEvents.claimExploration:FireServer(exploration.tier)
                wait(1.75)
                _GameEvents.setExploration:FireServer(exploration.tier, exploration[1])
                wait(1.5)
            end)
            wait()
        end
    --end)
end

function eventRoutine(type)
    type = "Halloween"
    
    local _GameSPECIALEvents = {
        claimHalloweenFarmSlot = game.ReplicatedStorage["shared/network@eventDefinitions"]["claimHalloweenFarmSlot"],
        plantHalloweenFarmSlot = game.ReplicatedStorage["shared/network@eventDefinitions"]["plantHalloweenFarmSlot"],
        speedupHalloweenFarmSlot = game.ReplicatedStorage["shared/network@eventDefinitions"]["speedupHalloweenFarmSlot"]
    };
    local _GameSPECIALEventSpeedups = {
      "weak_soul_essence",
      "medium_soul_essence",
      "strong_soul_essence",
      "potent_soul_essence"
    };
    local _GameSPECIALEventSlots = {
      "slot_1",
      "slot_2",
      "slot_3",
      "slot_4",
      "slot_5",
      "slot_6",
    };
    
    function collectionMaterialRoutine()
        communicate("collecting halloween stems...", 1)
        local c = game.Players.LocalPlayer.Character
        for _, v in ipairs(game.Workspace:GetChildren()) do
            if v.Name:match("stem_") and v:FindFirstChildOfClass("TouchTransmitter") then
                c.HumanoidRootPart.CFrame = v.CFrame
                wait(1)
                firetouchinterest(c.HumanoidRootPart, v, 1)
                wait(2)
                firetouchinterest(c.HumanoidRootPart, v, 0)
                wait(1)
            end
        end
    end
    
    function skipStemTimeRoutine()
        communicate("running halloween stem speedup routine....", 2)
        for slot = 1, 6 do
            wait(0.5)
            for essenceType = 1, 4 do
                _GameSPECIALEvents.speedupHalloweenFarmSlot:FireServer(_GameSPECIALEventSlots[slot], _GameSPECIALEventSpeedups[essenceType], 1)
                wait()
            end
        end
    end
    
    function claimStemsRoutine()
        communicate("claiming/re-planting all halloween stems.. (if any)", 2)
        for slot = 1, 6 do
            wait(0.35)
            local stillGrowing = true
            spawn(function()
                stillGrowing = promise.NewPositiveActionPromiseWait2(30, "not finished growing yet")
            end)
            _GameSPECIALEvents.claimHalloweenFarmSlot:FireServer(_GameSPECIALEventSlots[slot])
            
            wait(35)
            
            if not stillGrowing then
                _GameSPECIALEvents.plantHalloweenFarmSlot:FireServer(_GameSPECIALEventSlots[slot])
            end
            wait(0.1)
        end
    end
    
    -- routine
      while wait(1) do
          --pcall(collectionMaterialRoutine)
          wait(1)
          pcall(skipStemTimeRoutine)
          wait(1)
          pcall(claimStemsRoutine)
      end
end

local vu = game:GetService("VirtualUser")
game.Players.LocalPlayer.Idled:Connect(function()
    vu:CaptureController()
    vu:ClickButton2(Vector2.new())
end)
--


--
--- Main
function main()
    communicate("Loaded. Beginning in 4 seconds.", 3)
    _GameEvents.setSetting:FireServer("show_battles", false)
    _GameEvents.forfeitBattle:FireServer()
    wait(4)
    
    --doExploration()
    --doQuestClaim()
    --doDailyBosses()
    --doQuestClaim()
    doDailyTowers()
    --doQuestClaim()
    --doHardcoreTower()
    wait(1)
end
--

--spawn(eventRoutine)

while true do
    main()
    wait(((60)*(60)) * 6)
end