What’s wrong with my Betta fish?
I don't know
It would help if you told us the symptoms. what size tank? was it heated filter? did he have tank mates. If it had a heater and filter, Put it back in the heated filtered tank ASAP. Use a gravel vacuum to change 25-40$ of the water, and add new water that is the same temp as the rest of the tank water. Which should be 78-82 degrees, and it should be stable 24-7. Since you already took him out, go aheady and clean it before adding him, and if it is really as dirty as you say, do the 40% water change, add new water, and repeat. Add dechlorinatore everytime, chlorine can kill the healthy bacteria that cycle the filter. The betta may have lost color simply from cold water. But he can also get sick with diseases such as ich in cold water. And , he will not heal well in cold water. Offer more tempting foods such as frozen blood worms, shrimp and or daphnia , new life thera, Plus A pellets, "which are made to be tempting to sick fish, and also have plenty of protein to be a staple pellet for a betta"
i would talk to a vet about it and ask hinn or sonneone at the pet store