I have no idea what language you mean in anyway. But Ill answer it in TorqueScript. Since it's just my favorite First you need to make something that will read the premade script function...
A script is a set of instructions. The computer executes the instructions, then returns data, a value -- which could be a number, a string, a list, or another data type. See related link for more...