With preaching chords, the only time you play a melody is if u doing a run on the keyboard. Like if the preacher starts humming, "Umm Umm Ahhh Ahhh," something like that u would be playing a run like the blues scale. Then, you can play whatever chord you want. The chords don't have to follow the melody here, and they rarely will. The idea is to play a chord when the preacher finishes a sentence, like this:
"And as Jesus was dying on the cross,"
chord: C / Bb-E-A-C (play as a hit)
"Hmmmm, yeah,"
fast RH run: C, Bb, G, F#, F, Eb, C
"He said, Father,"
chord: F / Eb-G-A-C (play as a hit)
"Ohhhhhhh Father"
chord: F# / Eb-F#-A-C (play as a hit)
"Please Father"
chord: G / D-F-A-C (play as a hit)
"Forgive them"
chord: G / F-G-B-Eb (play as a hit)
"For they know not what they do"
fast run in both hands: Eb, F, G, F, Eb, C
"Ummmm yeah"
chords: C / C-F-A
C / Bb-Eb-G, Bb-E-G, high C *slide Eb to E
You get the idea, you have to follow the preacher and play chords and runs as you feel them.
Now, for songs, it is a good idea to keep some kind of melody going in the beginning, especially if you just playing and no one is singing. People need to have an idea what song you playing and they can figure it out if you have melody at the top and chords underneath. Once you establish the song, then you can play whatever cuz people know the song already.