How does the script work?