In Florida, I would in a place where I had a legal right to be, and I could use equal force to stop an immediate forcable felony. Robbery is on the list.
Gun is out, demanding money makes the case. Double tap, assuming a clear background and tactically possible. No warning.
The quicker it is ended, the better for all non-perpetrators. Even if you are not the initial possible victim. who knows what lurks in the mind of criminal (if not a crazy).