Functions now get the script passed to them

In addition to the target actor and arguments, functions get the script
they are a part of passed to them.
Repeat block works