If you're going to accept not being able to take guns away from the perpetrators, the only thing that will "work" is their targets being likewise armed, as well as trained in firearm combat in close quarters and outside, as well as psychologically trained to handle the real situation and not freeze, tremble or hesitate.
No passive gimmicks will stop an armed perpetrator, unless he doesn't know about their existence and is not prepared for their deployment, which is a foolish assumption to rely on.