Hyundai Transmission

My husband and I have a 1997 Hyundai Sonata V6 SE with 165k+ miles (the speedometer doesn?t always work so the mileage is higher than that.) The other day it bucked a little getting into gear (it?s an automatic), but then smoothed out. Later in the same trip it started to slide backwards when starting on a hill and then about a mile from home the check engine light came on. Drove it home and let it sit for about 20 minutes and when I went out to check it I couldn?t get it to move ? you can shift the transmission but the car doesn?t go anywhere no matter what gear you put it in. I checked the fluids and there is transmission fluid in it (it?s red and doesn?t smell burnt) however there also appears to be transmission fluid all over a good portion of the car (the battery, tire, just everything is very freshly lubricated.) It?s like the transmission just spewed fluid everywhere. My husband was driving and said there was no odor and no smoke and no indication that the engine was overheating. The engine is idling very rough. And on the off chance there?s a relation? there is a hole in the muffler. The car is not worth anything financially speaking and we have little to no money to put into it ? we?re not even sure it?s worth the money to have it towed to a garage. I?ll pay to have it towed if there?s a chance they?ll find something fixable and moderately priced but not if they?re just going to tell me the transmission is gone. Any guidance and insight you could offer would be greatly appreciated. Thanks!