That black wire grounds where the battery box cover mounts,
View attachment 192278
It won't keep running,, First check your Valve Nash - IN .008" / EX .010"
Your gonna need to inspect the valve seats, Sadly the 1999-2004 valve seats came loose within the first 500 miles
Yeah the engine will start when cold but when it warms up a valve seat comes loose and the engine stalls
After it cools down the engine will start again
A new Cyl top end kit or even a new engine can be bought from
www.whizzercruzzerparts.com
Not saying this is your problem but something to check right away to eliminate if it' the issue