"he will win in court and who shoots him will be in jail... unless maybe you are in TX, not even sure about that."
OZZ - I am happy to see Texas represented, thank you for the kudos. Keeping in mind this is another "what if" and can have a million outcomes, I will offer this:
Based on the fact that "the gunman shoots into the ceiling" on entering, he has elevated to the next level. Based on the fact, from the pictures, he causes people to lay down, that's another level. Based on the fact that he appears to be waving the gun around, he is not calm or methodical in his crime and is VERY dangerous. Since he has already discharged the weapon, I would suggest he would definitely discharge the weapon again if surprised - such as a person coming in the front door, or a dish or pan dropping on the floor and making a noise.
For these reasons, I would draw my firearm and point it at him under the table (I always sit in a back booth so I can survey the entire area, not at the counter - you may wish to remember that where ever you are). If he cleans out the cash register and immediately leaves, fine. If he makes a move towards me, I'd drop him. If he makes a move with the appearance of killing someone else, I'd drop him. If he discharges the weapon again, I'd drop him.
And no worries about the results, he would not be testifying in court.