Took me ages to sort out the scoring system and finally manged to use scene and global variables to make it work.