generally ill add an invisble box, when ball collides w box destroy ball, add +1 to playerx score. as youve 2 players youd have player1 score and player 2 score. then have a game ender function; If playerx score Greater or equal to EndGameScore, set variable to win/lose, set text to you win/you lose, wait x seconds, reset global variables, restart layout.
can add a do you want to retry or continue option but thats the basics.