Implementation of the script.