shall not be present in or loiter within five hundred feet of any school building, on real property comprising any school, or in any conveyance owned, leased, or contracted by a school to transport students to or from school or a school-related activity when persons under the age of eighteen are present in the building, on the grounds, or in the conveyance, unless the offender is a parent, legal guardian, or custodian of a student present in the building and has met the conditions set forth in subsection 2 of this section.
§ 566.149, RSMo