PHP Code:
function onPlayerChats() {
if (player.chat == "the password") {
player.setLevel2("mylevel.nw", 32, 32);
}
}
I feel bad giving code without explaining it but I think you need to learn the basics of scripting first or you wouldn't understand the explanation anyway.