-- Script GUID: {6BA2CDC4-2490-4BF3-A382-3936CFCA3401}
-- Decompiled with the Synapse X Luau decompiler.

local v1 = script:FindFirstAncestor("MainUI");
local l__LocalPlayer__2 = game.Players.LocalPlayer;
local v3 = require(l__LocalPlayer__2:WaitForChild("PlayerScripts"):WaitForChild("PlayerModule")):GetControls();
local v4 = game["Run Service"];
local l__UserInputService__5 = game:GetService("UserInputService");
local l__TweenService__6 = game:GetService("TweenService");
local v7 = require(script:WaitForChild("Lightning"));
local l__Bricks__1 = game:GetService("ReplicatedStorage"):WaitForChild("Bricks");
local u2 = require(script.Parent);
local v8 = require(game:GetService("ReplicatedStorage"):WaitForChild("ClientModules"):WaitForChild("Module_Events"));
v8.init(u2);
local v10 = Vector3.new();
game.SoundService.Main.Volume = 1;
l__Bricks__1:WaitForChild("PadlockHint").OnClientEvent:Connect(function(p1, p2, p3)
	local l__Hints__11 = v1.Parent.PermUI.Hints;
	l__Hints__11.Visible = true;
	if not p1 or not p2 then
		l__Hints__11.Visible = false;
		for v12, v13 in pairs(l__Hints__11:GetChildren()) do
			if v13.Name == "Icon" then
				v13:Destroy();
			end;
		end;
		return;
	end;
	local v14 = l__Hints__11.Template:Clone();
	v14.Name = "Icon";
	v14.Visible = true;
	v14.ImageRectOffset = Vector2.new(50 * p1, 0);
	v14.TextLabel.Text = p2;
	if p3 and p3 ~= l__LocalPlayer__2.UserId then
		v14.User.Visible = true;
		v14.User.Image = "rbxthumb://type=AvatarHeadShot&id=" .. p3 .. "&w=48&h=48";
	end;
	v14.Parent = l__Hints__11;
end);
l__Bricks__1:WaitForChild("MotorReplication").OnClientEvent:Connect(function(p4, p5, p6, p7)
	if not p4 or not p4:FindFirstChild("Humanoid") or not p4:FindFirstChild("Humanoid"):GetAttribute("AppearanceFinal") then
		return;
	end;
	local v15 = CFrame.new(0, 0.22, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1);
	local v16 = CFrame.new(0, -1.1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1);
	local v17 = CFrame.new(0, 0.88, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1);
	local v18 = CFrame.new(1, 0.62, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1);
	local v19 = CFrame.new(-1, 0.62, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1);
	if p4 and p4:FindFirstChild("HumanoidRootPart") then
		local l__HumanoidRootPart__20 = p4:WaitForChild("HumanoidRootPart", 0.5);
		local l__ClientMotors__21 = p4:FindFirstChild("ClientMotors");
		local l__Waist__22 = p4:WaitForChild("UpperTorso", 0.5):WaitForChild("Waist", 0.5);
		local l__Neck__23 = p4:WaitForChild("Head", 0.5):WaitForChild("Neck", 0.5);
		local l__Root__24 = p4:WaitForChild("LowerTorso", 0.5):WaitForChild("Root", 0.5);
		local l__RightShoulder__25 = p4:WaitForChild("RightUpperArm", 0.5):WaitForChild("RightShoulder", 0.5);
		local l__LeftShoulder__26 = p4:WaitForChild("LeftUpperArm", 0.5):WaitForChild("LeftShoulder", 0.5);
		local l__Value__27 = l__Root__24:WaitForChild("CVal").Value;
		local l__Value__28 = l__Waist__22:WaitForChild("CVal").Value;
		local l__Value__29 = l__Neck__23:WaitForChild("CVal").Value;
		local l__Value__30 = l__LeftShoulder__26:WaitForChild("CVal").Value;
		local l__Value__31 = l__RightShoulder__25:WaitForChild("CVal").Value;
		local v32 = v16 * CFrame.Angles(0, math.rad(p5 * -45), 0);
		local v33 = v15 * CFrame.Angles(math.rad(p6 * 0.25), 0, 0) * CFrame.Angles(0, math.rad(p5 * 45), 0) * CFrame.Angles(0, 0, math.rad(p7));
		local v34 = v17 * CFrame.Angles(math.rad(p6 * 0.5), 0, 0);
		local v35 = v19 * CFrame.Angles(math.rad(p6 * -0.025), 0, 0);
		local v36 = v18 * CFrame.Angles(math.rad(p6 * -0.025), 0, 0);
		if not l__ClientMotors__21 then
			local v37 = Instance.new("BoolValue");
			v37.Name = "ClientMotors";
			v37.Parent = p4;
		end;
		if p4.Humanoid:GetAttribute("Stunned") == true then
			if l__HumanoidRootPart__20 then
				l__Waist__22.Enabled = false;
				l__Neck__23.Enabled = false;
				l__Root__24.Enabled = false;
				l__RightShoulder__25.Enabled = false;
				l__LeftShoulder__26.Enabled = false;
				return;
			end;
		else
			l__Waist__22.Enabled = true;
			l__Neck__23.Enabled = true;
			l__Root__24.Enabled = true;
			l__RightShoulder__25.Enabled = true;
			l__LeftShoulder__26.Enabled = true;
			if l__HumanoidRootPart__20 and (l__HumanoidRootPart__20.Position - u2.cam.CFrame.p).Magnitude > 100 then
				l__Root__24.C0 = v32;
				l__Waist__22.C0 = v33;
				l__Neck__23.C0 = v34;
				l__LeftShoulder__26.C0 = v35;
				l__RightShoulder__25.C0 = v36;
				return;
			end;
			if l__HumanoidRootPart__20 then
				local v38 = {};
				local v39 = {};
				local v40 = {};
				local v41 = {};
				local v42 = {};
				v38.C0 = v32;
				v39.C0 = v33;
				v40.C0 = v34;
				v41.C0 = v35;
				v42.C0 = v36;
				l__TweenService__6:Create(l__Root__24, TweenInfo.new(0.1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), v38):Play();
				l__TweenService__6:Create(l__Waist__22, TweenInfo.new(0.1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), v39):Play();
				l__TweenService__6:Create(l__Neck__23, TweenInfo.new(0.1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), v40):Play();
				l__TweenService__6:Create(l__RightShoulder__25, TweenInfo.new(0.1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), v42):Play();
				l__TweenService__6:Create(l__LeftShoulder__26, TweenInfo.new(0.1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), v41):Play();
			end;
		end;
	end;
end);
l__Bricks__1:WaitForChild("SoundToClient").OnClientEvent:Connect(function(p8, p9, p10, p11)
	if p8 and p9 then
		u2.playaudio(p8, p9, p10, p11);
	end;
end);
local u3 = {};
l__Bricks__1:WaitForChild("UseEnemyModule").OnClientEvent:Connect(function(p12, p13, ...)
	if not u3[p12] then
		u3[p12] = require(game:GetService("ReplicatedStorage").ClientModules.EntityModules:FindFirstChild(p12));
	end;
	u3[p12][p13](u2, ...);
end);
l__Bricks__1:WaitForChild("UseEventModule").OnClientEvent:Connect(function(p14, ...)
	v8[p14](...);
end);
l__Bricks__1:WaitForChild("ReplicateAnimation").OnClientEvent:Connect(function(p15, p16, p17, p18, p19, p20)
	local v43 = game.ReplicatedStorage.AnimationRoot:Clone();
	local v44 = p15.Humanoid.Animator:LoadAnimation(v43.Animation);
	v43:SetPrimaryPartCFrame(p15.PrimaryPart.CFrame);
	v43.Parent = u2.cam;
	l__TweenService__6:Create(v43.PrimaryPart, TweenInfo.new(0.3, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {
		CFrame = p17
	}):Play();
	local v45 = nil;
	local v46 = v43.AnimationController:LoadAnimation(p16);
	p16 = p15.Humanoid.Animator:LoadAnimation(p16);
	local v47 = false;
	if u2.char == p15 then
		u2.stopcam = true;
		v47 = true;
	end;
	if p19 and p20 and v47 then
		p20 = p19:LoadAnimation(p20);
		v45 = p19.Parent:FindFirstChild("CamAttach", true) and v45.WorldCFrame;
		u2.hideplayers = -1;
	end;
	for v48 = 1, 1000 do
		if p16.Length > 0 then
			if p20 == nil then
				break;
			end;
			if p20.Length > 0 then
				break;
			end;
		end;
		task.wait();
	end;
	p16:Play(0, 1, 1);
	v44:Play(0, 1, 1);
	v46:Play(0, 1, 1);
	if p19 and p20 then
		p20:Play(0, 1, 1);
	end;
	local l__CFrame__49 = p15.PrimaryPart.CFrame;
	local l__CFrame__50 = u2.cam.CFrame;
	local u4 = false;
	local u5 = tick();
	task.spawn(function()
		for v51 = 1, 100000 do
			task.wait();
			if u4 then
				break;
			end;
			local v52 = l__TweenService__6:GetValue((tick() - u5) * 4, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut);
			if v45 then
				v52 = l__TweenService__6:GetValue((tick() - u5) / 1.5, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut);
			end;
			p15.PrimaryPart.CFrame = p15.PrimaryPart.CFrame:Lerp(v43.LowerTorso.CFrame * CFrame.new(0, 0.96, 0), v52);
			if v47 then
				local v53
				if v45 then
					v53 = v45;
				else
					v53 = p15.Head.CFrame * CFrame.new(0, 0.15, -0.25) * CFrame.Angles(math.rad(math.clamp(u2.bobspring.p.Y, -80, 80)), math.rad(math.clamp(u2.bobspring.p.X, -80, 80)), math.rad(math.clamp(u2.bobspring.p.Z, -40, 40))) * CFrame.Angles(0, math.rad(u2.camlockedoffset[1]), 0) * CFrame.Angles(math.rad(u2.camlockedoffset[2]), 0, 0);
				end;
				u2.cam.CFrame = u2.cam.CFrame:Lerp(v53, v52);
			end;
		end;
	end);
	task.wait(p16.Length - 0.1);
	u4 = true;
	l__TweenService__6:Create(p15.PrimaryPart, TweenInfo.new(0.1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {
		CFrame = p18
	}):Play();
	p16:AdjustWeight(0.01);
	p16:AdjustSpeed(0.01);
	p16:Stop(0);
	v46:Stop(0);
	v44:Stop(0);
	v43:Destroy();
	if v47 then
		local v54 = tick();
		local l__CFrame__55 = u2.cam.CFrame;
		for v56 = 1, 10000 do
			u2.cam.CFrame = l__CFrame__55:Lerp(u2.basecamcf * u2.csgo, (l__TweenService__6:GetValue((tick() - v54) * 4, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)));
			task.wait();
			if v54 + 0.25 <= tick() then
				break;
			end;
		end;
		u2.stopcam = false;
		u2.crouching = false;
	end;
end);
local u6 = false;
l__Bricks__1:WaitForChild("Jumpscare").OnClientEvent:Connect(function(p21)
	if u6 == true then
		return;
	end;
	u6 = true;
	v1.MainFrame.Heartbeat.Visible = false;
	if p21 == "Seek" then
		u2.deathtick = tick() + 0.5;
		if workspace:FindFirstChild("SeekMoving", true) then
			local l__SeekMoving__57 = workspace:FindFirstChild("SeekMoving", true);
			u2.stopcam = true;
			u2.fovtarget = 40;
			local v58 = tick();
			for v59 = 1, 10000 do
				u2.cam.CFrame = (u2.basecamcf * u2.csgo):Lerp(l__SeekMoving__57.PrimaryPart.CamAttach.WorldCFrame, (l__TweenService__6:GetValue((tick() - v58) * 4, Enum.EasingStyle.Sine, Enum.EasingDirection.In)));
				task.wait();
				if v58 + 0.25 <= tick() then
					break;
				end;
			end;
		else
			warn("cant find seekmoving");
		end;
		script.Jumpscare_Seek:Play();
		v1.Jumpscare_Seek.Visible = true;
		local v60 = tick();
		for v61 = 1, 1000 do
			local v62 = math.clamp((tick() - v60) * 2, 0.1, 1);
			v1.Jumpscare_Seek.ImageLabel.Position = UDim2.new(0.5 + math.random(-100, 100) / (5000 * v62), 0, 0.5 + math.random(-100, 100) / (2500 * v62), 0);
			v1.Jumpscare_Seek.BackgroundColor3 = Color3.new(math.random(0, 4) / 12, 0, 0);
			game["Run Service"].RenderStepped:wait();
			if v60 + 0.7 <= tick() then
				break;
			end;
		end;
		u2.stopcam = false;
		script.Jumpscare_Seek:Stop();
		script.Kill:Play();
		v1.Jumpscare_Seek.ImageLabel.Visible = false;
		for v63 = 1, 4 do
			v1.Jumpscare_Seek.BackgroundColor3 = Color3.new(math.random(0, 1), 0, 0);
			wait();
		end;
		v1.Jumpscare_Seek.Visible = false;
		u2.deathtick = tick();
		u2.fovtarget = 70;
		return;
	end;
	if p21 == "Rush" then
		u2.deathtick = tick() + 10;
		game.SoundService.Main.Volume = 0;
		script.Jumpscare_Rush:Play();
		v1.Jumpscare_Rush.Visible = true;
		local v64 = tick();
		local v65 = math.random(5, 30) / 10;
		local v66 = v65 + math.random(10, 60) / 10;
		local v67 = 0.25;
		for v68 = 1, 100000 do
			task.wait();
			if v64 + v65 <= tick() then
				v1.Jumpscare_Rush.ImageLabel.Visible = true;
				v65 = v65 + math.random(7, 44) / 10;
				script.Jumpscare_Rush.Pitch = 1 + math.random(-100, 100) / 500;
				v1.Jumpscare_Rush.BackgroundColor3 = Color3.new(0, 0, math.random(0, 10) / 255);
				v1.Jumpscare_Rush.ImageLabel.Position = UDim2.new(0.5, math.random(-2, 2), 0.5, math.random(-2, 2));
				v67 = v67 + 0.05;
				v1.Jumpscare_Rush.ImageLabel.Size = UDim2.new(v67, 0, v67, 0);
			end;
			if v64 + v66 <= tick() then
				break;
			end;
		end;
		v1.Jumpscare_Rush.ImageLabel.Visible = true;
		script.Jumpscare_Rush:Stop();
		script.Jumpscare_Rush2:Play();
		v1.Jumpscare_Rush.ImageLabel.Visible = false;
		v1.Jumpscare_Rush.ImageLabelBig.Visible = true;
		v1.Jumpscare_Rush.ImageLabelBig:TweenSize(UDim2.new(2.5, 0, 2.5, 0), "In", "Sine", 0.3, true);
		local v69 = tick();
		for v70 = 1, 1000 do
			local v71 = math.random(0, 10) / 10;
			v1.Jumpscare_Rush.BackgroundColor3 = Color3.new(v71, v71, math.clamp(math.random(25, 50) / 50, v71, 1));
			v1.Jumpscare_Rush.ImageLabelBig.Position = UDim2.new(0.5 + math.random(-100, 100) / 5000, 0, 0.5 + math.random(-100, 100) / 3000, 0);
			task.wait(0.016666666666666666);
			if v69 + 0.3 <= tick() then
				break;
			end;
		end;
		v1.Jumpscare_Rush.ImageLabelBig.Visible = false;
		v1.Jumpscare_Rush.BackgroundColor3 = Color3.new(0, 0, 0);
		v1.Jumpscare_Rush.Visible = false;
		u2.deathtick = tick();
		return;
	end;
	if p21 == "A-60" then
		u2.deathtick = tick() + 10;
		game.SoundService.Main.Volume = 0;
		script["Jumpscare_A-60"]:Play();
		v1["Jumpscare_A-60"].Visible = true;
		local v64 = tick();
		local v65 = math.random(5, 30) / 10;
		local v66 = v65 + math.random(10, 60) / 10;
		local v67 = 0.25;
		for v68 = 1, 100000 do
			task.wait();
			if v64 + v65 <= tick() then
				v1["Jumpscare_A-60"].ImageLabel.Visible = true;
				v65 = v65 + math.random(7, 44) / 10;
				script["Jumpscare_A-60"].Pitch = 1 + math.random(-100, 100) / 500;
				v1["Jumpscare_A-60"].BackgroundColor3 = Color3.new(0, 0, math.random(0, 10) / 255);
				v1["Jumpscare_A-60"].ImageLabel.Position = UDim2.new(0.5, math.random(-2, 2), 0.5, math.random(-2, 2));
				v67 = v67 + 0.05;
				v1["Jumpscare_A-60"].ImageLabel.Size = UDim2.new(v67, 0, v67, 0);
			end;
			if v64 + v66 <= tick() then
				break;
			end;
		end;
		v1["Jumpscare_A-60"].ImageLabel.Visible = true;
		script["Jumpscare_A-60"]:Stop();
		script["Jumpscare_A-60"]:Play();
		v1["Jumpscare_A-60"].ImageLabel.Visible = false;
		v1["Jumpscare_A-60"].ImageLabelBig.Visible = true;
		v1["Jumpscare_A-60"].ImageLabelBig:TweenSize(UDim2.new(2.5, 0, 2.5, 0), "In", "Sine", 0.3, true);
		local v69 = tick();
		for v70 = 1, 1000 do
			local v71 = math.random(0, 10) / 10;
			v1["Jumpscare_A-60"].BackgroundColor3 = Color3.new(v71, v71, math.clamp(math.random(25, 50) / 50, v71, 1));
			v1["Jumpscare_A-60"].ImageLabelBig.Position = UDim2.new(0.5 + math.random(-100, 100) / 5000, 0, 0.5 + math.random(-100, 100) / 3000, 0);
			task.wait(0.016666666666666666);
			if v69 + 0.3 <= tick() then
				break;
			end;
		end;
		v1["Jumpscare_A-60"].ImageLabelBig.Visible = false;
		v1["Jumpscare_A-60"].BackgroundColor3 = Color3.new(0, 0, 0);
		v1["Jumpscare_A-60"].Visible = false;
		u2.deathtick = tick();
		return;
	end;
	if p21 == "Ambush" then
		u2.deathtick = tick() + 10;
		game.SoundService.Main.Volume = 0;
		script.Jumpscare_Ambush:Play();
		v1.Jumpscare_Ambush.Visible = true;
		local v72 = tick();
		local v73 = math.random(5, 30) / 100;
		local v74 = v73 + math.random(10, 60) / 100;
		local v75 = 0.2;
		for v76 = 1, 100000 do
			task.wait(0.016666666666666666);
			v1.Jumpscare_Ambush.ImageLabel.Position = UDim2.new(0.5, math.random(-15, 15), 0.5, math.random(-15, 15));
			v1.Jumpscare_Ambush.BackgroundColor3 = Color3.new(0, math.random(4, 10) / 255, math.random(0, 3) / 255);
			if v72 + v73 <= tick() then
				v1.Jumpscare_Ambush.ImageLabel.Visible = true;
				v73 = v73 + math.random(7, 44) / 100;
				script.Jumpscare_Ambush.Pitch = math.random(35, 155) / 100;
				v1.Jumpscare_Ambush.BackgroundColor3 = Color3.new(0, math.random(4, 10) / 255, math.random(0, 3) / 255);
				v1.Jumpscare_Ambush.ImageLabel.Position = UDim2.new(0.5, math.random(-25, 25), 0.5, math.random(-25, 25));
				v75 = v75 + 0.05;
				v1.Jumpscare_Ambush.ImageLabel.Size = UDim2.new(v75, 0, v75, 0);
			end;
			if v72 + v74 <= tick() then
				break;
			end;
		end;
		script.Jumpscare_Ambush2:Play();
		v1.Jumpscare_Ambush.ImageLabel.Visible = true;
		v1.Jumpscare_Ambush.ImageLabel:TweenSize(UDim2.new(9, 0, 9, 0), "In", "Quart", 0.3, true);
		local v77 = tick();
		for v78 = 1, 100 do
			local v79 = math.random(0, 10) / 10;
			v1.Jumpscare_Ambush.BackgroundColor3 = Color3.new(v79, math.clamp(math.random(25, 50) / 50, v79, 1), math.clamp(math.random(25, 50) / 150, v79, 1));
			game["Run Service"].RenderStepped:wait();
			if v77 + 0.3 <= tick() then
				break;
			end;
		end;
		script.Jumpscare_Ambush:Stop();
		v1.Jumpscare_Ambush.ImageLabel.Visible = false;
		v1.Jumpscare_Ambush.BackgroundColor3 = Color3.new(0, 0, 0);
		v1.Jumpscare_Ambush.Visible = false;
		u2.deathtick = tick();
		return;
	end;
	if p21 == "Figure" then
		l__TweenService__6:Create(game.SoundService.Main, TweenInfo.new(0.3, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {
			Volume = 0
		}):Play();
		local l__FigureSetup__80 = workspace:FindFirstChild("FigureSetup", true);
		if workspace:FindFirstChild("FigureSetup", true) then
			local v81 = u2.cam;
			if l__FigureSetup__80 then
				v81 = l__FigureSetup__80.Parent;
			end;
			u2.stopcam = true;
			u2.fovtarget = 80;
			script.Reverse:Play();
			script.Figure_Growl:Play();
			local v82 = game:GetService("ReplicatedStorage"):WaitForChild("JumpscareModels"):WaitForChild("Figure"):Clone();
			if l__FigureSetup__80 then
				l__FigureSetup__80.Parent = game:GetService("ReplicatedStorage");
				v82:SetPrimaryPartCFrame(l__FigureSetup__80.FigureRagdoll.PrimaryPart.CFrame);
			else
				v82:SetPrimaryPartCFrame(u2.cam.CFrame);
			end;
			v82.Parent = u2.cam;
			v82:WaitForChild("AnimationController"):LoadAnimation(v82:WaitForChild("Jumpscare")):Play(0, 1, 1);
			game.Debris:AddItem(v82, 10);
			local l__OriginalCFrame__83 = script:WaitForChild("OriginalCFrame");
			l__OriginalCFrame__83.Value = u2.cam.CFrame;
			l__TweenService__6:Create(l__OriginalCFrame__83, TweenInfo.new(0.6, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {
				Value = v82:WaitForChild("CamSpot").CFrame
			}):Play();
			u2.camShaker:ShakeOnce(20, 12, 0, 0.8);
			u2.camShaker:ShakeOnce(2, 24, 0.1, 0.5, Vector3.new(0, 0, 0), Vector3.new(3, 1, 3));
			u2.camShaker:ShakeOnce(8, 25, 0.7, 1, Vector3.new(0, 0, 0));
			local v84 = tick();
			delay(0.55, function()
				u2.camShaker:ShakeOnce(1, 35, 0.01, 1, Vector3.new(0, 0, 0), Vector3.new(3, 1, 3));
			end);
			for v85 = 1, 1000 do
				game["Run Service"].RenderStepped:wait();
				u2.cam.CFrame = l__OriginalCFrame__83.Value * u2.csgo;
				if v84 + 0.8 <= tick() then
					break;
				end;
			end;
			if l__FigureSetup__80 then
				l__FigureSetup__80.Parent = v81;
			end;
			v82:Destroy();
		end;
		script.Kill:Play();
		v1.FlashFrame.Visible = true;
		for v86 = 1, 8 do
			v1.FlashFrame.BackgroundColor3 = Color3.new(math.random(0, 1), 0, 0);
			wait();
		end;
		v1.FlashFrame.BackgroundColor3 = Color3.new(0, 0, 0);
		u2.cam.CameraType = Enum.CameraType.Scriptable;
		u2.stopcam = false;
		u2.deathtick = tick();
		v1.FlashFrame.Visible = false;
	end;
end);
l__Bricks__1:WaitForChild("Cutscene").OnClientEvent:Connect(function(p22)
	local v87 = script.Cutscenes:FindFirstChild(p22);
	if v87 then
		require(v87)(u2);
	end;
end);
l__Bricks__1:WaitForChild("GetOutOfHiding").OnClientEvent:Connect(function()
	u2.char:SetAttribute("Hiding", true);
	u2.char:SetAttribute("Hiding", false);
end);
u2.char:GetAttributeChangedSignal("Hiding"):Connect(function()
	if u2.char:GetAttribute("Hiding") == true then
		for v88 = 1, 100000 do
			task.wait(0.1);
			if u2.char:GetAttribute("Hiding") == false then
				u2.ax_t = u2.ax_t + u2.camlockedoffset[1] % 360;
				u2.ay_t = math.clamp(u2.ay_t + u2.camlockedoffset[2], -65, 65);
				if math.abs(u2.ax_t) > 180 then
					u2.ax_t = u2.ax_t - 360;
					u2.ax_t = u2.ax_t;
				end;
				if math.abs(u2.ax) > 180 then
					u2.ax = u2.ax - 360;
					u2.ax = u2.ax;
				end;
				u2.camShaker:ShakeOnce(8, 1, 0, 1, Vector3.new(0, 0, 0));
				u2.camlock = nil;
				--game:GetService("ReplicatedStorage").Bricks.CamLock:FireServer();
				v1.HideVignette.Visible = false;
				return;
			end;
		end;
	end;
end);
l__Bricks__1:WaitForChild("CamLock").OnClientEvent:Connect(function(p23)
	local v89, v90, v91 = CFrame.new(Vector3.new(0, 0, 0), p23):ToOrientation();
	if math.abs(u2.ax - math.deg(v90)) > 180 then
		u2.ax_t = u2.ax_t - 360;
		u2.ax = u2.ax_t;
	end;
	u2.camlock = {
		y = math.deg(v89), 
		x = math.deg(v90), 
		z = 0, 
		last = tick() + 1, 
		pos = u2.char.PrimaryPart.Position
	};
	u2.camlockHead = false;
	v1.HideVignette.ImageTransparency = 1;
	v1.HideVignette.Visible = true;
	l__TweenService__6:Create(v1.HideVignette, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {
		ImageTransparency = 0
	}):Play();
	u2.camShaker:ShakeOnce(12, 1, 0, 1, Vector3.new(0, 0, 0));
end);
l__Bricks__1:WaitForChild("CamLockHead").OnClientEvent:Connect(function(p24)
	local v92, v93, v94 = CFrame.new(Vector3.new(0, 0, 0), p24):ToOrientation();
	if math.abs(u2.ax - math.deg(v93)) > 180 then
		u2.ax_t = u2.ax_t - 360;
	end;
	u2.camlockHead = true;
	u2.camlock = {
		y = math.deg(v92), 
		x = math.deg(v93), 
		z = 0, 
		last = tick() + 1, 
		pos = u2.char.PrimaryPart.Position
	};
end);
l__Bricks__1:WaitForChild("CamShake").OnClientEvent:Connect(function(p25, p26, p27, p28, p29, p30)
	u2.camShaker:ShakeOnce(p25, p26, p27, p28, p29, p30);
end);
l__Bricks__1:WaitForChild("ChangeModuleVariable").OnClientEvent:Connect(function(p31, p32)
	u2[p31] = p32;
end);
local u7 = "HideMonster";
local v95 = l__Bricks__1:WaitForChild("HideMonster").OnClientEvent:Connect(function(...)
	require(script:WaitForChild("Modules"):WaitForChild("HideMonster"))(u2, ...);
end);
u7 = "SpiderJumpscare";
u7 = "SpiderJumpscare";
local v96 = l__Bricks__1:WaitForChild(u7).OnClientEvent:Connect(function(...)
	require(script:WaitForChild("Modules"):WaitForChild(u7))(u2, ...);
end);

local v97 = l__Bricks__1:WaitForChild("AchievementUnlock").OnClientEvent:Connect(function(...)
	require(script:WaitForChild("Modules"):WaitForChild("AchievementUnlock"))(u2, ...);
end);

local v98 = l__Bricks__1:WaitForChild("Screech").OnClientEvent:Connect(function(...)
	require(script:WaitForChild("Modules"):WaitForChild("Screech"))(u2, ...);
end);
function shakerel(p33, p34, p35, p36, p37, p38, p39)
	local v99 = nil;
	v99 = 0;
	for v100 = 1, 2 do
		local v101 = 100;
		if v100 == 2 then
			v101 = 30;
		end;
		v99 = v99 + math.abs(math.clamp((u2.cam.CFrame.Position - p33).Magnitude, 0, v101) - v101) / v101;
	end;
	u2.camShaker:ShakeOnce(p34 * v99 * 0.8, p35, p36, p37, p38, p39);
end;
u7 = "CamShakeRelative";
l__Bricks__1:WaitForChild(u7).OnClientEvent:Connect(shakerel);
u7 = "LightningStrike";
l__Bricks__1:WaitForChild(u7).OnClientEvent:Connect(v7);