Mario Maker Beta! - A Mario Platformer

Instructions:           ╰(*°▽°*)╯Mario Maker Beta!╰(*°▽°*)╯\n                       @DuckGoose9254 2020 \n=========================================\n- L to make and test levels\n- Hold mouse down to draw your stage\n- Space to change block\n- Arrow Keys or WASD to move\n- T to show and hide the tips\n- Hold down FPS to show and hide the FPS counter\n- Press M to get the X and Y points\n\nPlease no advertising.\n=========================================\nUpdates will come soon so ❤️ and ⭐ so you'll remember :)\n=========================================

@Stage\n\nwhen flag clicked\nforever\n    play sound [1 v] until done\nend\n\nwhen flag clicked\nforever\n    if <(Mode?) = [Play]> then\n        set volume to (0) %\n    else\n        set volume to (100) %\n    end\nend\n\n@Player\n\nwhen flag clicked\nshow\npoint in direction (90)\ngo to x: (-208) y: (-144)\nset [yv v] to [0]\nset [xv v] to [0]\nset rotation style [left-right v]\nforever\n    if <(Mode?) = [Maker]> then\n        go to x: ((round ((x position) / (16))) * (16)) y: ((round ((y position) / (16))) * (16))\n    else\n        Platform Physics [10] [-1] [0.9] [0.75] [8] [7]\n        if <touching color (#ff0000)?> then\n            go to x: (-208) y: (-144)\n            set [mode? v] to [Maker]\n        end\n        if <touching color (#c0c0c0)?> then\n            go to x: (-208) y: (-144)\n            set [mode? v] to [Maker]\n        end\n        if <(y position) < [-179]> then\n            go to x: (-208) y: (-144)\n            set [mode? v] to [Maker]\n        end\n    end\nend\n\ndefine Platform Physics (jump height) (gravity) (friction) (movement speed) (wall jump vm) (wall jump hm)\nswitch costume to (hit box v)\nchange y by (YV)\nif <<touching color (#15ff00)?> or <touching color (#e29600)?>> then\n    repeat ([abs v] of (YV) )\n        if <<touching color (#15ff00)?> or <touching color (#e29600)?>> then\n            change y by ((-1) * (([abs v] of (YV) ) / (YV)))\n        end\n    end\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <not <(YV) > [0]>>> then\n        set [yv v] to (jump height)\n    else\n        set [yv v] to [0]\n    end\nelse\n    change [yv v] by (gravity)\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    point in direction (90)\n    change [xv v] by (movement speed)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    point in direction (-90)\n    change [xv v] by ((-1) * (movement speed))\nend\nchange x by (XV)\nif <<touching color (#15ff00)?> or <touching color (#e29600)?>> then\n    set [old y v] to (y position)\n    repeat (([abs v] of (YV) ) + (1))\n        if <<touching color (#15ff00)?> or <touching color (#e29600)?>> then\n            change y by (1)\n        end\n    end\n    if <<touching color (#15ff00)?> or <touching color (#e29600)?>> then\n        set y to (old y)\n        repeat ([ceiling v] of ([abs v] of (XV) ) )\n            if <<touching color (#15ff00)?> or <touching color (#e29600)?>> then\n                change x by ((-1) * (([abs v] of (XV) ) / (XV)))\n            end\n        end\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            if <(XV) < [0]> then\n                set [xv v] to [0]\n                if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n                    set [xv v] to (wall jump hm)\n                    set [yv v] to (wall jump vm)\n                end\n            else\n                set [xv v] to [0]\n                if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                    set [xv v] to ((-1) * (wall jump hm))\n                    set [yv v] to (wall jump vm)\n                end\n            end\n        end\n    end\nend\nset [xv v] to ((XV) * (friction))\nswitch costume to (1 v)\n\nwhen I receive [move v]\nshow\npoint in direction (90)\ngo to x: (-208) y: (-144)\nset [yv v] to [0]\nset [xv v] to [0]\nset rotation style [left-right v]\n\n@Draw\n\nwhen flag clicked\nshow\ngo to [back v] layer\nswitch costume to (1 v)\nset [mode? v] to [Maker]\nforever\n    if <(Mode?) = [Maker]> then\n        show\n        go to (mouse-pointer v)\n        go to x: ((round ((x position) / (16))) * (16)) y: ((round ((y position) / (16))) * (16))\n        if <mouse down?> then\n            stamp\n        end\n        if <key (space v) pressed?> then\n            next costume\n            wait until <not <key (space v) pressed?>>\n        end\n        if <key (c v) pressed?> then\n            erase all\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nbroadcast (Move v)\nforever\n    if <key (l v) pressed?> then\n        set [mode? v] to [Play]\n        wait until <not <key (l v) pressed?>>\n        wait until <key (l v) pressed?>\n        broadcast (Move v)\n        set [mode? v] to [Maker]\n        wait until <not <key (l v) pressed?>>\n    end\nend\n\nwait until <not <mouse down?>>\n\nwhen flag clicked\nshow variable [tips v]\nforever\n    if <key (t v) pressed?> then\n        hide variable [tips v]\n        wait until <not <key (t v) pressed?>>\n        wait until <key (t v) pressed?>\n        show variable [tips v]\n        wait until <not <key (t v) pressed?>>\n    end\nend\n\n@Grid\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\ngo [forward v] (1) layers\nforever\n    if <(Mode?) = [Maker]> then\n        show\n        set volume to (0) %\n    else\n        hide\n        set volume to (100) %\n    end\nend\n\nwhen flag clicked\nforever\n    play sound [SUPER MARIO RUN \(Trap Remix\) v] until done\nend\n\nwhen flag clicked\nforever\n    set [tips v] to [Welcome to the Mario Maker Beta!]\n    wait (3) seconds\n    set [tips v] to [Press L to switch from Testing to Making! ]\n    wait (3) seconds\n    set [tips v] to [While you're at it, please Love, Favorite, and FOLLOW!!]\n    wait (4) seconds\n    set [tips v] to [Arrow keys or WASD to move!]\n    wait (3) seconds\n    set [tips v] to [I'll make the full game soon if you Love, Favorite, and FOLLOW!!]\n    wait (4) seconds\n    set [tips v] to [Draw using the mouse!]\n    wait (3) seconds\n    set [tips v] to [Please Love and Favorite :\)]\n    wait (3) seconds\nend\n\n@Thumbnail\n\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\n\nwhen flag clicked\nhide\n\n@Extras\n\nwhen [m v] key pressed\nif <([abs v] of (mouse x) ) < [240]> then\n    show variable [mouse v]\n    set [mouse v] to (join ((mouse x) + (SX)) (join [,] ((mouse y) + (SY))))\nelse\n    hide variable [mouse v]\nend\n\nwhen flag clicked\nbroadcast (FPS On v)\nhide variable [fps v]\nhide variable [mouse v]\nforever\n    change [counter v] by (1)\n    if <(timer) > [1]> then\n        set [fps v] to (Counter)\n        set [counter v] to [0]\n        reset timer\n    end\nend\n\nwhen I receive [fps on v]\nforever\n    if <<key (f v) pressed?> and <<key (p v) pressed?> and <key (s v) pressed?>>> then\n        show variable [fps v]\n        wait until <not <<key (f v) pressed?> and <<key (p v) pressed?> and <key (s v) pressed?>>>>\n        broadcast (FPS Off v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [fps off v]\nforever\n    if <<key (f v) pressed?> and <<key (p v) pressed?> and <key (s v) pressed?>>> then\n        hide variable [fps v]\n        wait until <not <<key (f v) pressed?> and <<key (p v) pressed?> and <key (s v) pressed?>>>>\n        broadcast (FPS On v)\n        stop [this script v]\n    end\nend\n\n