If the nuts don t have wings lock a pair of locking pliers around each one in turn.
Toilet lock nut clockwise.
Use your pliers to loosen the nut under the tank.
Empty the bucket and place it underneath the water supply line.
Position the new valve in place of the faulty one.
Gently pull the nut down.
Locate the coupling nut on the underside of the toilet tank.
These are used in a toilet chiefly to secure the fill valve in the toilet tank.
I then would proceed counter clockwise with a second offset 6 pipe wrench and try to loosen the nut.
To be honest before i grabbed the hack saw i would always set up a straight 6 pipe wrench inside the toilet tank and position it at the base of the fill valve with the handle up against the toilet tank.
Then finish loosening the nut with your fingers.
The valve is connected to a rubber ball float.
Tightly secure the lock nut washer and nut.
The lock nut threads onto the fill valve inlet just above where the water supply hose or tube coupling attaches.
Remove the fill valve.
While turning these stabilize the bolt from above with a screwdriver.
Lock nuts are used to hold fixtures securely in place from below.
Remove the nut washer and lock nut.
The end of the water supply line will come away from the connection.
Some nuts have wings that you can grasp with your fingers.
Prepare the toilet turn the water supply shutoff valve clockwise to turn.
Use a pair of pliers to just loosen the coupling nut.
Raise the pipeline from the overflow tube.