Stop typing in all CAPS.
click me <-- engine codes.
You have a dead battery. Bike needs a battery to run things. At idle there's not enough juice to power everything. Bike dies.
I'd bet, based on very little information, if you replaced your dead battery with a new one, you'd have a fully operational motorcycle.
It's possible a good charge might fix things too.
_________________
2008 WR250X
Gearing: 13t - 48t
Power Commander 5 / PC-V
Airbox Door Removed - Flapper glued - AIS removed
FmF Q4
Bridgestone Battlax BT-003rs