As far as I researched the Freon compressor to cool air has to stay up right not to leak oil into the system? So how does one work in space? What do they use to cool of the air?
The space shuttle used Freon in some of its cooling loops but they did not work like a home air conditioning system with expansion valves, etc.
Schematic of home AC system:
Schematic of shuttle Freon loop:
Instead the Freon was used as the heat transfer medium in two parallel cooling loops. Redundant electrical pumps pumped the Freon through a series of heat exchangers which picked up heat either directly from components mounted on coldplates, or from heat exchangers with other thermal loops. These other loops included the fuel cell coolant loops, the hydraulic systems, and the water loops, which cooled coldplate mounted equipment inside the crew cabin and also picked up heat from the cabin air through the cabin heat exchanger.
All of this heat collected by the Freon loops was rejected to space through the large radiators mounted on the inside of the payload bay doors. Other heat rejection devices available during various mission phases were a heat exchanger with the ground service equipment, an ammonia boiler system, and a water flash evaporator system.
The diagram above is extracted from the Environmental Control and Life Support Training Manual which you may wish to peruse for further information about the shuttle's Freon, water, and air coolant loops.