Migrated createMenuScript method to new SwiftScript Class.