Wow shit. That's a mess.
Anyway, tomos is easy. Except yours has some severely wacky shit going on
Ok first, headlight means nothing, the regulator and lighting wires (last pic) mean nothing. Lights are an entirely separate system.
Tomos is simple, should be one yellow and one black wire out of the motor. Only. Yellow goes to the regulator and then to lights, Ignore that all for now. Black goes to a little split, one wire goes to the front, to the kill switch on the bars. Easiest to disconnect that for now also. Then black goes to the cdi/coil combo, that also has a ground, and the plug wire.
You got some funky stuff, dunno why there are so many wires on that coil. If it worked once before tho, I suppose it could work. Youre on your own though, you'll probably wanna get some gator clips and just try different wire combos and keep testing. I'd suspect the black wire from engine might be black or red, and other is ground. Looks like right now you've got your power wire tied into that soldered wire? Shit I dunno- that's wacky. Maybe just try color coded matching wires