finish script.