Improved generative script