Help i have no idea

Help, this is my first try to make a game and I want that after the player has won a certain number of points, on the screen a message will appear that the game has been passed successfully.

create a variable to store the number of points, and set it to 0. every time the player should win a point, add 1 to the number of points. when you get a point, check if the number of points is high enough (equal to what you want). if it is, make a message appear. you can make that message appear by putting the message off-screen, waiting until the number of points is reached, then moving it onscreen with this.x and/or this.y.

thanks for that it was easier than I thought. Do you also happen to know how to restart a game? The thing is that I want to add a button so that when the players lose, they can try to play again. I tried with gotoPrevFrame but it is not an option that actually resets the game.