While these terms seem synonymous, they actually mean different things. Coding can be applied to all programming languages, but scripting cannot. Scripting pertains to a series of instructions given to programs running on a computer, such as an email service or a website. Scripting is responsible for managing dynamic content, such as a database, and is also responsible for automation of said content, where it makes decisions and relays instructions to its parent program. This way, developers can incorporate features of a website with one set of instructions instead of writing out every possible scenario for a dynamic function.
It's important to know that scripting is one type of coding. Just as scripting languages are responsible for the dynamic content of a website, markup languages provide static content, such as webpage design. In essence, all scripting is coding, but not all coding is scripting.