--// 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
)
