[Serious] If ever caught in an active shooting situation, what are the best ways to survive and to minimize the amount of casualties?

I remember in middle school we were annoyed our school installed a full lock down systems, I can’t remember what school shooting caused our school to do this but it was 2006 so which ever one was before that . We hated it because the halls and every stair case needed passcodes only the teachers knew to be open( some main halls would be opened for school hours but could be remotely locked at any time from The office or teachers lounge) I remember is all complaining because we were on the third floor and our gym was right below us but because of the doors that stayed locked we had to go down to the first floor, walk the full length of the school up another flight and the length of the school again, at the time we thought all of this was stupid but now as an adult I’m so fucking claim this system is there ( the grade school is set up like this too) all the doors to the class rooms can also be locked down at anytime and the windows are now bullet proof glass, not exactly super related to this but fuck this something like this system should be the normal in all schools

/r/AskReddit Thread