Problem with IR receiver

I know it's a mess it's just that I started it for fun and then decided to make a school project...if it works I will make it better looking!

I will try to change the way I get the results.value now that you mentioned that I can use it up until irrecv.resume().

The delay is there because I figured when you press a button it takes some milliseconds to let it go again and I only want to use it once, not consecutive times.