Slant 6 dies when driving

Got a problem with my slant. On my way to work it just died.i kept cranking it too see if it would start but eventually i killed my battery so i got a new battery, new battery same problem.after the new battery it will only click no cranking .i figured lets change all electronic componets.so now i replaced starter,starter relay, ballast resistor, ecu module, battery. Alternator and voltage regulator are 2 months old. When the car does turn on i unplugged the positive for a second to see if the alternator is charging the battery and it is car doesn't die. But now a days even a brand new part is sometimes faulty .anyone have any ideas what i should check next? Thanks in advance