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

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
