Mormon 9:28–29

Be wise in the days of your probation;
strip yourselves of all uncleanness;
ask, not that ye may consume it on your lusts,
but ask with a firmness unshaken,
that ye will yield to no temptation,
but that ye will serve the true and living God.

See that ye are not baptized unworthily;
see that ye partake not of the sacrament of Christ unworthily;
but see that ye do all things in worthiness,
and do it in the name of Jesus Christ,
the Son of the living God.

And if ye do this, and endure to the end,
ye will in nowise be cast out.

From section: Moroni’s Invitation to Believe

From page: Moroni Finalizes the Book of Mormon

Commentary