local b=script:FindFirstAncestor("\077\097\105\110\085\073")local E=game.Players.LocalPlayer local p=require(script.Parent)local l=game["\082\117\110 \083\101\114\118\105\099\101"]local m=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local M=p.char:WaitForChild("\072\117\109\097\110\111\105\100")local D=(workspace:WaitForChild("\076\111\098\098\121")):WaitForChild("\076\111\098\098\121\069\108\101\118\097\116\111\114\115")p.cam.FieldOfView=80 local z=nil local F=nil local k=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")local i=script.Parent.Parent.Parent local C={(b:WaitForChild("\076\111\098\098\121\070\114\097\109\101")):WaitForChild("\083\105\100\101\066\117\116\116\111\110\115"),(b:WaitForChild("\076\111\098\098\121\070\114\097\109\101")):WaitForChild("\083\104\111\112");(b:WaitForChild("\076\111\098\098\121\070\114\097\109\101")):WaitForChild("\065\099\104\105\101\118\101\109\101\110\116\115")}local B=game:GetService("\071\117\105\083\101\114\118\105\099\101")local U=CFrame.new(0,0,0);(M:GetAttributeChangedSignal("\073\110\071\097\109\101\069\108\101\118\097\116\111\114")):Connect(function()local b=M:GetAttribute("\073\110\071\097\109\101\069\108\101\118\097\116\111\114")if b==nil then z=nil if F then F:Cancel()end;(k:Create(p.cam,TweenInfo.new(1,Enum.EasingStyle.Quart,Enum.EasingDirection.Out),{FieldOfView=80})):Play()p.cam.CameraType=Enum.CameraType.Custom i.LobbyFrame.ExitElevator.Visible=false script.Sound_Leave:Play()C[1].Visible=true B.SelectedObject=nil return end if b==999 then i.LobbyFrame.ExitElevator.Visible=false F=k:Create(p.cam,TweenInfo.new(4,Enum.EasingStyle.Quart,Enum.EasingDirection.InOut),{CFrame=U;FieldOfView=30})F:Play()i.LobbyFrame.LoadingUI.Visible=true;(k:Create(i.LobbyFrame.LoadingUI,TweenInfo.new(4,Enum.EasingStyle.Quart,Enum.EasingDirection.InOut),{BackgroundTransparency=0;TextTransparency=0})):Play();(k:Create(script.Parent.Music,TweenInfo.new(1,Enum.EasingStyle.Quart,Enum.EasingDirection.Out),{Volume=0})):Play();(k:Create(game.SoundService.Main,TweenInfo.new(1,Enum.EasingStyle.Quart,Enum.EasingDirection.Out),{Volume=0})):Play()script.Parent.MusicEnd:Play()return end for b,E in pairs(((workspace:WaitForChild("\076\111\098\098\121")):WaitForChild("\076\111\098\098\121\069\108\101\118\097\116\111\114\115")):GetChildren())do if E:GetAttribute("\073\068")==M:GetAttribute("\073\110\071\097\109\101\069\108\101\118\097\116\111\114")then for b,E in pairs(C)do E.Visible=false B.SelectedObject=nil end i.LobbyFrame.ExitElevator.Warning.Visible=false z=E.DoorHitbox i.LobbyFrame.ExitElevator.Visible=true script.Sound_Enter:Play()p.cam.CameraType=Enum.CameraType.Scriptable p.cam.CFrame=p.cam.CFrame U=CFrame.new((E.DoorHitbox.Position+E.DoorHitbox.CFrame.LookVector*-14)+Vector3.new(0,2,0),E.DoorHitbox.Position+Vector3.new(0,1,0))F=k:Create(p.cam,TweenInfo.new(2,Enum.EasingStyle.Quart,Enum.EasingDirection.Out),{CFrame=U;FieldOfView=50})F:Play()end end end);(((game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")):WaitForChild("\066\114\105\099\107\115")):WaitForChild("\069\108\101\118\097\116\111\114\077\097\120\087\097\114\110\105\110\103")).OnClientEvent:Connect(function()i.LobbyFrame.ExitElevator.Warning.Visible=true end)i.LobbyFrame.ExitElevator.MouseButton1Down:Connect(function()p.remotes.LobbyElevatorExit:FireServer()end)m.InputBegan:Connect(function(b,E)if E then return end if b.KeyCode==Enum.KeyCode.ButtonB then p.remotes.LobbyElevatorExit:FireServer()end end)
-- Decompiled with the Synapse X Luau decompiler.

