Worlds || A Platformer

Instructions: Press the flag 2 times and wait for a while because takes a while to load.\n\n>instructions<\nUse the arrow keys to move spikes are painful. signs tell you which way to go. purple and mushrooms are bouncy. blue is a  teleporter and to activate the teleporter you press space while touching it.

@Stage\n\nwhen flag clicked\nswitch backdrop to (world 1 v)\nforever\n    if <(Level) > [8]> then\n        switch backdrop to (world 2 v)\n        if <(Level) > [16]> then\n            switch backdrop to (world 3 v)\n        end\n    end\nend\n\n@Background\n\nwhen flag clicked\nswitch costume to (level 1 v)\ngo to [back v] layer\nshow\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nforever\n    if <(Level) = [9]> then\n        hide\n    end\nend\n\nwhen [a v] key pressed\nif <(username) = [chick_animations]> then\n    repeat (21)\n        broadcast (Next Level v)\n        change [level v] by (1)\n    end\nend\n\n@Ground\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (level 1 v)\n\n@Player\n\nwhen flag clicked\nset rotation style [all around v]\nswitch costume to (player v)\nset [speed y v] to [0]\nset [speed x v] to [0]\ngo to x: (-210) y: (-100)\nforever\n    Platformer code\nend\n\ndefine Platformer code\nif <not <<key (left arrow v) pressed?> or <key (right arrow v) pressed?>>> then\n    switch costume to (player rest v)\nend\nchange [speed y v] by (-1)\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [speed x v] by (-3)\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [speed x v] by (3)\nend\nset [speed x v] to ((Speed x) * (0.7))\nchange x by (Speed x)\nif <<<touching (ground v)?> or <touching (moving platforms v)?>> or <touching (locked block v)?>> then\n    change y by (1)\n    if <<<touching (ground v)?> or <touching (moving platforms v)?>> or <touching (locked block v)?>> then\n        change y by (1)\n        if <<<touching (ground v)?> or <touching (moving platforms v)?>> or <touching (locked block v)?>> then\n            change y by (1)\n            if <<<touching (ground v)?> or <touching (moving platforms v)?>> or <touching (locked block v)?>> then\n                change y by (1)\n                if <<<touching (ground v)?> or <touching (moving platforms v)?>> or <touching (locked block v)?>> then\n                    change y by (1)\n                    if <<<touching (ground v)?> or <touching (moving platforms v)?>> or <touching (locked block v)?>> then\n                        change y by (1)\n                        if <<<touching (ground v)?> or <touching (moving platforms v)?>> or <touching (locked block v)?>> then\n                            change y by (1)\n                            if <<<touching (ground v)?> or <touching (moving platforms v)?>> or <touching (locked block v)?>> then\n                                change y by (1)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nif <<<touching (ground v)?> or <touching (moving platforms v)?>> or <touching (locked block v)?>> then\n    change y by (-8)\n    repeat until <not <<<touching (ground v)?> or <touching (moving platforms v)?>> or <touching (locked block v)?>>>\n        change x by ((Speed x) * (-1))\n    end\n    if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n        set [speed y v] to [10]\n        if <(Speed x) < [0]> then\n            set [speed x v] to [16]\n        else\n            set [speed x v] to [-16]\n        end\n    else\n        set [speed x v] to [0]\n    end\nend\nchange y by (Speed y)\nif <<<touching (ground v)?> or <touching (moving platforms v)?>> or <touching (locked block v)?>> then\n    repeat until <not <<<touching (ground v)?> or <touching (moving platforms v)?>> or <touching (locked block v)?>>>\n        change y by ((Speed y) * (-1))\n    end\n    set [speed y v] to [0]\nend\nchange y by (-1)\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <<<touching (ground v)?> or <touching (moving platforms v)?>> or <touching (locked block v)?>>> then\n    set [speed y v] to [12.5]\nend\nif <<<<<(y position) < [-178]> or <touching (spikes v)?>> or <touching (circle geyser v)?>> or <touching (spinning red v)?>> or <<touching (animation red v)?> or <touching (animation red 2 v)?>>> then\n    go to x: (-210) y: (-100)\nend\nif <<<(x position) > [244]> or <touching (neon portal v)?>> and <not <(Level) > [8]>>> then\n    go to x: (-210) y: (-100)\n    broadcast (Next Level v)\n    change [level v] by (1)\nend\nif <<touching (bouncy v)?> or <touching (neon bouncy v)?>> then\n    set [speed y v] to [18]\n    broadcast (Bounced v)\nend\nif <touching (speed boost right v)?> then\n    set [speed x v] to [33]\nend\nif <<touching (flag v)?> or <touching (scratch portal v)?>> then\n    go to x: (-210) y: (-100)\n    broadcast (Next Level v)\n    change [level v] by (1)\nend\ngo to [front v] layer\nchange y by (1)\n\nwhen flag clicked\nset [level v] to [1]\n\nwhen flag clicked\npoint in direction (90)\nshow\n\nwhen flag clicked\nswitch costume to (grassland v)\npoint in direction (90)\nforever\n    if <(Level) = [9]> then\n        switch costume to (neon v)\n    end\n    if <(Level) = [17]> then\n        switch costume to (scratch v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (teleporter v)?> and <key (space v) pressed?>> then\n        go to (teleporter 2 v)\n        wait until <not <key (space v) pressed?>>\n    end\n    if <<touching (teleporter 2 v)?> and <key (space v) pressed?>> then\n        go to (teleporter v)\n        wait until <not <key (space v) pressed?>>\n    end\nend\n\nwhen I receive [next level v]\ngo to x: (-210) y: (-100)\n\nwhen [s v] key pressed\nif <not <(Level) = [22]>> then\n    go to x: (-210) y: (-100)\n    broadcast (Next Level v)\n    change [level v] by (1)\nend\n\n@Spikes\n\nwhen flag clicked\nswitch costume to (level 1 v)\ngo to [back v] layer\n\nwhen I receive [next level v]\nnext costume\n\n@Moving Platforms\n\nwhen flag clicked\nhide\nforever\n    if <(Level) = [4]> then\n        switch costume to (level 4 moving block v)\n        go to [front v] layer\n        go to x: (0) y: (-24)\n        show\n        wait (0.5) seconds\n        if <(Level) = [4]> then\n            glide (1) secs to x: (192) y: (-24)\n        end\n        wait (0.5) seconds\n        if <(Level) = [4]> then\n            glide (1) secs to x: (0) y: (-24)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [5]> then\n        switch costume to (level 5 moving block v)\n        go to x: (-96) y: (-156)\n        show\n        go to [back v] layer\n        if <(Level) = [5]> then\n            wait (0.5) seconds\n            glide (1) secs to x: (-96) y: (-25)\n            wait (0.5) seconds\n            glide (1) secs to x: (-96) y: (-156)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [6]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [7]> then\n        switch costume to (level 7 moving block v)\n        go to x: (-192) y: (-156)\n        go to [back v] layer\n        show\n        wait (0.5) seconds\n        glide (3) secs to x: (-192) y: (106)\n        wait (0.5) seconds\n        glide (3) secs to x: (-192) y: (-156)\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nforever\n    if <<(Level) = [1]> or <<(Level) = [2]> or <(Level) = [3]>>> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [8]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [14]> then\n        point in direction (90)\n        switch costume to (neon turning type 1 v)\n        show\n        repeat until <(Level) = [15]>\n            go to x: (-86) y: (-25)\n            turn right (3) degrees\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [15]> then\n        hide\n    end\nend\n\n@Bouncy\n\nwhen flag clicked\nswitch costume to (1 v)\nhide\nforever\n    if <(Level) = [7]> then\n        go to x: (112) y: (-112)\n        show\n    end\n    if <(Level) = [8]> then\n        hide\n    end\nend\n\nwhen I receive [bounced v]\nrepeat (6)\n    next costume\nend\nswitch costume to (1 v)\n\n@Neon Portal\n\nwhen flag clicked\nhide\nforever\n    turn right (15) degrees\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [8]> then\n        switch costume to (1 v)\n        go to x: (162) y: (68)\n        show\n    end\n    if <(Level) = [9]> then\n        hide\n    end\nend\n\n@Neon Bouncy\n\nwhen flag clicked\nhide\nforever\n    if <(Level) = [10]> then\n        go to x: (59) y: (29)\n        show\n    end\n    if <(Level) = [11]> then\n        hide\n    end\nend\n\n@Flag\n\nwhen flag clicked\nswitch costume to (level 1 v)\ngo to x: (0) y: (0)\n\nwhen I receive [next level v]\nnext costume\n\n@Speed Boost Right\n\nwhen flag clicked\nhide\nforever\n    if <(Level) = [9]> then\n        go to x: (62) y: (95)\n        show\n    end\n    if <(Level) = [10]> then\n        go to x: (-63) y: (-85)\n    end\n    if <(Level) = [11]> then\n        hide\n    end\nend\n\n@Teleporter\n\nwhen flag clicked\ngo to [back v] layer\nhide\nforever\n    if <(Level) = [10]> then\n        go to x: (-208) y: (-11)\n        show\n    end\n    if <(Level) = [11]> then\n        go to x: (24) y: (-42)\n    end\n    if <(Level) = [12]> then\n        go to x: (-114) y: (-53)\n    end\n    if <(Level) = [13]> then\n        go to x: (-204) y: (82)\n    end\n    if <(Level) = [14]> then\n        go to x: (181) y: (57)\n    end\n    if <(Level) = [15]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        switch costume to (2 v)\n    else\n        switch costume to (1 v)\n    end\nend\n\n@Teleporter 2\n\nwhen flag clicked\ngo to [back v] layer\nhide\nforever\n    if <(Level) = [10]> then\n        go to x: (-181) y: (140)\n        show\n    end\n    if <(Level) = [11]> then\n        go to x: (-206) y: (145)\n    end\n    if <(Level) = [12]> then\n        go to x: (0) y: (22)\n    end\n    if <(Level) = [14]> then\n        go to x: (120) y: (-58)\n    end\n    if <(Level) = [15]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        switch costume to (2 v)\n    else\n        switch costume to (1 v)\n    end\nend\n\n@Circle Geyser\n\nwhen flag clicked\nswitch costume to (1 v)\nhide\nforever\n    repeat (14)\n        next costume\n    end\n    wait (1) seconds\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [11]> then\n        go to x: (-30) y: (114)\n        go to [front v] layer\n        show\n    end\n    if <(Level) = [12]> then\n        hide\n    end\nend\n\n@Locked Block\n\nwhen flag clicked\nset [ghost v] effect to (0)\nhide\nwait until <(Level) = [12]>\nswitch costume to (lock door type 3 v)\nset [ghost v] effect to (0)\nshow\n\nwhen I receive [next level v]\nset [ghost v] effect to (0)\n\nwhen I receive [key v]\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [13]> then\n        hide\n    end\nend\n\n@Key\n\nwhen flag clicked\nhide\nwait until <(Level) = [12]>\ngo to x: (-123) y: (130)\nshow\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        broadcast (Key v)\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [13]> then\n        hide\n    end\nend\n\n@Spinning Red\n\nwhen flag clicked\nhide\nforever\n    if <(Level) = [14]> then\n        point in direction (90)\n        switch costume to (neon turning type 1 v)\n        show\n        repeat until <(Level) = [15]>\n            go to x: (-86) y: (-25)\n            turn right (3) degrees\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [15]> then\n        hide\n    end\nend\n\n@Scratch Portal\n\nwhen flag clicked\ngo to x: (-15) y: (124)\nhide\nforever\n    if <(Level) = [16]> then\n        show\n    end\n    if <(Level) = [17]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    turn right (15) degrees\nend\n\n@Animation Red\n\nwhen flag clicked\npoint in direction (90)\ngo to x: (-3) y: (7)\nhide\nforever\n    next costume\n    wait (0.00000000000000000000000000001) seconds\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [20]> then\n        go to x: (-3) y: (7)\n        show\n    end\n    if <(Level) = [21]> then\n        go to x: (186) y: (9)\n    end\n    if <(Level) = [22]> then\n        hide\n    end\nend\n\n@Animation Red 2\n\nwhen flag clicked\ngo to x: (175) y: (132)\npoint in direction (0)\nhide\nforever\n    next costume\n    wait (0.00000000000000000000000000001) seconds\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [20]> then\n        show\n    end\n    if <(Level) = [21]> then\n        hide\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\n