Toast 3 - Platformer || #games #all

Instructions: Worlds 4 - a Multiplayer platformer\n\nSERVER 2 (please play there if this server is full, because it causes some glitches) https://scratch.mit.edu/projects/421333408\n\nUpdate: There can now be up to 10 players\nN to toggle names\n\nWelcome to Worlds 4, my biggest project yet! Explore the Frozen World, the Hot Desert, GrassLand, Candy Wonderland, Sky, the Cave and finally the Ocean. Collect coins on your journey to buy items in the shop, which all come with special powers. Find keys to unlock doors. Finish your mission by finding the lost star.\n\nInstructions: \n-Arrow keys or drag to move\n-Avoid anything that looks nasty\n-Collect coins to buy items in the shop. There are two big coins hidden in the whole game that are worth 100 coins each\n-Bounce pads make you jump very high\n-Get keys to unlock doors\n-Find the lost star to win the game. It may be helpful to know that the lost star is hidden in the Cave, and that to get it you need to collect a key that is in Candy WonderLand

@Stage\n\nwhen I receive [level 16 v]\nswitch backdrop to (level 16 v)\nbroadcast (move v)\n\nwhen I receive [play v]\nswitch backdrop to (level 1 v)\nbroadcast (move v)\n\nwhen I receive [level 5 v]\nswitch backdrop to (level 5 v)\nbroadcast (move v)\n\nwhen I receive [level 3 v]\nswitch backdrop to (level 3 v)\nbroadcast (move v)\n\nwhen I receive [level 4 v]\nswitch backdrop to (level 4 v)\nbroadcast (move v)\n\nwhen I receive [level 6 v]\nswitch backdrop to (level 6 v)\nbroadcast (move v)\n\nwhen I receive [level 7 v]\nswitch backdrop to (level 7 v)\nbroadcast (move v)\n\nwhen I receive [portal 1 v]\nswitch backdrop to (level 8 v)\nbroadcast (move v)\n\nwhen I receive [level 9 v]\nswitch backdrop to (level 9 v)\nbroadcast (move v)\n\nwhen I receive [level 10 v]\nswitch backdrop to (level 10 v)\nbroadcast (move v)\n\nwhen I receive [level 11 v]\nswitch backdrop to (level 11 v)\nbroadcast (move v)\n\nwhen I receive [level 12 v]\nswitch backdrop to (level 12 v)\nbroadcast (move v)\n\nwhen I receive [level 14 v]\nswitch backdrop to (level 14 v)\nbroadcast (move v)\n\nwhen I receive [level 13 v]\nswitch backdrop to (level 13 v)\nbroadcast (move v)\n\nwhen I receive [portal 2 v]\nswitch backdrop to (level 15 v)\nbroadcast (move v)\n\nwhen I receive [level 17 v]\nswitch backdrop to (level 17 v)\nbroadcast (move v)\n\nwhen I receive [level 18 v]\nswitch backdrop to (level 18 v)\nbroadcast (move v)\n\nwhen I receive [level 19 v]\nswitch backdrop to (level 19 v)\nbroadcast (move v)\n\nwhen I receive [level 20 v]\nswitch backdrop to (level 20 v)\nbroadcast (move v)\n\nwhen I receive [level 21 v]\nswitch backdrop to (level 21 v)\nbroadcast (move v)\n\nwhen I receive [portal 3 v]\nswitch backdrop to (level 22 v)\nbroadcast (move v)\n\nwhen I receive [level 23 v]\nswitch backdrop to (level 23 v)\nbroadcast (move v)\n\nwhen I receive [level 24 v]\nswitch backdrop to (level 24 v)\nbroadcast (move v)\n\nwhen I receive [portal 4 v]\nswitch backdrop to (final level v)\nbroadcast (move v)\n\nwhen I receive [code v]\nask [What's the code?] and wait\nif <(answer) = [61453279]> then\n    broadcast (good v)\nelse\n    broadcast (bad v)\nend\n\nwhen I receive [level 2 v]\nswitch backdrop to (level 2 v)\nbroadcast (move v)\n\nwhen flag clicked\nswitch backdrop to (main menu v)\n\n@Player\n\nwhen backdrop switches to [level 2 v]\ngo to x: (-150) y: (-74)\nset [yv v] to [0]\n\nwhen backdrop switches to [level 20 v]\ngo to x: (-150) y: (-74)\nset [yv v] to [0]\n\nwhen backdrop switches to [level 18 v]\ngo to x: (-150) y: (-74)\nset [yv v] to [0]\n\nwhen backdrop switches to [level 17 v]\ngo to x: (-150) y: (-74)\nset [yv v] to [0]\n\nwhen backdrop switches to [level 16 v]\ngo to x: (-150) y: (-74)\nset [yv v] to [0]\n\nwhen backdrop switches to [level 15 v]\ngo to x: (-150) y: (-74)\nset [yv v] to [0]\n\nwhen backdrop switches to [level 14 v]\ngo to x: (-150) y: (-74)\nset [yv v] to [0]\n\nwhen backdrop switches to [level 13 v]\ngo to x: (-150) y: (-74)\nset [yv v] to [0]\n\nwhen backdrop switches to [level 12 v]\ngo to x: (-150) y: (-74)\nset [yv v] to [0]\n\nwhen backdrop switches to [level 11 v]\ngo to x: (-150) y: (-74)\nset [yv v] to [0]\n\nwhen backdrop switches to [level 10 v]\ngo to x: (-150) y: (-74)\nset [yv v] to [0]\n\nwhen backdrop switches to [level 9 v]\ngo to x: (-150) y: (-74)\nset [yv v] to [0]\n\nwhen backdrop switches to [level 8 v]\ngo to x: (-150) y: (-74)\nset [yv v] to [0]\n\nwhen backdrop switches to [level 6 v]\ngo to x: (-150) y: (-74)\nset [yv v] to [0]\n\nwhen backdrop switches to [level 5 v]\ngo to x: (-150) y: (-74)\nset [yv v] to [0]\n\nwhen backdrop switches to [level 4 v]\ngo to x: (-150) y: (-74)\nset [yv v] to [0]\n\nwhen backdrop switches to [level 3 v]\ngo to x: (-150) y: (-74)\nset [yv v] to [0]\n\nwhen backdrop switches to [level 21 v]\ngo to x: (-150) y: (-74)\nset [yv v] to [0]\n\nwhen backdrop switches to [level 22 v]\ngo to x: (-150) y: (-74)\nset [yv v] to [0]\n\nwhen backdrop switches to [level 23 v]\ngo to x: (-150) y: (-74)\nset [yv v] to [0]\n\nwhen I receive [try again v]\nset [xv v] to [0]\nset [yv v] to [0]\nif <(backdrop [name v]) = [Level 23]> then\n    broadcast (key and locked door v)\nend\nif <(backdrop [name v]) = [Level 24]> then\n    go to x: (-180) y: (31)\n    set [yv v] to [0]\nelse\n    go to x: (-150) y: (-74)\n    set [yv v] to [0]\nend\n\nwhen backdrop switches to [final level v]\ngo to x: (-150) y: (-74)\nset [yv v] to [0]\n\nwhen backdrop switches to [level 24 v]\ngo to x: (-180) y: (31)\nset [yv v] to [0]\n\nwhen backdrop switches to [level 7 v]\ngo to x: (-150) y: (-74)\nset [yv v] to [0]\n\nwhen backdrop switches to [level 19 v]\ngo to x: (-150) y: (-74)\nset [yv v] to [0]\n\nwhen I receive [change colour v]\nglide (1) secs to x: (-2) y: (-74)\nbroadcast (arrows, show yourselves! v)\n\nwhen I receive [right v]\nchange [costume # v] by (1)\nnext costume\nif <(Costume #) = [8]> then\n    if <(Ultimate?) = [Yes]> then\n        switch costume to (playerultimate v)\n        set [costume # v] to [Ultimate]\n    else\n        switch costume to (player1 v)\n        set [costume # v] to [1]\n    end\nend\n\nwhen I receive [left v]\nchange [costume # v] by (-1)\nif <(Costume #) = [0]> then\n    if <(Ultimate?) = [Yes]> then\n        switch costume to (playerultimate v)\n        set [costume # v] to [Ultimate]\n    else\n        switch costume to (player7 v)\n        set [costume # v] to [7]\n    end\nend\nif <(Costume #) = [1]> then\n    switch costume to (player1 v)\nend\nif <(Costume #) = [2]> then\n    switch costume to (player2 v)\nend\nif <(Costume #) = [3]> then\n    switch costume to (player3 v)\nend\nif <(Costume #) = [4]> then\n    switch costume to (player4 v)\nend\nif <(Costume #) = [5]> then\n    switch costume to (player5 v)\nend\nif <(Costume #) = [6]> then\n    switch costume to (player6 v)\nend\nif <(Costume #) = [-1]> then\n    switch costume to (player7 v)\n    set [costume # v] to [7]\nend\n\nwhen I receive [done v]\nglide (1) secs to x: (-150) y: (-74)\nbroadcast (play, show yourself! v)\n\nwhen I receive [good v]\nswitch costume to (playerultimate v)\nset [ultimate? v] to [Yes]\nset [costume # v] to [Ultimate]\nbroadcast (done v)\n\nwhen backdrop switches to [main menu v]\nshow\ngo to x: (-150) y: (-74)\nstop [other scripts in sprite v]\nset [xv v] to [0]\nset [yv v] to [0]\n\nwhen flag clicked\nshow\nset [ultimate? v] to [No]\nswitch costume to (player1 v)\ngo to x: (-150) y: (-74)\nset [level # v] to [1]\nset [costume # v] to [1]\nstop [other scripts in sprite v]\n\nwhen I receive [move v]\nforever\n    change [yv v] by (-0.5)\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <([costume # v] of [right v]) = [2]>>> then\n        change [xv v] by (0.7)\n        point in direction (90)\n    end\n    if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <([costume # v] of [left v]) = [2]>>> then\n        change [xv v] by (-0.7)\n        point in direction (-90)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <<<touching color (#019c31)?> or <touching color (#7f5723)?>> or <<<touching color (#e14339)?> or <touching color (#9f2e26)?>> or <<touching color (#016edb)?> or <touching color (#0157ae)?>>>> then\n        change y by (1)\n        if <<<touching color (#019c31)?> or <touching color (#7f5723)?>> or <<<touching color (#e14339)?> or <touching color (#9f2e26)?>> or <<touching color (#016edb)?> or <touching color (#0157ae)?>>>> then\n            change y by (1)\n            if <<<touching color (#019c31)?> or <touching color (#7f5723)?>> or <<<touching color (#e14339)?> or <touching color (#9f2e26)?>> or <<touching color (#016edb)?> or <touching color (#0157ae)?>>>> then\n                change y by (1)\n                if <<<touching color (#019c31)?> or <touching color (#7f5723)?>> or <<<touching color (#e14339)?> or <touching color (#9f2e26)?>> or <<touching color (#016edb)?> or <touching color (#0157ae)?>>>> then\n                    change y by (1)\n                    if <<<touching color (#019c31)?> or <touching color (#7f5723)?>> or <<<touching color (#e14339)?> or <touching color (#9f2e26)?>> or <<touching color (#016edb)?> or <touching color (#0157ae)?>>>> then\n                        change y by (1)\n                        if <<<touching color (#019c31)?> or <touching color (#7f5723)?>> or <<<touching color (#e14339)?> or <touching color (#9f2e26)?>> or <<touching color (#016edb)?> or <touching color (#0157ae)?>>>> then\n                            change x by ((Xv) * (-1))\n                            change x by (-1)\n                            change y by (-5)\n                            change x by (1)\n                            if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <([costume # v] of [up v]) = [2]>>> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-8]\n                                else\n                                    set [xv v] to [8]\n                                end\n                                set [yv v] to [10]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (Yv)\n    change y by (-1)\n    if <<<touching color (#019c31)?> or <touching color (#7f5723)?>> or <<<touching color (#e14339)?> or <touching color (#9f2e26)?>> or <<touching color (#016edb)?> or <touching color (#0157ae)?>>>> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <([costume # v] of [up v]) = [2]>>> then\n        change y by (-2)\n        if <<<touching color (#019c31)?> or <touching color (#7f5723)?>> or <<<touching color (#e14339)?> or <touching color (#9f2e26)?>> or <<touching color (#016edb)?> or <touching color (#0157ae)?>>>> then\n            set [yv v] to [10]\n        end\n        change y by (2)\n    end\n    change y by (1)\n    if <<touching color (#ff6161)?> or <<(y position) < [-179]> or <key (r v) pressed?>>> then\n        broadcast (try again v)\n    end\n    if <touching color (#b882ff)?> then\n        change [level # v] by (1)\n        if <(backdrop [name v]) = [Level 7]> then\n            broadcast (portal 1 v)\n        end\n        if <(backdrop [name v]) = [Level 14]> then\n            broadcast (portal 2 v)\n        end\n    end\n    if <touching color (#87c3ff)?> then\n        change [level # v] by (1)\n        if <(backdrop [name v]) = [Level 21]> then\n            broadcast (portal 3 v)\n        end\n        if <(backdrop [name v]) = [Level 24]> then\n            broadcast (portal 4 v)\n        end\n    end\n    if <touching color (#006666)?> then\n        set [yv v] to [15]\n    end\n    if <touching color (#002699)?> then\n        broadcast (code, show yourself! v)\n    end\n    if <<touching color (#ffdc49)?> or <touching color (#ffbe28)?>> then\n        if <(backdrop [name v]) = [Level 23]> then\n            broadcast (open, sesamo! v)\n        end\n        if <(backdrop [name v]) = [Final Level]> then\n            broadcast (final message v)\n            hide\n        end\n    end\n    if <(x position) > [240]> then\n        change [level # v] by (1)\n        if <(backdrop [name v]) = [Level 1]> then\n            broadcast (level 2 v)\n        end\n        if <(backdrop [name v]) = [Level 2]> then\n            broadcast (level 3 v)\n        end\n        if <(backdrop [name v]) = [Level 3]> then\n            broadcast (level 4 v)\n        end\n        if <(backdrop [name v]) = [Level 4]> then\n            broadcast (level 5 v)\n        end\n        if <(backdrop [name v]) = [Level 5]> then\n            broadcast (level 6 v)\n        end\n        if <(backdrop [name v]) = [Level 6]> then\n            broadcast (level 7 v)\n        end\n        if <(backdrop [name v]) = [Level 8]> then\n            broadcast (level 9 v)\n        end\n        if <(backdrop [name v]) = [Level 9]> then\n            broadcast (level 10 v)\n        end\n        if <(backdrop [name v]) = [Level 10]> then\n            broadcast (level 11 v)\n        end\n        if <(backdrop [name v]) = [Level 11]> then\n            broadcast (level 12 v)\n        end\n        if <(backdrop [name v]) = [Level 12]> then\n            broadcast (level 13 v)\n        end\n        if <(backdrop [name v]) = [Level 13]> then\n            broadcast (level 14 v)\n        end\n        if <(backdrop [name v]) = [Level 15]> then\n            broadcast (level 16 v)\n        end\n        if <(backdrop [name v]) = [Level 16]> then\n            broadcast (level 17 v)\n        end\n        if <(backdrop [name v]) = [Level 17]> then\n            broadcast (level 18 v)\n        end\n        if <(backdrop [name v]) = [Level 18]> then\n            broadcast (level 19 v)\n        end\n        if <(backdrop [name v]) = [Level 19]> then\n            broadcast (level 20 v)\n        end\n        if <(backdrop [name v]) = [Level 20]> then\n            broadcast (level 21 v)\n        end\n        if <(backdrop [name v]) = [Level 22]> then\n            broadcast (level 23 v)\n        end\n        if <(backdrop [name v]) = [Level 23]> then\n            broadcast (level 24 v)\n        end\n    end\nend\n\n@Change Colour\n\nwhen flag clicked\nshow\ngo to x: (10) y: (-10)\nswitch costume to (button v)\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (change colour v)\n    hide\nend\n\nwhen I receive [done v]\nhide\n\nwhen backdrop switches to [main menu v]\nshow\n\nwhen I receive [change colour, hide yourself! v]\nhide\n\nwhen I receive [arrows, show yourselves! v]\ngo to x: (0) y: (-11)\nswitch costume to (button2 v)\nshow\n\nwhen this sprite clicked\nif <(costume [number v]) = [2]> then\n    broadcast (done v)\n    hide\nend\n\nwhen I receive [play, show yourself! v]\nshow\nswitch costume to (button v)\ngo to x: (10) y: (-10)\n\nwhen I receive [level select v]\nhide\n\n@Play\n\nwhen flag clicked\nshow\n\nwhen I receive [change colour v]\nhide\n\nwhen I receive [play, show yourself! v]\nshow\n\nwhen this sprite clicked\nhide\nbroadcast (Change Colour, hide yourself! v)\nif <(Level #) = [1]> then\n    broadcast (Play v)\nend\nif <(Level #) = [2]> then\n    broadcast (Level 2 v)\nend\nif <(Level #) = [3]> then\n    broadcast (Level 3 v)\nend\nif <(Level #) = [4]> then\n    broadcast (Level 4 v)\nend\nif <(Level #) = [5]> then\n    broadcast (Level 5 v)\nend\nif <(Level #) = [6]> then\n    broadcast (Level 6 v)\nend\nif <(Level #) = [7]> then\n    broadcast (Level 7 v)\nend\nif <(Level #) = [8]> then\n    broadcast (Portal 1 v)\nend\nif <(Level #) = [9]> then\n    broadcast (Level 9 v)\nend\nif <(Level #) = [10]> then\n    broadcast (Level 10 v)\nend\nif <(Level #) = [11]> then\n    broadcast (Level 11 v)\nend\nif <(Level #) = [12]> then\n    broadcast (Level 12 v)\nend\nif <(Level #) = [13]> then\n    broadcast (Level 13 v)\nend\nif <(Level #) = [14]> then\n    broadcast (Level 14 v)\nend\nif <(Level #) = [15]> then\n    broadcast (Portal 2 v)\nend\nif <(Level #) = [16]> then\n    broadcast (Level 16 v)\nend\nif <(Level #) = [17]> then\n    broadcast (Level 17 v)\nend\nif <(Level #) = [18]> then\n    broadcast (Level 18 v)\nend\nif <(Level #) = [19]> then\n    broadcast (Level 19 v)\nend\nif <(Level #) = [20]> then\n    broadcast (Level 20 v)\nend\nif <(Level #) = [21]> then\n    broadcast (Level 21 v)\nend\nif <(Level #) = [22]> then\n    broadcast (Portal 3 v)\nend\nif <(Level #) = [23]> then\n    broadcast (Level 23 v)\nend\nif <(Level #) = [24]> then\n    broadcast (Level 24 v)\nend\nif <(Level #) > [24]> then\n    broadcast (Play v)\nend\n\nwhen backdrop switches to [main menu v]\nshow\n\nwhen I receive [level select v]\nhide\n\n@Key\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [level 23 v]\nshow\n\nwhen backdrop switches to [level 24 v]\nhide\n\nwhen I receive [open, sesamo! v]\nhide\n\nwhen I receive [key and locked door v]\nshow\n\nwhen backdrop switches to [main menu v]\nhide\n\n@Locked door\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [level 23 v]\nshow\ngo to x: (200) y: (89)\n\nwhen I receive [open, sesamo! v]\nglide (2) secs to x: (200) y: (345)\n\nwhen backdrop switches to [level 24 v]\nhide\n\nwhen I receive [key and locked door v]\nstop [other scripts in sprite v]\nshow\ngo to x: (200) y: (89)\n\nwhen backdrop switches to [main menu v]\nhide\n\n@Trophy\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [final level v]\nshow\n\nwhen I receive [final message v]\nhide\n\nwhen backdrop switches to [main menu v]\nhide\n\n@Final Message\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [final level v]\nhide\n\nwhen I receive [final message v]\nshow\n\nwhen backdrop switches to [main menu v]\nhide\n\n@Left Arrow\n\nwhen flag clicked\nhide\n\nwhen I receive [arrows, show yourselves! v]\nshow\n\nwhen this sprite clicked\nbroadcast (Left v)\n\nwhen I receive [done v]\nhide\n\nwhen I receive [good v]\nhide\n\n@Right Arrow\n\nwhen flag clicked\nhide\n\nwhen I receive [arrows, show yourselves! v]\nshow\n\nwhen this sprite clicked\nbroadcast (right v)\n\nwhen I receive [done v]\nhide\n\nwhen I receive [good v]\nhide\n\n@Music\n\nwhen flag clicked\nshow\nswitch costume to (music1 v)\nset [song # v] to [1]\nset volume to (100) %\nstop all sounds\nbroadcast (Song #1 v)\n\nwhen this sprite clicked\nnext costume\nif <(costume [number v]) = [2]> then\n    set volume to (0) %\nend\nif <(costume [number v]) = [1]> then\n    set volume to (100) %\nend\n\nwhen [k v] key pressed\nchange [song # v] by (1)\nif <(Song #) = [2]> then\n    stop all sounds\n    broadcast (Song #2 v)\nend\nif <(Song #) = [3]> then\n    stop all sounds\n    broadcast (Song #3 v)\nend\nif <(Song #) = [4]> then\n    stop all sounds\n    broadcast (Song #4 v)\nend\nif <(Song #) = [5]> then\n    stop all sounds\n    broadcast (Song #5 v)\nend\nif <(Song #) = [6]> then\n    set [song # v] to [1]\n    stop all sounds\n    broadcast (Song #1 v)\nend\n\nwhen I receive [song #2 v]\nrepeat until <<(Song #) = [1]> or <(Song #) > [2]>>\n    play sound [F-777 - Bow Wow v] until done\nend\n\nwhen I receive [song #3 v]\nrepeat until <<(Song #) < [3]> or <(Song #) > [3]>>\n    play sound [F-777 - Let's Stomp v] until done\nend\n\nwhen I receive [song #4 v]\nrepeat until <<(Song #) < [4]> or <(Song #) = [5]>>\n    play sound [F-777 - Airborne Robots v] until done\nend\n\nwhen I receive [song #5 v]\nrepeat until <(Song #) < [5]>\n    play sound [F-777 - A Lost World v] until done\nend\n\nwhen I receive [song #1 v]\nrepeat until <(Song #) > [1]>\n    play sound [Foxsky - Kirby Smash v] until done\nend\n\n@Code\n\nwhen flag clicked\nhide\n\nwhen I receive [arrows, show yourselves! v]\nif <(Ultimate?) = [Yes]> then\n    hide\nelse\n    show\nend\n\nwhen this sprite clicked\nbroadcast (Code v)\n\nwhen I receive [good v]\nhide\n\nwhen I receive [done v]\nhide\n\n@Message\n\nwhen I receive [bad v]\nswitch costume to (bad v)\nset [ghost v] effect to (0)\nwait (2.5) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [good v]\nswitch costume to (good v)\nset [ghost v] effect to (0)\nwait (3.5) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [code v]\nset [ghost v] effect to (100)\nshow\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\n\nwhen backdrop switches to [main menu v]\nset [ghost v] effect to (100)\n\n@Code (numbers)\n\nwhen flag clicked\ngo to x: (-185) y: (-164)\nhide\n\nwhen I receive [code, show yourself! v]\nshow\n\nwhen I receive [code v]\nglide (1) secs to x: (-185) y: (-65)\n\nwhen I receive [good v]\nhide\n\nwhen I receive [bad v]\nglide (1) secs to x: (-185) y: (-164)\n\n@Home\n\nwhen this sprite clicked\nswitch backdrop to (main menu v)\n\nwhen backdrop switches to [main menu v]\nhide\n\nwhen I receive [move v]\nshow\n\nwhen flag clicked\nhide\n\n@Star\n\nwhen flag clicked\nset [code v] to [Off]\nhide\n\nwhen backdrop switches to [level 22 v]\nif <(Code) = [Off]> then\n    show\nend\nif <(Code) = [On]> then\n    hide\nend\n\nwhen backdrop switches to [level 23 v]\nhide\n\nwhen I receive [code, show yourself! v]\nset [code v] to [On]\nhide\n\nwhen backdrop switches to [main menu v]\nhide\n\n@Level Select\n\nwhen flag clicked\nshow\n\nwhen backdrop switches to [main menu v]\nshow\n\nwhen I receive [change colour v]\nhide\n\nwhen I receive [move v]\nhide\n\nwhen this sprite clicked\nbroadcast (Level Select v)\nhide\n\nwhen I receive [play, show yourself! v]\nshow\n\n@Back\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nhide\nbroadcast (Play, show yourself! v)\n\nwhen I receive [level select v]\nshow\n\nwhen I receive [move v]\nhide\n\n@1\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (Play v)\nend\n\nwhen I receive [level select v]\nshow\nif <<(Level #) > [1]> or <(Level #) = [1]>> then\n    switch costume to (button v)\nelse\n    switch costume to (button2 v)\nend\n\nwhen backdrop switches to [main menu v]\nhide\n\nwhen I receive [move v]\nhide\n\nwhen I receive [play, show yourself! v]\nhide\n\n@2\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (Level 2 v)\n    hide\nend\n\nwhen backdrop switches to [main menu v]\nhide\n\nwhen I receive [move v]\nhide\n\nwhen I receive [level select v]\nshow\nif <(Level #) > [1]> then\n    switch costume to (button v)\nelse\n    switch costume to (button2 v)\nend\n\nwhen I receive [play, show yourself! v]\nhide\n\n@3\n\nwhen flag clicked\nhide\n\nwhen I receive [move v]\nhide\n\nwhen I receive [level select v]\nshow\nif <(Level #) > [2]> then\n    switch costume to (button v)\nelse\n    switch costume to (button2 v)\nend\n\nwhen backdrop switches to [main menu v]\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (Level 3 v)\n    hide\nend\n\nwhen I receive [play, show yourself! v]\nhide\n\n@4\n\nwhen flag clicked\nhide\n\nwhen I receive [move v]\nhide\n\nwhen I receive [level select v]\nshow\nif <(Level #) > [3]> then\n    switch costume to (button v)\nelse\n    switch costume to (button2 v)\nend\n\nwhen backdrop switches to [main menu v]\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (Level 4 v)\n    hide\nend\n\nwhen I receive [play, show yourself! v]\nhide\n\n@5\n\nwhen flag clicked\nhide\n\nwhen I receive [move v]\nhide\n\nwhen I receive [level select v]\nshow\nif <(Level #) > [4]> then\n    switch costume to (button v)\nelse\n    switch costume to (button2 v)\nend\n\nwhen backdrop switches to [main menu v]\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (Level 5 v)\n    hide\nend\n\nwhen I receive [play, show yourself! v]\nhide\n\n@6\n\nwhen flag clicked\nhide\n\nwhen I receive [move v]\nhide\n\nwhen I receive [level select v]\nshow\nif <(Level #) > [5]> then\n    switch costume to (button v)\nelse\n    switch costume to (button2 v)\nend\n\nwhen backdrop switches to [main menu v]\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (Level 6 v)\n    hide\nend\n\nwhen I receive [play, show yourself! v]\nhide\n\n@7\n\nwhen flag clicked\nhide\n\nwhen I receive [move v]\nhide\n\nwhen I receive [level select v]\nshow\nif <(Level #) > [6]> then\n    switch costume to (button v)\nelse\n    switch costume to (button2 v)\nend\n\nwhen backdrop switches to [main menu v]\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (Level 7 v)\n    hide\nend\n\nwhen I receive [play, show yourself! v]\nhide\n\n@8\n\nwhen flag clicked\nhide\n\nwhen I receive [move v]\nhide\n\nwhen I receive [level select v]\nshow\nif <(Level #) > [7]> then\n    switch costume to (button v)\nelse\n    switch costume to (button2 v)\nend\n\nwhen backdrop switches to [main menu v]\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (Portal 1 v)\n    hide\nend\n\nwhen I receive [play, show yourself! v]\nhide\n\n@9\n\nwhen flag clicked\nhide\n\nwhen I receive [move v]\nhide\n\nwhen I receive [level select v]\nshow\nif <(Level #) > [8]> then\n    switch costume to (button v)\nelse\n    switch costume to (button2 v)\nend\n\nwhen backdrop switches to [main menu v]\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (Level 9 v)\n    hide\nend\n\nwhen I receive [play, show yourself! v]\nhide\n\n@10\n\nwhen flag clicked\nhide\n\nwhen I receive [move v]\nhide\n\nwhen I receive [level select v]\nshow\nif <(Level #) > [9]> then\n    switch costume to (button v)\nelse\n    switch costume to (button2 v)\nend\n\nwhen backdrop switches to [main menu v]\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (Level 10 v)\n    hide\nend\n\nwhen I receive [play, show yourself! v]\nhide\n\n@11\n\nwhen flag clicked\nhide\n\nwhen I receive [move v]\nhide\n\nwhen I receive [level select v]\nshow\nif <(Level #) > [10]> then\n    switch costume to (button v)\nelse\n    switch costume to (button2 v)\nend\n\nwhen backdrop switches to [main menu v]\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (Level 11 v)\n    hide\nend\n\nwhen I receive [play, show yourself! v]\nhide\n\n@12\n\nwhen flag clicked\nhide\n\nwhen I receive [move v]\nhide\n\nwhen I receive [level select v]\nshow\nif <(Level #) > [11]> then\n    switch costume to (button v)\nelse\n    switch costume to (button2 v)\nend\n\nwhen backdrop switches to [main menu v]\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (Level 12 v)\n    hide\nend\n\nwhen I receive [play, show yourself! v]\nhide\n\n@13\n\nwhen flag clicked\nhide\n\nwhen I receive [move v]\nhide\n\nwhen I receive [level select v]\nshow\nif <(Level #) > [12]> then\n    switch costume to (button v)\nelse\n    switch costume to (button2 v)\nend\n\nwhen backdrop switches to [main menu v]\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (Level 13 v)\n    hide\nend\n\nwhen I receive [play, show yourself! v]\nhide\n\n@14\n\nwhen flag clicked\nhide\n\nwhen I receive [move v]\nhide\n\nwhen I receive [level select v]\nshow\nif <(Level #) > [13]> then\n    switch costume to (button v)\nelse\n    switch costume to (button2 v)\nend\n\nwhen backdrop switches to [main menu v]\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (Level 14 v)\n    hide\nend\n\nwhen I receive [play, show yourself! v]\nhide\n\n@15\n\nwhen flag clicked\nhide\n\nwhen I receive [move v]\nhide\n\nwhen I receive [level select v]\nshow\nif <(Level #) > [14]> then\n    switch costume to (button v)\nelse\n    switch costume to (button2 v)\nend\n\nwhen backdrop switches to [main menu v]\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (Portal 2 v)\n    hide\nend\n\nwhen I receive [play, show yourself! v]\nhide\n\n@16\n\nwhen flag clicked\nhide\n\nwhen I receive [move v]\nhide\n\nwhen I receive [level select v]\nshow\nif <(Level #) > [15]> then\n    switch costume to (button v)\nelse\n    switch costume to (button2 v)\nend\n\nwhen backdrop switches to [main menu v]\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (Level 16 v)\n    hide\nend\n\nwhen I receive [play, show yourself! v]\nhide\n\n@17\n\nwhen I receive [move v]\nhide\n\nwhen I receive [level select v]\nshow\nif <(Level #) > [16]> then\n    switch costume to (button v)\nelse\n    switch costume to (button2 v)\nend\n\nwhen backdrop switches to [main menu v]\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (Level 17 v)\n    hide\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [play, show yourself! v]\nhide\n\n@18\n\nwhen flag clicked\nhide\n\nwhen I receive [move v]\nhide\n\nwhen I receive [level select v]\nshow\nif <(Level #) > [17]> then\n    switch costume to (button v)\nelse\n    switch costume to (button2 v)\nend\n\nwhen backdrop switches to [main menu v]\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (Level 18 v)\n    hide\nend\n\nwhen I receive [play, show yourself! v]\nhide\n\n@19\n\nwhen flag clicked\nhide\n\nwhen I receive [move v]\nhide\n\nwhen I receive [level select v]\nshow\nif <(Level #) > [18]> then\n    switch costume to (button v)\nelse\n    switch costume to (button2 v)\nend\n\nwhen backdrop switches to [main menu v]\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (Level 19 v)\n    hide\nend\n\nwhen I receive [play, show yourself! v]\nhide\n\n@20\n\nwhen flag clicked\nhide\n\nwhen I receive [move v]\nhide\n\nwhen I receive [level select v]\nshow\nif <(Level #) > [19]> then\n    switch costume to (button v)\nelse\n    switch costume to (button2 v)\nend\n\nwhen backdrop switches to [main menu v]\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (Level 20 v)\n    hide\nend\n\nwhen I receive [play, show yourself! v]\nhide\n\n@21\n\nwhen flag clicked\nhide\n\nwhen I receive [move v]\nhide\n\nwhen I receive [level select v]\nshow\nif <(Level #) > [20]> then\n    switch costume to (button v)\nelse\n    switch costume to (button2 v)\nend\n\nwhen backdrop switches to [main menu v]\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (Level 21 v)\n    hide\nend\n\nwhen I receive [play, show yourself! v]\nhide\n\n@22\n\nwhen flag clicked\nhide\n\nwhen I receive [move v]\nhide\n\nwhen I receive [level select v]\nshow\nif <(Level #) > [21]> then\n    switch costume to (button v)\nelse\n    switch costume to (button2 v)\nend\n\nwhen backdrop switches to [main menu v]\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (Portal 3 v)\n    hide\nend\n\nwhen I receive [play, show yourself! v]\nhide\n\n@23\n\nwhen flag clicked\nhide\n\nwhen I receive [move v]\nhide\n\nwhen I receive [level select v]\nshow\nif <(Level #) > [22]> then\n    switch costume to (button v)\nelse\n    switch costume to (button2 v)\nend\n\nwhen backdrop switches to [main menu v]\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (Level 23 v)\n    hide\nend\n\nwhen I receive [play, show yourself! v]\nhide\n\n@24\n\nwhen flag clicked\nhide\n\nwhen I receive [move v]\nhide\n\nwhen I receive [level select v]\nshow\nif <(Level #) > [23]> then\n    switch costume to (button v)\nelse\n    switch costume to (button2 v)\nend\n\nwhen backdrop switches to [main menu v]\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (Level 24 v)\n    hide\nend\n\nwhen I receive [play, show yourself! v]\nhide\n\n@25\n\nwhen I receive [move v]\nhide\n\nwhen I receive [level select v]\nshow\nif <<(Level #) > [25]> or <(Level #) = [25]>> then\n    switch costume to (button v)\nelse\n    switch costume to (button2 v)\nend\n\nwhen backdrop switches to [main menu v]\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (Portal 4 v)\n    hide\nend\n\nwhen I receive [play, show yourself! v]\nhide\n\nwhen flag clicked\nhide\n\n@Up\n\nwhen flag clicked\nswitch costume to (up_notpressing v)\ngo to x: (213) y: (-138)\nhide\n\nwhen backdrop switches to [level 1 v]\nshow\nforever\n    if <not <(backdrop [number v]) = [1]>> then\n        show\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <touching (mouse-pointer v)?>>> then\n            switch costume to (up_pressing v)\n        end\n        if <not <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <touching (mouse-pointer v)?>>>> then\n            switch costume to (up_notpressing v)\n        end\n    else\n        hide\n    end\nend\n\n@Left\n\nwhen flag clicked\nswitch costume to (left_notpressing v)\ngo to x: (-187) y: (-138)\nhide\n\nwhen backdrop switches to [level 1 v]\nshow\nforever\n    if <not <(backdrop [number v]) = [1]>> then\n        show\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <touching (mouse-pointer v)?>>> then\n            switch costume to (left_pressing v)\n        end\n        if <not <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <touching (mouse-pointer v)?>>>> then\n            switch costume to (left_notpressing v)\n        end\n    else\n        hide\n    end\nend\n\n@Right\n\nwhen flag clicked\nswitch costume to (right_notpressing v)\ngo to x: (-147) y: (-138)\nhide\n\nwhen backdrop switches to [level 1 v]\nshow\nforever\n    if <not <(backdrop [number v]) = [1]>> then\n        show\n        if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <touching (mouse-pointer v)?>>> then\n            switch costume to (right_pressing v)\n        end\n        if <not <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <touching (mouse-pointer v)?>>>> then\n            switch costume to (right_notpressing v)\n        end\n    else\n        hide\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\n\n