The below setup will check if user now has exactly 5 points after points were added/deducted from the user.

Event: Userpoints - User was awarded points
Condition1: Userpoints - Compare current Userpoints / Negate: unchecked / Amount to compare: 5
Condition1: Userpoints - Compare current Userpoints / Negate: checked / Amount to compare: 6
Action: // whatever you choose

The below setup will check if user had exactly 5 points before points were added/deducted from the user.

Event: Userpoints - User was awarded points
Condition1: Userpoints - Compare Userpoints before the transaction / Negate: unchecked / Amount to compare: 5
Condition2: Userpoints - Compare Userpoints before the transaction / Negate: checked / Amount to compare: 6
Action: // whatever you choose