Help with a teleporter

I have a teleporter for my platform game, it works just fine, I just want to set a counter on it, so that, if I have a certain amount of coins, it and I jump through it, it will either ignore me, or take me to the next scene. here is my code for the tele porter-
onClipEvent (enterFrame) {
if (this.hitTest(_root.char)) {
if (_root.score.text>=5);
_root.gotoAndStop(‘level2’);
}

}

also, how do I get my score, to carry on to the next level?