Update script.js

Changed confirm to alert, in most cases. This makes it much easier to understand.