-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathFix
167 lines (164 loc) · 5.81 KB
/
Fix
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
spawn(function()
local RS = game:WaitForChild('ReplicatedStorage')
local RSRF = RS:WaitForChild("RemoteFunction")
local RSRE = RS:WaitForChild("RemoteEvent")
function EquipTroop(troop)
if game.PlaceId ~= 5591597781 then
local args = {
[1] = "Inventory",
[2] = "Execute",
[3] = "Troops",
[4] = "Add",
[5] = {
["Name"] = tostring(troop)
}
}
game.ReplicatedStorage.RemoteEvent:FireServer(unpack(args))
end
end
function UnEquip()
for TowerName, Tower in next, game.ReplicatedStorage.RemoteFunction:InvokeServer("Session", "Search", "Inventory.Troops") do
if (Tower.Equipped) then
local args = {
[1] = "Inventory",
[2] = "Execute",
[3] = "Troops",
[4] = "Remove",
[5] = {
["Name"] = TowerName
}
}
game:GetService("ReplicatedStorage").RemoteEvent:FireServer(unpack(args))
end
end
end
if game.PlaceId == 5591597781 then
getgenv().map = game:GetService("ReplicatedStorage").State.Map.Value
else
spawn(function()
getgenv().timer = 0
while wait(1) do
getgenv().timer = getgenv().timer + 1
end
end)
getgenv().BreakEvery = false
getgenv().repeating = true
spawn(function()
spawn(function()
getgenv().timer = 0
while wait(1) do
getgenv().timer = getgenv().timer + 1
end
end)
getgenv().repeating = true
while wait(1) do
if getgenv().repeating then
getgenv().repeating = false
local jc = 0
for _, Elevators in pairs(game:GetService('Workspace').Elevators:GetChildren()) do
local mp = Elevators.State.Map.Title
local plrs = Elevators.State.Players
if getgenv().Maps[mp.Value] ~= nil then
if (plrs.Value <= 0) then
jc = jc + 1
print("Join attempt...")
getgenv().status = "Joining..."
RSRF:InvokeServer("Elevators","Enter",Elevators)
UnEquip()
for i,v in next, getgenv().Maps[mp.Value] do
EquipTroop(v)
end
print("Joined elavator...")
getgenv().status = "Joined"
while wait() do
getgenv().status = "Joined ("..Elevators.State.Timer.Value.."s)"
if Elevators.State.Timer.Value == 0 then
local s = true
for c=1,100 do
if (plrs.Value > 1) then
print("Someone joined, leaving elevator...")
getgenv().status = "Someone joined..."
RSRF:InvokeServer("Elevators","Leave")
getgenv().repeating = true
s = false
break
end
wait(0.01)
end
if Elevators.State.Timer.Value == 0 and s then
getgenv().status = "Teleporting..."
wait(60)
getgenv().status = "Teleport failed!"
RSRF:InvokeServer("Elevators","Leave")
else
getgenv().status = "Teleport failed! (Timer)"
RSRF:InvokeServer("Elevators","Leave")
getgenv().repeating = true
end
end
if getgenv().Maps[mp.Value] ~= nil then
if antimulti then
if (plrs.Value > 1) then
RSRF:InvokeServer("Elevators","Leave")
prints("Someone joined, leaving elevator...")
getgenv().status = "Someone joined..."
getgenv().repeating = true
break
elseif (plrs.Value == 0) then
wait(1)
if (plrs.Value == 0) then
wait(1)
if (plrs.Value == 0) then
wait(1)
if (plrs.Value == 0) then
wait(1)
if (plrs.Value == 0) then
print("Error")
getgenv().status = "Error occured, check dev con"
print("Error occured, please open ticket on Money Maker Development discord server!")
RSRF:InvokeServer("Elevators","Leave")
getgenv().repeating = true
break
end
end
end
end
end
end
else
RSRF:InvokeServer("Elevators","Leave")
print("Map changed while joining, leaving...")
getgenv().status = "Map changed..."
getgenv().repeating = true
break
end
end
end
end
end
if jc == 0 then
getgenv().repeating = true
print("Waiting for map...")
getgenv().status = "Waiting for map..."
if getgenv().timer >= 15 then
getgenv().status = "Force changing maps..."
getgenv().timer = 0
for i, v in pairs(game:GetService('Workspace').Elevators:GetChildren()) do
local plrs = v.State.Players
if plrs.Value <= 0 then
RSRF:InvokeServer("Elevators","Enter",v)
wait(1)
RSRF:InvokeServer("Elevators","Leave")
end
end
wait(0.6)
RSRF:InvokeServer("Elevators","Leave")
wait(1)
end
end
end
end
end)
end
end)
--Fixed Version