Hi,
Yes the script is only for masked language modeling (MLM), so you would have to modify this script if you want to also perform next sentence prediction.
But what you could do is the following:

First use the run_mlm.py script to continue pre-training Greek BERT on your domain specific dataset for masked language modeling.
Define a BertForPreTraining model (which includes both the masked language modeling head as well as a sequence classification head), load in the weights of the model that you trained in step 1, and then train on the next sentence prediction task.