Hi Dorothy,
I can't imagine all of the emotions running through your life as a soon to be mom in action.
If this goes to court it will almost certainly end with shared custody. If he says he's the father and you acknowledge that, then joint it will be. The judge will also take a look into finances and how the father will be supporting the child. In general, it's usually 20% of whatever income the person makes in terms of support.
If you can't afford an attorney, I'd look into legal services your county offers. Often arrangements can be made if done early enough to find representation fre or on a scale, meaning based on how much income you have coming in.
If the father is hostle to you in general, the child is apt to be caught in the middle. You may want to include in the custody arrangements, specified times, places and counceling. Sometimes these things can turn into a power struggle, again at the child's expense.
Do whatever you can to work with the dad if at all possible and run all of this by people who can support you while you are recovering.
Even if you don't go to court, I highly recommend something in writing that both of you sign as well as having it certified by a notary to prove what is in the contract is something you have read and signed after agreeing to it.
Emotions can rise and fall to great extremes and to protect everyone involved having a piece of paper to refer to, even if someone says to you, "We don't need a piece of paper between us." Get one anyway it will serve everyone in the long run