local v=game.Players.LocalPlayer local u=require(script.Parent)local X=require((script:FindFirstAncestor("\077\097\105\110\085\073")).Modules.WindShake)local x=(require((v:WaitForChild("\080\108\097\121\101\114\083\099\114\105\112\116\115")):WaitForChild("\080\108\097\121\101\114\077\111\100\117\108\101"))):GetControls()local Z=game["\082\117\110 \083\101\114\118\105\099\101"]local j=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local w=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")local N=require(((game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")):WaitForChild("\067\108\105\101\110\116\077\111\100\117\108\101\115")):WaitForChild("\077\111\100\117\108\101\095\069\118\101\110\116\115"))X:Init();(u.gd:WaitForChild("\067\104\097\115\101\073\110\083\101\115\115\105\111\110")).Changed:Connect(function(v) end)local function F()local x=workspace.CurrentRooms:FindFirstChild(u.gd.LatestRoom.Value)if x and x:GetAttribute("\082\101\113\117\105\114\101\115\075\101\121")==true then end if x:WaitForChild("\068\111\111\114",1)then local X=x:FindFirstChild("\068\111\111\114")local Z=12 if u.chase then Z=24 end if X then local x=u.gd.LatestRoom.Value task.spawn(function()for u=1,10000,1 do wait(.1)if x<tonumber(v:GetAttribute("\067\117\114\114\101\110\116\082\111\111\109"))then return end if(v.Character.PrimaryPart.Position-X.PrimaryPart.Position).Magnitude<Z then local u=RaycastParams.new()u.CollisionGroup="\080\108\097\121\101\114"u.FilterDescendantsInstances={X,v.Character}local x=workspace:Raycast(v.Character.PrimaryPart.Position,(CFrame.new(v.Character.PrimaryPart.Position,X.PrimaryPart.Position)).LookVector*(v.Character.PrimaryPart.Position-X.PrimaryPart.Position).Magnitude,u)if not x then X.ClientOpen:FireServer()return end if not x.Position then X.ClientOpen:FireServer()return end end end end)end end if x:FindFirstChild("\083\104\111\112\107\101\101\112\101\114")then(require(script.Shopkeeper)).run(x)end local Z,j,N=ipairs(x:GetDescendants())while true do Z(j,N)if not Z then break end N=Z if j:IsA("\066\097\115\101\080\097\114\116")and j:GetAttribute("\087\105\110\100\083\104\097\107\101")==true then print("\115\117\112")X:AddObjectShake(j)elseif j.Name=="\071\117\105\100\105\110\103\076\105\103\104\116\083\116\117\102\102"or j.Name=="\072\101\108\112\076\105\103\104\116"or j.Name=="\072\101\108\112\080\097\114\116\105\099\108\101"then if j:IsA("\083\112\111\116\076\105\103\104\116")then if(UserSettings()).GameSettings.SavedQualityLevel.Value<=4 then j.Color=Color3.fromRGB(39,190,255)j.Brightness=8 j.Range=32 j.Angle=40 end elseif j:IsA("\080\097\114\116\105\099\108\101\069\109\105\116\116\101\114")and(UserSettings()).GameSettings.SavedQualityLevel.Value<=5 then j.Rate=50 end end end if x:GetAttribute("\072\101\097\100\101\114")~=nil and(x:GetAttribute("\072\101\097\100\101\114")~=""and x:GetAttribute("\072\101\097\100\101\114")~=" ")then print("\100\111\105\110\103 \104\101\097\100\101\114")u.titlelocation(x:GetAttribute("\072\101\097\100\101\114"))end if x:FindFirstChild("\070\105\103\117\114\101\083\101\116\117\112",true)then local v=(x:FindFirstChild("\070\105\103\117\114\101\083\101\116\117\112",true)).FigureRagdoll local u=v.Parent local X=0 local Z=v.Head.Click local j=v.Head.Growl local N={}for u,X in pairs(v:GetDescendants())do if X:IsA("\076\105\103\104\116")and X.Name=="\066\108\105\115\116\101\114\076\105\103\104\116"then X.Enabled=true X.Brightness=0 table.insert(N,{Light=X;Distance=v.Head.Position-X.Parent.WorldPosition})end end local F=TweenInfo.new(.1,Enum.EasingStyle.Linear)for x=1,100000000,1 do wait(.1)if not v then break end if v.Parent~=u then break end local R=(Z.PlaybackLoudness+j.PlaybackLoudness)/60 if R~=X then for v,u in N,nil do delay(u.Distance/2,function()(w:Create(u.Light,F,{Brightness=R})):Play()end)end end X=R end end if x:FindFirstChild("\070\105\103\117\114\101\065\110\105\109\097\116\101\100\087\101\108\100\101\100",true)then local v=x:FindFirstChild("\070\105\103\117\114\101\065\110\105\109\097\116\101\100\087\101\108\100\101\100",true)local u=v.Parent local X=0 local Z=v.Parent.Head.Click local j=v.Parent.Head.Growl local N={}for u,X in pairs(v:GetDescendants())do if X:IsA("\076\105\103\104\116")and X.Name=="\066\108\105\115\116\101\114\076\105\103\104\116"then X.Enabled=true X.Brightness=0 table.insert(N,{Light=X;Distance=v.Parent.Head.Position-X.Parent.WorldPosition})end end local F=TweenInfo.new(.1,Enum.EasingStyle.Linear)for x=1,100000000,1 do wait(.1)if not v then break end if v.Parent~=u then break end local R=(Z.PlaybackLoudness+j.PlaybackLoudness)/90-.15 if R~=X then for v,u in N,nil do delay(u.Distance/4,function()(w:Create(u.Light,F,{Brightness=R})):Play()end)end end X=R end end end;(u.gd:WaitForChild("\070\105\110\105\115\104\101\100\076\111\097\100\105\110\103\082\111\111\109")).Changed:Connect(F);(u.gd:WaitForChild("\080\114\101\108\111\097\100")).Changed:Connect(F);(workspace:WaitForChild("\065\109\098\105\101\110\099\101\095\068\097\114\107")).Played:Connect(function() end);(v:GetAttributeChangedSignal("\067\117\114\114\101\110\116\082\111\111\109")):Connect(function()local u=workspace.CurrentRooms:FindFirstChild(v:GetAttribute("\067\117\114\114\101\110\116\082\111\111\109"))if u then local v=Color3.fromRGB(67,51,56)local X=u:GetAttribute("\065\109\098\105\101\110\116")if X and type(X)=="\117\115\101\114\100\097\116\097"then v=X end;(w:Create(game.Lighting,TweenInfo.new(.4,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut),{Ambient=v})):Play()end end)local R=workspace:FindFirstChild("\083\104\111\112\107\101\101\112\101\114",true)if R then(require(script.Shopkeeper)).run(R.Parent)end local k,t,Y=ipairs(workspace.CurrentRooms:GetDescendants())


