Here is the structure of text scripts:
[#package packageName] ([#import importName])* [#metatype metatypeName] ([#script visibility scriptName(scriptParameters)] (body statement)* [/#script])*
Script