There is the script step Go To Record/Request and there is possible to calculate record number.
Probably you need auto-enter field for record number (auto-enter serial) and then get Max in calculation to go to the last record.
Go To Record [First] //jumps to first record in found set
Go To Record [Last] //Jumps to last record in found set
Go To Record [Previous] //Jumps to record just before current record in found set
Go To Record [Next] //Jumps to record just after current record in found set
Go To Record [No dialog; "Your expression here"] Jumps to a record specified in your calculation expression
Go To Record ["Your expression here"] Jumps to a record specified in your calculation expression, but halts your script and pops up a dialog for the user to confirm the "jump"
All of these options can be selected from the script options section of the script editor while the script step is selected (highlighted) in your script.
Note that Previous and Next options have an "exit after last" option that can be used to exit a loop after the last/first record has been reached.
Note also that Go To Record relies on you to first set up the correct found set and record sort order in order for it to work the way you want.