You can discard the edits you have made to a script and revert to the unedited version by selecting Edit>Revert Script from the menu.