How to stop onEvent

So im using the onEvent('update', function () { }) code and I was wondering how I could stop the event so the code inside of it doesnt work and it doesnt keep updating.

You can’t stop a ticker. Also, it’s recommended for newbies to use the + button to make scripts for every event.

Ik how to make events but for what i’m doing I needed to use that. Thanks for the help.