A man has admitted attempting to commit armed robberies at two convenience stores in a town in less than a week.