In order for any of the above to work, one first has to address the issue of what to do with a person willing to kill large numbers of other people, and address why they are willing to kill this way. Until you do that, regulating the tools used is a pointless exercise.
Suppose instead of using an AR-15, Cruz had simply dumped a bunch of activated insect foggers (bug bombs) down the schools central AC/Heat air intake? These insecticides are generally either neurotoxins or respiratory agents. Chlorine bleach mixed with ammonia would have the same effect (chloramine gas). By the time anybody realized something was wrong, it would be too late. The sound of the gunfire from the AR-15 alerted students that something was wrong and gave them time to take cover or try to escape.
As I said, trying to change the tool used will not solve the problem - only by making sure that those whose mindset/morals would allow them to kill large numbers of people will.
Edit to final part of above post: “only by making sure that those whose mindset/morals would allow them to kill large numbers of people secured so that they are not physically able to kill (ie psychiatric or legal incarceration) will.