You could bring the whole script in but you would need to do that twice if you have two light sources.
But rather than repeating the script you bring it in once and use it as a GOSUB routine (GOSUB for each light source).
Or better still if you are needing it in a lot of objects use CALL to bring it in as a macro.
That way if ever you need to adjust it you can do so to the one macro file and all objects that CALL it will update automatically (a bit like hotlinks).
Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11