Try place it in new file on your mIRC Script Editor.
ALT+R -> File -> New
EDIT: That code is working only on #nacknic channel.
Also you can read the full ON NOTICE event help file description
/help on notice or from the online (unofficial) wiki
https://en.wikichip.org/wiki/mirc/on_events/on_notice i know only in #nacknic channle [im new, in mirc scripting]
but so mad i write the code like he needed to be and not work.
and i try do new file before because i search problem like tht , and that what they said, open new file, but not work