UI script debugged