Well I'm not too sure on what things this code will work on but you basically make something like this
CamX =+ 1
Move camera to (CamX, 0)
If CamX <= Px - 4
Kill the player
If CamX >= 105 (105 is the safe part at the end, change it as needed)
Px is the players X location