Joking about carrying guns is not wise - maybe funny to the person who said it, but not to the screeners.
Having said that, some screeners are notpleasnant to encounter.
Let me point out an example that is well above the norm.
Last year I accidentally left a swiss pocket knife in my briefcase.
Mea culpa.
The security screeners at FRA who found it were both understanding that it was a mistake and pleasant in their approach, even offering to leave it in the office so that I could collect it landside the next time I was travelling through.
The professionalism of the security screeners was exemplary and if more would behave in this way, the encounters between pax and security would be so much less stressful.