The mass school shootings, tragic and frightening though they are, are rare and have been getting more rare. (Not so the gang shootings in Chicago.)
So politicians posture and pundits clamor, and as the dust settles I see two clusters of suggestions: restrictions on guns and having armed people in the schools. (Nothing much about dealing with gangs, though.)
I will take it as understood that the media misrepresent both the risks and the benefits, and take it as given that many people don't trust the governments with a monopoly of force (and I know of no reason why they should).
But that doesn't mean I'm in favor of arming teachers or bringing in security guards (as a rule. There are exceptions, such as when some children are special targets like the President's kids would be, or when the community is awash with violent gangs).
Suppose the school is "gun free." There will always be some small probability Pr that some student will kill some other student--but those kinds of fights are usually limited (except for gang fights, but we'll not consider those here). In addition, there is the very small probability that somebody will come in and start shooting up the place, call that Pv, and the number of deaths resulting Nv. So the number of deaths with a "gun free" school will be of the order of the number of schools times Pv*Nv plus the number of students times Pr. There are well over 100,000 schools in the US, and about 75 million students (some adult).
Pr isn't big: in 1992-1993 34 K-12 children were murdered at school (or a bus, etc), and in 2009-2010 this was 17, suggesting Pr of .2E-6. Pv is also very small: I get about 6 in 7 years from the Wikipedia article (counting "subdued" as meaning the culprit would have done more if he could), for something less that 1E-5, with an average of about 12 dead per attack. So Pv*Nv is about 1E-4, which times 100,000 schools gives about 12 deaths per year. Add that to the 17 per year, and you get about 29 dead per year (though some of that 17 is gang-related).
Suppose the school includes armed teachers or security guards (who may not be much better than armed teachers). Pv (the intruder) is likely to be smaller, though the murderer may just look for easier targets. Nv (the number killed on average) will be smaller, because the murderer will be stopped more often and sooner. Let me pull wild numbers out of the air (I know of no better ones) and guess that the number killed would be cut by a third and the number of incidents would drop by half. So we'd get of order 2 deaths per year from intruders trying to kill students.
But there's a new factor. Pr may not be so small anymore.
The problem is that now it is easier for a student, or disgruntled teacher, or other staff member, to get ahold of an inadequately secured weapon. Most of the time nothing will happen. It takes continual training to keep attentive when there are no problems; otherwise you slack off. If there are five armed guards or teachers in school, what would you guess are the odds that one of them will be careless with the weapon during a school year? Cynical sort that I am, I'd guess the probability is nearly 1. So now the question is "What are the chances that a disgruntled teacher or bullied student will be around to notice?" 0.1% maybe? OK, be optimistic and say 0.001% That's Pr=1E-5, which we multiply by the number of students (about 75 million). That gives about 750 deaths per year.
The numbers are guesses, so I could easily be off by an order of magnitude or more. My point is that the cure may be deadlier than the disease. (And are you sure you can rely on the security guards?)
Banning "assault rifles" will not change the numbers at all, of course; I doubt that it would be meant to.