You don't need the Input.isLongPressed part if you're checking if cancel is pressed and then incrementing another variable. Change the 10 to 60 or 90 or 120 to adjust the length of how long the button has to be pressed down. Also you might want to make it >=10 in case a frame is skipped.