Script for getting scale factor