Compare Buddha's last words with the Apostle Paul's words in the Bible, Philippians 2:12:
Buddha - "Try to accomplish your own salvation with diligence" or another translation, "Work hard to gain your own salvation."
Paul - "Work out your own salvation with fear (awe) and trembling." (trembling, i.e. diligence)
The Buddha's last words are not linked to any other religious tradition. He merely said, and I paraphrase; No one and nothing in the Universe is permanent, everything changes. Work out your own salvation with diligence.