Sets main script