Draw platformer‼︎

Instructions: I finally have finished the first part my BEST platformer of all time, Geo!\n\nPC Players:\n-WASD or arrow keys to move and jump\n\nMobile players:\n- Tap the screen to the right to go right, tap the screen to the left to go left, and tap the screen to the upper side to jump!\n\nAvoid obstacles and try to get to the end! :D

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nforever\n    if <key (e v) pressed?> then\n        switch backdrop to (backdrop1 v)\n    end\n    if <key (q v) pressed?> then\n        switch backdrop to (backdrop2 v)\n    end\nend\n\n@Blank\n\n@Player\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nrepeat (10)\n    change size by (-5)\n    change [brightness v] effect by (3.5)\n    change [ghost v] effect by (-20)\nend\ndelete this clone\n\ndefine reset\nbroadcast (death v)\ngo to x: (-200) y: (-73)\n\nwhen flag clicked\nforever\n    if <<touching (spikes v)?> or <key (r v) pressed?>> then\n        reset\n    end\n    if <touching (lava v)?> then\n        reset\n    end\nend\n\nwhen flag clicked\n\nforever\n    play sound [so sad D: v] until done\n    if <key (m v) pressed?> then\n        set volume to (0) %\n    end\n    if <key (u v) pressed?> then\n        set volume to (40) %\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\nshow\nset [xvelocity v] to [0]\nset [yvelocity v] to [0]\ngo to x: (-200) y: (-57)\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [xvelocity v] by (1)\n        point in direction (90)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [xvelocity v] by (-1)\n        point in direction (-90)\n    end\n    set [xvelocity v] to ((xvelocity) * (.9))\n    change x by (xvelocity)\n    if <touching (lvl v)?> then\n        change y by (1)\n        if <touching (lvl v)?> then\n            change y by (1)\n            if <touching (lvl v)?> then\n                change y by (1)\n                if <touching (lvl v)?> then\n                    change y by (1)\n                    if <touching (lvl v)?> then\n                        change y by (1)\n                        if <touching (lvl v)?> then\n                            change y by (1)\n                            if <touching (lvl v)?> then\n                                change x by ((xvelocity) * (-1))\n                                change y by (-5)\n                                if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                    if <(xvelocity) > [0]> then\n                                        set [xvelocity v] to [-5]\n                                    else\n                                        set [xvelocity v] to [5]\n                                    end\n                                    set [yvelocity v] to [10]\n                                else\n                                    set [xvelocity v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    switch costume to (join [costume2] (weapon number))\n    change [yvelocity v] by (-1)\n    change y by (yvelocity)\n    if <touching (lvl v)?> then\n        change y by ((yvelocity) * (-1))\n        set [yvelocity v] to [0]\n    end\n    change y by (-1)\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        if <touching (lvl v)?> then\n            change [yvelocity v] by (15)\n        end\n    end\n    change y by (1)\n    if <(x position) > [230]> then\n        change [level v] by (1)\n        set [xvelocity v] to [0]\n        set [yvelocity v] to [0]\n        go to x: (-200) y: (-73)\n    end\nend\n\nwhen I receive [death v]\nplay sound [death v] until done\n\nwhen I receive [switch of the weapon v]\nswitch costume to (costume2 v)\n\nwhen flag clicked\nforever\n    if <touching (boss \(unfinished\) v)?> then\n        wait (0.3) seconds\n    end\nend\n\n@lvl\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    switch costume to (level)\nend\n\n@spikes\n\nwhen flag clicked\nforever\n    switch costume to (level)\nend\n\n@Effect\n\nwhen I start as a clone\nforever\n    go to [back v] layer\nend\n\nwhen flag clicked\nforever\n    wait (pick random (0.1) to (0.3)) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset size to (pick random (50) to (100)) %\nswitch costume to (pick random (1) to (2))\ngo to x: (pick random (-230) to (230)) y: (-180)\nshow\nrepeat until <(y position) > [170]>\n    change y by (3)\nend\ndelete this clone\n\n@lava\n\nwhen flag clicked\ngo to x: (18) y: (-25)\nset [level v] to [1]\nforever\n    switch costume to (level)\n    go to [back v] layer\nend\n\nwhen flag clicked\nforever\n    repeat (10)\n        change y by (1)\n        wait (0.01) seconds\n    end\n    repeat (10)\n        change y by (-1)\n        wait (0.01) seconds\n    end\nend\n\n@thumbnail\n\nwhen flag clicked\nshow\nforever\n    go to [front v] layer\n    show\n    set [ghost v] effect to (100)\nend\n\n@Music\n\nwhen this sprite clicked\nif <(music) = [0]> then\n    broadcast (Munsic v)\n    switch costume to (1 v)\nelse\n    set [music v] to [0]\n    repeat (5)\n        change size by (1)\n    end\n    switch costume to (2 v)\nend\n\nwhen flag clicked\nset volume to (50) %\nset [music v] to [1]\nhide\n\nwhen flag clicked\nforever\n    play sound [sad v] until done\nend\n\nwhen flag clicked\nset volume to (50) %\nswitch costume to (1 v)\npoint in direction (90)\nset size to (20) %\nshow\nforever\n    go to x: (220) y: (-160)\n    if <touching (mouse-pointer v)?> then\n        change size by (((80) - (size)) / (5))\n        set [brightness v] effect to (10)\n    else\n        change size by (((65) - (size)) / (5))\n        set [brightness v] effect to (0)\n    end\nend\n\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    if <(music) = [0]> then\n        set volume to (0) %\n    else\n        set volume to (50) %\n    end\nend\n\nwhen I receive [munsic v]\nset [music v] to [1]\n\ngo [backward v] (2) layers\n\n@ low quality sword D:\n\nwhen flag clicked\nhide\nforever\n    if <(level) > [13]> then\n        go to x: (-3) y: (-10)\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\nset [level v] to [14]\n\nwhen I start as a clone\nhide\nset [weapon number v] to [1]\nset [weapon type v] to [1]\nbroadcast (sword v)\ndelete this clone\n\nwhen I start as a clone\nhide\nforever\n    show\n    point in direction (90)\n    switch costume to (swing v)\n    repeat (10)\n        change y by (1)\n    end\n    repeat (20)\n        change y by (-1)\n    end\n    repeat (10)\n        change y by (1)\n    end\nend\n\nwhen flag clicked\ndelete this clone\n\nwhen I receive [sword v]\nforever\n    if <<key (space v) pressed?> and <(weapon number) = [1]>> then\n        swing sword\n        wait until <not <key (space v) pressed?>>\n    end\nend\n\ndefine swing sword\nshow\nif <([direction v] of [player v]) = [90]> then\n    set size to (100) %\n    point in direction (30)\n    repeat (7)\n        turn right (20) degrees\n        switch costume to (swing v)\n        go to (player v)\n        broadcast (switch of the weapon v)\n    end\nelse\n    set size to (100) %\n    point in direction (150)\n    repeat (7)\n        turn right (-20) degrees\n        switch costume to (swing2 v)\n        go to (player v)\n        broadcast (switch of the weapon v)\n    end\nend\nhide\n\n@boss (unfinished)\n\nwhen flag clicked\nhide\npoint in direction (-88)\nswitch costume to (costume2 v)\nforever\n    next costume\n    wait (0.4) seconds\nend\n\nwhen flag clicked\nforever\n    repeat (10)\n        change y by (1)\n        wait (0.01) seconds\n    end\n    repeat (10)\n        change y by (-1)\n        wait (0.01) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) > [17]> then\n        show\n        broadcast (boss fight v)\n    end\nend\n\nwhen flag clicked\ngo to x: (9) y: (115)\n\nset [level v] to [16]\n\nwhen flag clicked\nforever\n    if <touching (boss weapon v)?> then\n        broadcast (boss = hurt v)\n        change [pixelate v] effect by (25)\n        wait (0.3) seconds\n        set [pixelate v] effect to (0)\n    end\nend\n\n@boss weapon\n\nwhen flag clicked\ngo to [back v] layer\ngo to (boss \(unfinished\) v)\nhide\nforever\n    if <(level) > [16]> then\n        wait (3) seconds\n        create clone of (_myself_ v)\n        wait (pick random (1) to (1.5)) seconds\n    end\nend\n\nwhen I start as a clone\nshow\npoint towards (player v)\nrepeat until <<touching (_edge_ v)?> or <touching (lvl v)?>>\n    move (15) steps\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <touching ( low quality sword d: v)?> then\n        point towards (boss \(unfinished\) v)\n        repeat until <touching (boss \(unfinished\) v)?>\n            move (15) steps\n        end\n    end\nend\n\nset [level v] to [17]\n\nwhen flag clicked\nforever\n    if <touching (boss \(unfinished\) v)?> then\n        repeat (1)\n            broadcast (boss = hurt v)\n            wait (5) seconds\n        end\n    end\nend\n\n