tweak script gen