generate script