Pregnant

So I’m pregnant... and it’s from my ex but we still live together, we only broke up because he was trying to work on himself and get himself together. So I took 4 tests and they all came back positive and he just said we “can’t have sex” anymore because it’s too “risky.” And that he can go out and mess with other girls because he’s not with anyone... and I feel like I failed as a mom... I’m about to bring my child into a world where the father doesn’t care... I love him... and idk if maybe this is just him freaking out as an instant reaction or what... but I’m just really scared... I was hoping he’d be by my side through all this, and now I feel like I don’t have anyone and like I let him down and everyone..: including the child I haven’t had yet...