We are sadly mistaken if we believe we can live however we want in this life and still spend eternity with Christ. Saying a scripted prayer or responding to an invitation given at the end of a church service may signify your first steps to living a life solely devoted to Christ, but they are not your ticket to eternity in Heaven.
Only those who truly repent of their sins–and that means you turn away from them in sorrowful contrition and acknowledge you have trespassed against the standards of the Holy King–and surrender to Jesus as the Lord of your life, only those will find their life in Him. No one who claims to love Jesus but lives in allegiance to this world will be saved (1 John 2:15).