Toxic Baby Dad

How do you deal with a toxic baby dad?

I give birth in 3 weeks he’s been involved in the pregnancy for a total of 20 weeks because he doesn’t know what he wants. I’ve told him multiple times that I would like to be civil. I told him if he’s sober (he does meth) that he would be able to come see his son and I wouldn’t keep him from him but only if he were sober. I really want to coparent and be friends and have him be sober. But he seems more interested in my personal life who I’m talking to and hanging out with. And we talk fine for a few days until he gets into these moods (which I think is when he does meth) and he freaks out on me and threatens court and how he has the best lawyer (which he does) and how I don’t have one at all and he will block me on everything. I don’t know what to do and I’m exhausted. I just don’t understand does anyone have any advice on what to do. He has me so stressed & afraid of him.