Short answer - no.
However, you could write a “base” script that would modify itself by accepting a snippet of code that was passed as a message and would then be embedded within the “base” script itself.
Short answer - no.
However, you could write a “base” script that would modify itself by accepting a snippet of code that was passed as a message and would then be embedded within the “base” script itself.