Safety Third!
Avoid the use of real guns. You can buy fake guns that look just as good as real guns and make realistic sounds in post. It’s practically impossible to hurt someone with a fake gun. Fake guns are cheaper, so you can buy more, which is useful because they often fly to flinders.
A place to buy cheap guns is Cheaper than Dirt. Look in airsofts.
By the way, once you paint the orange tips black for the movie, be aware that these look very real, so passers-by and police and such will be fooled. Also, painting the tips might be illegal, so do whatever your lawyer tells you in that regard.
My friend Dwight refers to such props as “Police-Assisted Suicide Devices.”
I don’t need to tell you to not have your actors or crew screwing around on set with realistic guns, right?
And if you are going to be shooting where others might see you, it never hurts to call the nearest police office (not the 911 line!) and tell them you’re filming (not “shooting”) a low-budget movie, and that you’re using realistic-looking fake guns, and that every gun is non-functional. Invite them to come by and visit the set. Be friendly… and after you are finished, call them back and let them know you’re finished and thank them for their time and patience.