Plugins can change scripts using a property called .Source, however I am wondering if the Source becomes ‘locked’ from plugins if a developer has it open in a TC session.
I just tried this in Team Create (with collaborative scripting on) and failed.