My kid has one of those pellet guns (airsoft), and you need to make sure they get orange on them to identify them as fake.
Plus, everybody knows you don’t point things that look like guns at police officers, unless you want to be dead.
So my guess is the kid was depressed, and this was his way to commit suicide. A sad thing to be sure.
.
.
.