Script to make HAB index