Clean the endUIScript