I suspect there is, but haven't paid enough attention to AppleScripts that i've read to be able to say how to do it.
Here's an alternative, though:
Set your document up with the values you want to revert to, then before running the script, Save the document as a template.
Test the script.
If it needs adjustment, Close the document without saving and open a fresh copy of the document from the Template Chooser.
My day job is writting automation for a certain desktop spreadsheet application used in most offices. We have to work on this test process all the time, all day long. Let me give you our test process...
Create a folder to test in.
Create a folder within that folder called "original docs".
Copy all your original documents to this folder, and then copy then again to the main test folder.
Run your test on the test folder contents, not the original docs files.
After analyzing your results delete modified docs from the test folder
Copy new fresh copies into the test folder form the original docs.
Retest when ready
If you require to track your tests. Make test scripts that state what steps your taking in the current test.
Make the last sto of your script resave the document with a date and time stamp as part fmthenfile name, maybe even test script number.