The Righteous Noah had paid workers who helped build his ark. Simply put, they worked to be paid. They didn’t believe in the coming flood or the revelation of Noah. Were they saved?
No, they drowned! Working morally and justly without correct belief will not save anyone.