Explorer | A Mobile friendly Platformer | A Collab with @qwerty1456
@Stage\n\nwhen flag clicked\nswitch backdrop to (1 v)\nwait until <(LEVEL) = [7]>\nnext backdrop\nwait until <(LEVEL) = [12]>\nnext backdrop\n\n@Nothing\n\n@Platform\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    switch costume to (LEVEL)\nend\n\n@Danger\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    switch costume to (LEVEL)\nend\n\n@Trampoline\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    switch costume to (LEVEL)\nend\n\n@Level\n\nwhen I receive [new level v]\nset size to (100) %\nrepeat (10)\n    change size by (-10)\nend\nnext costume\nrepeat (10)\n    change size by (10)\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset size to (100) %\n\n@Mute - button\n\nwhen flag clicked\nset volume to (100) %\nswitch costume to (costume1 v)\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        if <(volume) = [100]> then\n            set volume to (0) %\n            switch costume to (costume2 v)\n        else\n            set volume to (100) %\n            switch costume to (costume1 v)\n        end\n        wait (1) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    play sound [TheFatRat - Monody v] until done\n    play sound [Open Secrets v] until done\n    play sound [tobu candyland v] until done\nend\n\n@Pause - button\n\nwhen flag clicked\nset [game v] to [1]\nswitch costume to (costume1 v)\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        set [game v] to [0]\n        switch costume to (costume2 v)\n        wait (0.5) seconds\n        wait until <<mouse down?> and <touching (mouse-pointer v)?>>\n        set [game v] to [1]\n        switch costume to (costume1 v)\n        wait (0.5) seconds\n    end\nend\n\n@Reset - button\n\nwhen flag clicked\nset [game v] to [1]\nswitch costume to (costume1 v)\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        broadcast (RESET v)\n        wait (1) seconds\n    end\nend\n\n@Skip - button\n\nwhen flag clicked\nwait (0.01) seconds\nshow\nset [game v] to [1]\nswitch costume to (costume1 v)\nforever\n    if <(LEVEL) < [15]> then\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            broadcast (SKIP v)\n            wait (1) seconds\n        end\n    end\n    if <not <(LEVEL) < [15]>> then\n        hide\n    end\nend\n\n@Shoot - button\n\nwhen flag clicked\nset [game v] to [1]\nswitch costume to (costume1 v)\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        broadcast (SHOOT v)\n        wait until <not <mouse down?>>\n    end\nend\n\n@Accessoires\n\nwhen flag clicked\nforever\n    go to (player v)\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\nwait (1) seconds\nwait until <(LEVEL) = [7]>\nnext costume\nwait until <(LEVEL) = [12]>\nnext costume\n\n@Player\n\nwhen flag clicked\nset [x vel v] to [0]\nset [y vel v] to [0]\ngo to x: (-215) y: (0)\nforever\n    if <(GAME) = [1]> then\n        platformer physics [1] [0.9] [15]\n    end\n    set [player x position v] to (x position)\n    set [player y position v] to (y position)\nend\n\ndefine platformer physics (speed) (friction) (jump height)\nif <<<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> or <key (d v) pressed?>> then\n    point in direction (90)\n    change [x vel v] by (speed)\nend\nif <<<key (left arrow v) pressed?> or <<mouse down?> and <(x position) > (mouse x)>>> or <key (a v) pressed?>> then\n    point in direction (-90)\n    change [x vel v] by ((speed) * (-1))\nend\nset [x vel v] to ((x vel) * (friction))\nchange x by (x vel)\nif <touching (platform v)?> then\n    change y by (1)\n    if <touching (platform v)?> then\n        change y by (1)\n        if <touching (platform v)?> then\n            change y by (1)\n            if <touching (platform v)?> then\n                change y by (1)\n                if <touching (platform v)?> then\n                    change y by (1)\n                    if <touching (platform v)?> then\n                        change y by (1)\n                        if <touching (platform v)?> then\n                            change y by (1)\n                            if <touching (platform v)?> then\n                                change y by (1)\n                                if <touching (platform v)?> then\n                                    change x by ((x vel) * (-1))\n                                    if <<<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> or <key (w v) pressed?>> then\n                                        if <(x vel) > [0]> then\n                                            set [x vel v] to [-5]\n                                        else\n                                            set [x vel v] to [5]\n                                        end\n                                        set [y vel v] to [10]\n                                    else\n                                        set [x vel v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange [y vel v] by (-1)\nchange y by (y vel)\nif <touching (platform v)?> then\n    change y by ((y vel) * (-1))\n    set [y vel v] to [0]\nend\nchange y by (-1)\nif <touching (platform v)?> then\n    if <<<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> or <key (w v) pressed?>> then\n        change [y vel v] by (jump height)\n    end\nend\nchange y by (1)\nif <<touching (danger v)?> or <touching (enemie v)?>> then\n    go to x: (-215) y: (0)\n    set [x vel v] to [0]\n    set [y vel v] to [0]\nend\nif <<(x position) > [230]> and <touching (_edge_ v)?>> then\n    go to x: (-215) y: (0)\n    set [x vel v] to [0]\n    set [y vel v] to [0]\n    change [level v] by (1)\n    broadcast (NEW LEVEL v)\nend\nif <touching (trampoline v)?> then\n    set [y vel v] to [20]\nend\n\nwhen I receive [skip v]\ngo to x: (-215) y: (0)\nset [x vel v] to [0]\nset [y vel v] to [0]\nchange [level v] by (1)\nbroadcast (NEW LEVEL v)\n\nwhen I receive [reset v]\ngo to x: (-215) y: (0)\nset [x vel v] to [0]\nset [y vel v] to [0]\n\nwhen flag clicked\nswitch costume to (costume1 v)\nwait (1) seconds\nwait until <(LEVEL) = [7]>\nnext costume\nwait until <(LEVEL) = [12]>\nnext costume\n\n@Thumbnail\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\n@Cloud\n\nwhen flag clicked\nhide\nrepeat until <[6] < (LEVEL)>\n    if <(GAME) = [1]> then\n        create clone of (_myself_ v)\n        wait (pick random (1) to (5)) seconds\n    end\nend\n\nwhen I start as a clone\nset [ghost v] effect to (pick random (50) to (80))\nshow\nswitch costume to (pick random (1) to (4))\ngo to x: (-240) y: (pick random (0) to (180))\nglide (pick random (5) to (10)) secs to x: (260) y: (y position)\ndelete this clone\n\n@Enemie\n\nwhen flag clicked\nshow\nset [x vel v] to [0]\nset [y vel v] to [0]\ngo to x: (215) y: (0)\nforever\n    if <(GAME) = [1]> then\n        platformer physics [1] [0.6] [10]\n    end\nend\n\ndefine platformer physics (speed) (friction) (jump height)\nchange [y vel v] by (-1)\nif <(PLAYER X POSITION) > (x position)> then\n    point in direction (90)\n    change [x vel v] by (speed)\nend\nif <(x position) > (PLAYER X POSITION)> then\n    point in direction (-90)\n    change [x vel v] by ((speed) * (-1))\nend\nset [x vel v] to ((x vel) * (friction))\nchange x by (x vel)\nif <touching (platform v)?> then\n    change y by (1)\n    if <touching (platform v)?> then\n        change y by (1)\n        if <touching (platform v)?> then\n            change y by (1)\n            if <touching (platform v)?> then\n                change y by (1)\n                if <touching (platform v)?> then\n                    change y by (1)\n                    if <touching (platform v)?> then\n                        change y by (1)\n                        if <touching (platform v)?> then\n                            change y by (1)\n                            if <touching (platform v)?> then\n                                change y by (1)\n                                if <touching (platform v)?> then\n                                    change y by (8)\n                                    change x by ((x vel) * (-1))\n                                    if <(PLAYER Y POSITION) > (y position)> then\n                                        if <(x vel) > [0]> then\n                                            set [x vel v] to [-5]\n                                        else\n                                            set [x vel v] to [5]\n                                        end\n                                        set [y vel v] to [10]\n                                    else\n                                        set [x vel v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange [y vel v] by (-1)\nchange y by (y vel)\nif <touching (platform v)?> then\n    change y by ((y vel) * (-1))\n    set [y vel v] to [0]\nend\nchange y by (-1)\nif <touching (platform v)?> then\n    if <(PLAYER Y POSITION) > (y position)> then\n        change [y vel v] by (jump height)\n    end\nend\nchange y by (1)\nif <touching (weapon v)?> then\n    go to x: (215) y: (0)\n    set [x vel v] to [0]\n    set [y vel v] to [0]\n    hide\nend\nif <touching (trampoline v)?> then\n    set [y vel v] to [20]\nend\n\nwhen I receive [skip v]\ngo to x: (215) y: (0)\nset [x vel v] to [0]\nset [y vel v] to [0]\n\nwhen I receive [reset v]\nshow\ngo to x: (215) y: (0)\nset [x vel v] to [0]\nset [y vel v] to [0]\n\nwhen I receive [new level v]\nshow\ngo to x: (215) y: (0)\nset [x vel v] to [0]\nset [y vel v] to [0]\n\n@Weapon\n\nwhen flag clicked\nhide\nforever\n    go to (player v)\n    if <(GAME) = [1]> then\n        if <key (space v) pressed?> then\n            create clone of (_myself_ v)\n            repeat until <not <key (space v) pressed?>>\n                go to (player v)\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nshow\nrepeat until <<<touching (enemie v)?> or <touching (platform v)?>> or <<touching (danger v)?> or <touching (_edge_ v)?>>>\n    move (10) steps\nend\ndelete this clone\n\nwhen I receive [shoot v]\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nforever\n    go to (player v)\n    if <(GAME) = [1]> then\n        if <<<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> or <key (d v) pressed?>> then\n            point in direction (90)\n        end\n        if <<<key (left arrow v) pressed?> or <<mouse down?> and <(x position) > (mouse x)>>> or <key (a v) pressed?>> then\n            point in direction (-90)\n        end\n    end\nend\n\n