amsung Galaxy S4-I9505 stuck in bootloop/bricked. NEED HELP!!!

I recently received a Samsung Galaxy S4 from my friend as my old phone broke. When i got it, i tried to go into recovery mode and it didn't work and ended up in going in a boot loop. Every time i try and go on recovery mode it says "movinand checksum confirmation fail", so last night i decided to run Odin and flash new firmware on the device and every time i tried to flash it, it says "There is no PIT partition", so i looked around for some pits and i tried flashing them with the firmware, by themselves and i even changed to 3 different cords and when i do it keeps saying "re-repartition operation failed". I have spent way to long on this and i need help!!!