NUTLEY — Prosecutors say an 18-year-old high school student created a virtual video-game school where his avatar could walk around shooting people.

The "Minecraft" video was one of several that resulted in police arresting and charging Joseph Rafanello last week with causing public alarm, which caused Nutley High School to close two days after the Parkland, Florida, shooting.

Nutley was the only district in New Jersey to cancel classes during the recent spate of threats around the state. Rafanello is among nearly a dozen students who have been arrested in the last two weeks on charges of making threats or perpetrating hoaxes.

A Superior Court judge on Wednesday released Rafanello from custody and ordered him to wear an electronic monitoring device pending his trial.  Nutley schools Superintendent Julie Glazer has said that Rafanello would not be returning to the high school.

Rafanello's father also turned in his legally owned firearms, NJ.com reported.

After his arrest, authorities pointed to his Instagram post of a shooting range video with the song "Pumped Up Kicks," which has lyrics about kids outrunning bullets.

At a Superior Court detention hearing in Newark on Wednesday, Assistant Prosecutor Alexander Albu said the student's Instagram account also had a picture of him holding a rifle along with the words "Sandy Hook." Someone commented on the photo asking him what he  shooting at, to which he responded "children," Albu said.

"Minecraft" is a game in which players built virtual worlds and characters using cubes.

Public defender Alexandra Briggs told the judge that Rafanello is an avid gamer who had been accepted into Bergen County Community College's game testing program and who wants to have a career in gaming.

"The fact that that he is creating 'Minesweeper' videos, your honor, speaks to his academic career," Briggs said, misidentifying the game.

More From 92.7 WOBM