This is an extended allusion to, of course, Assault on Precinct 13, starting with the most G-rated version of the “ice cream truck sequence” you'll ever see.
In Chapter 21 (and perhaps elsewhere), John is clearly wearing an “Assault on Precinct 13” shirt, implying that the film exists in-universe. Moreover, John also plays an active part in this chapter. This raises a lot of questions about continuity and why he doesn't recognize the plot of his own film. “It's just a show, I should really just relax.”
The gun involved is a “silver ball” gun. These were popular from around the ‘60s to the ‘80s among elementary school children. They used springs and fired slightly larger ammunition than BBs, made out of colored clay instead of steel. Overall, they seem to be much less dangerous.