How to recreate this scripting with something like a derived or reference tag?

Where are the values coming from?

Tip: while a screengrab of a code window is useful to give context it means that anyone wanting to correct your code has to type it all out. Post the formatted code as well as the screengrab. See Wiki - how to post code on this forum.