Modify creating $script