I'm a newbie, hoping to get better at these scripting things.
This is the best script I've came across to the looks of it.

But I have one problem, I get this error:

Failed when compiling
Line...