You can create a new script either by menu
→ → → , or by selecting an existing script directory and selecting "Create Script..." from the context menu. The "New Script Wizard" will start, and at least a name for the new script must be given. After pressing "OK" the new script shows up in a Script view, where you can edit, compile and execute it.
More details are provided in: Section 16.3, “ Creating a new Groovy Script ”