Script for calculating world opportunity gain