So I did. But there's no code in the file from the first post.

So as I said, I can't get it to work and I think others would appreciate it too, if there were a working, easy to use script.

The one from the template doesn't work for me either, and others have pointed that out already.