Hi Alisa,
Are you selecting any object(s) before using the script command? The Line 0 syntax error usually occurs when there is an issue with the overall organization/structure of the script. For example, a missing opening or closing bracket '{','}'. I will suggest you to check each bracket and make sure it has a closing bracket. Please let me know if the error is still not fixed.
Regards,
Amrita