Dude. What the fuck are you on?
You can invest money into things that lower your taxable amount, for example charitable donations, investing in your pension and improving your home energy efficiency. That’s exactly what tax credits and itemised tax deductions are.

As I understand it, technically the “thing of value” is the script itself - because it doesn’t have a clearly defined value you can get away with claiming some fairly crazy valuations.
There’s a very similar tax loophole popular with the wealthy where you get a “great deal” on some slightly valuable art, donate it to charity, get it valued by an “expert” you know, who just happens to think it’s worth many times what you paid, then write that off on your taxes. Basically free money.