Super Mario- A PLATFORMER

Instructions: ❤️ AND ⭐ FOR SOME MAGIC\n \n1000 views already?\n\npress the green flag twice\nI will add more soon\n\nTO MOVE:\nA,D or LEFT AND RIGHT ARROWS\n\nTO JUMP:\nW or UP ARROW\n\nTHIS TOOK 1 WEEK TO MAKE HOPE YOU LIKE IT :)

@Stage\n\nwhen flag clicked\nset [level v] to [1]\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen flag clicked\nforever\n    if <(Level) = [11]> then\n        switch backdrop to (backdrop2 v)\n    end\nend\n\n@Player\n\nwhen flag clicked\ngo to x: (-228) y: (-20)\nforever\n    platform physics (10) (-1) (0.7) (2)\n    if <<touching (spikes v)?> or > then\n        if <(Level) = [10]> then\n            start sound [mario death sound2 v]\n            go to x: (-228) y: (-148)\n            set [x vel v] to [0]\n            point in direction (90)\n            set [y vel v] to [-5]\n            switch costume to (idle v)\n            broadcast (boss v)\n            wait (6) seconds\n        else\n            start sound [mario death sound2 v]\n            go to x: (-228) y: (-138)\n            set [x vel v] to [0]\n            set [y vel v] to [0]\n        end\n    end\n    if <touching (finish v)?> then\n        start sound [Checkpoint Sound Effect v]\n        if <(Level) = [9]> then\n            broadcast (boss v)\n        end\n        change [level v] by (1)\n        if <(Level) = [10]> then\n            go to x: (-4) y: (-153)\n            set [x vel v] to [0]\n            point in direction (90)\n            set [y vel v] to [-5]\n            switch costume to (idle v)\n            wait (6) seconds\n        else\n            go to x: (-228) y: (-138)\n            set [x vel v] to [0]\n            point in direction (90)\n            set [y vel v] to [-5]\n            switch costume to (idle v)\n            broadcast (finish v)\n        end\n    end\n    if <touching (trampolines v)?> then\n        start sound [Cartoon Sound Effect - Bounce.mp3 v]\n        set [y vel v] to [17]\n    end\n    if <touching (boss 1 v)?> then\n        hide\n        start sound [Bone Breaking Sound EffectNon Copyrighted Sound Effects.mp3 v]\n        broadcast (boss v)\n        go to x: (-228) y: (-148)\n        switch costume to (idle v)\n        point in direction (90)\n        show\n        set [x vel v] to [0]\n        set [y vel v] to [-5]\n        wait (6) seconds\n    end\nend\n\nwhen I receive [message1 v]\ngo to x: (-228) y: (-138)\nset [x vel v] to [0]\nset [y vel v] to [0]\n\nwhen flag clicked\nshow\n\nforever\n    if <(Screen) = [Gameplay]> then\n        if <not <(Screen) = [10]>> then\n    else\n        hide\n    end\n    go to [front v] layer\nend\n\nwhen flag clicked\nset [walk v] to [5]\nforever\n    change [walk v] by (1)\n    if <(Walk) > [8]> then\n        set [walk v] to [5]\n    end\n    wait (0.05) seconds\nend\n\ndefine platform physics (jump height) (gravity) (friction) (movement speed)\nswitch costume to (hitbox v)\nchange y by (y vel)\nif <touching (ground v)?> then\n    repeat ([abs v] of (y vel) )\n        if <touching (ground v)?> then\n            change y by ((-1) * (([abs v] of (y vel) ) / (y vel)))\n        end\n    end\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <not <(y vel) > [0]>>> then\n        start sound [Mario Jump - Gaming Sound Effect \(HD\)2 v]\n        set [y vel v] to (jump height)\n    else\n        set [y vel v] to [0]\n    end\nelse\n    change [y vel v] by (gravity)\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [x vel v] by (movement speed)\n    point in direction (90)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [x vel v] by ((-1) * (movement speed))\n    point in direction (-90)\nend\nchange x by (x vel)\nif <touching (ground v)?> then\n    set [old y v] to (y position)\n    repeat ([abs v] of (x vel) )\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n    end\n    if <touching (ground v)?> then\n        set y to (old y)\n        repeat ([ceiling v] of ([abs v] of (x vel) ) )\n            if <touching (ground v)?> then\n                change x by ((-1) * (([abs v] of (x vel) ) / (x vel)))\n            end\n        end\n        set [x vel v] to [0]\n    end\nend\nset [x vel v] to ((x vel) * (friction))\nswitch costume to (idle v)\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n    switch costume to (Walk)\nend\nif <(y vel) > [1]> then\n    switch costume to (jump v)\nend\nif <(y vel) < [-3]> then\n    switch costume to (fall v)\nend\n\nwhen flag clicked\nplay sound [SUPER MARIO RUN \(Trap Remix\) v] until done\nplay sound [SUPER MARIO RUN \(Trap Remix\) v] until done\nplay sound [SUPER MARIO RUN \(Trap Remix\) v] until done\nplay sound [SUPER MARIO RUN \(Trap Remix\) v] until done\nplay sound [SUPER MARIO RUN \(Trap Remix\) v] until done\nplay sound [SUPER MARIO RUN \(Trap Remix\) v] until done\n\nwhen flag clicked\nforever\n    if <touching (sprite3 v)?> then\n        wait until <not <touching (sprite3 v)?>>\n        change [level v] by (1)\n    end\nend\n\nset [level v] to [17]\n\nif <(Level) = [10]> then\n    start sound [mario death sound2 v]\n    go to x: (-228) y: (-148)\n    set [x vel v] to [0]\n    point in direction (90)\n    set [y vel v] to [-5]\n    switch costume to (idle v)\n    broadcast (boss v)\n    wait (6) seconds\nelse\n    start sound [mario death sound2 v]\n    go to x: (-228) y: (-138)\n    set [x vel v] to [0]\n    set [y vel v] to [0]\nend\nif <touching (finish v)?> then\n    start sound [Checkpoint Sound Effect v]\n    if <(Level) = [9]> then\n        broadcast (boss v)\n    end\n    change [level v] by (1)\n    if <(Level) = [10]> then\n        go to x: (-4) y: (-153)\n        set [x vel v] to [0]\n        point in direction (90)\n        set [y vel v] to [-5]\n        switch costume to (idle v)\n        wait (6) seconds\n    else\n        go to x: (-228) y: (-138)\n        set [x vel v] to [0]\n        point in direction (90)\n        set [y vel v] to [-5]\n        switch costume to (idle v)\n        broadcast (finish v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite9 v)?> then\n        go to x: (92) y: (-148)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite5 v)?> then\n        wait until <not <touching (sprite3 v)?>>\n        change [level v] by (1)\n    end\nend\n\n@Spikes\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    go to [front v] layer\n    switch costume to (Level)\nend\n\nwhen flag clicked\nshow\n\nforever\n    if <(Screen) = [Gameplay]> then\nend\n\n@Finish\n\nwhen flag clicked\nforever\n    next costume\n    wait (0.01) seconds\nend\n\nwhen flag clicked\nset size to (125) %\nforever\n    point in direction (90)\n    clear graphic effects\n    if <(Level) = [1]> then\n        go to x: (195) y: (-174)\n        show\n    end\n    if <(Level) = [2]> then\n        go to x: (-225) y: (-53)\n        show\n    end\n    if <(Level) = [3]> then\n        go to x: (97) y: (16)\n        show\n    end\n    if <(Level) = [4]> then\n        go to x: (136) y: (43)\n        show\n    end\n    if <(Level) = [5]> then\n        go to x: (120) y: (-40)\n        show\n    end\n    if <(Level) = [5]> then\n        go to x: (180) y: (-146)\n        show\n    end\n    if <(Level) = [6]> then\n        go to x: (180) y: (-170)\n        show\n    end\n    if <(Level) = [7]> then\n        go to x: (-184) y: (16)\n        show\n    end\n    if <(Level) = [8]> then\n        go to x: (35) y: (-47)\n        show\n    end\n    if <(Level) = [9]> then\n        go to x: (195) y: (-174)\n        show\n    end\n    if <(Level) = [9]> then\n        go to x: (64) y: (-76)\n        show\n    end\n    if <(Level) = [10]> then\n        go to x: (206) y: (66)\n        hide\n    end\n    if <(Level) = [11]> then\n        go to x: (-143) y: (-22)\n        show\n    end\n    if <(Level) = [12]> then\n        go to x: (46) y: (93)\n        point in direction (90)\n        show\n    end\n    if <(Level) = [13]> then\n        go to x: (-195) y: (73)\n        show\n    end\n    if <(Level) = [14]> then\n        show\n        go to x: (125) y: (84)\n    end\n    if <(Level) = [15]> then\n        show\n        go to x: (200) y: (-171)\n    end\n    if <(Level) = [16]> then\n        show\n        go to x: (207) y: (-174)\n    end\n    if <(Level) = [17]> then\n        hide\n    end\n    if <(Level) = [18]> then\n        go to x: (-235) y: (-175)\n        show\n    end\n    if <(Level) = [19]> then\n        hide\n    end\nend\n\ngo to x: (147) y: (-174)\nshow\n\nshow\n\nwhen I receive [falg v]\ngo to x: (-10) y: (-58)\nshow\nset size to (50) %\nstop all sounds\nstart sound [pop v]\nrepeat (2)\n    change size by (25)\nend\n\nwhen I receive [boss v]\nhide\n\nif <(Screen) = [Gameplay]> then\n\nset [level v] to [17]\n\n@Ground\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\nwhen flag clicked\nset [level v] to [1]\nshow\n\nforever\n    if <(Screen) = [Gameplay]> then\nend\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [10]> then\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [11]> then\n        hide\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    if <(Level) = [10]> then\n        show\n        wait (6) seconds\n        forever\n            hide\n        end\n    end\nend\n\nset [level v] to [9]\n\nwhen flag clicked\n\nnext costume\nwait (6) seconds\n\n@Sprite3\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [10]> then\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [11]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        play sound [Mario Warp Pipe Sound Effect2 v] until done\n    end\nend\n\n@Sprite4\n\nwhen flag clicked\nhide\n\ngo to [front v] layer\n\n@206-2063012_mario-blocks-hd-png-download\n\nwhen flag clicked\nhide\n\n@BowserFlame\n\nwhen flag clicked\nswitch costume to (bowser_ v)\nset rotation style [left-right v]\nforever\n    point towards (player v)\n    if <(Level) = [18]> then\n        show\n        wait (0.5) seconds\n        switch costume to (bowsersp2 v)\n        create clone of (sprite9 v)\n        wait (1) seconds\n        switch costume to (bowser_ v)\n    end\nend\n\nwhen flag clicked\ngo to x: (-220) y: (-69)\nhide\npoint in direction (-90)\n\nwhen flag clicked\nforever\n    if <(Level) = [19]> then\n        hide\n    end\nend\n\nset [level v] to [17]\n\n@Sprite9\n\nwhen flag clicked\nhide\n\ngo to [front v] layer\n\nwhen flag clicked\ngo to (bowserflame v)\n\nwhen I start as a clone\nstart sound [\[Super Mario Bros\] Bowser Fire Sound Effect \[Free Ringtone Download\] v]\nmove (5) steps\nshow\ngo to (bowserflame v)\npoint in direction ([direction v] of [bowserflame v])\nrepeat until <<<touching (_edge_ v)?> or <touching (player v)?>> or <touching (ground v)?>>\n    move (5) steps\nend\ndelete this clone\n\nset [level v] to [19]\n\nwhen flag clicked\n\nwhen I start as a clone\n\nforever\n    if <touching (_edge_ v)?> then\n        delete this clone\n    end\nend\n\n@Sprite5\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [17]> then\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [18]> then\n        hide\n    end\nend\n\nset [level v] to [18]\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n    end\nend\n\nset [level v] to [17]\n\nchange [level v] by (1)\n\n@detector\n\nwhen flag clicked\npoint in direction (90)\nhide\nset [clone id v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(LOVED__) = [1]> and <(FAVED___) = [1]>>\nwait (0.5) seconds\nshow\ngo to x: (0) y: (-100)\nreset timer\nswitch costume to (pick random (1) to (4))\nset [ghost v] effect to (100)\ngo [forward v] (2000) layers\nrepeat until <(timer) > [3.5]>\n    change y by ((y position) / (-15))\n    change [ghost v] effect by (-3)\nend\nreset timer\nrepeat until <(timer) > [3.5]>\n    change y by (((y position) - (-100)) / (-15))\n    change [ghost v] effect by (10)\nend\n\nwhen I start as a clone\nif <(clone id) = [0]> then\n    go to x: (-15) y: (0)\n    set [loved__ v] to [0]\n    switch costume to (love v)\n    forever\n        set [love? v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            wait (0.2) seconds\n            if <touching (mouse-pointer v)?> then\n                set [loved__ v] to [1]\n            end\n        end\n    end\nend\nif <(clone id) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (fave v)\n    set [faved___ v] to [0]\n    forever\n        set [fav v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            wait (0.2) seconds\n            if <touching (mouse-pointer v)?> then\n                set [faved___ v] to [1]\n            end\n        end\n    end\nend\n\n