-
Notifications
You must be signed in to change notification settings - Fork 0
/
AnimeWarriorsSim2.lua
183 lines (157 loc) · 5.47 KB
/
AnimeWarriorsSim2.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()
Rayfield:Notify({
Title = "Loading...",
Content = "Wont take long",
Duration = 1
})
local Window = Rayfield:CreateWindow({
Name = "FallAngelHub - Anime Warriors Simulator 2",
LoadingTitle = "FallAngelHub beein booted",
LoadingSubtitle = "by GS",
ConfigurationSaving = {
Enabled = true,
FolderName = 'FallAngelHub', -- Create a custom folder for your hub/game
FileName = "Anime Warriors Simulator 2"
},
Discord = {
Enabled = true,
Invite = "https://discord.gg/QxZfVsRcsd", -- The Discord invite code, do not include discord.gg/. E.g. discord.gg/ABCD would be ABCD
RememberJoins = true -- Set this to false to make them join the discord every time they load it up
}
})
local playerName = game.Players.LocalPlayer.Name
local player = game.Players.LocalPlayer
local maps = game:GetService("Workspace").Maps
local currentIsland
for i, island in ipairs(maps:GetChildren()) do
if island:FindFirstChild('Teleport') then
currentIsland = island
break
end
end
local repStorage = game:GetService("ReplicatedStorage").Packages._Index
local sleitnick_knit
for _, folder in pairs(repStorage:GetChildren()) do
if string.find(folder.Name, "sleitnick_knit") then
sleitnick_knit = folder
break
end
end
local currentEggs = currentIsland.Eggs:GetChildren()
local currentEggsNames = {}
for _, child in ipairs(currentEggs) do
table.insert(currentEggsNames, child.Name)
end
local function tp(part)
local character = player.Character
if character and character:FindFirstChild("HumanoidRootPart") then
character.HumanoidRootPart.CFrame = part.CFrame
end
end
function fight(ID)
local epuipped = #game:GetService("Workspace").Warriors[playerName]:GetChildren()
for i = 1, epuipped do
sleitnick_knit.knit.Services.EnemyService.RE.AttackEnemy:FireServer(ID)
end
end
function collectAll()
for i, drop in ipairs(game:GetService("Workspace").Drops:GetChildren()) do
repeat
tp(drop)
task.wait(0.1)
until not game:GetService("Workspace").Drops:FindFirstChild(drop)
end
end
function hatch(egg)
tp(egg.MeshPart)
game:GetService("ReplicatedStorage").Packages._Index["[email protected]"].knit.Services.EggService.RF.Open:InvokeServer(
egg.Name, nil, false)
end
local Tab = Window:CreateTab("Farming")
local main = Tab:CreateSection("Main")
Rayfield:Notify({
Title = "Done loading",
Content = "Wont take long",
Duration = 1
})
local autofarmT = Tab:CreateToggle({
Name = "Auto farm",
CurrentValue = false,
Flag = "autofarm", -- A flag is the identifier for the configuration file, make sure every element has a different flag if you're using configuration saving to ensure no overlaps
Callback = function(Value)
getgenv().autofarm = Value
end
})
local autoeggT = Tab:CreateToggle({
Name = "Auto egg",
CurrentValue = false,
Flag = "autoegg", -- A flag is the identifier for the configuration file, make sure every element has a different flag if you're using configuration saving to ensure no overlaps
Callback = function(Value)
getgenv().autoegg = Value
end
})
local Input = Tab:CreateInput({
Name = "Egg",
PlaceholderText = "Egg name (dont add 'egg')",
RemoveTextAfterFocusLost = false,
Callback = function(Text)
getgenv().autoeggS = Text
end
})
spawn(function()
while task.wait(1) do
for i, island in ipairs(maps:GetChildren()) do
if island:FindFirstChild('Teleport') then
currentIsland = island
break
end
end
currentEggs = currentIsland.Eggs:GetChildren()
local currentEggsNames = {}
for _, child in ipairs(currentEggs) do
table.insert(currentEggsNames, child.Name)
end
end
end)
spawn(function()
local path = game:GetService("Workspace").ClientEnemies
while task.wait() do
if autofarm then
for i, enem in ipairs(path:GetChildren()) do
if enem:FindFirstChild('HumanoidRootPart') then
tp(enem.HumanoidRootPart)
if enem.HumanoidRootPart:FindFirstChild('EnemyHealthBar') then
local ID = enem.Name
local name = enem.HumanoidRootPart.EnemyHealthBar.Title.Text
local HPtextS = string.split(enem.HumanoidRootPart.EnemyHealthBar.Bar.HP.Text, '/')
local totalHP = HPtextS[0]
local HP = HPtextS[1]
if name ~= 'Dummy' then
fight(ID)
repeat
if not autofarm then
break
end
task.wait()
until HP == 0 or not enem:FindFirstChild('HumanoidRootPart') or not autofarm
collectAll()
end
end
end
end
end
end
end)
spawn(function()
while task.wait() do
if autoegg and autoeggS then
for i, egg in ipairs(currentEggs) do
if egg.Name == autoeggS then
hatch(egg)
break
end
end
end
end
end)
Rayfield:LoadConfiguration()