To create groovy script or class use context menu of all project file [New -> Groovy -> Groovy class | Groovy script]