I'll leave this right here. (Thanks to the other people whose scripts I stole and amalgamated.)