Scripts are one of the many ways to program your game using code and allow you to create your own functions. What's unique about script resources is that they are independent of any object and can work on one or many objects. They can also be passed parameters which makes them much more modular than code actions and initialization code. It's very easy with a script to create reusable code that in most cases you can copy and paste into any game and use. This can also be useful if you want to work on a game with other people as they can write scripts without having access to your game and then copy them in later.