a less-than-trustworthy score calculation script

and all the examples that I was pretending were correct :D