# Source URL: https://dev.epicgames.com/documentation/en-us/uefn/persistent-player-statistics-in-unreal-editor-for-fortnite
# Local doc: epic-docs/documentation/en-us/uefn/persistent-player-statistics-in-unreal-editor-for-fortnite.md
# Section: Testing Persistence with Devices
# Awards a player a win or a loss when they interact
# with the CheckWinButton.
CheckWin(Agent:agent):void=
var CurrentScore:int = 0
if:
PlayerStats := PlayerStatsManager.GetPlayerStats[Agent]
set CurrentScore = PlayerStats.Score
Verse Library
verse
21 Testing Persistence With Devices
Fetches a player current score from persistent data for win condition evaluation.
extracted-snippets/documentation/en-us/uefn/persistent-player-statistics-in-unreal-editor-for-fortnite/21-testing-persistence-with-devices.verse