Finished scripts logic