function RoomManager._flashAlerts()(coroutine.wrap(function()local g=Color3.fromRGB(255,0,0)local T=Color3.fromRGB(0,0,0)while true do local X={}for g,T in pairs(RoomManager.getRooms())do if not T:isPressurized()then local g=(T:getModel()).AlertLights:GetChildren()for g,T in pairs(g)do table.insert(X,T)end end end for T,X in pairs(X)do local E=X:FindFirstChild("\076\097\109\112")local a=(E:FindFirstChild("\066\117\108\098")):FindFirstChild("\076\105\103\104\116")a.Enabled=true E.Part.Color=g end wait(1)for g,X in pairs(X)do local E=X:FindFirstChild("\076\097\109\112")local a=(E:FindFirstChild("\066\117\108\098")):FindFirstChild("\076\105\103\104\116")a.Enabled=false E.Part.Color=T end wait(1)end end))()end function RoomManager.resetRooms()for g,T in pairs(rooms:getAll())do T:reset()end end
--[[
	Loop that flashes the alert lights for rooms that are not pressurized.
]]
function RoomManager._flashAlerts()
	coroutine.wrap(function()
		local onColor = Color3.fromRGB(255, 0, 0)
		local offColor = Color3.fromRGB(0, 0, 0)
		while true do
			local allAlerts = {}

			for _, room in pairs(RoomManager.getRooms()) do
				if not room:isPressurized() then
					local alerts = room:getModel().AlertLights:GetChildren()
					for _, alert in pairs(alerts) do
						table.insert(allAlerts, alert)
					end
				end
			end

			for _, alert in pairs(allAlerts) do
				local lamp = alert:FindFirstChild("Lamp")
				local light = lamp:FindFirstChild("Bulb"):FindFirstChild("Light")

				light.Enabled = true
				lamp.Part.Color = onColor
			end

			wait(1)

			for _, alert in pairs(allAlerts) do
				local lamp = alert:FindFirstChild("Lamp")
				local light = lamp:FindFirstChild("Bulb"):FindFirstChild("Light")

				light.Enabled = false
				lamp.Part.Color = offColor
			end

			wait(1)
		end
	end)()
end

function RoomManager.resetRooms()
	for _, room in pairs(rooms:getAll()) do
		room:reset()
	end
end
