Ok dude! First and foremost, calm down! This might sound stupid, but when you frett and freak out, you can't help anything.
then, seperate the chick and observe very carefully. ensure that the chick is drinking and eating properly. forget about the leg for now and give vitamin suppliment in the mean time as mentioned by another BYC user.
Make sure the chick is in good health otherwise. If the chick seems happy, active and eating and drinking well, then it's a leg injury or deformity which can be dealt with seperately.
As long as the chick is healthy and eating and drinking (hence the vitamin suppliment), then the chick will learn to move around with the leg. there is a thread about special needs chickens with PLENTY of stories of chickens with "wobbly bits' and still thriving none the less.