Black should go to the ignition modules as a ground to shut off the engine off with the key. The grey will be 12 volts to the fuel solenoid on the bottom of the carb, and most likely the red goes to a voltage regulator.
I am assuming that the new engine has the 6 pin connector, I don't know about the older engine but may have the same connector. So you need to compare the old engine wires to the new wires to make sure that they are in the correct positions, but most likely will be a plug and play type connector and should connect directly without any changes.