most of the time its just better to replace the whole compressor and the dryer, if you put a new compressor with out a new dryer the compressor will not have a long life.
was it blowing cold? if so see if you can get a shop to vac out the system and then you go do your repairs, bring it back and they can use the same refrigerant they took out to charge the a/c. so you only pay for the vac service.