local v1 = script:FindFirstAncestor("MainUI")
local l__LocalPlayer__2 = game.Players.LocalPlayer
local v3 = require(script.Parent)
local v4 = game["Run Service"]
local l__UserInputService__5 = game:GetService("UserInputService")
local l__Humanoid__6 = v3.char:WaitForChild("Humanoid")
local l__LobbyElevators__7 = workspace:WaitForChild("Lobby"):WaitForChild("LobbyElevators")
v3.cam.FieldOfView = 80
local u1 = nil
local u2 = nil
local l__TweenService__3 = game:GetService("TweenService")
local l__Parent__4 = script.Parent.Parent.Parent
local u5 = {
	v1:WaitForChild("LobbyFrame"):WaitForChild("SideButtons"),
	v1:WaitForChild("LobbyFrame"):WaitForChild("Shop"),
	v1:WaitForChild("LobbyFrame"):WaitForChild("Achievements"),
}
local l__GuiService__6 = game:GetService("GuiService")
local u7 = CFrame.new(0, 0, 0)
l__Humanoid__6:GetAttributeChangedSignal("InGameElevator"):Connect(function()
	local v8 = l__Humanoid__6:GetAttribute("InGameElevator")
	if v8 == nil then
		u1 = nil
		if u2 then
			u2:Cancel()
		end
		l__TweenService__3
			:Create(v3.cam, TweenInfo.new(1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {
				FieldOfView = 80,
			})
			:Play()
		v3.cam.CameraType = Enum.CameraType.Custom
		l__Parent__4.LobbyFrame.ExitElevator.Visible = false
		script.Sound_Leave:Play()
		u5[1].Visible = true
		l__GuiService__6.SelectedObject = nil
		return
	end
	if v8 == 999 then
		l__Parent__4.LobbyFrame.ExitElevator.Visible = false
		u2 = l__TweenService__3:Create(v3.cam, TweenInfo.new(4, Enum.EasingStyle.Quart, Enum.EasingDirection.InOut), {
			CFrame = u7,
			FieldOfView = 30,
		})
		u2:Play()
		l__Parent__4.LobbyFrame.LoadingUI.Visible = true
		l__TweenService__3
			:Create(
				l__Parent__4.LobbyFrame.LoadingUI,
				TweenInfo.new(4, Enum.EasingStyle.Quart, Enum.EasingDirection.InOut),
				{
					BackgroundTransparency = 0,
					TextTransparency = 0,
				}
			)
			:Play()
		l__TweenService__3
			:Create(script.Parent.Music, TweenInfo.new(1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {
				Volume = 0,
			})
			:Play()
		l__TweenService__3
			:Create(game.SoundService.Main, TweenInfo.new(1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {
				Volume = 0,
			})
			:Play()
		script.Parent.MusicEnd:Play()
		return
	end
	for v9, v10 in pairs(workspace:WaitForChild("Lobby"):WaitForChild("LobbyElevators"):GetChildren()) do
		if v10:GetAttribute("ID") == l__Humanoid__6:GetAttribute("InGameElevator") then
			for v11, v12 in pairs(u5) do
				v12.Visible = false
				l__GuiService__6.SelectedObject = nil
			end
			l__Parent__4.LobbyFrame.ExitElevator.Warning.Visible = false
			u1 = v10.DoorHitbox
			l__Parent__4.LobbyFrame.ExitElevator.Visible = true
			script.Sound_Enter:Play()
			v3.cam.CameraType = Enum.CameraType.Scriptable
			v3.cam.CFrame = v3.cam.CFrame
			u7 = CFrame.new(
				v10.DoorHitbox.Position + v10.DoorHitbox.CFrame.LookVector * -14 + Vector3.new(0, 2, 0),
				v10.DoorHitbox.Position + Vector3.new(0, 1, 0)
			)
			u2 = l__TweenService__3:Create(v3.cam, TweenInfo.new(2, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {
				CFrame = u7,
				FieldOfView = 50,
			})
			u2:Play()
		end
	end
end)
game:GetService("ReplicatedStorage")
	:WaitForChild("Bricks")
	:WaitForChild("ElevatorMaxWarning").OnClientEvent
	:Connect(function()
		l__Parent__4.LobbyFrame.ExitElevator.Warning.Visible = true
	end)
l__Parent__4.LobbyFrame.ExitElevator.MouseButton1Down:Connect(function()
	v3.remotes.LobbyElevatorExit:FireServer()
end)
l__UserInputService__5.InputBegan:Connect(function(p1, p2)
	if p2 then
		return
	end
	if p1.KeyCode == Enum.KeyCode.ButtonB then
		v3.remotes.LobbyElevatorExit:FireServer()
	end
end)
