Combining two events

I’m trying to make a script that if “Shockwave” key gets pressed and the ball is overlapping the box then the ball gets speed up from the shockwave but everytime I try something, ball either ignores the box and me pressing anywhere speeds up the ball or the ball starts bouncing of the box instead of overlapping. How do I do it right?

Try it like this:

Image from Gyazo

Works perfectly, thank you.