DDR Code?

i’m trying to make a dance dance revoltion like game, but i dont know how to code the part were you press the arrows at the right time and then it either says good,bad,etc.