I would say, either like this: How would you display the name, would anyone be able to make a mockup?
when this sprite clicked - name: myscript:: events :: hat //oror like this:
when this sprite clicked - name: [myscript]:: events :: hat
when this sprite clicked //name: myscriptSorry, my photoshop skills are not good so I used scratchblock, an awesome thing.
I like the second, although maybe the input could be a different colour to make sure people know it's a name, not part of the script? Maybe the colour of comments?