First, copy the entire script. Then open up RPG Maker XP and go to Tools > Script Editor.
On the left there will be a list of all the scripts, scroll to the bottom of that. Right click on the script titled 'Main' and hit 'Insert', this will place a new blank script above 'Main'. That is where you paste the script you want. All scripts must go above 'Main' and below 'Scene_Debug' unless stated otherwise.