what to do ?

I'm currently lost, I just got my first job and car and currently 5 months pregnant and done with school, I work full time also. 
My ex/baby father is being selfish, I've giving him shoes, a iphone, over $200 in cash and gas money for someone to bring him to my house which is $20 every time plus money, and my mom used to pick him up and take him home and pay for his snacks and dinner when we go out to eat which was every Saturday or other Saturday. 
I've done so much for him and when he "had" a job he never given me anything he actually cheated on me and left Me that was before I got pregnant, months later he came back and he promised we would get back together so I waited of course and we were having sex and I thought we was together because he asked to come back, and he wanted this child, he promised to fix this and everything and I believed him.
He then broke up with me and tried to date another but she didn't want him sooo after that I said no to getting back together. 
Now that I have a job he keeps asking for money and I don't have money to give, I have to pay car payments and insurance.... and get ready for this baby and he keeps saying this....
(Had to pay mother back for putting money down on car) but he doesn't understand..
And he refuses to pay child support he says he'll go to jail before giving me money, also a couple days ago I also asked him to apply where I work I just want $10-$15 in gas a week and he said no he doesn't wanna pay me in gas, I called him lazy because I know he isn't looking for jobs... was just trying to help but he says I'm judging him... 
Also when I say I refuse to give him part custody after this convo he says he'll take me to court ... Idk what to do right now because I don't trust his family around my baby and I'm lost ... idk anything bout this court stuff, child support or part custody ...