Added scoreCheck function to script.js