add registerScripts for events