Need help with spell scripting and things

I'm trying to make a spell that shoots multiple objects constantly torwards wherever the player is aiming, say sweet rolls or cabbages for example. How would I go about doing this? I already copied the Spectral Arrow spell and its parts and renamed/edited them, I'm just not sure if I have to go script some things, or even how to do that.