94 toyota dies while driving randomly

94 toyota 22re 143000 miles. Head gasket was replaced. (not sure how long after this problem started) Problem: While driving engine begins to lope…about 1000 rpm to 3000 rpm…then ok for awhile then lopes then other direction 1000 rpm down to about 500 …then dies and if let sit it starts again after awhile.
I dont drive this truck it one im looking at buying and trying to diagnose b4 i buy.

maybe that should be randomly dies

egr?

Come on guys. I know one of you has the answer to this. It must be a sensor. Idle control ???

I’ve been studying it and it looks like a number of possibilities … crap

The description could be more helpful. You really are not specific. How long does it sit before starting again? What do you mean by lopes, this is not a common term. does this mean the rpms drop or the mph? This needs more pedal or just happens no matter how far you push the pedal. Does this happen at highway speed with the engine hot?

I was told…It starts after sitting a few minutes. The “surge” is RPMs and i believe it to be a fairly common term. I started it cold and it surged one time. I drove it and the surge didnt happen. That seems to be why a mechanic or mechanics can find the problem. Its random

Perhaps the fuel pump relay contacts are going bad. Replacing the relay might fix the trouble. Maybe the fuel filter needs to be replaced. The trouble could also be with the ignition system. I would have a can of starter fluid handy in the car for when the trouble happens again. When it does, spray some fluid into the intake and see if that gets the engine going. If it does then the ignition is ok and a fuel delivery problem is most likely the cause of the trouble.

Fuel pressure was checked but i guess that wouldnt eliminate bad contacts…