Alex The Dog - a platformer
@Stage\n\nwhen flag clicked\nset [level v] to [0]\nhide variable [level v]\n\nwhen I receive [game over v]\nforever\n    stop all sounds\nend\n\nwhen flag clicked\nforever\n    if <<key (space v) pressed?> and <(backdrop [name v]) = [title screen]>> then\n        wait (1.1) seconds\n        switch backdrop to (bakgrunn1 v)\n        set [level v] to [1]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<key (t v) pressed?> and <(backdrop [name v]) = [title screen]>> then\n        switch backdrop to (toturial page 1 v)\n    end\n    if <<key (space v) pressed?> and <<(backdrop [name v]) = [Toturial page 1]> or <<(backdrop [name v]) = [Toturial page 2]> or <(backdrop [name v]) = [Toturial page 3]>>>> then\n        wait (0.3) seconds\n        next backdrop\n    end\n    if <<key (space v) pressed?> and <(backdrop [name v]) = [Toturial page 4]>> then\n        switch backdrop to (bakgrunn1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<key (s v) pressed?> and <(backdrop [name v]) = [title screen]>> then\n        switch backdrop to (story v)\n    end\nend\n\nwhen I receive [level 8 v]\nswitch backdrop to (level 8 v)\nset [level v] to [8]\n\nset [brightness v] effect to (0)\n\nwhen I receive [level 7 v]\nswitch backdrop to (level 7 v)\nset [level v] to [7]\n\nset [brightness v] effect to (-40)\n\nwhen I receive [level 6 v]\nswitch backdrop to (level 6 v)\nset [level v] to [6]\n\nset [brightness v] effect to (-30)\n\nwhen I receive [level 5 v]\nswitch backdrop to (level 5 v)\nset [level v] to [5]\n\nwhen I receive [level 4 v]\nswitch backdrop to (level 4 v)\nset [level v] to [4]\n\nwhen I receive [level 3 v]\nswitch backdrop to (level 3 v)\nset [level v] to [3]\n\nwhen I receive [level 2 v]\nswitch backdrop to (level 2 v)\nset [level v] to [2]\n\nwhen I receive [start level 1 v]\nswitch backdrop to (level 1 v)\n\nwhen I receive [level 9 v]\nswitch backdrop to (level 9 v)\nset [level v] to [9]\n\nwhen backdrop switches to [title screen v]\nrepeat until <(level) = [10]>\n    play sound [Mario Elevator music v] until done\nend\n\nwhen flag clicked\nswitch backdrop to (tails-spin01 sceene v)\nwait (4) seconds\nswitch backdrop to (title screen v)\n\nwhen I receive [level 10 v]\nswitch backdrop to (level 10 v)\nset [level v] to [10]\n\nwhen backdrop switches to [level 10 v]\nstop all sounds\nwait (0.5) seconds\nrepeat until <(level) = [cutsceene]>\n    play sound [Run Amok v] until done\nend\n\nwhen I receive [cutsceene v]\nswitch backdrop to (cutsceene v)\nset [level v] to [cutsceene]\n\nwhen I receive [cutsceene v]\nwait (4) seconds\nstop all sounds\nforever\n    play sound [Mario Elevator music v] until done\nend\n\nwhen backdrop switches to [tails-spin01 sceene v]\nstart sound [25-carnival-night-zone-act-1.mp3 v]\n\n@Alex the dog\n\nwhen backdrop switches to [level 1 v]\nshow variable [score v]\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [level 1 v]\nshow\n\nwhen flag clicked\nforever\n    if <not <<<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>> and <not <<key (up arrow v) pressed?> and <not <(costume [number v]) = [6]>>>>>> then\n        set [fall v] to [0]\n        repeat until <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>\n            change [fall v] by (-0.6)\n            switch costume to (running6 v)\n            change y by (fall)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <<key (space v) pressed?> or <<key (right arrow v) pressed?> or <<key (left arrow v) pressed?> or <<key (up arrow v) pressed?> or <<key (b v) pressed?> or <<(speed) > [1]> or <<(speed) < [-1]> or <key (down arrow v) pressed?>>>>>>>>> then\n        switch costume to (normal v)\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    if <key (m v) pressed?> then\n        go [backward v] (3) layers\n    end\n    if <key (c v) pressed?> then\n        go to [front v] layer\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#ff0000)?> then\n        set [speed v] to [0]\n        go to x: (startplace x) y: (startplace y)\n        broadcast (lose a life v)\n    end\nend\n\ndefine jump\nset [jump v] to [18]\nchange y by (10)\nrepeat until <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>\n    change [jump v] by (-0.5)\n    change y by (jump)\nend\n\nwhen flag clicked\nforever\n    if <touching (flower 1 v)?> then\n        go to x: (-160) y: (90)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (to level 2 v)?> then\n        broadcast (level 2 v)\n        go to x: (-180) y: (-78)\n        set [speed v] to [0]\n        set [startplace x v] to [-180]\n        set [startplace y v] to [-78]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (flower 2 v)?> then\n        go to x: (160) y: (-100)\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>> then\n        repeat until <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>\n            switch costume to (running5 v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<key (up arrow v) pressed?> and <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>> then\n        start sound [pop v]\n        jump\n    end\nend\n\nwhen backdrop switches to [level 1 v]\nsay (join (join [I'm counting on you to get my bones back,] (username)) [!]) for (5) seconds\n\nwhen backdrop switches to [level 1 v]\nshow variable [time v]\nforever\n    wait (1) seconds\n    change [time v] by (1)\nend\n\nwhen flag clicked\nforever\n    if <<(speed) < [-7]> and <<<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>> and <not <<key (right arrow v) pressed?> or <key (left arrow v) pressed?>>>>> then\n        repeat until <<(speed) > [-1]> or <<<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>> and <<key (right arrow v) pressed?> or <key (left arrow v) pressed?>>>>\n            switch costume to (brake v)\n        end\n    end\n    if <<(speed) > [7]> and <<<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>> and <not <<key (right arrow v) pressed?> or <key (left arrow v) pressed?>>>>> then\n        repeat until <<(speed) < [1]> or <<<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>> and <<key (right arrow v) pressed?> or <key (left arrow v) pressed?>>>>\n            switch costume to (brake v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>> then\n        change y by (5)\n    end\n    if <not <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>> then\n        change y by (-5)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<not <<key (right arrow v) pressed?> or <key (left arrow v) pressed?>>> and <<key (down arrow v) pressed?> and <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>>> then\n        switch costume to (duck v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (to level 3 v)?> then\n        broadcast (level 3 v)\n        go to x: (-180) y: (-65)\n        set [speed v] to [0]\n        set [startplace x v] to [-180]\n        set [startplace y v] to [-65]\n    end\nend\n\nwhen backdrop switches to [level 3 v]\nforever\n    if <touching color (#ff6998)?> then\n        go to x: (-195) y: (113)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (to level 4 v)?> then\n        broadcast (level 4 v)\n        go to x: (-199) y: (96)\n        set [speed v] to [3]\n        set [startplace x v] to [-199]\n        set [startplace y v] to [96]\n    end\nend\n\nwhen backdrop switches to [level 1 v]\ngo to x: (-180) y: (-110)\nset [startplace x v] to [-180]\nset [startplace y v] to [-110]\npoint in direction (90)\nswitch costume to (normal v)\nset size to (45) %\n\nwhen flag clicked\nforever\n    if <key (r v) pressed?> then\n        broadcast (restart v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(lives) = [0]> then\n        broadcast (game over v)\n        stop [other scripts in sprite v]\n        set size to (60) %\n        switch costume to (dead v)\n        set [jump v] to [13]\n        change y by (10)\n        repeat until <(y position) < [-180]>\n            change [jump v] by (-0.5)\n            change y by (jump)\n        end\n        switch costume to (game over v)\n        go to x: (0) y: (0)\n        point in direction (90)\n        stop [all v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(speed) = [0]> then\n        switch costume to (normal v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (right arrow v) pressed?> then\n        point in direction (90)\n        change [speed v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        point in direction (-90)\n        change [speed v] by (-1)\n    end\n    set [speed v] to ((speed) * (0.9))\n    change x by (speed)\nend\n\nwhen flag clicked\nforever\n    if <key (b v) pressed?> then\n        set [barking v] to [1]\n        switch costume to (bark2 v)\n        play sound [bark v] until done\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (spikes v)?> then\n        go to x: (startplace x) y: (startplace y)\n        broadcast (lose a life v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (enemy2 v)?> and <(Barking) = [1]>> then\n        start sound [Bomb Exploding Sound v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (enemy1 v)?> and <(Barking) = [0]>> then\n        go to x: (startplace x) y: (startplace y)\n        broadcast (lose a life v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<key (right arrow v) pressed?> and <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>> then\n        point in direction (90)\n        switch costume to (running6 v)\n        wait (0.08) seconds\n    end\n    if <<key (right arrow v) pressed?> and <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>> then\n        point in direction (90)\n        switch costume to (running1 v)\n        wait (0.08) seconds\n    end\n    if <<key (right arrow v) pressed?> and <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>> then\n        point in direction (90)\n        switch costume to (running2 v)\n        wait (0.08) seconds\n    end\n    if <<key (right arrow v) pressed?> and <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>> then\n        point in direction (90)\n        switch costume to (running3 v)\n        wait (0.08) seconds\n    end\n    if <<key (right arrow v) pressed?> and <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>> then\n        point in direction (90)\n        switch costume to (running4 v)\n        wait (0.08) seconds\n    end\n    if <<key (right arrow v) pressed?> and <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>> then\n        point in direction (90)\n        switch costume to (running5 v)\n        wait (0.08) seconds\n    end\n    if <<key (right arrow v) pressed?> and <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>> then\n        point in direction (90)\n        switch costume to (running4 v)\n        wait (0.08) seconds\n    end\n    if <<key (right arrow v) pressed?> and <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>> then\n        point in direction (90)\n        switch costume to (running3 v)\n        wait (0.08) seconds\n    end\n    if <<key (right arrow v) pressed?> and <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>> then\n        point in direction (90)\n        switch costume to (running2 v)\n        wait (0.08) seconds\n    end\n    if <<key (right arrow v) pressed?> and <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>> then\n        point in direction (90)\n        switch costume to (running1 v)\n        wait (0.08) seconds\n    end\nend\n\nwhen flag clicked\nset [speed v] to [0]\n\nwhen flag clicked\nforever\n    if <touching (to level 6 v)?> then\n        broadcast (level 6 v)\n        go to x: (-199) y: (-118)\n        set [speed v] to [0]\n        set [startplace x v] to [-199]\n        set [startplace y v] to [-118]\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <key (b v) pressed?>> then\n        set [barking v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (to level 7 v)?> then\n        broadcast (level 7 v)\n        go to x: (-199) y: (-73)\n        set [speed v] to [0]\n        set [startplace x v] to [-199]\n        set [startplace y v] to [-73]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (to level 8 v)?> then\n        broadcast (level 8 v)\n        go to x: (-199) y: (-104)\n        set [speed v] to [0]\n        set [startplace x v] to [-199]\n        set [startplace y v] to [-104]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (to level 9 v)?> then\n        broadcast (level 9 v)\n        go to x: (-199) y: (-104)\n        set [speed v] to [0]\n        set [startplace x v] to [-199]\n        set [startplace y v] to [-108]\n    end\nend\n\nwhen flag clicked\ngo to x: (-180) y: (-110)\n\nwhen flag clicked\nforever\n    if <touching (to level 10 v)?> then\n        broadcast (level 10 v)\n        go to x: (-199) y: (-84)\n        set [speed v] to [0]\n        set [startplace x v] to [-199]\n        set [startplace y v] to [-15]\n    end\nend\n\nwhen flag clicked\nhide variable [score v]\nset [score v] to [0]\nset [time v] to [0]\nhide variable [time v]\n\nwhen I receive [restart v]\nset [jump v] to [0]\ngo to x: (startplace x) y: (startplace y)\npoint in direction (90)\n\nwhen flag clicked\nforever\n    if <<key (left arrow v) pressed?> and <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>> then\n        point in direction (-90)\n        switch costume to (running6 v)\n        wait (0.08) seconds\n    end\n    if <<key (left arrow v) pressed?> and <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>> then\n        point in direction (-90)\n        switch costume to (running1 v)\n        wait (0.08) seconds\n    end\n    if <<key (left arrow v) pressed?> and <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>> then\n        point in direction (-90)\n        switch costume to (running2 v)\n        wait (0.08) seconds\n    end\n    if <<key (left arrow v) pressed?> and <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>> then\n        point in direction (-90)\n        switch costume to (running3 v)\n        wait (0.08) seconds\n    end\n    if <<key (left arrow v) pressed?> and <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>> then\n        point in direction (-90)\n        switch costume to (running4 v)\n        wait (0.08) seconds\n    end\n    if <<key (left arrow v) pressed?> and <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>> then\n        point in direction (-90)\n        switch costume to (running5 v)\n        wait (0.08) seconds\n    end\n    if <<key (left arrow v) pressed?> and <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>> then\n        point in direction (-90)\n        switch costume to (running4 v)\n        wait (0.08) seconds\n    end\n    if <<key (left arrow v) pressed?> and <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>> then\n        point in direction (-90)\n        switch costume to (running3 v)\n        wait (0.08) seconds\n    end\n    if <<key (left arrow v) pressed?> and <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>> then\n        point in direction (-90)\n        switch costume to (running2 v)\n        wait (0.08) seconds\n    end\n    if <<key (left arrow v) pressed?> and <<touching color (#00ff55)?> or <<touching color (#00cccc)?> or <touching color (#00b208)?>>>> then\n        point in direction (-90)\n        switch costume to (running1 v)\n        wait (0.08) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (to level 5 v)?> then\n        broadcast (level 5 v)\n        go to x: (-199) y: (-113)\n        set [speed v] to [0]\n        set [startplace x v] to [-199]\n        set [startplace y v] to [-113]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (to cutsceene v)?> then\n        broadcast (cutsceene v)\n        hide\n    end\nend\n\nwhen I receive [lose a life v]\nwait (0.1) seconds\nif <not <<touching (sprite8 v)?> and <(costume [number v]) = [11]>>> then\n    go to x: (startplace x) y: (startplace y)\nend\n\n@Sprite1\n\nwhen backdrop switches to [level 1 v]\nhide\n\nwhen flag clicked\nforever\n    if <<key (space v) pressed?> and <(backdrop [name v]) = [title screen]>> then\n        glide (0.5) secs to x: (100) y: (350)\n        hide\n    end\nend\n\nwhen backdrop switches to [toturial page 1 v]\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen backdrop switches to [story v]\nhide\n\nwhen backdrop switches to [title screen v]\nshow\ngo to x: (240) y: (-1)\nglide (0.5) secs to x: (90) y: (-1)\nglide (0.1) secs to x: (100) y: (-1)\n\nwhen flag clicked\nforever\n    if <not <(backdrop [name v]) = [title screen]>> then\n        hide\n    end\nend\n\n@Sprite2\n\nwhen backdrop switches to [level 1 v]\nshow\ngo to x: (130) y: (-133)\n\nwhen flag clicked\nforever\n    if <touching (alex the dog v)?> then\n        hide\n        repeat until <(score) = [10]>\n            wait (0.0001) seconds\n            change [score v] by (1)\n            start sound [rings sound1 v]\n        end\n    end\nend\n\nwhen backdrop switches to [level 2 v]\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen flag clicked\nhide\n\n@Sprite3\n\nwhen backdrop switches to [level 1 v]\nshow\nshow variable [lives v]\nswitch costume to (alex the dog v)\nset size to (80) %\ngo to x: (-216) y: (-192)\nforever\n    wait (0.1) seconds\n    next costume\nend\n\nwhen I receive [show special stage v]\nhide\nhide variable [lives v]\n\nwhen flag clicked\nhide\nhide variable [lives v]\n\nwhen flag clicked\nset [lives v] to [15]\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen I receive [lose a life v]\nchange [lives v] by (-1)\nset [speed v] to [0]\nset volume to (100) %\nplay sound [buzz whir v] until done\n\nwhen backdrop switches to [cutsceene v]\nhide\nhide variable [lives v]\n\n@Sprite5\n\nwhen flag clicked\nforever\n    go [backward v] (100000000) layers\nend\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [level 1 v]\nshow\n\nwhen flag clicked\ngo to x: (150) y: (116)\n\nwhen backdrop switches to [level 2 v]\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\n@flower 1\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [level 1 v]\nshow\ngo to x: (209) y: (-109)\nswitch costume to (drakt1 v)\nforever\n    wait (0.1) seconds\n    next costume\nend\n\nwhen backdrop switches to [level 2 v]\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\n@flower 2\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [level 1 v]\nshow\ngo to x: (-205) y: (78)\nswitch costume to (drakt1 v)\nforever\n    wait (0.1) seconds\n    next costume\nend\n\nwhen backdrop switches to [level 2 v]\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\n@Sprite10\n\nwhen backdrop switches to [level 1 v]\nshow\ngo to [front v] layer\nset size to (20) %\ngo to x: (215) y: (-165)\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <<key (m v) pressed?> and <<(x position) = [215]> and <(y position) = [-165]>>> then\n        glide (0.5) secs to x: (0) y: (0)\n        repeat (4)\n            change size by (50)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<key (c v) pressed?> and <<(x position) = [0]> and <(y position) = [0]>>> then\n        repeat (4)\n            change size by (-50)\n        end\n        glide (0.5) secs to x: (215) y: (-165)\n    end\nend\n\nwhen I receive [show special stage v]\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen backdrop switches to [cutsceene v]\nhide\n\n@to level 2\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [level 1 v]\nshow\ngo to x: (203) y: (65)\n\nwhen backdrop switches to [level 2 v]\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\n@Alex on the map\n\nwhen flag clicked\nforever\n    if <<key (m v) pressed?> and <<(level) = [2]> or <(level) = [3]>>> then\n        wait (0.6) seconds\n        show\n        go to [front v] layer\n        go to x: (-70) y: (99)\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (c v) pressed?> then\n        hide\n    end\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <<key (m v) pressed?> and <(level) = [1]>> then\n        wait (0.6) seconds\n        show\n        go to [front v] layer\n        go to x: (-128) y: (100)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<key (m v) pressed?> and <<(level) = [4]> or <<(level) = [5]> or <(level) = [6]>>>> then\n        wait (0.6) seconds\n        show\n        go to [front v] layer\n        go to x: (-30) y: (73)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<key (m v) pressed?> and <(level) = [7]>> then\n        wait (0.6) seconds\n        show\n        go to [front v] layer\n        go to x: (18) y: (111)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<key (m v) pressed?> and <<(level) = [8]> or <(level) = [9]>>> then\n        wait (0.6) seconds\n        show\n        go to [front v] layer\n        go to x: (67) y: (23)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<key (m v) pressed?> and <(level) = [10]>> then\n        wait (0.6) seconds\n        show\n        go to [front v] layer\n        go to x: (121) y: (-17)\n    end\nend\n\n@Alex title screen\n\nwhen backdrop switches to [bakgrunn1 v]\nhide\n\nwhen backdrop switches to [title screen v]\nset size to (250) %\ngo to x: (-240) y: (-3)\nshow\nswitch costume to (normal v)\nglide (0.5) secs to x: (-100) y: (-3)\nglide (0.1) secs to x: (-120) y: (-3)\n\nwhen flag clicked\nforever\n    if <<key (space v) pressed?> and <(backdrop [name v]) = [title screen]>> then\n        wait (0.5) seconds\n        forever\n            wait (0.08) seconds\n            next costume\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<key (space v) pressed?> and <(backdrop [name v]) = [title screen]>> then\n        wait (0.5) seconds\n        glide (1) secs to x: (240) y: (-3)\n    end\nend\n\nwhen backdrop switches to [story v]\nhide\n\nwhen backdrop switches to [toturial page 1 v]\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen flag clicked\nhide\nforever\n    if <not <(backdrop [name v]) = [title screen]>> then\n        hide\n    end\nend\n\n@Whiskers the Cat\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen flag clicked\nset size to (23) %\nhide\n\nwhen I receive [boss defeated v]\nwait (0.5) seconds\npoint in direction (90)\ngo to x: ([x position v] of [whiskers the cat in ufo v]) y: ([y position v] of [whiskers the cat in ufo v])\nswitch costume to (jump v)\nshow\nset [whiskers jump v] to [12]\nchange y by (10)\nrepeat until <(x position) > [240]>\n    change x by (7)\n    change [whiskers jump v] by (-0.5)\n    change y by (whiskers jump)\nend\nhide\n\nwhen I receive [cutsceene v]\nswitch costume to (normal v)\nset size to (35) %\nshow\nrepeat until <([y position v] of [rocketship v]) > [340]>\n    go to x: ([x position v] of [rocketship v]) y: ([y position v] of [rocketship v])\n    change y by (45)\n    point in direction (-90)\nend\nhide\n\n@Sprite8\n\nwhen backdrop switches to [bakgrunn1 v]\nwait (1) seconds\ngo [backward v] (3) layers\nshow\ngo to x: (-240) y: (-25)\nset size to (55) %\nglide (1.5) secs to x: (70) y: (-25)\nwait (4) seconds\nglide (1) secs to x: (240) y: (-25)\nhide\nbroadcast (start level 1 v)\n\nwhen backdrop switches to [level 1 v]\nset [whiskers life v] to [200]\nhide\n\nwhen backdrop switches to [bakgrunn1 v]\nswitch costume to (drakt1 v)\nwait (3.5) seconds\nswitch costume to (drakt3 v)\nwait (1) seconds\nswitch costume to (drakt1 v)\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen backdrop switches to [level 10 v]\ngo to x: (115) y: (-115)\npoint in direction (-90)\nset [ufo direction v] to [-90]\nswitch costume to (drakt2 v)\nshow\nwait (10) seconds\nrepeat until <(boss defeated) = [1]>\n    set [ufo direction v] to [-90]\n    broadcast (Start shooting lasers v)\n    switch costume to (drakt4 v)\n    wait (0.5) seconds\n    switch costume to (drakt2 v)\n    wait (3) seconds\n    glide (2) secs to x: (115) y: (50)\n    wait (1) seconds\n    glide (1) secs to x: (0) y: (50)\n    wait (0.5) seconds\n    glide (0.5) secs to x: (0) y: (-115)\n    wait (2) seconds\n    glide (2) secs to x: (0) y: (50)\n    wait (1) seconds\n    glide (1) secs to x: (-110) y: (50)\n    point in direction (90)\n    set [ufo direction v] to [90]\n    wait (1) seconds\n    glide (1) secs to x: (-110) y: (-115)\n    wait (1) seconds\n    broadcast (Start shooting lasers v)\n    switch costume to (drakt4 v)\n    wait (0.5) seconds\n    switch costume to (drakt2 v)\n    wait (3) seconds\n    glide (1) secs to x: (-110) y: (50)\n    wait (1) seconds\n    glide (1) secs to x: (0) y: (50)\n    wait (0.5) seconds\n    glide (0.5) secs to x: (0) y: (-115)\n    wait (2) seconds\n    glide (2) secs to x: (0) y: (50)\n    wait (1) seconds\n    glide (1) secs to x: (115) y: (50)\n    point in direction (-90)\n    set [ufo direction v] to [-90]\n    wait (1) seconds\n    glide (1) secs to x: (115) y: (-115)\n    wait (1) seconds\nend\n\nwhen backdrop switches to [level 10 v]\nforever\n    if <(boss defeated) = [1]> then\n        change y by (70)\n        switch costume to (drakt4 v)\n        repeat until <(costume [number v]) = [29]>\n            next costume\n            set size to (200) %\n        end\n        hide\n    end\nend\n\nwhen flag clicked\nset [boss defeated v] to [0]\npoint in direction (90)\nhide\n\nwhen backdrop switches to [level 10 v]\nforever\n    if <<touching (alex the dog v)?> and <touching color (#ff0000)?>> then\n        change [whiskers life v] by (-1)\n    end\nend\n\nwhen I receive [boss defeated v]\nplay sound [Bomb Exploding Sound v] until done\n\n@Whiskers the Cat in UFO\n\nwhen backdrop switches to [bakgrunn1 v]\nwait (1) seconds\nshow\nswitch costume to (normal v)\ngo to x: (-240) y: (10)\npoint in direction (90)\ngo to [front v] layer\nset size to (35) %\nglide (1.5) secs to x: (71) y: (10)\nbroadcast (glide away v)\nwait (2) seconds\nswitch costume to (laughing v)\nwait (0.1) seconds\nswitch costume to (laughing 2 v)\nwait (0.1) seconds\nswitch costume to (laughing v)\nwait (0.1) seconds\nswitch costume to (laughing 2 v)\nwait (0.1) seconds\nswitch costume to (laughing v)\nwait (0.1) seconds\nswitch costume to (laughing 2 v)\nwait (0.1) seconds\nswitch costume to (laughing v)\nwait (0.1) seconds\nswitch costume to (laughing 2 v)\nwait (0.1) seconds\nswitch costume to (laughing v)\nwait (0.1) seconds\nswitch costume to (laughing 2 v)\nwait (0.1) seconds\nswitch costume to (laughing v)\nwait (0.1) seconds\nswitch costume to (laughing 2 v)\nwait (0.5) seconds\nswitch costume to (normal v)\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [level 1 v]\nhide\n\nwhen I receive [glide away v]\nwait (4) seconds\nglide (1) secs to x: (240) y: (10)\nhide\n\nwhen backdrop switches to [level 10 v]\ngo to x: ([x position v] of [sprite8 v]) y: ([y position v] of [sprite8 v])\nchange y by (35)\nchange x by (-3)\npoint in direction (-90)\nset size to (30) %\nshow\nsay [This is the first and last time you'll be sniffing around in my buisness!] for (5) seconds\nsay [Now it's time to destroy you, you stupid little...] for (5) seconds\nforever\n    point in direction (UFO direction)\nend\n\nwhen backdrop switches to [level 10 v]\nrepeat until <(boss defeated) = [1]>\n    go to x: ([x position v] of [sprite8 v]) y: ([y position v] of [sprite8 v])\n    change y by (35)\n    change x by (-3)\nend\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\n@Alex title sceene\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [level 1 v]\nhide\n\nwhen backdrop switches to [bakgrunn1 v]\nshow\nset size to (50) %\nswitch costume to (normal v)\ngo to x: (-212) y: (-108)\nwait (3.5) seconds\nglide (1.5) secs to x: (-6) y: (-111)\n\nwhen backdrop switches to [bakgrunn1 v]\nswitch costume to (alex the dog 3 v)\nwait (1) seconds\nswitch costume to (alex the dog 2 v)\nwait (0.5) seconds\nswitch costume to (normal v)\nwait (2.1) seconds\nswitch costume to (running6 v)\nwait (0.08) seconds\nswitch costume to (running1 v)\nwait (0.08) seconds\nswitch costume to (running2 v)\nwait (0.08) seconds\nswitch costume to (running3 v)\nwait (0.08) seconds\nswitch costume to (running4 v)\nwait (0.08) seconds\nswitch costume to (running5 v)\nwait (0.08) seconds\nswitch costume to (running4 v)\nwait (0.08) seconds\nswitch costume to (running3 v)\nwait (0.08) seconds\nswitch costume to (running2 v)\nwait (0.08) seconds\nswitch costume to (running1 v)\nwait (0.08) seconds\nswitch costume to (running6 v)\nwait (0.08) seconds\nswitch costume to (running1 v)\nwait (0.08) seconds\nswitch costume to (running2 v)\nwait (0.08) seconds\nswitch costume to (running3 v)\nwait (0.08) seconds\nswitch costume to (running4 v)\nwait (0.08) seconds\nswitch costume to (running5 v)\nwait (0.08) seconds\nswitch costume to (normal v)\nwait (1) seconds\nswitch costume to (bark2 v)\nstart sound [bark v]\nwait (0.2) seconds\nswitch costume to (normal v)\nwait (0.5) seconds\nswitch costume to (bark2 v)\nstart sound [bark v]\nwait (0.2) seconds\nswitch costume to (normal v)\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen I receive [cutsceene v]\nshow\nset size to (50) %\nswitch costume to (normal v)\ngo to x: (-212) y: (-108)\nwait (1) seconds\nglide (1.5) secs to x: (-6) y: (-111)\n\nwhen I receive [cutsceene v]\nswitch costume to (normal v)\nwait (1) seconds\nswitch costume to (running6 v)\nwait (0.08) seconds\nswitch costume to (running1 v)\nwait (0.08) seconds\nswitch costume to (running2 v)\nwait (0.08) seconds\nswitch costume to (running3 v)\nwait (0.08) seconds\nswitch costume to (running4 v)\nwait (0.08) seconds\nswitch costume to (running5 v)\nwait (0.08) seconds\nswitch costume to (running4 v)\nwait (0.08) seconds\nswitch costume to (running3 v)\nwait (0.08) seconds\nswitch costume to (running2 v)\nwait (0.08) seconds\nswitch costume to (running1 v)\nwait (0.08) seconds\nswitch costume to (running6 v)\nwait (0.08) seconds\nswitch costume to (running1 v)\nwait (0.08) seconds\nswitch costume to (running2 v)\nwait (0.08) seconds\nswitch costume to (running3 v)\nwait (0.08) seconds\nswitch costume to (running4 v)\nwait (0.08) seconds\nswitch costume to (running5 v)\nwait (0.08) seconds\nswitch costume to (normal v)\nwait (0.5) seconds\nswitch costume to (bark2 v)\nstart sound [bark v]\nwait (0.2) seconds\nswitch costume to (normal v)\nwait (0.5) seconds\nswitch costume to (bark2 v)\nstart sound [bark v]\nwait (0.2) seconds\nswitch costume to (normal v)\n\nbroadcast (cutsceene v)\n\n@bone 1 in title sceene\n\nwhen flag clicked\ngo to [front v] layer\nhide\n\nwhen backdrop switches to [bakgrunn1 v]\nshow\nset size to (15) %\ngo to x: (60) y: (-116)\n\nwhen flag clicked\nforever\n    if <touching (sprite8 v)?> then\n        glide (1) secs to x: (([x position v] of [sprite8 v]) - (10)) y: ([y position v] of [sprite8 v])\n        hide\n    end\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\n@bone 2 in title sceene\n\nwhen flag clicked\ngo to [front v] layer\nhide\n\nwhen backdrop switches to [bakgrunn1 v]\nshow\nset size to (15) %\ngo to x: (67) y: (-113)\n\nwhen flag clicked\nforever\n    if <touching (sprite8 v)?> then\n        glide (1) secs to x: (([x position v] of [sprite8 v]) - (10)) y: ([y position v] of [sprite8 v])\n        hide\n    end\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\n@bone 3 in title sceene\n\nwhen flag clicked\ngo to [front v] layer\nhide\n\nwhen backdrop switches to [bakgrunn1 v]\nshow\nset size to (15) %\ngo to x: (56) y: (-121)\n\nwhen flag clicked\nforever\n    if <touching (sprite8 v)?> then\n        glide (1) secs to x: (([x position v] of [sprite8 v]) - (10)) y: ([y position v] of [sprite8 v])\n        hide\n    end\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\n@enemy1\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [level 3 v]\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen backdrop switches to [level 2 v]\nshow\nset rotation style [left-right v]\nset size to (20) %\nswitch costume to (normal v)\ngo to x: (103) y: (-80)\npoint in direction (-90)\nforever\n    point in direction (-90)\n    glide (2.5) secs to x: (-111) y: (-80)\n    point in direction (90)\n    glide (2.5) secs to x: (103) y: (-80)\n    if <<touching (alex the dog v)?> and <(Barking) = [1]>> then\n        hide\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [level 2 v]\nforever\n    switch costume to (walking 1 v)\n    wait (0.08) seconds\n    switch costume to (walking 2 v)\n    wait (0.08) seconds\n    switch costume to (walking 3 v)\n    wait (0.08) seconds\n    switch costume to (walking 4 v)\n    wait (0.08) seconds\n    switch costume to (walking 5 v)\n    wait (0.08) seconds\n    switch costume to (walking 6 v)\n    wait (0.08) seconds\n    switch costume to (walking 5 v)\n    wait (0.08) seconds\n    switch costume to (walking 4 v)\n    wait (0.08) seconds\n    switch costume to (walking 3 v)\n    wait (0.08) seconds\n    switch costume to (walking 2 v)\n    wait (0.08) seconds\n    if <<touching (alex the dog v)?> and <(Barking) = [1]>> then\n        hide\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [level 2 v]\nforever\n    if <<touching (alex the dog v)?> and <(Barking) = [1]>> then\n        hide\n        switch costume to (normal v)\n        set size to (-100) %\n        go to x: (-240) y: (180)\n        change [score v] by (1)\n        start sound [rings sound1 v]\n        wait (0.001) seconds\n        change [score v] by (1)\n        start sound [rings sound1 v]\n        wait (0.001) seconds\n        change [score v] by (1)\n        start sound [rings sound1 v]\n        wait (0.001) seconds\n        change [score v] by (1)\n        start sound [rings sound1 v]\n        wait (0.001) seconds\n        change [score v] by (1)\n        start sound [rings sound1 v]\n    end\nend\n\n@score symbol\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [level 1 v]\nshow variable [score v]\nshow\ngo to x: (-221) y: (165)\nset size to (80) %\n\nwhen I receive [show special stage v]\nhide variable [score v]\nhide\nwait (10) seconds\ngo to x: (-32) y: (152)\nshow\nset size to (130) %\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen backdrop switches to [cutsceene v]\nhide\nhide variable [score v]\nwait (5) seconds\nshow variable [score v]\n\n@Screen Shot 08-01-14 at 04.59 PM\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [cutsceene v]\nhide\nhide variable [time v]\n\nwhen backdrop switches to [level 1 v]\nshow\ngo to x: (-221) y: (134)\nset size to (10) %\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\n@to level 3\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [level 2 v]\nshow\ngo to x: (193) y: (142)\n\nwhen backdrop switches to [level 3 v]\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\n@Sprite4\n\nwhen backdrop switches to [level 3 v]\nforever\n    if <<touching (alex the dog v)?> and <not <touching color (#ffff00)?>>> then\n        point in direction (90)\n        move (speed) steps\n    end\n    if <not <<touching color (#00ff55)?> or <touching color (#ffff00)?>>> then\n        set [fall block v] to [0]\n        repeat until <<touching color (#00ff55)?> or <touching color (#ffff00)?>>\n            change [fall block v] by (-1)\n            change y by (fall block)\n            change x by ((speed) - (5))\n        end\n    end\nend\n\nwhen I receive [restart v]\nset [fall block v] to [0]\n\nwhen backdrop switches to [level 4 v]\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen I receive [restart v]\ngo to x: (-148) y: (98)\nswitch costume to (drakt1 v)\n\nwhen flag clicked\nset [fall block v] to [0]\n\nwhen flag clicked\nforever\n    if <touching color (#ffff00)?> then\n        switch costume to (drakt2 v)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [level 3 v]\nshow\nswitch costume to (drakt1 v)\nset size to (75) %\ngo to x: (-148) y: (98)\n\n@to level 4\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [level 3 v]\nshow\ngo to x: (171) y: (131)\n\nwhen backdrop switches to [level 4 v]\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\n@spring\n\nwhen flag clicked\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen flag clicked\nforever\n    if <touching (alex the dog v)?> then\n        wait (1e-10) seconds\n        repeat until <(costume [number v]) = [5]>\n            wait (0.08) seconds\n            next costume\n        end\n        wait (0.08) seconds\n        switch costume to (drakt1 v)\n    end\nend\n\n@Sprite9\n\nwhen flag clicked\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\n@Sprite12\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [level 6 v]\ngo to x: (210) y: (0)\nshow\nforever\n    glide (2) secs to x: (-165) y: (0)\n    wait (0.5) seconds\n    glide (2) secs to x: (210) y: (0)\n    wait (0.5) seconds\nend\n\nwhen backdrop switches to [level 7 v]\nhide\n\n@coin 1\n\nwhen flag clicked\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\n@coin 2\n\nwhen flag clicked\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen backdrop switches to [level 5 v]\nhide\n\n@Alex 360\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen flag clicked\nhide\n\nshow\nforever\n    wait (0.1) seconds\n    next costume\nend\n\n@coin 3\n\nwhen flag clicked\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\n@coin 4\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen flag clicked\nhide\n\n@bomb\n\nwhen flag clicked\nhide\n\n@Sprite15\n\nwhen flag clicked\nhide\ngo to x: (48) y: (-74)\n\nwhen backdrop switches to [level 4 v]\ngo to x: (-60) y: (-100)\nforever\n    wait (0.5) seconds\n    show\n    set [jump fire ball v] to [10]\n    change y by (10)\n    repeat until <touching color (#ff0000)?>\n        change [jump fire ball v] by (-0.5)\n        change y by (jump fire ball)\n    end\n    hide\n    set [jump fire ball v] to [0]\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen backdrop switches to [level 5 v]\nforever\n    hide\nend\n\n@Sprite16\n\nwhen flag clicked\nhide\ngo to x: (108) y: (-74)\n\nwhen backdrop switches to [level 4 v]\ngo to x: (145) y: (-100)\nforever\n    wait (1) seconds\n    show\n    set [jump fire ball 2 v] to [10]\n    change y by (10)\n    repeat until <touching color (#ff0000)?>\n        change [jump fire ball 2 v] by (-0.5)\n        change y by (jump fire ball 2)\n    end\n    hide\n    set [jump fire ball 2 v] to [0]\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen backdrop switches to [level 5 v]\nforever\n    hide\nend\n\n@Sprite7\n\nwhen backdrop switches to [level 4 v]\nshow\nset size to (80) %\ngo to x: (64) y: (84)\n\nwhen I receive [show special stage v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen flag clicked\nforever\n    if <touching (alex the dog v)?> then\n        glide (2) secs to x: ([x position v] of [sprite3 v]) y: ([y position v] of [sprite3 v])\n        hide\n        change [lives v] by (1)\n        play sound [opptak1 v] until done\n    end\nend\n\nwhen backdrop switches to [level 1 v]\nswitch costume to (alex the dog v)\nforever\n    wait (0.1) seconds\n    next costume\nend\n\nwhen backdrop switches to [level 8 v]\nshow\nset size to (80) %\ngo to x: (207) y: (80)\n\nwhen backdrop switches to [level 5 v]\nhide\n\nwhen backdrop switches to [level 9 v]\nhide\n\n@enemy2\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <<touching (alex the dog v)?> and <(Barking) = [1]>> then\n        start sound [Bomb Exploding Sound v]\n    end\nend\n\nwhen I receive [level 3 v]\nshow\nswitch costume to (drakt2 v)\nset size to (30) %\ngo to x: (168) y: (-55)\nforever\n    point in direction (90)\n    glide (4) secs to x: (-135) y: (-55)\n    point in direction (-90)\n    glide (4) secs to x: (168) y: (-55)\nend\n\nwhen I receive [level 3 v]\nforever\n    switch costume to (drakt1 v)\n    wait (0.2) seconds\n    switch costume to (drakt2 v)\n    wait (0.2) seconds\n    switch costume to (drakt3 v)\n    wait (0.2) seconds\n    switch costume to (drakt2 v)\n    wait (0.2) seconds\nend\n\nwhen I receive [level 3 v]\nforever\n    if <<touching (alex the dog v)?> and <(Barking) = [1]>> then\n        stop [other scripts in sprite v]\n        set size to (100) %\n        switch costume to (explosion 1 v)\n        repeat (24)\n            next costume\n        end\n        hide\n        switch costume to (normal v)\n        set size to (-100) %\n        go to x: (-240) y: (180)\n        change [score v] by (1)\n        start sound [rings sound1 v]\n        wait (0.001) seconds\n        change [score v] by (1)\n        start sound [rings sound1 v]\n        wait (0.001) seconds\n        change [score v] by (1)\n        start sound [rings sound1 v]\n        wait (0.001) seconds\n        change [score v] by (1)\n        start sound [rings sound1 v]\n        wait (0.001) seconds\n        change [score v] by (1)\n        start sound [rings sound1 v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (alex the dog v)?> and <<(Barking) = [0]> and <not <(costume [number v]) > [3]>>>> then\n        broadcast (lose a life v)\n    end\nend\n\n@Spikes\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [level 4 v]\nshow\ngo to [front v] layer\nset size to (45) %\ngo to x: (66) y: (97)\nrepeat until <(level) = [5]>\n    switch costume to (drakt1 v)\n    wait (2) seconds\n    start sound [instance28725 v]\n    switch costume to (drakt2 v)\n    wait (0.05) seconds\n    switch costume to (drakt3 v)\n    wait (0.05) seconds\n    hide\n    wait (2) seconds\n    start sound [instance28725 v]\n    show\n    switch costume to (drakt3 v)\n    wait (0.05) seconds\n    switch costume to (drakt2 v)\n    wait (0.05) seconds\nend\n\nwhen backdrop switches to [level 5 v]\nforever\n    hide\nend\n\n@to level 5\n\nwhen flag clicked\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen backdrop switches to [level 5 v]\nhide\n\nwhen backdrop switches to [level 4 v]\nshow\ngo to x: (204) y: (-113)\n\n@Sprite6\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <touching (alex the dog v)?> then\n        hide\n        repeat (10)\n            wait (0.01) seconds\n            change [score v] by (1)\n            start sound [rings sound1 v]\n        end\n    end\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen backdrop switches to [level 4 v]\nshow\nset size to (80) %\ngo to x: (-6) y: (-111)\n\nwhen backdrop switches to [level 5 v]\nhide\n\n@Sprite13\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <touching (alex the dog v)?> then\n        hide\n        repeat (10)\n            wait (0.01) seconds\n            change [score v] by (1)\n            start sound [rings sound1 v]\n        end\n    end\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen backdrop switches to [level 5 v]\nshow\nset size to (80) %\ngo to x: (-99) y: (77)\n\nwhen backdrop switches to [level 6 v]\nhide\n\n@to level 6\n\nwhen flag clicked\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen backdrop switches to [level 5 v]\nshow\ngo to x: (207) y: (164)\n\nwhen backdrop switches to [level 6 v]\nhide\n\n@Sprite14\n\nwhen flag clicked\ngo to [front v] layer\ngo to x: (0) y: (0)\nswitch costume to (thumbnail v)\nhide\n\nshow\n\n@Sprite17\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <touching (alex the dog v)?> then\n        hide\n        broadcast (Hide red wall v)\n    end\nend\n\nwhen backdrop switches to [level 6 v]\nshow\ngo to [front v] layer\ngo [backward v] (100) layers\nset size to (50) %\ngo to x: (188) y: (-130)\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen backdrop switches to [level 7 v]\nhide\n\n@Sprite18\n\nwhen flag clicked\ngo to x: (-45) y: (9)\nhide\n\nwhen backdrop switches to [level 6 v]\nshow\n\nwhen I receive [hide red wall v]\nhide\n\nwhen backdrop switches to [level 7 v]\nhide\n\n@to level 7\n\nwhen flag clicked\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen backdrop switches to [level 6 v]\nshow\ngo to x: (183) y: (112)\n\nwhen backdrop switches to [level 7 v]\nhide\n\n@Sprite19\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <touching (alex the dog v)?> then\n        hide\n        repeat (10)\n            wait (0.01) seconds\n            change [score v] by (1)\n            start sound [rings sound1 v]\n        end\n    end\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen backdrop switches to [level 7 v]\nshow\nset size to (80) %\ngo to x: (123) y: (-43)\n\nwhen backdrop switches to [level 8 v]\nhide\n\n@Sprite20\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [level 8 v]\ncreate clone of (_myself_ v)\npoint in direction (90)\nset size to (30) %\ngo to x: (-48) y: (20)\nshow\nrepeat until <(level) = [9]>\n    wait (1) seconds\n    turn right (5) degrees\n    wait (0) seconds\n    turn left (5) degrees\n    wait (0) seconds\n    turn right (5) degrees\n    wait (0) seconds\n    turn left (5) degrees\n    wait (0) seconds\n    turn right (5) degrees\n    wait (0) seconds\n    turn left (5) degrees\n    wait (0) seconds\n    turn right (5) degrees\n    wait (0) seconds\n    turn left (5) degrees\n    wait (0) seconds\n    turn right (5) degrees\n    wait (0) seconds\n    turn left (5) degrees\n    wait (0) seconds\n    turn right (5) degrees\n    wait (0) seconds\n    turn left (5) degrees\n    wait (0) seconds\n    turn right (5) degrees\n    wait (0) seconds\n    turn left (5) degrees\n    wait (0) seconds\n    turn right (5) degrees\n    wait (0) seconds\n    turn left (5) degrees\n    wait (0) seconds\n    glide (0.1) secs to x: (-48) y: (-100)\n    wait (1) seconds\n    glide (1) secs to x: (-48) y: (20)\nend\nforever\n    if <(level) = [9]> then\n        hide\n    end\nend\n\nwhen I start as a clone\npoint in direction (90)\nset size to (30) %\ngo to x: (75) y: (20)\nshow\nwait (1) seconds\nrepeat until <(level) = [9]>\n    wait (1) seconds\n    turn right (5) degrees\n    wait (0) seconds\n    turn left (5) degrees\n    wait (0) seconds\n    turn right (5) degrees\n    wait (0) seconds\n    turn left (5) degrees\n    wait (0) seconds\n    turn right (5) degrees\n    wait (0) seconds\n    turn left (5) degrees\n    wait (0) seconds\n    turn right (5) degrees\n    wait (0) seconds\n    turn left (5) degrees\n    wait (0) seconds\n    turn right (5) degrees\n    wait (0) seconds\n    turn left (5) degrees\n    wait (0) seconds\n    turn right (5) degrees\n    wait (0) seconds\n    turn left (5) degrees\n    wait (0) seconds\n    turn right (5) degrees\n    wait (0) seconds\n    turn left (5) degrees\n    wait (0) seconds\n    turn right (5) degrees\n    wait (0) seconds\n    turn left (5) degrees\n    wait (0) seconds\n    glide (0.1) secs to x: (75) y: (-100)\n    wait (1) seconds\n    glide (1) secs to x: (75) y: (20)\nend\nforever\n    if <(level) = [9]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [9]> then\n        hide\n    end\nend\n\nwhen backdrop switches to [level 9 v]\nhide\n\n@to level 8\n\nwhen flag clicked\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen backdrop switches to [level 8 v]\nhide\n\nwhen backdrop switches to [level 7 v]\nshow\ngo to x: (205) y: (-73)\npoint in direction (115)\n\n@to level 9\n\nwhen flag clicked\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen backdrop switches to [level 8 v]\nshow\ngo to x: (209) y: (-50)\npoint in direction (90)\n\nwhen backdrop switches to [level 9 v]\nhide\n\n@to level 10\n\nwhen backdrop switches to [level 9 v]\ngo to x: (144) y: (-95)\nset size to (50) %\nshow\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [level 10 v]\nhide\n\n@Sprite22\n\nwhen backdrop switches to [level 9 v]\ngo to x: (98) y: (11)\nshow\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [level 9 v]\nwait (1) seconds\nforever\n    glide (1) secs to x: (-30) y: (11)\n    wait (1) seconds\n    glide (1) secs to x: (98) y: (11)\n    wait (1) seconds\nend\n\nwhen backdrop switches to [level 10 v]\nhide\n\n@Sprite25\n\nwhen flag clicked\nhide\n\nwhen I receive [start shooting lasers v]\nshow\ngo to x: ([x position v] of [sprite8 v]) y: (([y position v] of [sprite8 v]) + (58))\nif <(UFO direction) = [90]> then\n    point in direction (90)\n    change x by (110)\n    repeat until <<(x position) > [235]> or <touching (alex the dog v)?>>\n        move (10) steps\n    end\n    hide\nend\nif <(UFO direction) = [-90]> then\n    point in direction (-90)\n    change x by (-110)\n    repeat until <<(x position) < [-235]> or <touching (alex the dog v)?>>\n        move (10) steps\n    end\n    hide\nend\n\nwhen backdrop switches to [level 10 v]\nforever\n    if <touching (alex the dog v)?> then\n        repeat (10)\n            wait (0.001) seconds\n            hide\n        end\n    end\nend\n\nwhen I receive [boss defeated v]\nforever\n    hide\nend\n\n@Life icon for Whiskers\n\nwhen flag clicked\nswitch costume to (life icon for whiskers v)\nhide\nhide variable [whiskers life v]\n\nwhen backdrop switches to [level 10 v]\nshow\nshow variable [whiskers life v]\ngo to x: (135) y: (115)\nforever\n    if <(Whiskers life) < [1]> then\n        set [boss defeated v] to [1]\n        broadcast (boss defeated v)\n    end\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen I receive [boss defeated v]\nforever\n    set [whiskers life v] to [defeated]\n    switch costume to (normal v)\nend\n\nwhen backdrop switches to [cutsceene v]\nhide\nhide variable [whiskers life v]\n\n@to cutsceene\n\nwhen flag clicked\nhide\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen backdrop switches to [cutsceene v]\nhide\n\nwhen I receive [boss defeated v]\nwait (1.5) seconds\nshow\ngo to x: (207) y: (-80)\npoint in direction (90)\n\n@Rocketship\n\nwhen I receive [cutsceene v]\ngo to x: (101) y: (-59)\nswitch costume to (rocketship v)\npoint in direction (45)\nset size to (70) %\nshow\nwait (2) seconds\nswitch costume to (rocketship2 v)\nset [rocket fly v] to [0]\nchange y by (3)\nrepeat until <(y position) > [340]>\n    change [rocket fly v] by (0.2)\n    change y by (rocket fly)\nend\nhide\n\nwhen flag clicked\nhide\ngo to x: (101) y: (-59)\n\n@Sprite11\n\nwhen flag clicked\nhide\nforever\n    go to [front v] layer\n    go to [front v] layer\n    go to [front v] layer\nend\n\nwhen backdrop switches to [cutsceene v]\nset [ghost v] effect to (100)\nshow\nswitch costume to (drakt1 v)\nwait (5) seconds\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nwait (4) seconds\nswitch costume to (drakt2 v)\n\n@T0\n\nwhen backdrop switches to [title screen v]\nhide\n\nwhen flag clicked\nhide\ngo to x: (-32) y: (180)\nwait (1.7) seconds\nshow\nglide (0.5) secs to x: (-32) y: (-20)\n\n@S\n\nwhen flag clicked\nhide\ngo to x: (240) y: (-6)\nwait (1.7) seconds\nshow\nglide (0.5) secs to x: (60) y: (-6)\n\nwhen backdrop switches to [title screen v]\nhide\n\n@Presents\n\nwhen flag clicked\nhide\ngo to x: (2) y: (-200)\nwait (2.05) seconds\nshow\nglide (0.1) secs to x: (2) y: (-132)\n\nwhen backdrop switches to [title screen v]\nhide\n\n@Sprite21\n\nwhen backdrop switches to [title screen v]\nhide\n\nwhen backdrop switches to [tails-spin01 sceene v]\nswitch costume to (drakt1 v)\nshow\ngo to x: (-13) y: (-17)\ngo [backward v] (100) layers\nwait (2.2) seconds\nswitch costume to (drakt2 v)\n\n
NOTE 1: EXIT FULLSCREEN IF IT GETS TO LAGGY\n\nNOTE 2: WALKTHROUGH AVAILABLE: https://www.youtube.com/watch?v=e3FcG8nzp6I\n\nSo here is how it works: (I reccomend that before you do anything, read the story and watch the tutorial) arrow keys to move, jump and dodge. R to restart level. B to bark at enemies. M to open map and C to close map. NEVER TOUCH RED!\n\nENJOY!!!