Chosen Solution
it only works when is pluged in, and as soon as i unploged it completely turns off.what can it be, battery?
Bat battery- but unfortunately iFixit does not carry the part- So you’d best check elsewhere.
Try eBay: http://shop.ebay.com/?_from=R40&_trksid=… It is also possible that it is a bad motherboard, especially if it got wet or has some kind of liquid damage.
get a new batery not logic board