So let's roll with the idea that you have your Ted Cruz solution. We don't care about El Paso Walmart's or Buffalo grocery stores or synagogues or pulse nightclubs or Las Vegas strips. We just need to secure these schools. Think of the children!
I looked it up. It looks like about 50% of shootings that occur on school campuses occur by students. So you will now impact only half of the shootings. You'll need those metal detectors and millimeter wave scanners because the students are the ones bringing the guns half the time. I can't seem to find specific stats on rampage mass shootings to see if they have a different demographic. Are they mostly columbines? Or are they mostly Adam lanza's?
You can break an AR-15 down by it's pins and put it in a backpack easily. Throw in a few 30 round magazines and you're walking around with nearly a hundred rounds, a rifle, and room to store your homework.
The uvalde shooter just locked himself in one classroom and went to work killing everybody in it. Just like any student could no matter how much you lock the other classrooms from the outside, etc. Etc. And in fact in the uvalde situation, because the classrooms are locked from the outside as a security measure arriving police officers took 40 minutes to get into the classroom. You'll need to solve that too.
And then hopefully our kids aren't getting killed while buying new backpacks at Walmart and lunchables at the grocery store.