Custom MENU button?

I have seen some games use custom functionality to the menu button, like Sarge’s deliverimania, and i want to achieve something similar, like a pause screen. Any tips?