Scoring Algorithm

Credits to Joey McCann for the code
Made minor changes to account for recent code updates