local i={}local k=game:GetService("\084\119\101\101\110\083\101\114\118\105\099\101")i.module_events=require(script.Parent.Parent.Module_Events)local b=(game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")).Misc.Eyes:GetChildren()function i.tease(k,O,a,U,m)local I=U spawn(function()if not I then I=math.random(1,500)end I=Random.new(I)local k={}local U={}for i,b in pairs(O:GetDescendants())do if b:IsA("\066\097\115\101\080\097\114\116")then if b.Name=="\087\097\108\108"or b.Name=="\087\097\108\108\095\083\116\114\105\112"then table.insert(k,b)end if b.Name=="\067\097\114\112\101\116"then table.insert(U,b)end end end if#U<=0 then for i,k in pairs(O:GetDescendants())do if k:IsA("\066\097\115\101\080\097\114\116")and k.Name=="\070\108\111\111\114"then table.insert(U,k)end end end local m=RaycastParams.new()m.CollisionGroup="\067\104\101\099\107\087\097\108\108\083\116\117\102\102"local C=RaycastParams.new()C.CollisionGroup="\067\104\101\099\107\087\097\108\108\083\116\117\102\102"i.module_events.flickerLights(O,math.clamp(a/5,.4,1))local d=a for i=1,100,1 do local k=workspace:Raycast(U[I:NextInteger(1,#U)].Position+Vector3.new(I:NextInteger(-5,5),I:NextInteger(5,11),I:NextInteger(-5,5)),(CFrame.Angles(0,math.rad(I:NextInteger(0,360)),0)).LookVector*150,m)local a=Vector3.new(4,2,0)if k then local i=k.Position local U=k.Instance local m=k.Normal if i and(U and(U.Anchored==true and(U.Name=="\087\097\108\108"or U.Name=="\087\097\108\108\065\108\116")))then for k=1,4,1 do if k<=2 then local i=1 else v19=-1 end if k==2 or k==4 then local i=1 else v20=-1 end local b=workspace:Raycast((CFrame.new(i+m,i)*CFrame.new((a.X/2)*v19,(a.Y/2)*v20,0)).p,m*-1.1,C)if not b then local i=false break end local O=b.Instance local U=b.Normal if not b.Position then v22=false break end if not O then v22=false break end if O.Anchored~=true then v22=false break end if O.Name~="\087\097\108\108"and O.Name~="\087\097\108\108\065\108\116"then v22=false break end end else v22=false end if v22==true then local k=b[I:NextInteger(1,#b)]:Clone()k:SetPrimaryPartCFrame(CFrame.new(i,i+m)*CFrame.Angles(0,0,math.rad(I:NextInteger(-20,20))))k.Parent=O k.PrimaryPart.PlaySound:Play()k.PrimaryPart.Splat.Pitch=I:NextInteger(80,120)/100 k.PrimaryPart.Splat:Play()spawn(function()pcall(function()task.delay(3,function()for i,k in pairs(k:GetDescendants())do if k:IsA("\066\097\115\101\080\097\114\116")then k.CanCollide=false k.CanQuery=false k.CanTouch=false k.CollisionGroupId=1 end end end)end)if(UserSettings()).GameSettings.SavedQualityLevel.Value>=5 then pcall(function()for i=1,math.random(1,3),1 do wait(math.random(5,50)/10)k.Eye.Transparency=1 k.Eye.Decal.Transparency=1 k.PrimaryPart.ParticleEmitter:Emit(2)k.PrimaryPart.Blink.Pitch=I:NextInteger(80,120)/120 k.PrimaryPart.Blink:Play()wait(.1)k.Eye.Transparency=0 k.Eye.Decal.Transparency=0 end end)end end)d=d-1 end end task.wait(.016666666666667)if d<=0 then break end end end)if m==true then spawn(function()for i,k in pairs(O:GetDescendants())do if(UserSettings()).GameSettings.SavedQualityLevel.Value>=5 and(k:IsA("\066\097\115\101\080\097\114\116")and(k.Name=="\087\097\108\108"or k.Name=="\087\097\108\108\095\083\116\114\105\112"or k.Name=="\087\097\108\108\065\108\116"or k.Name=="\070\108\111\111\114"or k.Name=="\067\097\114\112\101\116"or k.Name=="\067\101\105\108\105\110\103"))then local i={Enum.NormalId.Front,Enum.NormalId.Back;Enum.NormalId.Right;Enum.NormalId.Left,Enum.NormalId.Top,Enum.NormalId.Bottom}if k.Name=="\087\097\108\108"or k.Name=="\087\097\108\108\095\083\116\114\105\112"or k.Name=="\087\097\108\108\065\108\116"then i={Enum.NormalId.Front,Enum.NormalId.Back;Enum.NormalId.Right;Enum.NormalId.Left}end if k.Name=="\070\108\111\111\114"or k.Name=="\067\097\114\112\101\116"then i={Enum.NormalId.Top}end if k.Name=="\067\101\105\108\105\110\103"then i={Enum.NormalId.Bottom}end for i,b in pairs(i)do local O=(game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")).Misc.EyesTexture:Clone()O.Face=b O.Parent=k task.spawn(function()local i=tick()for k=1,100,1 do O.OffsetStudsU=math.random(-50,50)O.OffsetStudsV=math.random(-50,50)task.wait(math.random(20,100)/100)if i+12<=tick()then break end end end)game.Debris:AddItem(O,12)end end end end)end end return i


