A script is a piece of code with instructions which tell a programme how to operate or behave. An addon is a script that performs a desired function.