Regenerate final script