So he got inside the school. Okay, but so what if he doesn't gain entry? I assume there will be plenty of students, teachers, parents milling around outside the school after all the classes let out.
What would stop Cruz, or any other nut, from stepping out from behind a tree, bush, whatever and opening fire. Before he'd be stopped, he could kill scores of people anyway.
Yes, take measures to prevent these nuts from gaining entry to schools. But you still won't be able to stop him or any other deranged person with a weapon from killing numerous people. They could walk into malls, other buildings, etc. and mow down people before they're stopped.
The trick is to either stop them before they go off, or have more people armed and ready to return fire if they, the nuts, start shooting at people.
But let's not kid ourselves, nuts like Cruz are going to do their damage no matter what preventive measures are taken. As has been shown motor vehicles can kill large numbers of people just as readily as guns.
Which might mean taking better measures to detect and stop these nuts when they first show signs and stopping them well before they kill.