HELP! drag and release

I am trying to make a game that has a catapult that you can drag back and it will release the ball and the amount you drag back is the power/speed the ball goes. I can not figure out a code. HELP!