We can come up with many a hypothetical, but one I would consider low is that the bad guy needs the guard's gun to begin with. Nearly every one of the school shootings in question didn't include the bad guy getting his gun after he got on campus. So while it might play a role in some elaborate plan, the easiet deterrent to that is that the gun be concealed, so the bad guy doesn't know who is or isn't armed, plus you have more than 1 armed person on campus.
This legislation is related to teachers being trained and legal to carry a weapon onto campus, not just guards. No teacher is going to wear their gun externally, as to broadcast that "they're packing". That's the great deterrent ocf CCW holders, and areas that allow for CCW carriers to enter/exit their establishment.....no one knows who has a weapon, so no one person can be targeted 1st, much less disarmed and their weapon used to kill in mass.