Moving Control Points of a Line Relative to the Surface Normal

Hello, I want to move the control points I selected on a line according to the normal direction of a surface. But I couldn’t do this. I tried writing it with script but I wasn’t successful. I want to move it like Orient on Surface command