Crazy Platformer

Instructions: Scratch Cat has learned some new moves! He can scale walls, wall jump, fingers latch climbing, all while avoiding moving and stationary obstacles. Help guide him to the portals to get to the next stage! \n\nUse arrow keys to move.

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nforever\n    play sound (pick random (1) to (3)) until done\nend\n\nwhen I receive [message1 v]\nnext backdrop\n\n@Player\n\nwhen flag clicked\nshow\ngo to x: (-200) y: (-100)\nset [yv v] to [0]\nset [xv v] to [0]\nset [jump v] to [1]\nforever\n    if <touching color (#000000)?> then\n        change y by ((yV) * (-1))\n        set [yv v] to [0]\n        set [jump v] to [1]\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (1)\n                        if <touching color (#000000)?> then\n                            change y by (1)\n                            if <touching color (#000000)?> then\n                                change x by ((xV) * (-1))\n                                change x by (-1)\n                                change y by (-5)\n                                set [yv v] to [0]\n                                set [jump v] to [1]\n                                if <key (up arrow v) pressed?> then\n                                    if <(xV) > [0]> then\n                                        set [xv v] to [-8]\n                                    else\n                                        set [xv v] to [8]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    if <touching (_edge_ v)?> then\n        change x by ((xV) * (-1))\n        change y by ((yV) * (-1))\n    end\n    if <not <touching color (#000000)?>> then\n        change [yv v] by (-1)\n    end\n    if <<key (up arrow v) pressed?> and <(jump) = [1]>> then\n        set [yv v] to [10]\n        change [jump v] by (-1)\n    end\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((xV) * (0.9))\n    change y by (yV)\n    change x by (xV)\n    if <touching color (#ffcccc)?> then\n        broadcast (message1 v)\n        go to x: (-200) y: (-100)\n        set [yv v] to [0]\n        set [xv v] to [0]\n    end\n    if <touching color (#ff0000)?> then\n        go to x: (-200) y: (-100)\n        set [yv v] to [0]\n        set [xv v] to [0]\n        broadcast (ow\] v)\n    end\n    if <touching color (#ff9400)?> then\n        change y by (2)\n        set [yv v] to [15]\n    end\nend\n\nwhen [r v] key pressed\ngo to x: (-200) y: (-100)\n\nrepeat (10)\n\n@Sprite1\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen backdrop switches to [backdrop6 v]\nshow\ngo to x: (-73) y: (-128)\npoint in direction (-90)\nforever\n    repeat (13)\n        next costume\n    end\n    set [num v] to [14]\n    broadcast (laser v)\n    repeat (13)\n        change [num v] by (-1)\n        switch costume to (num)\n    end\n    wait (2) seconds\nend\n\nwhen backdrop switches to [backdrop7 v]\nstop [other scripts in sprite v]\nshow\ngo to x: (-128) y: (-141)\npoint in direction (-90)\nforever\n    repeat (13)\n        next costume\n    end\n    set [num v] to [14]\n    broadcast (laser v)\n    repeat (13)\n        change [num v] by (-1)\n        switch costume to (num)\n    end\nend\n\nwhen backdrop switches to [backdrop8 v]\nstop [other scripts in sprite v]\nhide\n\n@Sprite3\n\nwhen I receive [laser v]\nshow\ncreate clone of (_myself_ v)\nhide\n\nwhen I start as a clone\ngo to (sprite1 v)\nrepeat until <touching (_edge_ v)?>\n    change y by (10)\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\n@Sprite4\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen backdrop switches to [backdrop7 v]\nshow\ngo to x: (-80) y: (-141)\npoint in direction (-90)\nwait (0.2) seconds\nstop [other scripts in sprite v]\nforever\n    repeat (13)\n        next costume\n    end\n    set [num v] to [14]\n    broadcast (laser1 v)\n    repeat (13)\n        change [num v] by (-1)\n        switch costume to (num)\n    end\nend\n\nwhen backdrop switches to [backdrop8 v]\nstop [other scripts in sprite v]\nhide\n\n@Sprite5\n\nwhen I receive [laser1 v]\nshow\ncreate clone of (_myself_ v)\nhide\n\nwhen I start as a clone\ngo to (sprite4 v)\nrepeat until <touching (_edge_ v)?>\n    change y by (10)\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\n@Sprite6\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen backdrop switches to [backdrop7 v]\nshow\ngo to x: (-32) y: (-141)\npoint in direction (-90)\nwait (0.4) seconds\nstop [other scripts in sprite v]\nforever\n    repeat (13)\n        next costume\n    end\n    set [num v] to [14]\n    broadcast (laser2 v)\n    repeat (13)\n        change [num v] by (-1)\n        switch costume to (num)\n    end\nend\n\nwhen backdrop switches to [backdrop8 v]\nstop [other scripts in sprite v]\nhide\n\n@Sprite7\n\nwhen I receive [laser2 v]\nshow\ncreate clone of (_myself_ v)\nhide\n\nwhen I start as a clone\ngo to (sprite6 v)\nrepeat until <touching (_edge_ v)?>\n    change y by (10)\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\n@Sprite8\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen backdrop switches to [backdrop7 v]\nshow\ngo to x: (16) y: (-141)\npoint in direction (-90)\nwait (0.6) seconds\nstop [other scripts in sprite v]\nforever\n    repeat (13)\n        next costume\n    end\n    set [num v] to [14]\n    broadcast (laser3 v)\n    repeat (13)\n        change [num v] by (-1)\n        switch costume to (num)\n    end\nend\n\nwhen backdrop switches to [backdrop8 v]\nstop [other scripts in sprite v]\nhide\n\n@Sprite9\n\nwhen I start as a clone\ngo to (sprite8 v)\nrepeat until <touching (_edge_ v)?>\n    change y by (10)\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [laser3 v]\nshow\ncreate clone of (_myself_ v)\nhide\n\n@Sprite10\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen backdrop switches to [backdrop7 v]\nshow\ngo to x: (64) y: (-141)\npoint in direction (-90)\nwait (0.8) seconds\nstop [other scripts in sprite v]\nforever\n    repeat (13)\n        next costume\n    end\n    set [num v] to [14]\n    broadcast (laser4 v)\n    repeat (13)\n        change [num v] by (-1)\n        switch costume to (num)\n    end\nend\n\nwhen backdrop switches to [backdrop8 v]\nstop [other scripts in sprite v]\nhide\n\n@Sprite11\n\nwhen I receive [laser4 v]\nshow\ncreate clone of (_myself_ v)\nhide\n\nwhen I start as a clone\ngo to (sprite10 v)\nrepeat until <touching (_edge_ v)?>\n    change y by (10)\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\n@Sprite12\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen backdrop switches to [backdrop8 v]\nshow\ngo to x: (75) y: (14)\npoint in direction (180)\nstop [other scripts in sprite v]\nforever\n    repeat (13)\n        next costume\n    end\n    set [num v] to [14]\n    broadcast (laserbackdrop8\(1\) v)\n    repeat (13)\n        change [num v] by (-1)\n        switch costume to (num)\n    end\nend\n\nwhen backdrop switches to [backdrop9 v]\nstop [other scripts in sprite v]\nhide\n\n@Sprite13\n\nwhen I start as a clone\ngo to (sprite12 v)\nrepeat until <touching (_edge_ v)?>\n    change x by (-10)\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [laserbackdrop8\(1\) v]\nshow\ncreate clone of (_myself_ v)\nhide\n\n@Sprite14\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen backdrop switches to [backdrop8 v]\nshow\ngo to x: (210) y: (-108)\npoint in direction (180)\nstop [other scripts in sprite v]\nwait (0.4) seconds\nforever\n    repeat (13)\n        next costume\n    end\n    set [num v] to [14]\n    broadcast (laserbackdrop8\(2\) v)\n    repeat (13)\n        change [num v] by (-1)\n        switch costume to (num)\n    end\nend\n\nwhen backdrop switches to [backdrop9 v]\nstop [other scripts in sprite v]\nhide\n\n@Sprite15\n\nwhen I start as a clone\ngo to (sprite14 v)\nrepeat until <touching (_edge_ v)?>\n    change x by (-10)\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [laserbackdrop8\(2\) v]\nshow\ncreate clone of (_myself_ v)\nhide\n\n@Sprite16\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen backdrop switches to [backdrop8 v]\nshow\ngo to x: (110) y: (-71)\npoint in direction (180)\nwait (0.2) seconds\nstop [other scripts in sprite v]\nforever\n    repeat (13)\n        next costume\n    end\n    set [num v] to [14]\n    broadcast (laserbackdrop8\(3\) v)\n    repeat (13)\n        change [num v] by (-1)\n        switch costume to (num)\n    end\nend\n\nwhen backdrop switches to [backdrop9 v]\nstop [other scripts in sprite v]\nhide\n\n@Sprite17\n\nwhen I start as a clone\ngo to (sprite16 v)\nrepeat until <touching (_edge_ v)?>\n    change x by (-10)\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [laserbackdrop8\(3\) v]\nshow\ncreate clone of (_myself_ v)\nhide\n\n@Sprite19\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen backdrop switches to [backdrop9 v]\nshow\ngo to x: (0) y: (0)\npoint in direction (180)\nstop [other scripts in sprite v]\nforever\n    repeat (13)\n        point towards (player v)\n        turn left (90) degrees\n        next costume\n        move (5) steps\n    end\n    set [num v] to [14]\n    broadcast (tracking laser v)\n    repeat (13)\n        point towards (player v)\n        turn left (90) degrees\n        change [num v] by (-1)\n        switch costume to (num)\n        move (5) steps\n    end\nend\n\nwhen backdrop switches to [backdrop10 v]\nhide\nstop [other scripts in sprite v]\n\n@Sprite18\n\nwhen I start as a clone\ngo to (sprite19 v)\npoint in direction ([direction v] of [sprite19 v])\nturn right (90) degrees\nrepeat until <touching (_edge_ v)?>\n    move (10) steps\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [tracking laser v]\nshow\ncreate clone of (_myself_ v)\nhide\n\n@Sprite20\n\nwhen flag clicked\nhide\nforever\n    go to x: (([sin v] of ((timer) * (50)) ) * (200)) y: (-100)\nend\n\nwhen backdrop switches to [backdrop16 v]\nreset timer\nshow\n\nwhen backdrop switches to [backdrop18 v]\nhide\n\n@Sprite21\n\nwhen flag clicked\nhide\nforever\n    go to x: (([sin v] of ((timer) * (50)) ) * (200)) y: (0)\nend\n\nwhen backdrop switches to [backdrop16 v]\nreset timer\nshow\n\nwhen backdrop switches to [backdrop18 v]\nhide\n\n@Sprite22\n\nwhen flag clicked\nhide\nforever\n    go to x: (([sin v] of ((timer) * (50)) ) * (200)) y: (100)\nend\n\nwhen backdrop switches to [backdrop16 v]\nreset timer\nshow\n\nwhen backdrop switches to [backdrop18 v]\nhide\n\n@Sprite23\n\nwhen flag clicked\nhide\nforever\n    go to x: ((([sin v] of ((timer) * (50)) ) * (200)) * (-1)) y: (-50)\nend\n\nwhen backdrop switches to [backdrop16 v]\nreset timer\nshow\n\nwhen backdrop switches to [backdrop18 v]\nhide\n\n@Sprite24\n\nwhen flag clicked\nhide\nforever\n    go to x: ((([sin v] of ((timer) * (50)) ) * (200)) * (-1)) y: (50)\nend\n\nwhen backdrop switches to [backdrop16 v]\nreset timer\nshow\n\nwhen backdrop switches to [backdrop18 v]\nhide\n\n@Sprite25\n\nwhen flag clicked\nhide\nforever\n    go to x: (-100) y: (([sin v] of ((timer) * (50)) ) * (200))\nend\n\nwhen backdrop switches to [backdrop17 v]\nreset timer\nshow\n\nwhen backdrop switches to [backdrop18 v]\nhide\n\n@Sprite26\n\nwhen flag clicked\nhide\nforever\n    go to x: (0) y: (([sin v] of ((timer) * (50)) ) * (200))\nend\n\nwhen backdrop switches to [backdrop17 v]\nreset timer\nshow\n\nwhen backdrop switches to [backdrop18 v]\nhide\n\n@Sprite27\n\nwhen flag clicked\nhide\nforever\n    go to x: (100) y: (([sin v] of ((timer) * (50)) ) * (200))\nend\n\nwhen backdrop switches to [backdrop17 v]\nreset timer\nshow\n\nwhen backdrop switches to [backdrop18 v]\nhide\n\n@Sprite28\n\nwhen flag clicked\nhide\nforever\n    go to x: (-50) y: ((([sin v] of ((timer) * (50)) ) * (200)) * (-1))\nend\n\nwhen backdrop switches to [backdrop17 v]\nreset timer\nshow\n\nwhen backdrop switches to [backdrop18 v]\nhide\n\n@Sprite29\n\nwhen flag clicked\nhide\nforever\n    go to x: (50) y: ((([sin v] of ((timer) * (50)) ) * (200)) * (-1))\nend\n\nwhen backdrop switches to [backdrop17 v]\nreset timer\nshow\n\nwhen backdrop switches to [backdrop18 v]\nhide\n\n@Sprite30\n\nwhen flag clicked\nhide\nforever\n    go to x: (150) y: ((([sin v] of ((timer) * (50)) ) * (200)) * (-1))\nend\n\nwhen backdrop switches to [backdrop17 v]\nreset timer\nshow\n\nwhen backdrop switches to [backdrop18 v]\nhide\n\n@Sprite31\n\nwhen flag clicked\nhide\nforever\n    go to x: (-150) y: ((([sin v] of ((timer) * (50)) ) * (200)) * (-1))\nend\n\nwhen backdrop switches to [backdrop17 v]\nreset timer\nshow\n\nwhen backdrop switches to [backdrop18 v]\nhide\n\n@Sprite33\n\nwhen flag clicked\nhide\nforever\n    go to x: (50) y: ((([sin v] of ((timer) * (100)) ) * (200)) * (-1))\nend\n\nwhen backdrop switches to [backdrop17 v]\nreset timer\nshow\n\nwhen backdrop switches to [backdrop18 v]\nhide\n\n@Sprite34\n\nwhen flag clicked\nhide\nforever\n    go to x: (-50) y: ((([sin v] of ((timer) * (100)) ) * (200)) * (-1))\nend\n\nwhen backdrop switches to [backdrop17 v]\nreset timer\nshow\n\nwhen backdrop switches to [backdrop18 v]\nhide\n\n@Sprite32\n\nwhen flag clicked\nhide\nforever\n    go to x: (-150) y: ((([sin v] of ((timer) * (100)) ) * (150)) * (-1))\nend\n\nwhen backdrop switches to [backdrop18 v]\nreset timer\nshow\n\nwhen backdrop switches to [backdrop20 v]\nhide\n\nwhen backdrop switches to [backdrop21 v]\nshow\n\nwhen backdrop switches to [backdrop25 v]\nstop [other scripts in sprite v]\nhide\n\n@Sprite35\n\nwhen flag clicked\nhide\nforever\n    go to x: (-50) y: ((([sin v] of ((timer) * (100)) ) * (150)) * (-1))\nend\n\nwhen backdrop switches to [backdrop18 v]\nreset timer\nshow\n\nwhen backdrop switches to [backdrop20 v]\nhide\n\nwhen backdrop switches to [backdrop21 v]\nshow\n\nwhen backdrop switches to [backdrop25 v]\nstop [other scripts in sprite v]\nhide\n\n@Sprite36\n\nwhen flag clicked\nhide\nforever\n    go to x: (50) y: ((([sin v] of ((timer) * (100)) ) * (150)) * (-1))\nend\n\nwhen backdrop switches to [backdrop18 v]\nreset timer\nshow\n\nwhen backdrop switches to [backdrop20 v]\nhide\n\nwhen backdrop switches to [backdrop21 v]\nshow\n\nwhen backdrop switches to [backdrop25 v]\nstop [other scripts in sprite v]\nhide\n\n@Sprite38\n\nwhen flag clicked\nhide\nforever\n    go to x: (150) y: ((([sin v] of ((timer) * (100)) ) * (150)) * (-1))\nend\n\nwhen backdrop switches to [backdrop18 v]\nreset timer\nshow\n\nwhen backdrop switches to [backdrop20 v]\nhide\n\nwhen backdrop switches to [backdrop21 v]\nshow\n\nwhen backdrop switches to [backdrop25 v]\nstop [other scripts in sprite v]\nhide\n\n@Sprite39\n\nwhen flag clicked\nhide\nforever\n    go to x: (-100) y: (([sin v] of ((timer) * (100)) ) * (150))\nend\n\nwhen backdrop switches to [backdrop18 v]\nreset timer\nshow\n\nwhen backdrop switches to [backdrop20 v]\nhide\n\nwhen backdrop switches to [backdrop21 v]\nshow\n\nwhen backdrop switches to [backdrop25 v]\nstop [other scripts in sprite v]\nhide\n\n@Sprite40\n\nwhen flag clicked\nhide\nforever\n    go to x: (0) y: (([sin v] of ((timer) * (100)) ) * (150))\nend\n\nwhen backdrop switches to [backdrop18 v]\nreset timer\nshow\n\nwhen backdrop switches to [backdrop20 v]\nhide\n\nwhen backdrop switches to [backdrop21 v]\nshow\n\nwhen backdrop switches to [backdrop25 v]\nstop [other scripts in sprite v]\nhide\n\n@Sprite41\n\nwhen flag clicked\nhide\nforever\n    go to x: (100) y: (([sin v] of ((timer) * (100)) ) * (150))\nend\n\nwhen backdrop switches to [backdrop18 v]\nreset timer\nshow\n\nwhen backdrop switches to [backdrop20 v]\nhide\n\nwhen backdrop switches to [backdrop21 v]\nshow\n\nwhen backdrop switches to [backdrop25 v]\nstop [other scripts in sprite v]\nhide\n\n@Sprite42\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen backdrop switches to [backdrop22 v]\nstop [other scripts in sprite v]\nhide\n\nwhen backdrop switches to [backdrop21 v]\nshow\ngo to x: (-150) y: (150)\npoint in direction (90)\nforever\n    repeat (13)\n        next costume\n    end\n    set [num v] to [14]\n    broadcast (laserbackdrop\(1\) v)\n    repeat (13)\n        change [num v] by (-1)\n        switch costume to (num)\n    end\n    wait (2) seconds\nend\n\n@Sprite43\n\nwhen I receive [laserbackdrop\(1\) v]\nshow\ncreate clone of (_myself_ v)\nhide\n\nwhen I start as a clone\ngo to (sprite42 v)\nrepeat until <touching (_edge_ v)?>\n    change y by (-10)\nend\ndelete this clone\n\nwhen flag clicked\npoint in direction (90)\nhide\n\n@Sprite46\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen backdrop switches to [backdrop22 v]\nstop [other scripts in sprite v]\nhide\n\nwhen backdrop switches to [backdrop21 v]\nshow\ngo to x: (-30) y: (140)\nwait (6) seconds\npoint in direction (90)\nforever\n    repeat (13)\n        next costume\n    end\n    set [num v] to [14]\n    broadcast (laserbackdrop\(3\) v)\n    repeat (13)\n        change [num v] by (-1)\n        switch costume to (num)\n    end\n    wait (2) seconds\nend\n\n@Sprite47\n\nwhen I start as a clone\ngo to (sprite46 v)\nrepeat until <touching (_edge_ v)?>\n    change y by (-10)\nend\ndelete this clone\n\nwhen flag clicked\npoint in direction (90)\nhide\n\nwhen I receive [laserbackdrop\(3\) v]\nshow\ncreate clone of (_myself_ v)\nhide\n\n@Sprite50\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen backdrop switches to [backdrop22 v]\nstop [other scripts in sprite v]\nhide\n\nwhen backdrop switches to [backdrop21 v]\nshow\ngo to x: (90) y: (140)\npoint in direction (90)\nwait (12) seconds\nforever\n    repeat (13)\n        next costume\n    end\n    set [num v] to [14]\n    broadcast (laserbackdrop\(5\) v)\n    repeat (13)\n        change [num v] by (-1)\n        switch costume to (num)\n    end\n    wait (2) seconds\nend\n\n@Sprite51\n\nwhen I start as a clone\ngo to (sprite50 v)\nrepeat until <touching (_edge_ v)?>\n    change y by (-10)\nend\ndelete this clone\n\nwhen flag clicked\npoint in direction (90)\nhide\n\nwhen I receive [laserbackdrop\(5\) v]\nshow\ncreate clone of (_myself_ v)\nhide\n\n@Sprite44\n\nwhen flag clicked\nhide\nforever\n    glide (1) secs to x: (100) y: (100)\n    wait (1) seconds\n    glide (1) secs to x: (100) y: (-100)\n    wait (1) seconds\n    glide (1) secs to x: (-100) y: (-100)\n    wait (1) seconds\n    glide (1) secs to x: (-100) y: (100)\n    wait (1) seconds\nend\n\nwhen flag clicked\nforever\n    turn right (15) degrees\nend\n\nwhen backdrop switches to [backdrop22 v]\nshow\n\nwhen backdrop switches to [backdrop23 v]\ngo to x: (200) y: (0)\nstop [other scripts in sprite v]\nforever\n    point towards (player v)\n    move (0.5) steps\nend\n\nwhen I receive [ow\] v]\ngo to x: (200) y: (0)\n\nwhen backdrop switches to [backdrop24 v]\ngo to x: (200) y: (0)\nstop [other scripts in sprite v]\nforever\n    point towards (player v)\n    move (1) steps\nend\n\nwhen backdrop switches to [backdrop25 v]\nstop [other scripts in sprite v]\nhide\n\n@Sprite2\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop25 v]\nshow\npoint in direction (90)\nswitch costume to (costume1 v)\nforever\n    repeat (14)\n        next costume\n    end\n    wait (1) seconds\nend\n\nwhen backdrop switches to [backdrop29 v]\nhide\n\n@Sprite37\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop25 v]\nshow\npoint in direction (-90)\nswitch costume to (costume1 v)\nwait (0.5) seconds\nforever\n    repeat (7)\n        next costume\n    end\n    wait (1) seconds\n    repeat (7)\n        next costume\n    end\n    wait (1) seconds\nend\n\nwhen backdrop switches to [backdrop29 v]\nhide\n\n@Sprite45\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop26 v]\nshow\npoint in direction (180)\nswitch costume to (costume1 v)\nforever\n    repeat (7)\n        next costume\n    end\n    wait (1) seconds\n    repeat (7)\n        next costume\n    end\n    wait (1) seconds\nend\n\nwhen backdrop switches to [backdrop29 v]\nhide\n\n@Sprite48\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop26 v]\nshow\npoint in direction (180)\nswitch costume to (costume1 v)\nwait (0.5) seconds\nforever\n    repeat (7)\n        next costume\n    end\n    wait (1) seconds\n    repeat (7)\n        next costume\n    end\n    wait (1) seconds\nend\n\nwhen backdrop switches to [backdrop29 v]\nhide\n\n@Sprite49\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop26 v]\nshow\npoint in direction (180)\nswitch costume to (costume1 v)\nforever\n    repeat (7)\n        next costume\n    end\n    wait (1) seconds\n    repeat (7)\n        next costume\n    end\n    wait (1) seconds\nend\n\nwhen backdrop switches to [backdrop29 v]\nhide\n\n@Sprite52\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop26 v]\nshow\npoint in direction (180)\nswitch costume to (costume1 v)\nwait (0.5) seconds\nforever\n    repeat (7)\n        next costume\n    end\n    wait (1) seconds\n    repeat (7)\n        next costume\n    end\n    wait (1) seconds\nend\n\nwhen backdrop switches to [backdrop29 v]\nhide\n\n@Sprite53\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop26 v]\nshow\npoint in direction (180)\nswitch costume to (costume1 v)\nforever\n    repeat (7)\n        next costume\n    end\n    wait (1) seconds\n    repeat (7)\n        next costume\n    end\n    wait (1) seconds\nend\n\nwhen backdrop switches to [backdrop29 v]\nhide\n\n@Sprite54\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop27 v]\nshow\npoint in direction (0)\nswitch costume to (costume1 v)\nforever\n    repeat (7)\n        next costume\n    end\n    wait (1) seconds\n    repeat (7)\n        next costume\n    end\n    wait (10) seconds\nend\n\nwhen backdrop switches to [backdrop29 v]\nhide\n\n@Sprite55\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop27 v]\nshow\npoint in direction (0)\nswitch costume to (costume1 v)\nwait (0.5) seconds\nforever\n    repeat (7)\n        next costume\n    end\n    wait (1) seconds\n    repeat (7)\n        next costume\n    end\n    wait (10) seconds\nend\n\nwhen backdrop switches to [backdrop29 v]\nhide\n\n@Sprite56\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop27 v]\nshow\npoint in direction (0)\nswitch costume to (costume1 v)\nforever\n    repeat (7)\n        next costume\n    end\n    wait (1) seconds\n    repeat (7)\n        next costume\n    end\n    wait (10) seconds\nend\n\nwhen backdrop switches to [backdrop29 v]\nhide\n\n@Sprite57\n\nwhen flag clicked\nhide\nforever\n    glide (1) secs to x: (100) y: (100)\n    wait (5) seconds\n    glide (1) secs to x: (100) y: (-100)\n    wait (5) seconds\n    glide (1) secs to x: (-100) y: (-100)\n    wait (5) seconds\n    glide (1) secs to x: (-100) y: (100)\n    wait (5) seconds\nend\n\nwhen backdrop switches to [backdrop28 v]\nshow\n\nwhen flag clicked\nforever\n    turn right (15) degrees\nend\n\nwhen backdrop switches to [backdrop29 v]\nhide\n\n@Sprite58\n\nwhen flag clicked\nhide variable [boss health v]\nhide\n\nwhen backdrop switches to [backdrop30 v]\nshow variable [boss health v]\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\nshow\nset [boss health v] to [1000]\nrepeat until <(BOSS HEALTH) < [1]>\n    glide (1) secs to x: (0) y: (50)\n    glide (1) secs to x: (0) y: (0)\nend\n\nwhen backdrop switches to [backdrop31 v]\nhide\n\nwhen backdrop switches to [backdrop30 v]\nrepeat until <(BOSS HEALTH) < [1]>\n    if <color (#000000) is touching (#faa51d)?> then\n        change [boss health v] by ((pick random (1) to (10)) * (-1))\n    end\nend\nswitch costume to (costume2 v)\nhide variable [boss health v]\ngo to x: (0) y: (50)\n\n@Sprite59\n\nwhen flag clicked\nhide variable [boss health v]\nhide\n\nwhen backdrop switches to [backdrop31 v]\nshow variable [boss health v]\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\nshow\nset [boss health v] to [2000]\nrepeat until <(BOSS HEALTH) < [1]>\n    glide (1) secs to x: (0) y: (50)\n    glide (1) secs to x: (0) y: (25)\nend\n\nwhen backdrop switches to [backdrop32 v]\nhide\n\nwhen backdrop switches to [backdrop31 v]\nrepeat until <(BOSS HEALTH) < [1]>\n    if <<color (#000000) is touching (#faa51d)?> and <(costume [number v]) = [1]>> then\n        change [boss health v] by ((pick random (1) to (20)) * (-1))\n    end\n    if <(pick random (1) to (100)) = [10]> then\n        switch costume to (costume3 v)\n        wait (pick random (1) to (1.5)) seconds\n        switch costume to (costume1 v)\n    end\nend\nswitch costume to (costume2 v)\nhide variable [boss health v]\ngo to x: (0) y: (50)\n\nwhen backdrop switches to [backdrop31 v]\nrepeat until <(BOSS HEALTH) < [1]>\n    change [boss health v] by (pick random (1) to (3))\n    wait ((1) - (((2000) - (BOSS HEALTH)) * (0.001))) seconds\nend\n\n@Sprite60\n\nwhen flag clicked\nhide variable [boss health v]\nhide\n\nwhen backdrop switches to [backdrop32 v]\nshow variable [boss health v]\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\nshow\nset [boss health v] to [5000]\nrepeat until <(BOSS HEALTH) < [1]>\n    glide (1) secs to x: (0) y: (50)\n    glide (1) secs to x: (0) y: (25)\nend\n\nwhen backdrop switches to [backdrop33 v]\nhide\n\nwhen backdrop switches to [backdrop32 v]\nrepeat until <(BOSS HEALTH) < [1]>\n    if <<color (#000000) is touching (#faa51d)?> and <(costume [number v]) = [1]>> then\n        change [boss health v] by ((pick random (1) to (50)) * (-1))\n    end\n    if <(pick random (1) to (50)) = [10]> then\n        switch costume to (costume3 v)\n        wait (pick random (1) to (1.5)) seconds\n        switch costume to (costume1 v)\n    end\nend\nswitch costume to (costume2 v)\nhide variable [boss health v]\nstop [other scripts in sprite v]\ngo to x: (0) y: (50)\n\nwhen backdrop switches to [backdrop32 v]\nrepeat until <(BOSS HEALTH) < [1]>\n    change [boss health v] by (pick random (1) to (5))\n    wait ((1) - (((5000) - (BOSS HEALTH)) * (0.001))) seconds\nend\n\n@Sprite61\n\nwhen flag clicked\nset size to (1500) %\nhide\n\nwhen backdrop switches to [backdrop32 v]\nshow\npoint in direction (180)\nswitch costume to (costume1 v)\nforever\n    repeat (7)\n        next costume\n    end\n    wait (1) seconds\n    repeat (7)\n        next costume\n    end\n    wait (1) seconds\nend\n\nwhen backdrop switches to [backdrop33 v]\nhide\n\nwhen backdrop switches to [backdrop32 v]\nshow\npoint in direction (180)\nswitch costume to (costume1 v)\nforever\n    set x to (0)\n    set y to ([y position v] of [sprite60 v])\n    point towards (player v)\nend\n\n