Ignition problem I think?

It was doing this with the old carb on it too. When it did it today I qiuckly checked for spark and there was no spark when about 5 min went by it started right up It's a new coil MSD new ignition box MSD. Do you think it's the distributor or a defective MSD box? when I first cranked it after it happened it started to spark and it almost started then the spark died off and car would not start.