https://codepen.io/jeremymontes10/pen/YzaJeWP
This works to stop the game and say you lost...
`if (blockLeft < 19 && blockLeft > 1 && characterTop >= 120) {
block.style.animation = "none";
alert("You got a score of " + (i-1) + "!");`
This changes the text every time you click the jump button but you could just keep pressing it and keep scoring.
`function text() {
document.getElementById("t").innerHTML = i++;
}`
This is for the play again button to get the block moving again as well as set the score back to zero.
`function playAgain() {
block.style.animation = "block 2s infinite";
i = 0;
document.getElementById("t").innerHTML = i++;
}`