Creepy a bit? But, it's real life.

They're brain is still working after they die, according to New York University’s Langone School of Medicine in a new study. For a brief period after death, they say they are dead, but the brain goes momentarily into a “hyper-alerted state”.

They are studying people who have suffered cardiac arrest and when a heart stops, "technically speaking, that’s how you get the time of death — it’s all based on the moment when the heart stops", according to Dr. Sam Parnia. 

In heart attack cases, the blood no longer circulates to the brain, which means brain function halts almost instantaneously “You lose all your brain stem reflexes – your gag reflex, your pupil reflex, all that is gone", but if they are brought back to life within a few minutes cases knew what was going on.