trajectory question

Hi everyone i am trying to implement a basic shooting / trajectory mechanic similar to the screenshot below

Ive done a search and found a few scripts posted but ive yet to get any of them working. Anyone implemented a similar mechanic already?

I just want to attach it to a ball and any mouse x/mouse y position would modify the trajectory line and then when fired the ball will follow the exact arc.

Any scripts/help would be greatly appreciated

An easy (though not strictly accurate) way to do this is to use a quadratic Bezier curve to draw the path and also to move the ball. There is a script with a Bezier implementation in this thread.