What I would suggest doing is modifying the script to something like this which will allow you to run it "row by row":
// Names Default To Here(1);
// Clear Log();
dt = Current Data Table();
run_script = Expr(
If(Row() == 1,
val = 1; // this is breaking rule of > 750, so we define it separately
change = 1;
);
next_vals = :Current[Row()::Min(Dim()[1], Row() + 9)];
over_limit = Sum(next_vals >= 750);
If(change & over_limit >= 10,
val++;
change = 0;
, over_limit < 10,
change = 1;
);
val;
show(row(), val, change, next_vals, over_limit);
Write("\!N");
);
Row() = 1;
run_script;
Row() = 2;
run_script;
Row() = 5;
run_script;
Then you can fairly easily run the script in parts and look at the log to see what happens (you can also run one row at the time if you want to).
Script Window and Embedded Log:
Scripting Index is also helpful in explaining the functions, such as Dim().
If this won't be enough of a help, please comment in this post and tag me, I can try to explain it in more detail.
-Jarmo