In most of my scripts I have issue key or some hard coded values and the purpose is to give you a working example but you can always change it to a variable.
#ScriptRunnerforJira #HardCodedIssueKeys
Script here: https://github.com/sparxsys/ScriptRunner-Scripts/
Topic