A Manor High student has been charged with a felony after police allege he was plotting an attack on the school during a pep rally.

The arrest affidavit for Rafael Gamboa, 17, states a school resource officer was contacted by Manor High authorities Nov. 10 after Gamboa allegedly posted several threats to the school on his Snapchat. The affidavit states a video with the caption "Loads Glock, oh I'll make yall red" was posted during the school's pep rally, and that Gamboa appeared to be hiding behind bushes while recording other students. Police said in the affidavit “Students who observed the original post were afraid and did not want to remain in school with him.”

Gamboa was removed from class by an assistant principal, and a search of his phone was conducted with his permission. The affidavit states several photos and videos were found on the phone, including a map of the school and several images/videos in which Gamboa made threats of violence. One contained Gamboa with an assault rifle with the caption "I got what I need." The affidavit stated a video Gamboa was shown holding a movie video case in a way to mimic holding a gun with the captions "Don't come to school tomorrow or face my ultimate weapon."

Travis County Sheriff deputies conducted a search of Gamboa's room with his parent's permission and found the hand drawn map used in the video. The legend on the map coincided with marking on the map that indicated shooting positions, locations of explosives, location of attack vehicle and movements through the school.

Gamboa has been charged with felony Exhibition of Firearm. The affidavit also states he must remain 200 yards away from Manor High, undergo a mental health evaluation and cannot be in possession of a firearm. Online records at the Travis County Jail state he is being held on $50,000 bond. A booking photo is not available as of 12:20 p.m. Monday.