You have to record any x and y position and store them(in an array or a file).
Create on the 2nd attempt the ghostplayer and load the x and y positions.
Your game has a few more "players"...I would use the "s-plugin" and make 6 arrays with it, for the 6 lives.
Here is a example made by toralord->viewtopic.php?f=8&t=6291&hilit=s+plugin+time+warp
He used the s-plugin to rewind the players action.
Now you have to put the information, that is stored in the s-plugin, on the ghostplayer(the x and y positions for example).
It's not that easy...but it's possible.
If there is any easier way to do it, someone else will post it I think^^...