Full script

Untouched for a few years.