I know this is an ethical question, but I wonder, would it be possible to have him license the script to the company for some annual fee and then offer the company a support contract as well in case new quirks are found that need to be updated? Combined license + support contract cost == his current salary. Or does the automated script he created already belong to the company?