According to the (partial) code you posted earlier in this thread, your script already has an event handler. If you want help modifying it, post your entire code. I don't know why I have to keep telling you this over and over in every thread you post. If you want help modifying or fixing your code,
post your code.