I saw this movie about a town in total power blackout, pepole started to plunder and kill. Nothing worked.

is it a realistic scenerio, has it happend will it happen? And for how long could a power shutdown go on?

would one need a gun or rifle in a situation like that to survive or is it more dangerous to have a gun, i mean is it more a risk then a lifesaver to have a gun?