local v1 = {};
local l__TweenService__2 = game:GetService("TweenService");
v1.module_events = require(script.Parent.Parent.Module_Events);
local u1 = game:GetService("ReplicatedStorage").Misc.Eyes:GetChildren();
function v1.tease(p1, p2, p3, p4, p5)
	local u2 = p4;
	spawn(function()
		if not u2 then
			u2 = math.random(1, 500);
		end;
		u2 = Random.new(u2);
		local v3 = {};
		local v4 = {};
		for v5, v6 in pairs(p2:GetDescendants()) do
			if v6:IsA("BasePart") then
				if v6.Name == "Wall" or v6.Name == "Wall_Strip" then
					table.insert(v3, v6);
				end;
				if v6.Name == "Carpet" then
					table.insert(v4, v6);
				end;
			end;
		end;
		if #v4 <= 0 then
			for v7, v8 in pairs(p2:GetDescendants()) do
				if v8:IsA("BasePart") and v8.Name == "Floor" then
					table.insert(v4, v8);
				end;
			end;
		end;
		local v9 = RaycastParams.new();
		v9.CollisionGroup = "CheckWallStuff";
		local v10 = RaycastParams.new();
		v10.CollisionGroup = "CheckWallStuff";
		v1.module_events.flickerLights(p2, math.clamp(p3 / 5, 0.4, 1));
		local v11 = p3;
		for v12 = 1, 100 do
			local v13 = workspace:Raycast(v4[u2:NextInteger(1, #v4)].Position + Vector3.new(u2:NextInteger(-5, 5), u2:NextInteger(5, 11), u2:NextInteger(-5, 5)), CFrame.Angles(0, math.rad(u2:NextInteger(0, 360)), 0).LookVector * 150, v9);
			local v14 = Vector3.new(4, 2, 0);
			if v13 then
				local l__Position__15 = v13.Position;
				local l__Instance__16 = v13.Instance;
				local l__Normal__17 = v13.Normal;
				if l__Position__15 and l__Instance__16 and l__Instance__16.Anchored == true and (l__Instance__16.Name == "Wall" or l__Instance__16.Name == "WallAlt") then
					for v18 = 1, 4 do
						if v18 <= 2 then
							local v19 = 1;
						else
							v19 = -1;
						end;
						if v18 == 2 or v18 == 4 then
							local v20 = 1;
						else
							v20 = -1;
						end;
						local v21 = workspace:Raycast((CFrame.new(l__Position__15 + l__Normal__17, l__Position__15) * CFrame.new(v14.X / 2 * v19, v14.Y / 2 * v20, 0)).p, l__Normal__17 * -1.1, v10);
						if not v21 then
							local v22 = false;
							break;
						end;
						local l__Instance__23 = v21.Instance;
						local l__Normal__24 = v21.Normal;
						if not v21.Position then
							v22 = false;
							break;
						end;
						if not l__Instance__23 then
							v22 = false;
							break;
						end;
						if l__Instance__23.Anchored ~= true then
							v22 = false;
							break;
						end;
						if l__Instance__23.Name ~= "Wall" and l__Instance__23.Name ~= "WallAlt" then
							v22 = false;
							break;
						end;
					end;
				else
					v22 = false;
				end;
				if v22 == true then
					local v25 = u1[u2:NextInteger(1, #u1)]:Clone();
					v25:SetPrimaryPartCFrame(CFrame.new(l__Position__15, l__Position__15 + l__Normal__17) * CFrame.Angles(0, 0, math.rad(u2:NextInteger(-20, 20))));
					v25.Parent = p2;
					v25.PrimaryPart.PlaySound:Play();
					v25.PrimaryPart.Splat.Pitch = u2:NextInteger(80, 120) / 100;
					v25.PrimaryPart.Splat:Play();
					spawn(function()
						pcall(function()
							task.delay(3, function()
								for v26, v27 in pairs(v25:GetDescendants()) do
									if v27:IsA("BasePart") then
										v27.CanCollide = false;
										v27.CanQuery = false;
										v27.CanTouch = false;
										v27.CollisionGroupId = 1;
									end;
								end;
							end);
						end);
						if UserSettings().GameSettings.SavedQualityLevel.Value >= 5 then
							pcall(function()
								for v28 = 1, math.random(1, 3) do
									wait(math.random(5, 50) / 10);
									v25.Eye.Transparency = 1;
									v25.Eye.Decal.Transparency = 1;
									v25.PrimaryPart.ParticleEmitter:Emit(2);
									v25.PrimaryPart.Blink.Pitch = u2:NextInteger(80, 120) / 120;
									v25.PrimaryPart.Blink:Play();
									wait(0.1);
									v25.Eye.Transparency = 0;
									v25.Eye.Decal.Transparency = 0;
								end;
							end);
						end;
					end);
					v11 = v11 - 1;
				end;
			end;
			task.wait(0.016666666666666666);
			if v11 <= 0 then
				break;
			end;
		end;
	end);
	if p5 == true then
		spawn(function()
			for v29, v30 in pairs(p2:GetDescendants()) do
				if UserSettings().GameSettings.SavedQualityLevel.Value >= 5 and v30:IsA("BasePart") and (v30.Name == "Wall" or v30.Name == "Wall_Strip" or v30.Name == "WallAlt" or v30.Name == "Floor" or v30.Name == "Carpet" or v30.Name == "Ceiling") then
					local v31 = { Enum.NormalId.Front, Enum.NormalId.Back, Enum.NormalId.Right, Enum.NormalId.Left, Enum.NormalId.Top, Enum.NormalId.Bottom };
					if v30.Name == "Wall" or v30.Name == "Wall_Strip" or v30.Name == "WallAlt" then
						v31 = { Enum.NormalId.Front, Enum.NormalId.Back, Enum.NormalId.Right, Enum.NormalId.Left };
					end;
					if v30.Name == "Floor" or v30.Name == "Carpet" then
						v31 = { Enum.NormalId.Top };
					end;
					if v30.Name == "Ceiling" then
						v31 = { Enum.NormalId.Bottom };
					end;
					for v32, v33 in pairs(v31) do
						local v34 = game:GetService("ReplicatedStorage").Misc.EyesTexture:Clone();
						v34.Face = v33;
						v34.Parent = v30;
						task.spawn(function()
							local v35 = tick();
							for v36 = 1, 100 do
								v34.OffsetStudsU = math.random(-50, 50);
								v34.OffsetStudsV = math.random(-50, 50);
								task.wait(math.random(20, 100) / 100);
								if v35 + 12 <= tick() then
									break;
								end;
							end;
						end);
						game.Debris:AddItem(v34, 12);
					end;
				end;
			end;
		end);
	end;
end;
return v1;
