My speedometer dosent work?

I just bought a Civic 98 LX 4D Auto and the all gauges work except the speedometer, I scanned the engine codes and got back a p0501 code, I replaced the speed sensor and checked all fuses also swapped the cluster with another Honda and it still didint work, what could it be? Also forgot to say that there's a tab that broke on the harness that connects to the cluster maybe it could be that?

How many miles on the odometer. Does that still measure distance traveled? Note the mileage, now drive around the block and see if the number changed. If it changed then the mileage is right so just travel the same speed as the other cars and you will probably be going the right speed. You can live a long time before you replace the speedo. Go to junk yard and take one out of the same year car and swap them. Now you have a new odometer reading. And that will be the reading the car has. Less or more. If it does not work you exchange it and try another. Chances of you running into a few that are all broken is 1:10000000000000 so not likely.

If you read the codes carefully you'd notice it always says CIRCUIT, never that a Sensor is bad. Because it only knows that a correct Signal is not being received. Many times it IS actually the Sensor, but sometimes the connector or wiring is bad and the Sensor is fine. The broken tab on a connector is cause for concern. How do you know it's still connected when you push the Gage Cluster back into place? You DON"T! You can buy many Connector Pigtails and splice them in. Search VSS Gage Cluster Connector Pigtail and see if they sell it for your car. Also since you know what it looks like, search Honda 2 pin connectors, if it's 2 wire. Or 3 pin connector or 4 pin connector.

If I were you, I would buy a different car and sell your old car for scrap.