This reminds me of a funny story:
I usually bring a bb or pellet gun with me when I fish to shoot pinecones, dirt clods, chipmunks or other targets of opportunity. I keep it in my trunk with my fishing gear. Shortly after I retired from the Air Force, I went on base to meet some of my old co workers. I got picked for a random vehicle inspection. I was talking to the gate guard, who I knew, when his guy inspecting my car calls out "Sarge, we've got a gun back here". I thought I had left a real gun in my trunk (happens) and was thinking I was in doo doo. Then I saw my crossman pellet gun and started arguing, that even Massachusetts doesn't consider it a gun. As we're arguing, the kid found a slingshot in my glove box (I get bored fishing, sue me) and the Sgt asked if I was 12. lol
After much arguing back and forth, they decided they'd just keep the pellet gun at the gate and I could pick it up when I left. I offered to leave them some ammo and CO2, but they figured they'd get in trouble.
I was reminded that I can't bring a gun on base, even if it is more of a toy than a weapon, and it isn't worth the hassle to bring a pellet gun on the base, even if it isn't breaking any rules, it's still enough to cause a hassle and wasted minutes out of everyone's life.
Good thing they never asked me to empty my pocket, lol.