Your best defense is to comply with the demands of the robber. The money can be replaced, your life cannot. Robbers bring a weapon to ensure they get control of the situation. Once a robbery has started, it is too late to do anything now. Let him think he has control.
Robbers are desperate people.
Drugs and alcohol are often factors in robberies. Desperation, intoxication and weapons make a volatile combination. If a weapon is indicated but not seen, assume the possession of a real weapon. Be prepared to treat a robber like any other customer. This is one cash transaction you'll want to do without any bother.