local H=require(game.ReplicatedStorage.MotionDetectorsWhitelist.StandartPermission)Detector.Touched:Connect(function(e)if e.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")then local d=e.Parent local s=(game:GetService("\080\108\097\121\101\114\115")):GetPlayerFromCharacter(d)if H[s.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)
--// If youre here to add your team go to the module and add it in there, just tryna to clean this up alittle
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)
