Cannot remove leaky shutoff valve
I tried to replace a leaking shutoff valve on the toilet at a friend's house. The valve is old and quite corroded. The replacement she already had was a screw on with 1/4 turn on/off handle... no compression fitting on main inlet side. The supply line is PVC pipe. After shutting off water and disconecting the toilet fill line, I tried to unscrew the entire valve from pipe. It turns but does not back out. Is there a way to unscrew the valve from the inlet pipe? With all the corrosion I cannot tell if the old valve screws into the metal nut around the pipe or if it is one piece like the replacement valve. If it is two pieces (valve and attatchment nut) and highly corroded, what is best way to break apart. Not much room to work as I'm sure is common for these. Thanks!