Player selection with dialogs

Hi guys! I'm making a datapack for a custom gamemode and i want to have a dialog that has a button of the skin or name of every player and when the player selects a player in the server and then presses the "revive" button it will run the command "scoreboard players set [PLAYERNAME] deaths -1

I am a beginner but I am kinda good with commands and stuff so yeah thank you!

Continue to help post