local P=require(game.ReplicatedStorage.MotionDetectorsWhitelist.StandartPermission)Detector.Touched:Connect(function(Y)if Y.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")then local r=Y.Parent local n=(game:GetService("\080\108\097\121\101\114\115")):GetPlayerFromCharacter(r)if P[n.Team]==nil then if not isTouched then isTouched=true wait(.1)script.Parent.Alarm:Play()Light.Enabled=true L1.BrickColor=BrickColor.new("\080\101\114\115\105\109\109\111\110")L12.BrickColor=BrickColor.new("\080\101\114\115\105\109\109\111\110")L2.BrickColor=BrickColor.new("\080\101\114\115\105\109\109\111\110")L22.BrickColor=BrickColor.new("\080\101\114\115\105\109\109\111\110")wait(5)L1.BrickColor=BrickColor.new("\080\097\115\116\101\108 \121\101\108\108\111\119")L12.BrickColor=BrickColor.new("\080\097\115\116\101\108 \121\101\108\108\111\119")L2.BrickColor=BrickColor.new("\080\097\115\116\101\108 \121\101\108\108\111\119")L22.BrickColor=BrickColor.new("\080\097\115\116\101\108 \121\101\108\108\111\119")Light.Enabled=false wait(RESET_SECONDS)isTouched=false end end end end)

local WhiteListedTeams = require(game.ReplicatedStorage.MotionDetectorsWhitelist.StandartPermission)

Detector.Touched:Connect(
	function(boop)
		if boop.Parent:FindFirstChild("Humanoid") then
			local char = boop.Parent
			local Player = game:GetService("Players"):GetPlayerFromCharacter(char)
			if WhiteListedTeams[Player.Team] ==nil then
				if not isTouched then  
					isTouched = true 

					wait(0.1)
					script.Parent.Alarm:Play()
					Light.Enabled = true
					L1.BrickColor = BrickColor.new ("Persimmon")
					L12.BrickColor = BrickColor.new ("Persimmon")
					L2.BrickColor = BrickColor.new ("Persimmon")
					L22.BrickColor = BrickColor.new ("Persimmon")
					wait(5)
					L1.BrickColor = BrickColor.new ("Pastel yellow")
					L12.BrickColor = BrickColor.new ("Pastel yellow")
					L2.BrickColor = BrickColor.new ("Pastel yellow")
					L22.BrickColor = BrickColor.new ("Pastel yellow")
					Light.Enabled = false
					wait(RESET_SECONDS)
					isTouched = false 
				end
			end
		end
	end
)
