What have you tried? Before coming on here and asking someone to do your work for you, look around, see if there's anything else you can adapt to what you're trying to do. Chances are very good that someone else has already done something similar and posted about it, you just need to look around the codes board and try.
And if you still can't find anything, just copy/paste the gravity modifier and change the onPickup() event.
PQ in a nutshell
The following user(s) said Thank You: Regislian, StewMan46