local w=script:FindFirstAncestor("\077\097\105\110\085\073")local r=game.Players.LocalPlayer local e=require(script.Parent)local b=game["\082\117\110 \083\101\114\118\105\099\101"]local V=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local O=e.char:WaitForChild("\072\117\109\097\110\111\105\100")local Z=(workspace:WaitForChild("\076\111\098\098\121")):WaitForChild("\076\111\098\098\121\069\108\101\118\097\116\111\114\115")e.cam.FieldOfView=80 local Y=nil local U=nil local L=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")local A=script.Parent.Parent.Parent local p={(w:WaitForChild("\076\111\098\098\121\070\114\097\109\101")):WaitForChild("\083\105\100\101\066\117\116\116\111\110\115");(w:WaitForChild("\076\111\098\098\121\070\114\097\109\101")):WaitForChild("\083\104\111\112");(w: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 s=game:GetService("\071\117\105\083\101\114\118\105\099\101")local n=CFrame.new(0,0,0);(O:GetAttributeChangedSignal("\073\110\071\097\109\101\069\108\101\118\097\116\111\114")):Connect(function()local w=O:GetAttribute("\073\110\071\097\109\101\069\108\101\118\097\116\111\114")if w==nil then Y=nil if U then U:Cancel()end;(L:Create(e.cam,TweenInfo.new(1,Enum.EasingStyle.Quart,Enum.EasingDirection.Out),{FieldOfView=80})):Play()e.cam.CameraType=Enum.CameraType.Custom A.LobbyFrame.ExitElevator.Visible=false script.Sound_Leave:Play()p[1].Visible=true s.SelectedObject=nil return end if w==999 then A.LobbyFrame.ExitElevator.Visible=false U=L:Create(e.cam,TweenInfo.new(4,Enum.EasingStyle.Quart,Enum.EasingDirection.InOut),{CFrame=n;FieldOfView=30})U:Play()A.LobbyFrame.LoadingUI.Visible=true;(L:Create(A.LobbyFrame.LoadingUI,TweenInfo.new(4,Enum.EasingStyle.Quart,Enum.EasingDirection.InOut),{BackgroundTransparency=0,TextTransparency=0})):Play();(L:Create(script.Parent.Music,TweenInfo.new(1,Enum.EasingStyle.Quart,Enum.EasingDirection.Out),{Volume=0})):Play();(L:Create(game.SoundService.Main,TweenInfo.new(1,Enum.EasingStyle.Quart,Enum.EasingDirection.Out),{Volume=0})):Play()script.Parent.MusicEnd:Play()return end for w,r 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 r:GetAttribute("\073\068")==O:GetAttribute("\073\110\071\097\109\101\069\108\101\118\097\116\111\114")then for w,r in pairs(p)do r.Visible=false s.SelectedObject=nil end A.LobbyFrame.ExitElevator.Warning.Visible=false Y=r.DoorHitbox A.LobbyFrame.ExitElevator.Visible=true script.Sound_Enter:Play()e.cam.CameraType=Enum.CameraType.Scriptable e.cam.CFrame=e.cam.CFrame n=CFrame.new((r.DoorHitbox.Position+r.DoorHitbox.CFrame.LookVector*-14)+Vector3.new(0,2,0),r.DoorHitbox.Position+Vector3.new(0,1,0))U=L:Create(e.cam,TweenInfo.new(2,Enum.EasingStyle.Quart,Enum.EasingDirection.Out),{CFrame=n,FieldOfView=50})U: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()A.LobbyFrame.ExitElevator.Warning.Visible=true end)A.LobbyFrame.ExitElevator.MouseButton1Down:Connect(function()e.remotes.LobbyElevatorExit:FireServer()end)V.InputBegan:Connect(function(w,r)if r then return end if w.KeyCode==Enum.KeyCode.ButtonB then e.remotes.LobbyElevatorExit:FireServer()end end)


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);
