added funcion to change the score if event happens