Anyone else baby dad do this?

The father of my unborn baby told me he doesn’t want anything to do with the kid and that I can have full custody when it’s born and that he doesn’t want to be on the birth certificate or take a DNA taste because “he doesn’t care if it’s his kid” a week ago he was happy to have a kid with me and that all just randomly changed..it hurts but at the same time I’m kind of happy he wants nothing to do with the kid cause I didn’t want to co parent with him