Unlawful use of weapons--exceptions--penalties.
571.030. 1. A person commits the crime of unlawful use of weapons if he or she knowingly:
.
.
.
(10) Carries a firearm, whether loaded or unloaded, or any other weapon readily capable of lethal use into any school, onto any school bus, or onto the premises of any function or activity sponsored or sanctioned by school officials or the district school board.
.
.
.
3. Subdivisions (1), (5), (8), and (10) of subsection 1 of this section do not apply when the actor is transporting such weapons in a nonfunctioning state or in an unloaded state when ammunition is not readily accessible or when such weapons are not readily accessible....<snip>.....Subdivision (10) of subsection 1 of this section does not apply if the firearm is otherwise lawfully possessed by a person while traversing school premises for the purposes of transporting a student to or from school, or possessed by an adult for the purposes of facilitation of a school-sanctioned firearm-related event or club event.
.
.
4. Subdivisions (1), (8), and (10) of subsection 1 of this section shall not apply to any person who has a valid concealed carry endorsement issued pursuant to sections 571.101 to 571.121 or a valid permit or endorsement to carry concealed firearms issued by another state or political subdivision of another state.
5. Subdivisions (3), (4), (5), (6), (7), (8), (9), and (10) of subsection 1 of this section shall not apply to persons who are engaged in a lawful act of defense pursuant to section 563.031.
.
.
.
7. Unlawful use of weapons is a class D felony unless committed pursuant to subdivision (6), (7), or (8) of subsection 1 of this section, in which cases it is a class B misdemeanor, or subdivision (5) or (10) of subsection 1 of this section, in which case it is a class A misdemeanor if the firearm is unloaded and a class D felony if the firearm is loaded, or subdivision (9) of subsection 1 of this section, in which case it is a class B felony, except that if the violation of subdivision (9) of subsection 1 of this section results in injury or death to another person, it is a class A felony.