Ending on variable reaching specific vallue

Probably have been asked but how do I end the match when one of the players reaches 35 points which are stored in player variable?

Add an on-going event player rule that checks if the variable is equal or more than 35 points

then declare player victory for the event player