A Trolled Platformer 2

Instructions: left and right keys and A and D keys are to move,\nUp arrow, W, and space bar to jump.\n\ntry to beat each level, some walls you can go through (-:<\nmake sure to ❤️ and⭐️!!

@Stage\n\nwhen flag clicked\nforever\n    switch backdrop to (level)\nend\n\nwhen flag clicked\nforever\n    play sound [RICK ROLLED!!!!! v] until done\nend\n\n@DAT BOI 2\n\nwhen flag clicked\nset [level v] to [1]\nhide variable [level v]\nhide\nset size to (100) %\nwait (1) seconds\nreset timer\nshow variable [level v]\nshow\ngo to [front v] layer\ngo to x: (-200) y: (-60)\nset [xv v] to [0]\nset [yv v] to [0]\ngo to [front v] layer\nforever\n    if <not <<(level) = [12]> or <(level) = [13]>>> then\n        platform\n    else\n        mroftalp\n    end\nend\n\nwhen I receive [die v]\nif <not <<(level) = [12]> or <(level) = [13]>>> then\n    go to x: (-200) y: (-60)\nelse\n    go to x: (200) y: (-60)\nend\n\ndefine platform\nset rotation style [left-right v]\nswitch costume to (hitbox v)\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [xv v] by (-1)\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [xv v] by (1)\nend\npoint in direction (((xv) * (logo secret)) + (90))\nset [xv v] to ((xv) * (0.85))\nchange x by (xv)\nif <touching color (#000000)?> then\n    change y by (-2)\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (1)\n                        if <touching color (#000000)?> then\n                            change y by (-5)\n                            change x by ((-1) * (xv))\n                            if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <key (space v) pressed?>> and <not <(xv) = [0]>>> then\n                                set [mode v] to [walljump]\n                                set [yv v] to [8]\n                                set [xv v] to (((xv) / ([abs v] of (xv) )) * (-10))\n                            else\n                                set [mode v] to [wallslide]\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (2)\nend\nchange y by (-3)\nif <touching color (#000000)?> then\n    if <(yv) = [-3]> then\n        if <<key (a v) pressed?> or <<key (d v) pressed?> or <<key (left arrow v) pressed?> or <key (right arrow v) pressed?>>>> then\n            set [mode v] to [run]\n        else\n            if <([abs v] of (xv) ) > [.1]> then\n                set [mode v] to [skid]\n            else\n                set [mode v] to [stand]\n            end\n        end\n    end\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <key (space v) pressed?>> then\n        set [mode v] to [jump]\n        set [yv v] to [9]\n    end\nend\nif <<<<(mode) = [jump]> or <(mode) = [walljump]>> and <(yv) < [0]>> or <<<(mode) = [run]> or <(mode) = [skid]>> and <(yv) < [-3]>>> then\n    set [mode v] to [fall]\nend\nchange y by (3)\nif <(yv) > [-15]> then\n    change [yv v] by (-0.5)\nend\nchange y by (-2)\nif <not <touching color (#000000)?>> then\n    change y by (-1)\n    if <not <touching color (#000000)?>> then\n        change y by (-1)\n        if <not <touching color (#000000)?>> then\n            change y by (-1)\n            if <not <touching color (#000000)?>> then\n                change y by (-1)\n                if <not <touching color (#000000)?>> then\n                    change y by (-1)\n                    if <not <touching color (#000000)?>> then\n                        change y by (5)\n                    end\n                end\n            end\n        end\n    end\nend\nchange y by (2)\nchange y by (yv)\nif <touching color (#000000)?> then\n    change y by (-2)\n    if <touching color (#000000)?> then\n        change y by ((-1) * (yv))\n        set [yv v] to [-3]\n    end\n    change y by (2)\nend\nset rotation style [all around v]\nswitch costume to (last key pressed)\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    switch costume to (left v)\n    set [last key pressed v] to [left]\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    switch costume to (right v)\n    set [last key pressed v] to [right]\nend\n\nwhen flag clicked\nset [☁ record time: v] to (☁ Record Time:)\nhide variable [☁ record time: v]\nhide variable [time: v]\nwait (1) seconds\nwait until <(level) = [1]>\nrepeat until <(level) = [25]>\n    set [time: v] to (timer)\nend\nshow variable [time: v]\nshow variable [☁ record time: v]\nif <(Time:) < (☁ Record Time:)> then\n    set [☁ record time: v] to (Time:)\nend\n\nset [☁ record time: v] to [1000000]\n\nwhen flag clicked\nwait (2) seconds\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    if <touching color (#a300ff)?> then\n        set [yv v] to [10]\n    end\n    if <touching color (#c359ff)?> then\n        set [yv v] to [20]\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (hitbox v)\n    if <<touching color (#ff0000)?> or <(y position) < [-194]>> then\n        broadcast (hahaha noob v)\n        wait (1) seconds\n        broadcast (die v)\n    end\n    switch costume to (last key pressed)\nend\n\nwhen flag clicked\nforever\n    if <touching (win v)?> then\n        change [level v] by (1)\n        broadcast (die v)\n    end\nend\n\ndefine mroftalp\nset rotation style [left-right v]\nswitch costume to (hitbox v)\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [xv v] by (1)\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [xv v] by (-1)\nend\npoint in direction (((xv) * (logo secret)) + (90))\nset [xv v] to ((xv) * (0.85))\nchange x by (xv)\nif <touching color (#000000)?> then\n    change y by (-2)\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (1)\n                        if <touching color (#000000)?> then\n                            change y by (-5)\n                            change x by ((-1) * (xv))\n                            if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <key (space v) pressed?>> and <not <(xv) = [0]>>> then\n                                set [mode v] to [walljump]\n                                set [yv v] to [8]\n                                set [xv v] to (((xv) / ([abs v] of (xv) )) * (-10))\n                            else\n                                set [mode v] to [wallslide]\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (2)\nend\nchange y by (-3)\nif <touching color (#000000)?> then\n    if <(yv) = [-3]> then\n        if <<key (a v) pressed?> or <<key (d v) pressed?> or <<key (left arrow v) pressed?> or <key (right arrow v) pressed?>>>> then\n            set [mode v] to [run]\n        else\n            if <([abs v] of (xv) ) > [.1]> then\n                set [mode v] to [skid]\n            else\n                set [mode v] to [stand]\n            end\n        end\n    end\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <key (space v) pressed?>> then\n        set [mode v] to [jump]\n        set [yv v] to [9]\n    end\nend\nif <<<<(mode) = [jump]> or <(mode) = [walljump]>> and <(yv) < [0]>> or <<<(mode) = [run]> or <(mode) = [skid]>> and <(yv) < [-3]>>> then\n    set [mode v] to [fall]\nend\nchange y by (3)\nif <(yv) > [-15]> then\n    change [yv v] by (-0.5)\nend\nchange y by (-2)\nif <not <touching color (#000000)?>> then\n    change y by (-1)\n    if <not <touching color (#000000)?>> then\n        change y by (-1)\n        if <not <touching color (#000000)?>> then\n            change y by (-1)\n            if <not <touching color (#000000)?>> then\n                change y by (-1)\n                if <not <touching color (#000000)?>> then\n                    change y by (-1)\n                    if <not <touching color (#000000)?>> then\n                        change y by (5)\n                    end\n                end\n            end\n        end\n    end\nend\nchange y by (2)\nchange y by (yv)\nif <touching color (#000000)?> then\n    change y by (-2)\n    if <touching color (#000000)?> then\n        change y by ((-1) * (yv))\n        set [yv v] to [-3]\n    end\n    change y by (2)\nend\nset rotation style [all around v]\nswitch costume to (last key pressed)\nif <touching color (#a300ff)?> then\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        switch costume to (right2 v)\n        set [last key pressed v] to [left2]\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        switch costume to (right2 v)\n        set [last key pressed v] to [right2]\n    end\nelse\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        switch costume to (left v)\n        set [last key pressed v] to [left]\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        switch costume to (right v)\n        set [last key pressed v] to [right]\n    end\nend\n\n@ground\n\nwhen flag clicked\nwait until <(level) = [22]>\ngo to [front v] layer\n\nwhen flag clicked\ngo to x: (0) y: (0)\nwait (1.5) seconds\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    switch costume to (level)\nend\n\n@win\n\nwhen flag clicked\nforever\n    if <(level) = [19]> then\n        go to [front v] layer\n    end\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen flag clicked\nforever\n    switch costume to (level)\nend\n\n@logo\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\ngo to [front v] layer\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen flag clicked\nset [logo secret v] to [3]\nrepeat (35)\n    go to [front v] layer\nend\n\nwhen this sprite clicked\nset [logo secret v] to [60]\n\n@level:\n\nwhen flag clicked\nswitch costume to (nintendo switch v)\ngo to x: (0) y: (0)\nwait (1.51) seconds\nrepeat (10)\n    go to [front v] layer\nend\n\nwhen flag clicked\nwait until <(level) = [22]>\nrepeat (10)\n    go to [front v] layer\nend\n\n@haha\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nrepeat (10)\n    hide\nend\n\nwhen I receive [hahaha noob v]\ngo to [front v] layer\nhide variable [level v]\nshow\nswitch costume to (pick random (1) to (8))\nwait (1) seconds\nhide\nshow variable [level v]\n\nwhen flag clicked\nforever\n    if <(level) = [12]> then\n        point in direction (-90)\n        set rotation style [left-right v]\n    else\n        if <(level) = [13]> then\n            point in direction (-90)\n            set rotation style [all around v]\n        else\n            point in direction (90)\n            set rotation style [left-right v]\n        end\n    end\nend\n\n@GOT M\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen flag clicked\nforever\n    if <<(level) = [8]> and <([x position v] of [dat boi 2 v]) < [-238]>> then\n        go to [front v] layer\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nwait until <<(level) = [8]> and <([x position v] of [dat boi 2 v]) < [-238]>>\nplay sound [got em v] until done\n\nwhen flag clicked\npoint in direction (90)\nwait until <<(level) = [8]> and <([x position v] of [dat boi 2 v]) < [-238]>>\npoint in direction (90)\nrepeat (160)\n    show\n    go to [front v] layer\n    show\nend\nrepeat (160)\n    point in direction (pick random (-180) to (180))\n    show\n    go to [front v] layer\n    show\nend\n\n@moving platform\n\nwhen flag clicked\ngo to x: (-38) y: (-68)\nhide\nwait until <(level) = [17]>\nshow\ngo to [front v] layer\nwait (1) seconds\nglide (.3) secs to x: (108) y: (30)\ncreate clone of (_myself_ v)\nwait until <(level) = [18]>\nhide\ndelete this clone\n\nwhen I start as a clone\nhide\ngo to x: (0) y: (-50)\nwait (1) seconds\nshow\nwait until <(level) = [18]>\nhide\ndelete this clone\n\n