It is unfortunate that many see salvation on a prescriptive basis. In other words, by mumbling an “I'm sorry” prayer, God is obligated to save the person, regardless of the misery he or she has caused throughout life. We often forget that God is not only a forgiving God, He is also a just God.
For example, folks believe that if Adolph Hitler had confessed his sins to Christ and accepted the Savior in his last moments, the notorious madman would have gone to heaven. While many would reject such a notion, many denominational preachers teach that anyone receiving Christ with their last dying breath is saved. “If the Thief on the Cross could wait until the last minute to get into heaven, why can't I?” (Luke 24:39-43)
You are on a very slippery slope by waiting until the last minute. Most of us don't know when we'll die. The Bible warns us: “You do not even know what will happen tomorrow. What is your life? You are a mist that appears for a little while and then vanishes.” (James 4:14)
“God is not mocked...a person will reap what they sow.” (Galatians 6:7) In other words, folks will get what they deserve. A person who spends their entire life doing evil and thumbing their nose at God is not going to suddenly get a reprieve just because Death is at their doorstep. The so-called Sinner's Prayer is unscriptural. Nowhere does the Bible teach that saying a little prayer will save a person. There are the issues of confession, repentance (turning around), and water baptism.
God can do what He wants within the parameters of His eternal grace and mercy. But one cannot live a lifetime of evil, thinking that God will whisk an Adolph Hitler into eternal bliss because some priest performed a ritual at the time of death.