In Salt Lake City, Alex Corvis (Eric Mabius) is a death row convict framed for the murder of his girlfriend Lauren Randall (Jodi Lyn O'Keefe). Three years later, he is sentenced to death in the electric chair. When he is asked for his last words, he says he still loves Lauren and that he is innocent. However, the guards do their job, and the switch is pulled. The generator is struck by lightning during the electrocution, overriding the electricity, and Alex suffers a painful, excruciating death. Soon after the execution, Alex is resurrected by a mystical crow and gifted with supernatural abilities, so he can clear his name and avenge Lauren's death. Alex follows the crow to the Salt Lake City police department's evidence room, where he discovers that Lauren was killed by a group of corrupt cops. Alex has a vision of one of the killers, who has a scar on his arm matching one he saw just before his execution. Alex finds the knife that was used on Lauren, and then goes to her grave. There, he meets with Lauren's sister Erin (Kirsten Dunst), who believes he is guilty. He tells her that he will prove his innocence, and disappears.
Alex finds Tommy Leonard (David Stevens), a witness at the trial who was paid to give perjured testimony about Alex. Leonard tells Alex that the cops who murdered Lauren were Madden (Bruce McCarthy), Martin Toomey (Tim DeKay), Vincent Erlich (Dale Midkiff), Stan Roberts (Walton Goggins), and Phillip Dutton (Bill Mondy).
Alex kills Erlich in a car crash, but inadvertently drops the list of names of the cops he's after, and Roberts and Toomey find it. Later, Alex gives Erin a piece of paper found in Erlich's car, proving to Erin that he is innocent. She then finds out that her father, Nathan Randall (William Atherton), is in business with the corrupt cops who killed Lauren, and was thus indirectly responsible for her death. Nathan swears he did not intend for Lauren to die, but Erin nevertheless runs from him in horror.
Alex goes to the place where Lauren died and talks to her. Erin goes home, and finds that her father has committed suicide. Later, Alex meets with his lawyer, Peter Walsh, who tells him that Nathan owns a company called Westwind Building, which owns D.E.R.T., a company that serves as front for a drug smuggling operation. Lauren had witnessed John, the police captain (Fred Ward), killing a man at the Key Club; John then had Lauren killed.
Madden kills Walsh, and John kidnaps Erin. Alex starts a shootout at the Key Club in which he impales Roberts with a pipe he breaks off the ceiling, and kills the remaining police. Madden shows up, and tries to kill Alex. Madden accidentally shoots a pipe, which ignites a gas leak; the explosion kills Toomey. Alex walks out of the fire and sees an arm hanging out of the rubble with the scar on it.
The next day, Alex finds out that the man with the scarred arm faked his death, and is still at large. Alex goes to the police station to kill John. However, he is no longer invulnerable, as he "fulfilled his duty" after finding the arm with the scar. John stabs Alex several times. Before Alex dies, he starts to believe he is the one who murdered Lauren. Madden, John, and John's secretary (Kelly Harren) pull Alex into John's taxidermy room, where Erin is tied up with her mouth stitched shut. The crow picks up her locket and drops it next to Alex, who comes back to life. Alex sets Erin free and kills Madden, and she runs out with John in pursuit.
Alex and Erin take John to the same electric chair that Alex died in, and strap him onto it. Alex tells John how much voltage will pass through him when the chair is activated, and John vows to return from his grave and kill both him and Erin. Alex covers John's face with the mask while Erin throws the switch, and they watch him scream in agony as he is electrocuted. After a few minutes, John bursts into flames and dies while Erin and Alex leave his body to cremate on the chair, and exit the facility. Alex disappears in a whirlwind, and Erin puts the necklace that bound him to her on his headstone.

Question: Where does the pipe come from that Alex uses to impale Roberts?
Answer: The ceiling.
Alternative answer: from the ceiling