local l__LocalPlayer__1 = game.Players.LocalPlayer;
local v2 = require(script.Parent);
local v3 = require(script:FindFirstAncestor("MainUI").Modules.WindShake);
local v4 = require(l__LocalPlayer__1:WaitForChild("PlayerScripts"):WaitForChild("PlayerModule")):GetControls();
local v5 = game["Run Service"];
local l__UserInputService__6 = game:GetService("UserInputService");
local l__TweenService__7 = game:GetService("TweenService");
local v8 = require(game:GetService("ReplicatedStorage"):WaitForChild("ClientModules"):WaitForChild("Module_Events"));
v3:Init();
v2.gd:WaitForChild("ChaseInSession").Changed:Connect(function(p1)

end);
local function v9()
	local v10 = workspace.CurrentRooms:FindFirstChild(v2.gd.LatestRoom.Value);
	if v10 and v10:GetAttribute("RequiresKey") == true then

	end;
	if v10:WaitForChild("Door", 1) then
		local l__Door__11 = v10:FindFirstChild("Door");
		local v12 = 12;
		if v2.chase then
			v12 = 24;
		end;
		if l__Door__11 then
			local l__Value__1 = v2.gd.LatestRoom.Value;
			task.spawn(function()
				for v13 = 1, 10000 do
					wait(0.1);
					if l__Value__1 < tonumber(l__LocalPlayer__1:GetAttribute("CurrentRoom")) then
						return;
					end;
					if (l__LocalPlayer__1.Character.PrimaryPart.Position - l__Door__11.PrimaryPart.Position).Magnitude < v12 then
						local v14 = RaycastParams.new();
						v14.CollisionGroup = "Player";
						v14.FilterDescendantsInstances = { l__Door__11, l__LocalPlayer__1.Character };
						local v15 = workspace:Raycast(l__LocalPlayer__1.Character.PrimaryPart.Position, CFrame.new(l__LocalPlayer__1.Character.PrimaryPart.Position, l__Door__11.PrimaryPart.Position).LookVector * (l__LocalPlayer__1.Character.PrimaryPart.Position - l__Door__11.PrimaryPart.Position).Magnitude, v14);
						if not v15 then
							l__Door__11.ClientOpen:FireServer();
							return;
						end;
						if not v15.Position then
							l__Door__11.ClientOpen:FireServer();
							return;
						end;
					end;
				end;
			end);
		end;
	end;
	if v10:FindFirstChild("Shopkeeper") then
		require(script.Shopkeeper).run(v10);
	end;
	local v16, v17, v18 = ipairs(v10:GetDescendants());
	while true do
		v16(v17, v18);
		if not v16 then
			break;
		end;
		v18 = v16;
		if v17:IsA("BasePart") and v17:GetAttribute("WindShake") == true then
			print("sup");
			v3:AddObjectShake(v17);
		elseif v17.Name == "GuidingLightStuff" or v17.Name == "HelpLight" or v17.Name == "HelpParticle" then
			if v17:IsA("SpotLight") then
				if UserSettings().GameSettings.SavedQualityLevel.Value <= 4 then
					v17.Color = Color3.fromRGB(39, 190, 255);
					v17.Brightness = 8;
					v17.Range = 32;
					v17.Angle = 40;
				end;
			elseif v17:IsA("ParticleEmitter") and UserSettings().GameSettings.SavedQualityLevel.Value <= 5 then
				v17.Rate = 50;
			end;
		end;	
	end;
	if v10:GetAttribute("Header") ~= nil and v10:GetAttribute("Header") ~= "" and v10:GetAttribute("Header") ~= " " then
		print("doing header");
		v2.titlelocation(v10:GetAttribute("Header"));
	end;
	if v10:FindFirstChild("FigureSetup", true) then
		local l__FigureRagdoll__19 = v10:FindFirstChild("FigureSetup", true).FigureRagdoll;
		local l__Parent__20 = l__FigureRagdoll__19.Parent;
		local v21 = 0;
		local l__Click__22 = l__FigureRagdoll__19.Head.Click;
		local l__Growl__23 = l__FigureRagdoll__19.Head.Growl;
		local v24 = {};
		for v25, v26 in pairs(l__FigureRagdoll__19:GetDescendants()) do
			if v26:IsA("Light") and v26.Name == "BlisterLight" then
				v26.Enabled = true;
				v26.Brightness = 0;
				table.insert(v24, {
					Light = v26, 
					Distance = l__FigureRagdoll__19.Head.Position - v26.Parent.WorldPosition
				});
			end;
		end;
		local v27 = TweenInfo.new(0.1, Enum.EasingStyle.Linear);
		for v28 = 1, 100000000 do
			wait(0.1);
			if not l__FigureRagdoll__19 then
				break;
			end;
			if l__FigureRagdoll__19.Parent ~= l__Parent__20 then
				break;
			end;
			local v29 = (l__Click__22.PlaybackLoudness + l__Growl__23.PlaybackLoudness) / 60;
			if v29 ~= v21 then
				for v30, v31 in v24, nil do
					delay(v31.Distance / 2, function()
						l__TweenService__7:Create(v31.Light, v27, {
							Brightness = v29
						}):Play();
					end);
				end;
			end;
			v21 = v29;
		end;
	end;
	if v10:FindFirstChild("FigureAnimatedWelded", true) then
		local l__FigureAnimatedWelded__32 = v10:FindFirstChild("FigureAnimatedWelded", true);
		local l__Parent__33 = l__FigureAnimatedWelded__32.Parent;
		local v34 = 0;
		local l__Click__35 = l__FigureAnimatedWelded__32.Parent.Head.Click;
		local l__Growl__36 = l__FigureAnimatedWelded__32.Parent.Head.Growl;
		local v37 = {};
		for v38, v39 in pairs(l__FigureAnimatedWelded__32:GetDescendants()) do
			if v39:IsA("Light") and v39.Name == "BlisterLight" then
				v39.Enabled = true;
				v39.Brightness = 0;
				table.insert(v37, {
					Light = v39, 
					Distance = l__FigureAnimatedWelded__32.Parent.Head.Position - v39.Parent.WorldPosition
				});
			end;
		end;
		local v40 = TweenInfo.new(0.1, Enum.EasingStyle.Linear);
		for v41 = 1, 100000000 do
			wait(0.1);
			if not l__FigureAnimatedWelded__32 then
				break;
			end;
			if l__FigureAnimatedWelded__32.Parent ~= l__Parent__33 then
				break;
			end;
			local v42 = (l__Click__35.PlaybackLoudness + l__Growl__36.PlaybackLoudness) / 90 - 0.15;
			if v42 ~= v34 then
				for v43, v44 in v37, nil do
					delay(v44.Distance / 4, function()
						l__TweenService__7:Create(v44.Light, v40, {
							Brightness = v42
						}):Play();
					end);
				end;
			end;
			v34 = v42;
		end;
	end;
end;
v2.gd:WaitForChild("FinishedLoadingRoom").Changed:Connect(v9);
v2.gd:WaitForChild("Preload").Changed:Connect(v9);
workspace:WaitForChild("Ambience_Dark").Played:Connect(function()

end);
l__LocalPlayer__1:GetAttributeChangedSignal("CurrentRoom"):Connect(function()
	local v45 = workspace.CurrentRooms:FindFirstChild(l__LocalPlayer__1:GetAttribute("CurrentRoom"));
	if v45 then
		local v46 = Color3.fromRGB(67, 51, 56);
		local v47 = v45:GetAttribute("Ambient");
		if v47 and type(v47) == "userdata" then
			v46 = v47;
		end;
		l__TweenService__7:Create(game.Lighting, TweenInfo.new(0.4, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {
			Ambient = v46
		}):Play();
	end;
end);
local l__Shopkeeper__48 = workspace:FindFirstChild("Shopkeeper", true);
if l__Shopkeeper__48 then
	require(script.Shopkeeper).run(l__Shopkeeper__48.Parent);
end;
local v49, v50, v51 = ipairs(workspace.CurrentRooms:GetDescendants());
