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