script and rectangle working