Update script.js

add this to add Debug function in event script