Follow CBSMIAMI.COM: Facebook | Twitter

CORAL SPRINGS (CBSMiami) – Police arrested a former student who they said brought a loaded 9-millimeter handgun onto the Coral Springs High School campus on Monday.

READ MORE: NBA fines Miami Heat $25,000 for violating 'bench decorum'

Ryan Trollinger, 17, faces several charges, including a felony count of possession of a firearm on school property.

Coral Springs police said a friend of the suspect had a 10 page manifesto on him about his desire to shoot up the school.

CBS4 cameras captured the suspect arriving at the Juvenile Assessment Center Monday night.

Investigators said Trollinger, a former student at the school who dropped out last year, flashed a loaded weapon to a friend and walked into the school cafeteria.

Fortunately, a male student saw the gun, told two female students and those girls alerted the school resource officer.

“He was intercepted very quickly by our school resource officer,” said Sgt. Carla Kmiotek.

Police believe Trollinger meant to do harm, they said his friend told them so.

“Our suspect today said, ‘Today’s the day, it’s going down,’ and flashed the firearm and made entry to the campus,” Kmiotek said.

Police placed the school on lockdown while they arrested Trollinger and searched for his friend.

Students underwent a code red situation, hiding in their classrooms, trying not to make a noise and praying they would survive.

READ MORE: Man faces several charges including pointing laser at BSO aviation unit

“Let me stay alive please,” said student Felton Morris. “I don’t have time to be dying. Not right now. I’m too young.”

And in a disturbing twist, when police found the friend on campus they said he had a 10-page journal on him discussing his rage and what he called “Terror Day.” The friend was not arrested but was taken to a mental health institution.

In the journal he wrote, “I want to be the worst school shooter in America if I do the attack. I’m still not 100 percent sure I want to do this but I want to be the worst school shooter in America worse than Columbine, Virginia Tech and Sandy Hook.”

He also wrote, “I will have the most fun in my whole life just going on a rampage in the school.”

But it appeared that he was interested in finding a girlfriend.

“I want love,” he wrote. “Love is what I want. Terror Day might not happen if I find love.”

Police are not sure at this point that the pair was acting together but they said the two teens had spoken in the past about school shootings.

“What happened today with our suspect Trollinger and then the journal recovered from the associate does depict that same kind of violence against the school, school shootings,” Kmiotek said.

Investigators said they released the journal to show parents, teachers and others what this kind of mindset can look like.

“If you go through your child’s room and there’s journaling depicting this kind of anger, hate, violence don’t take it lightly,” Kmiotek said. “Take it very seriously.”

The two female students will probably be recognized for their quick thinking in telling the school resource officer about that gun on campus.

MORE NEWS: Miami ex-Proud Boys leader Henry 'Enrique' Tarrio to stay jailed until Capitol riot trial

CBS4’s Carey Codd was told that the school district will likely do a threat assessment at the school to make sure all safety precautions worked as they should.