I've noticed that some recipes will cause a red line to appear through your score, though it tends to go away eventually.
What does it mean? Which Lua function causes it? Is it bad?
The red line means the score doesn't count for credit in the puzzle. You have to clear the red line to receive points for the score when the puzzle ends.
Several things can cause the red line:
* open cutpoints (created manually or by a recipe)
* playing as evolver, but haven't improved the solution (normally, a two-point gain is required)
* filters/conditions are disabled (manually or by a recipe)
* out of moves on a sketchbook puzzle (use undo or restore a save)
There may be some other causes, but those spring to mind. Open the "Objectives" dropdown under the score and scroll through, normally you'll see a red explanation of what's wrong.