I have been trying to set up my rearranging triggers but am having difficulties with the coding.

These are the random stats generated for your character.
Dexterity : 20
Constitution : 20
Strength : 18
Wisdom : 16
Intelligence : 10

Entering 'q' or 'quit' will exit rearranging without saving
Entering 'y' will save this roll.
Pressing any other key, or by itself will cause re-roll.

thanks for any help. these are the stats i have rolled in the past (manually)