Section 96. On motion made pursuant to the Massachusetts Rules of Civil Procedure or the District-Municipal Courts Rules of Civil Procedure, and upon such terms as are just, a court may relieve a party or his legal representative from a final judgment. If no attachment was made in the action, such relief may be granted and execution stayed without security; but if there was such attachment, the amount of the bond shall be fixed at the actual value of the property attached, as agreed by the parties or determined by the court. Liability upon an attachment made or bond given in the original action shall not continue after the judgment has been vacated, except that if the prevailing party has been relieved from judgment under this section within thirty days of the entry thereof, such liability shall, if a subsequent judgment is rendered, continue during such time thereafter as it would have continued upon the original judgment had it not been vacated.