if I understood what you meant by rolling slope, here's a script to do what you're looking for and the secret behind how to make the script.
Script:
dt = Data Table( "Input data" ) << Sort(
By( :Group, :Minutes ),
Order( Ascending, Ascending ),
Output Table( "Sorted Input Data.jmp" )
);
dt << New Table Variable ("window", 5);
dt << new column ("Rolling Slope", numeric, set formula (If( Row() > window,
(:Reading + Lag( :Reading )) / 2,
.
)));
Secret (you can skip this if you already know it :
If you know how to do things in the GUI in JMP, you don't need a ton of scripting know-how to create the scripts to do things, as you can mostly just copy/paste from the log. Three examples for this script:
1. Sorting. I first sorted the data table using the Tables...Sort command, then I looked at the "Source" script saved to the new data table, and copy/pasted it into a new script window (I did add a "dt = " at the beginning and a semicolon at the end, so you do have to have a tiny bit of scripting know-how).
2. I added a new table variable using the GUI (red triangle on table, New Table Variable), then I looked at the log and shamelessly copied the script, and pasted it into my script window. I replaced the first part with a reference to "dt".
3. I typed in "dt << new column ("Rolling Slope", numeric, set formula (xxx));", then I made the formula in the GUI, and copy/pasted it to replace the "xxx" section of code.
That being said, here's a link to an excellent and free course for learning scripting.