1. Have easily accessible alarm buttons in every classroom. If they are pushed all hell breaks loose inside and outside the school. Sirens, lights, whatever. Plus they are connected to police.
2. Since some with murderous fantasies have moments of lucidy and might seek help if they could do so without repercussion, that type of help should be available. By phone or in person. Similar to the way young mothers can anonomously abandon their babies to authorities with no questions asked. That’s the general idea . The details would have to be worked out.