Even a single soldier that catches the enemy by surprise while they’re resting or asleep is going to make an absolute carnage. This is known in the military since warfare is a thing and has been used by many successful generals.
It must not get to the point of an active shooter being on the loose, and somehow in other countries it manages to be a very strange occurrence, where the guns have been smuggled by a foreign enemy power, the gunners have been indoctrinated by whatever cult got their turn today, etc.
You also managed to skirt the other part that has been mentioned. If they are ever deployed, these toys will eventually kill the wrong person, which could be a child. Given that all you are interested about is in stopping the active shooter, will you deem this death justified, and agree that there is no liability because “the code did it”?