Learn the pentatonic minor scale. This is a five-note scale that's used in almost all rock and rap music today. Learn it on whatever instrument you're most comfortable with, then transpose the notes to piano.
Rehearse the pentatonic minor scale in different keys and at different tempos until you're very comfortable with it. When you're ready to play rap on the piano, you should be able to look at any key on the piano and run up and down its pentatonic minor scale.
Study rap music by listening to different artists and a variety of songs. Learn their piano riffs and practice them on your own to get new ideas, and to get a feel for different beats and their various uses. Log onto 911Tabs.com to get a variety of piano tabs by selecting the "Piano tabs" tab near the top of the page, and search for the song you want to learn.