-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsource.lua
More file actions
228 lines (228 loc) · 7.55 KB
/
source.lua
File metadata and controls
228 lines (228 loc) · 7.55 KB
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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
if not game:IsLoaded() then
game.Loaded:Wait()
end
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local owner = Players.LocalPlayer
while not owner do
Players.PlayerAdded:Wait()
owner = Players.LocalPlayer
end
local character = owner.Character or owner.CharacterAdded:Wait()
local humanoid = character:FindFirstChildOfClass("Humanoid")
while not humanoid or humanoid.ClassName ~= "Humanoid" do
humanoid = character.ChildAdded:Wait()
end
for _, connectionInfo in getconnections(owner.Idled) do
for _, name in { "Disable", "Disconnect" } do
if connectionInfo[name] then
connectionInfo[name](connectionInfo)
break
end
end
end
local function getPath(object, ...)
for index = 1, select("#", ...) do
object = object:WaitForChild(tostring((select(index, ...))))
end
return object
end
local currentRooms = getPath(workspace, "CurrentRooms")
local gameData = getPath(ReplicatedStorage, "GameData")
local latestRoom = getPath(gameData, "LatestRoom")
local mainUI = getPath(owner, "PlayerGui", "MainUI")
local function pressButton(button)
local mousePosition = button.AbsolutePosition + button.AbsoluteSize / 2
firesignal(button.MouseButton1Down, mousePosition.X, mousePosition.Y)
end
local canCollide = true
local function slideTo(position)
local currentPosition = character:GetPivot().Position
local lastFrame = os.clock()
while task.wait() do
local delta = os.clock() - lastFrame
lastFrame = os.clock()
if (character:GetPivot().Position - currentPosition).Magnitude > 3 then
currentPosition = character:GetPivot().Position
end
if (currentPosition - position).Magnitude > 1e-3 then
currentPosition = (CFrame.lookAt(currentPosition, position) * CFrame.new(
0,
0,
-math.min(100 * math.min(delta, 1 / 15), (currentPosition - position).Magnitude)
)).Position
end
character:PivotTo(CFrame.new(currentPosition))
for _, object in character:GetChildren() do
if object:IsA("BasePart") then
object.AssemblyLinearVelocity, object.CanCollide = Vector3.zero, false
object.CanQuery, object.CanTouch = canCollide, canCollide
object.Anchored = false
end
end
if (currentPosition - position).Magnitude < 1e-3 then
break
end
end
end
task.defer(game.Destroy, getPath(game:GetService("ReplicatedStorage"), "ClientModules", "EntityModules", "Void"))
local xzAxis = Vector3.new(1, 0, 1)
local bases = {}
for room = 0, 100 do
bases[room] = {}
end
local pathfindingBases = {}
local function check(object)
if table.find(pathfindingBases, object) then
return
end
if object.Name == "Base" and object.Parent:GetAttribute("Floor") then
local roomName = object.Parent.Name
local currentBases = bases[tonumber(roomName)]
table.insert(currentBases, object)
local pathfindingBase = object:Clone()
pathfindingBase:PivotTo(CFrame.new(0, -pathfindingBase.CFrame.Y, 0) * pathfindingBase.CFrame)
table.insert(pathfindingBases, pathfindingBase)
pathfindingBase.Parent = workspace
local ancestryChanged
ancestryChanged = object.AncestryChanged:Connect(function()
if object:IsDescendantOf(workspace) then
return
end
ancestryChanged:Disconnect()
table.remove(currentBases, table.find(currentBases, object))
table.remove(pathfindingBases, table.find(pathfindingBases, pathfindingBase))
pathfindingBase:Destroy()
end)
end
if object:IsA("BasePart") then
object.CanCollide, object.CanQuery, object.CanTouch = false, false, false
end
end
workspace.DescendantAdded:Connect(check)
for _, object in workspace:GetDescendants() do
check(object)
end
local path = game:GetService("PathfindingService"):CreatePath({
AgentCanJump = false,
WaypointSpacing = math.huge,
})
local startPosition = character:GetPivot().Position
pcall(
queueonteleport or queue_on_teleport,
"loadstring(game:HttpGet('https://raw.githubusercontent.com/Amourousity/WALLS/main/source.lua'), 'WALLS')()"
)
while workspace.DistributedGameTime < 30 do
slideTo(startPosition)
end
getPath(mainUI, "ItemShop").Visible = false
task.spawn(function()
local lastRoom = 0
local lastEntered = os.clock()
while task.wait(1) do
if lastRoom ~= latestRoom.Value then
lastEntered = os.clock()
lastRoom = latestRoom.Value
elseif os.clock() - lastEntered > 15 then
pressButton(getPath(mainUI, "ItemShop", "Confirm"))
getPath(ReplicatedStorage, "EntityInfo", "PlayAgain"):FireServer()
break
end
end
end)
for roomNumber = 0, 50 do
local room = getPath(currentRooms, roomNumber)
local ceiling = getPath(room, "LightBase").Position * Vector3.yAxis
canCollide = false
slideTo(character:GetPivot().Position * xzAxis + ceiling)
canCollide = true
local door = getPath(room, "Door")
local doorPart = getPath(door, "Door")
local doorCFrame = getPath(doorPart, "OriginalCFrameValue").Value
local doorOpen = math.abs(doorCFrame.X - doorPart.CFrame.X) > 1e-3
local lock = door:FindFirstChild("Lock")
if roomNumber ~= 50 and lock and not doorOpen then
local key = room:FindFirstChild("KeyObtain", true)
while not key do
room.DescendantAdded:Wait()
key = room:FindFirstChild("KeyObtain", true)
end
local done
task.spawn(function()
repeat
slideTo(character:GetPivot().Position * xzAxis + ceiling)
until done
end)
repeat
path:ComputeAsync(
character:GetPivot().Position * xzAxis + Vector3.yAxis * 4,
key:GetPivot().Position * xzAxis + Vector3.yAxis * 4
)
until path.Status.Name == "Success"
done = true
local waypoints = path:GetWaypoints()
table.remove(waypoints, 1)
for _, waypoint in waypoints do
slideTo(waypoint.Position * xzAxis + ceiling)
end
slideTo(key:GetPivot().Position * xzAxis + ceiling)
slideTo(key:GetPivot().Position)
repeat
slideTo(key:GetPivot().Position)
fireproximityprompt(getPath(key, "ModulePrompt"))
until owner.Character:FindFirstChild("Key")
slideTo(key:GetPivot().Position * xzAxis + ceiling)
done = false
task.spawn(function()
repeat
slideTo(character:GetPivot().Position * xzAxis + ceiling)
until done
end)
repeat
path:ComputeAsync(
key:GetPivot().Position * xzAxis + Vector3.yAxis * 4,
(doorCFrame * CFrame.new(0, 0, 5)).Position * xzAxis + Vector3.yAxis * 4
)
until path.Status.Name == "Success"
done = true
waypoints = path:GetWaypoints()
table.remove(waypoints, 1)
for _, waypoint in waypoints do
slideTo(waypoint.Position * xzAxis + ceiling)
end
slideTo((doorCFrame * CFrame.new(0, 0, 5)).Position * xzAxis + ceiling)
slideTo((doorCFrame * CFrame.new(0, 0, 5)).Position)
repeat
slideTo((doorCFrame * CFrame.new(0, 0, 5)).Position)
fireproximityprompt(getPath(lock, "UnlockPrompt"))
until roomNumber < latestRoom.Value
slideTo((doorCFrame * CFrame.new(0, 0, -5)).Position)
else
local done
task.spawn(function()
repeat
slideTo(character:GetPivot().Position * xzAxis + ceiling)
until done
end)
repeat
path:ComputeAsync(
character:GetPivot().Position * xzAxis + Vector3.yAxis * 4,
(doorCFrame * CFrame.new(0, 0, 5)).Position * xzAxis + Vector3.yAxis * 4
)
until path.Status.Name == "Success"
done = true
local waypoints = path:GetWaypoints()
table.remove(waypoints, 1)
for _, waypoint in waypoints do
slideTo(waypoint.Position * xzAxis + ceiling)
end
slideTo((doorCFrame * CFrame.new(0, 0, 5)).Position * xzAxis + ceiling)
slideTo((doorCFrame * CFrame.new(0, 0, 5)).Position)
repeat
slideTo((doorCFrame * CFrame.new(0, 0, math.random(0, 5))).Position)
until roomNumber < latestRoom.Value or doorOpen or roomNumber == 50
slideTo((doorCFrame * CFrame.new(0, 0, -5)).Position)
end
owner:SetAttribute("CurrentRoom", latestRoom.Value)
end
pressButton(getPath(mainUI, "ItemShop", "Confirm"))