On the Script side, create a new String variable and make it an Input to the script.
To match the example from Melissa:

------------------------------
George Ganahl CCXP, GCA
Principal Technology Consultant
Genesys
------------------------------
Original Message:
Sent: 04-02-2019 10:44
From: Matthew Calton
Subject: Script Change Page
Thanks Melissa
------------------------------
Matthew Calton
Grove & Dean Ltd
------------------------------
Original Message:
Sent: 04-02-2019 10:40
From: Melissa Bailey
Subject: Script Change Page
See screenshot
------------------------------
Melissa Bailey
Genesys - Employees
Original Message:
Sent: 04-02-2019 10:27
From: Matthew Calton
Subject: Script Change Page
Would you have any examples I could use as a guide for the flow - I may be able to get through pulling it through to the script after getting the flow right. :-)
------------------------------
Matthew Calton
Grove & Dean Ltd
Original Message:
Sent: 04-02-2019 09:50
From: Melissa Bailey
Subject: Script Change Page
Did you try passing the DNIS (in the flow it's Call.CalledAddressOriginal) to the script as an input variable?
------------------------------
Melissa Bailey
Genesys - Employees
Original Message:
Sent: 04-02-2019 04:04
From: Matthew Calton
Subject: Script Change Page
Hi @Melissa Bailey @George Ganahl guys I posted this the other day and wondered if you could help - I just want to effect a change page on DNIS number as explained but have tried hunting through all the areas and cannot find what I am looking for. I probably could muddle through but would much prefer your guidance. If I can achieve this with a bit of scripting language that would be cool... kindest regards
------------------------------
Matthew Calton
Grove & Dean Ltd