I just tested for pregnancy. It was positive but I've been spotting on and off for 6 days. Slight cramps no extreme pain. Will the baby be okay?

Maybe. It could go either way. You will need an ultrasound and/or serial ultrasounds to determine if the pregnancy. In general, bleeding does not increase the chances of misscarriage, but when it is this early it is worrisome to me.
OB . Get to your OB doctor immediately. Meanwhile adequate fluid intake and bed rest. You should not be spotting or having stomach pains while pregnant. While there may not be anything seriously going on,your doctor will be able to take care of other possible complications of pregnancy that can present this way that could otherwise affect you and/or the baby.