Discovering the scale that your rap song is played in is fundamental to playing both the melody and harmonies within the song. Find the key by playing the song on a speaker and striking each note on the piano. A scale that has all the notes you can hear in the song, and complements the tones you hear, is probably the right key. This can be verified in later steps.
Since most rap songs involved spoken words, the most important part of the song is the background harmonies. These are the piano chords that repeat throughout the song. Try to mark down the points in the song where the pattern changes. Then go back and discover the patterns on the piano. If you have the key or scale that the rap song is made in, you can find chords through a website like 8notes.com. These can be used instead of actual transcriptions of harmony notes.
After you have the harmonies, you are essentially done with learning how to play the song on the piano. You can practice singing the song with the chords or harmonies. If you want to play the staccato rhythms that the rap melodies incorporate, listen to the syllables of each word and play each note a corresponding number of times. You can pick a note that either is similar to the tone of the original rap singer, or it can be an equal harmony that fits with your own voice. This will let you play the song on the piano so that you can include your own singing.