-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCOA_AutoChainV2.lua
107 lines (94 loc) · 3.66 KB
/
COA_AutoChainV2.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
--[[BACKUP ; SCRIPT MADE BY Money Maker]]
--loadstring(game:HttpGet("https://raw.githubusercontent.com/wxzex/mmsautostratcontinuation/main/justincase/sjkdkjlfdjnnmklcvxjNotifCr"))()
loadstring(game:HttpGet("https://raw.githubusercontent.com/DEVIX7/RBLX_Scripts/master/NotifSend.lua",true))()
if not getgenv().OtherCOAV2 then
getgenv().OtherCOAV2 = true
say("SCRIPT", "Made by Money Maker")
local breaks = false
local cc = 0
local Commanders = {}
local chainStatus = ""
local rmF = game:GetService("ReplicatedStorage").RemoteFunction
local lib = loadstring(game:HttpGet("https://raw.githubusercontent.com/wxzex/mmsautostratcontinuation/main/libcode", true))()
local w = lib:CreateWindow("Auto Chain V2")
w:Section("Status :")
w:Section("ChainStatus")
local cs = nil
for i, v in pairs(game.CoreGui:GetDescendants()) do
if v:IsA("TextLabel") and v.Text == "ChainStatus" then
cs = v
end
end
spawn(function()
while wait() do
cs.Text = chainStatus
end
end)
function getTroopTypeCheck(troop)
return troop.Replicator:GetAttribute("Type")
end
function getTroopType(tr)
local check = getTroopTypeCheck(tr)
if check then
return check
else
return "Unable to GET"
end
end
function getNextClickedTroop()
local Mouse = game.Players.LocalPlayer:GetMouse()
local _Tower = nil
local con
con = Mouse.Button1Down:Connect(function()
for i, v in pairs(game.Workspace.Towers:GetChildren()) do
if v.Owner.Value == game.Players.LocalPlayer.UserId and v:IsAncestorOf(Mouse.Target) and getTroopType(v) == "Commander" and v ~= Commanders[1] and v ~= Commanders[2] and v ~= Commanders[3] then
_Tower = v
con:Disconnect()
break
end
end
end)
repeat wait() until _Tower
return _Tower
end
for c = 1, 3 do
chainStatus = "Click On Commander " .. tostring(c)
table.insert(Commanders, getNextClickedTroop())
end
repeat wait() until Commanders[3] ~= nil
getgenv().Coms = Commanders
function Act(Comm)
local Towers = game:GetService("Workspace").Towers
if Commanders[Comm] ~= nil then
local Tower = Commanders[Comm]
if not Tower.Replicator.Stuns:GetAttribute("1") and not Tower.Replicator.Stuns:GetAttribute("2") and not Tower.Replicator.Stuns:GetAttribute("3") then
rmF:InvokeServer("Troops", "Abilities", "Activate", {["Troop"] = Tower, ["Name"] = "Call Of Arms", ["AutoChain"] = true})
else
chainStatus = "Stun on commander " .. tostring(Comm)
repeat wait() until not Tower.Replicator.Stuns:GetAttribute("1") and not Tower.Replicator.Stuns:GetAttribute("2") and not Tower.Replicator.Stuns:GetAttribute("3")
rmF:InvokeServer("Troops", "Abilities", "Activate", {["Troop"] = Tower, ["Name"] = "Call Of Arms", ["AutoChain"] = true})
end
else
chainStatus = "Commander " .. tostring(Comm) .. " removed"
breaks = true
end
end
getgenv().OtherCOAV2 = false
while wait() do
if breaks then
break
end
Act(1)
chainStatus = "Chaining Commander 1"
wait(10.01)
Act(2)
chainStatus = "Chaining Commander 2"
wait(10.01)
Act(3)
chainStatus = "Chaining Commander 3"
wait(10.01)
end
breaks = false
else
say("ERROR", "Looks like other coa is setting up commanders at the moment!")
end