Huh?
The "law of attraction," also known as "gravity" doesn't contradict the repulsion effect of like charges. In other words, one theory doesn't make the other theory false!
Stars go supernova because of both effects working against each other, which means both effects are working. The intense gravity of the particles in a star overcome the electromagnetic repulsion and force them to fuse into heavier elements. When there's no more nuclear fuel for a star to burn, the electromagnetic repulsion wins out and reverses the push of the particles, causing the star to supernova. Same principle as to why our own sun will turn into a red giant. The intense gravity will no longer win out over the internal outward pressure. The difference is our sun is small enough that the expansion won't be an energetic explosion, but simply a red swelling.
Stars exist because of both gravity and electromagnetism working in concert.