It is same as declaring a Variable inside your script.
Let vTest = 'Test Load';
inside your text file.
Now Gp to your Dashboard -> Edit Script -> Insert -> Include Statement -> Then select the Text File just created.
Load the Dashboard and see the Variable is created inside your dashboard.