So many variables in this. Just the way the store is setup as far as cover and visibility could chance everything.
A big difference that many have mentioned is your locality. Yes, a good part of it is state laws, another is local sentiment. In Montana if you shot a guy holding a gun on a clerk, you would be fine as long as you only shot the robber. First there is state law and then there is the fact that any prosecutor around here would know that going after you would cost him the next election. In New York, the laws would not favor you. Worse is that the percentage of people who would know much about what happened or pay attention to it would be way lower. The percentage of people who know what the prosecutors response was would be way lower, plus add in a more liberal population and you got problems. There it would be a small blip in the news, unless the press decided to make it a big story and the press is far more apt to have liberal views. Here it would be probably be the most interesting news of the year and a topic of conversation for everyone and the press isn't liberal, and the state has a history of citizens taking care of criminal problems. We have had vigilantes, Granville Stuart etc. Part of the little town I live ins proud history is 2 local bad guys came to town during the 4th of July and started harassing the citizens, the locals gunned them both down in the streets and really celebrated.
Me, I am going to take a serious look at the whole thing, could he see my hands and where my gun is? Can I quickly get outside or behind solid cover? If his gun goes off I want to be able to get mine ASAP as I go for cover. If he shoots the clerk he will probably shoot me too. How hyped up does this guy seem, Meth head looking? Never ever trust one of them to do anything reasonable. I have been in some bad situations and its amazing how much goes through your head in a hurry. I would hope he just takes the money and runs, but, he best be paying attention, because I will be, this is a very serious situation, figure he might pull the trigger at any time and I am going to be looking for the best chance of getting out of it alive. Never been in a gun thing before, but in some very serious situations more than once and to quote the guy in the Magnificent 7 "So far, so good".
To many people have done just what the robber wanted all the time hoping he wouldn't kill them right up till he did. I didn't reluctantly come to the point of deciding to pack a gun around all the time to do that. If I figure I have to do something I am going to take what I figure is my best bet and the law isn't going to be a big part of the calculation. That's the future and this is right now. The law isn't going to save me from getting shot or living if I do. If I live I can deal with that later. The clerk, if I could save him without making my situation worse, I would, just like I would try to save any one in a bad situation, but, I didn't get him the job that put him where he is at. Taking big risks to save people usually just makes things worse.
These type of "what ifs" make you think about things. Thing is you had best give these things some thought. If your packing a gun around and something does happen its a poor time to start without any kind of a plan. Have a plan, have a back up plan, be ready to modify or abandon both of them.