I need code to run to modified 360 degrees servo motors.

Some servos allow you to modify them for continuous rotation without removing the pot; either the pot shaft is sawn off or otherwise disengaged from the output shaft, or in some case you can leave the pot in circuit, but just shorten its legs, so that the pot shaft is disengaged from the output shaft. Remember to centre the pot before closing-up.

I've never come across a mod that allows the pot to be left in place, because usually the pot itself will be incapable of 360 degree rotation.

If you're using resistors, say the pot is a 5k device, then two 2k2 or two 2k7 resistors should be soldered in its place, remembering to solder the junction of the two resistors to where the wiper was connected.