I jailbroke my iPhone 5 and tried to take it off and now it won't start

About a week ago I jailbroke my iPhone 5 with Pangu, followed all the instructions given and got cydia, everything seemed to be working fine, I had no issues with it at all. But then my phone constantly turned on and off by itself, and whenever it turned off there was something that appeared to be like a green glitch and then the iPhone took forever to turn back on, this never happened before I jailbroke it, so I thought erasing all the contents of my iPhone (practically resetting it) would get rid of Cydia and my phone wouldn't be jailbroken anymore and I wouldn't have to deal with the green glitch issue anymore. So I reset it and now my phone has a black screen and a buffering sign planted in the middle of the phone and It's taking forever to do anything and I'm scared, any suggestion will help!I jailbroke my iPhone 5 and tried to take it off and now it won t start, help

To restore a jailbroken iPhone, you need to use iTunes on your computer. IPhones can't be updated or restored via the iPhone when jailbroken. Just restore it on your computer, and it'll be fine. Try rejailbreaking after a clean restore, this'll help prevent any problems.