Socialist Europa has far fewer mass shootings than the US even though many Swiss and Scandinavians have access to modern firearms
Also, it's not entirely true to say that there was only muskets around when they wrote the 2nd amendment. There was most definitely rapid fire guns and canons and so forth, even if muskets were absolutely the most common firearm around
Somehow I don't see people bringing cannons to a school shooting.
As for automatic firearms: Oldest ones I could find are https://en.wikipedia.org/wiki/Mitrailleuse and https://en.wikipedia.org/wiki/Gatling_gun both of which showed up more than half a century after the 2nd amendment and I don't see a school shooter lugging those around either