Minecraft Platformer 2
@Stage\n\nwhen I receive [@animate v]\nif <not <(backdrop [number v]) = (_BACKDROP)>> then\n    switch backdrop to (_BACKDROP)\nend\n\nwhen flag clicked\nforever\n    hide variable [___level name v]\nend\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (thumbnail v)\nhide\nforever\n    set [timer v] to (timer)\nend\n\nwhen [timer v] > (timer)\ngo to [front v] layer\nshow\nhide variable [___level name v]\nhide variable [#coins v]\nhide variable [#lives v]\nhide variable [#score v]\nhide variable [#time v]\n\nturn right (15) degrees\n\nturn right (15) degrees\n\n@Main Menu\n\nwhen flag clicked\nwait (3) seconds\nset [id v] to []\nhide variable [level display1 v]\nhide variable [level display2 v]\nhide variable [level display3 v]\nhide variable [level display4 v]\nhide variable [page display v]\nshow list [here is your save code! v]\nif <(_EDITOR \(ON/OFF\)) = [1]> then\n    broadcast (_SAVE LEVEL v) and wait\nend\nforever\n    set [_volume sound v] to [35]\n    set [_volume music v] to [20]\n    set volume to (_VOLUME SOUND) %\n    broadcast (_GREEN FLAG v) and wait\n    set [_tile size v] to [30]\n    broadcast (_ADJUST SIZE v) and wait\n    set [#time v] to [999999999]\n    set [__game type v] to [1]\n    set [__game level v] to [1]\n    set [___menu mode v] to [1]\n    set [__game sub level v] to [0]\n    set [__scroll x v] to [240]\n    set [__scroll y v] to [180]\n    set [_left edge v] to (__SCROLL X)\n    set [_editor \(on/off\) v] to [0]\n    set [__player mode v] to [0]\n    set [_exit v] to [0]\n    set [__player x v] to [5]\n    set [__player y v] to [5]\n    set [menu scroll speed v] to [2]\n    delete all of [@mob spawns v]\n    delete all of [_spawn particles v]\n    delete all of [@mob dangers v]\n    broadcast (_LOAD LEVEL v) and wait\n    set [_music v] to [7]\n    broadcast (_DELETE CLONES v) and wait\n    broadcast (_CREATE CLONES v) and wait\n    broadcast (_BEGIN MUSIC LOOP v)\n    set size to (101) %\n    switch backdrop to (overworld v)\n    broadcast (_CREATE MENU CLONES v) and wait\n    broadcast (_BEGIN LEVEL v) and wait\n    repeat until <(_EXIT) > [0]>\n        change [_in game timer v] by (1)\n        change [__scroll x v] by (menu scroll speed)\n        if <(__SCROLL Y) < [180]> then\n            set [__scroll y v] to [180]\n        else\n            if <(__SCROLL Y) > ((((_TILE SIZE) * (_MAP HEIGHT)) - ((_TILE SIZE) / (2))) - (181))> then\n                set [__scroll y v] to ((((_TILE SIZE) * (_MAP HEIGHT)) - ((_TILE SIZE) / (2))) - (181))\n            end\n        end\n        if <(__SCROLL X) < [240]> then\n            set [__scroll x v] to [240]\n            set [menu scroll speed v] to [2]\n        else\n            if <(__SCROLL X) > (((_TILE SIZE) * (_MAP WIDTH)) - (240))> then\n                set [__scroll x v] to (((_TILE SIZE) * (_MAP WIDTH)) - (240))\n                set [menu scroll speed v] to [-2]\n            end\n        end\n        broadcast (@MOB TICK v)\n        broadcast (@SPAWN CYCLE v)\n        broadcast (@MENU TICK v)\n        broadcast (@ANIMATE v)\n    end\n    broadcast (_MUSIC FADE OUT v)\n    hide variable [level display1 v]\n    hide variable [level display2 v]\n    hide variable [level display3 v]\n    hide variable [level display4 v]\n    hide variable [page display v]\n    broadcast (_DELETE MENU v) and wait\n    switch backdrop to (loading v)\n    broadcast (_DELETE CLONES v) and wait\n    broadcast (_CREATE CLONES v) and wait\n    broadcast (_INIT PLAYER v) and wait\n    broadcast (_DELETE CLONES v) and wait\nend\n\nwhen I receive [_delete menu v]\nhide\ndelete this clone\n\nwhen I receive [@menu tick v]\nif <(id) > []> then\n    Tick Menu Object\nelse\n    hide\nend\n\ndefine Create Object at X (x) Y (y) | Type: (id)\nset [x v] to (x)\nset [y v] to (y)\nset [id v] to (id)\ncreate clone of (_myself_ v)\nset [id v] to []\n\ndefine Set Costume (costume)\nif <not <(costume) = (costume [number v])>> then\n    switch costume to (costume)\nend\n\ndefine Get IsClicked\nset [isclicked v] to [0]\nif <mouse down?> then\n    if <(mouse down) = [0]> then\n        if <touching (mouse-pointer v)?> then\n            set [isclicked v] to [1]\n            start sound [snap v]\n        end\n        set [mouse down v] to [1]\n    end\nelse\n    set [mouse down v] to [0]\nend\n\nwhen I start as a clone\nset [mouse down v] to [1]\nTick Menu Object\nset volume to (_VOLUME SOUND) %\n\ndefine // (comment)\n\nwhen I receive [_create menu clones v]\nif <(id) = []> then\n    hide variable [level display1 v]\n    hide variable [level display2 v]\n    hide variable [level display3 v]\n    hide variable [level display4 v]\n    hide variable [page display v]\n    broadcast (_DELETE MENU v) and wait\n    if <(___MENU MODE) = [1]> then\n        Create Object at X [-130] Y [-40] | Type: [1]\n        Create Object at X [-110] Y [-90] | Type: [2]\n        Create Object at X [-84] Y [-140] | Type: [3]\n        Create Object at X [160] Y [-90] | Type: [4]\n        Create Object at X [154] Y [-40] | Type: [5]\n        Create Object at X [0] Y [80] | Type: [7]\n    else\n        if <(___MENU MODE) = [2]> then\n            if <(__GAME TYPE) = [1]> then\n                set [total level pages v] to ([ceiling v] of ((length of [levels - game v]) / (4)) )\n            else\n                if <(__GAME TYPE) = [2]> then\n                    set [total level pages v] to ([ceiling v] of ((length of [levels - community v]) / (4)) )\n                else\n                    if <(__GAME TYPE) = [3]> then\n                        set [total level pages v] to ([ceiling v] of ((length of [levels - editor v]) / (4)) )\n                        Create Object at X [-184] Y [120] | Type: [12]\n                    end\n                end\n            end\n            if <(total level pages) < [1]> then\n                set [total level pages v] to [1]\n            end\n            set [page display v] to (join (join [Page ] (_LEVEL SELECT PAGE)) (join [ of ] (total level pages)))\n            show variable [page display v]\n            if <(_LEVEL SELECT PAGE) > [1]> then\n                Create Object at X [-205] Y [-134] | Type: [10]\n            end\n            if <(_LEVEL SELECT PAGE) < (total level pages)> then\n                Create Object at X [205] Y [-134] | Type: [11]\n            end\n            Create Object at X [0] Y [0] | Type: [8]\n            Create Object at X [-208] Y [155] | Type: [9]\n            set [level init v] to ((((_LEVEL SELECT PAGE) - (1)) * (4)) + (1))\n            Get Level Name and Creator\n            if <(level name) > []> then\n                set [level display1 v] to (join (level name) (join [ | @] (level creator)))\n                Create Object at X [-130] Y [0] | Type: [6]\n                show variable [level display1 v]\n            else\n                stop [this script v]\n            end\n            change [level init v] by (1)\n            Get Level Name and Creator\n            if <(level name) > []> then\n                set [level display2 v] to (join (level name) (join [ | @] (level creator)))\n                Create Object at X [-130] Y [-50] | Type: [6]\n                show variable [level display2 v]\n            else\n                stop [this script v]\n            end\n            change [level init v] by (1)\n            Get Level Name and Creator\n            if <(level name) > []> then\n                set [level display3 v] to (join (level name) (join [ | @] (level creator)))\n                Create Object at X [-130] Y [-100] | Type: [6]\n                show variable [level display3 v]\n            else\n                stop [this script v]\n            end\n            change [level init v] by (1)\n            Get Level Name and Creator\n            if <(level name) > []> then\n                set [level display4 v] to (join (level name) (join [ | @] (level creator)))\n                Create Object at X [-130] Y [-150] | Type: [6]\n                show variable [level display4 v]\n            else\n                stop [this script v]\n            end\n        end\n    end\nend\n\ndefine Decode Numbers to Letters (decode)\nset [decoded v] to []\nset [temp v] to (scanner)\nset [scanner v] to [1]\nrepeat (length of (decode))\n    if <<(letter (length of (decoded)) of (decoded)) = [ ]> or <(letter (length of (decoded)) of (decoded)) = []>> then\n        set [decoded v] to (join (decoded) (item (join (letter (scanner) of (decode)) (letter ((scanner) + (1)) of (decode))) of [letters - caps v]))\n    else\n        set [decoded v] to (join (decoded) (item (join (letter (scanner) of (decode)) (letter ((scanner) + (1)) of (decode))) of [letters v]))\n    end\n    change [scanner v] by (2)\nend\nset [scanner v] to (temp)\n\ndefine Read Value\nset [invalid code v] to [0]\nset [decoded v] to []\nchange [scanner v] by (1)\nrepeat until <[delimiters v] contains (letter (scanner) of (level to load))?>\n    if <(letter (scanner) of (level to load)) = []> then\n        set [invalid code v] to [1]\n        stop [this script v]\n    else\n        set [decoded v] to (join (decoded) (letter (scanner) of (level to load)))\n        change [scanner v] by (1)\n    end\nend\nif <(decoded) = []> then\n    set [decoded v] to [1]\nend\nset [delimiter found v] to (letter (scanner) of (level to load))\n\ndefine Get Level Name and Creator\nif <(__GAME TYPE) = [1]> then\n    set [level to load v] to (item (level init) of [levels - game v])\nelse\n    if <(__GAME TYPE) = [2]> then\n        set [level to load v] to (item (level init) of [levels - community v])\n    else\n        if <(__GAME TYPE) = [3]> then\n            set [level to load v] to (item (level init) of [levels - editor v])\n        end\n    end\nend\nset [scanner v] to [0]\nRead Value\nDecode Numbers to Letters (decoded)\nset [level name v] to (decoded)\nRead Value\nDecode Numbers to Letters (decoded)\nset [level creator v] to (decoded)\n\ndefine Tick Menu Object\ngo to x: (x) y: (y)\nshow\nif <(id) = [1]> then\n    // [play button]\n    if <touching (mouse-pointer v)?> then\n        Set Costume [2]\n    else\n        Set Costume [1]\n    end\n    Get IsClicked\n    if <(isClicked) = [1]> then\n        set [__game type v] to [1]\n        set [__game level v] to [1]\n        set [_exit v] to [1]\n    end\n    stop [this script v]\nend\nif <(id) = [2]> then\n    // [Select a Level]\n    if <touching (mouse-pointer v)?> then\n        Set Costume [4]\n    else\n        Set Costume [3]\n    end\n    Get IsClicked\n    if <(isClicked) = [1]> then\n        set [___menu mode v] to [2]\n        set [__game type v] to [1]\n        set [_level select page v] to [1]\n        broadcast (_CREATE MENU CLONES v)\n    end\n    stop [this script v]\nend\nif <(id) = [3]> then\n    // [Community Levels]\n    if <touching (mouse-pointer v)?> then\n        Set Costume [6]\n    else\n        Set Costume [5]\n    end\n    Get IsClicked\n    if <(isClicked) = [1]> then\n        set [___menu mode v] to [2]\n        set [__game type v] to [2]\n        set [_level select page v] to [1]\n        broadcast (_CREATE MENU CLONES v)\n    end\n    stop [this script v]\nend\nif <(id) = [4]> then\n    // [Edit Level]\n    if <touching (mouse-pointer v)?> then\n        Set Costume [8]\n    else\n        Set Costume [7]\n    end\n    Get IsClicked\n    if <(isClicked) = [1]> then\n        set [__game type v] to [3]\n        if <(length of [levels - editor v]) > [0]> then\n            set [___menu mode v] to [2]\n            set [_level select page v] to [1]\n            broadcast (_CREATE MENU CLONES v)\n        else\n            set [__game level v] to ((length of [levels - editor v]) + (1))\n            set [_exit v] to [1]\n        end\n    end\n    stop [this script v]\nend\nif <(id) = [5]> then\n    // [Load Level]\n    if <touching (mouse-pointer v)?> then\n        Set Costume [10]\n    else\n        Set Costume [9]\n    end\n    Get IsClicked\n    if <(isClicked) = [1]> then\n        set [_loaded level code v] to []\n        set [_exit v] to [1]\n        set [__game type v] to [4]\n    end\n    stop [this script v]\nend\nif <(id) = [6]> then\n    // [Play Level]\n    if <touching (mouse-pointer v)?> then\n        Set Costume [12]\n    else\n        Set Costume [11]\n    end\n    Get IsClicked\n    if <(isClicked) = [1]> then\n        set [__game level v] to (level init)\n        set [_exit v] to [1]\n    end\n    stop [this script v]\nend\nif <(id) = [7]> then\n    // [logo]\n    Set Costume [13]\n    stop [this script v]\nend\nif <(id) = [8]> then\n    // [logo small]\n    Set Costume [14]\n    stop [this script v]\nend\nif <(id) = [9]> then\n    // [back to main menu]\n    Set Costume [15]\n    Get IsClicked\n    if <(isClicked) = [1]> then\n        set [___menu mode v] to [1]\n        broadcast (_CREATE MENU CLONES v)\n    end\n    stop [this script v]\nend\nif <(id) = [10]> then\n    // [prev]\n    Set Costume [16]\n    Get IsClicked\n    if <(isClicked) = [1]> then\n        change [_level select page v] by (-1)\n        broadcast (_CREATE MENU CLONES v)\n    end\n    stop [this script v]\nend\nif <(id) = [11]> then\n    // [next]\n    Set Costume [17]\n    Get IsClicked\n    if <(isClicked) = [1]> then\n        change [_level select page v] by (1)\n        broadcast (_CREATE MENU CLONES v)\n    end\n    stop [this script v]\nend\nif <(id) = [12]> then\n    // [New Level]\n    Set Costume [18]\n    Get IsClicked\n    if <(isClicked) = [1]> then\n        set [__game level v] to ((length of [levels - editor v]) + (1))\n        set [_exit v] to [1]\n    end\n    stop [this script v]\nend\n\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    hide variable [#coins v]\n    hide variable [#score v]\n    hide variable [#time v]\nend\n\n@Player\n\nwhen I receive [@player pre animate v]\nset [_bounced tile v] to [0]\nchange [damage cooldown v] by (1)\nif <(damage cooldown) < [0]> then\n    set [ghost v] effect to (([floor v] of (((timer) * (12)) mod (2)) ) * (70))\nelse\n    set [ghost v] effect to (0)\nend\nif <(_IS IN WATER?????) = [0]> then\n    if <<key (space v) pressed?> or <<key (z v) pressed?> or <key (m v) pressed?>>> then\n        if <(__PLAYER IN AIR) > [0]> then\n            Controls | Speed: [0.013] Slide: [9.5] Jump Height: [0.1]\n        else\n            Controls | Speed: [0.024] Slide: [9.2] Jump Height: [0.13]\n        end\n    else\n        if <(__PLAYER IN AIR) > [0]> then\n            Controls | Speed: [0.009] Slide: [9.5] Jump Height: [0.1]\n        else\n            Controls | Speed: [0.014] Slide: [9.2] Jump Height: [0.13]\n        end\n    end\n    if <(__PLAYER Y VEL) > [0]> then\n        change [__player y vel v] by (-0.018)\n    else\n        change [__player y vel v] by (-0.04)\n    end\n    change [__player in air v] by (1)\nelse\n    Controls | Speed: [0.012] Slide: [9.5] Jump Height: [0.255]\n    change [__player y vel v] by (-0.018)\n    set [__player in air v] to [1]\n    if <(pick random (1) to (45)) = [1]> then\n        Particle | X: (((__PLAYER X) + ((width) * (pick random (-1.000) to (1.000)))) + (0.5)) Y: ((__PLAYER Y) + (height)) Type: [14] Direction: [90]\n    end\nend\nif <([abs v] of (__PLAYER X VEL) ) > [0.01]> then\n    Change X by (__PLAYER X VEL)\n    if <(__PLAYER X VEL) > [0.02]> then\n        if <(offset x) < [60]> then\n            change [offset x v] by (1.4)\n        end\n    else\n        if <(__PLAYER X VEL) < [-0.02]> then\n            if <(offset x) > [-60]> then\n                change [offset x v] by (-1.4)\n            end\n        end\n    end\nend\nChange Y by (__PLAYER Y VEL)\nif <(__POWER UP LEVEL) = [2]> then\n    if <<key (space v) pressed?> or <<key (z v) pressed?> or <key (m v) pressed?>>> then\n        if <(_CROUCH) = [0]> then\n            if <<(key press space) = [0]> and <(_FIREBALL#) < [2]>> then\n                start sound [Fireball v]\n                Spawn Mob | X: ((__PLAYER X) + ((width) * ((direction) / ([abs v] of (direction) )))) Y: ((__PLAYER Y) + (0.5)) Type: [8]\n            end\n        end\n        set [key press space v] to [1]\n    else\n        if <mouse down?> then\n            if <([abs v] of ((x position) - (mouse x)) ) > [30]> then\n                if <(_CROUCH) = [0]> then\n                    if <<(key press space) = [0]> and <(_FIREBALL#) < [2]>> then\n                        start sound [Fireball v]\n                        Spawn Mob | X: ((__PLAYER X) + ((width) * ((direction) / ([abs v] of (direction) )))) Y: ((__PLAYER Y) + (0.5)) Type: [8]\n                    end\n                end\n            end\n            set [key press space v] to [1]\n        else\n            set [key press space v] to [0]\n        end\n    end\nend\nset [_fireball# v] to [0]\nif <(__PLAYER Y) < [-1]> then\n    if <(__GAME SUB LEVEL) < [1]> then\n        set [_exit v] to [1]\n    else\n        set [_exit v] to [6]\n        set [__player x vel v] to [0]\n        set [__player y vel v] to [0]\n        set [_is in water????? v] to [0]\n        set [__game sub level v] to [0]\n        set [spawn block v] to [41]\n    end\nelse\n    Check for Goal\n    set [_is in water????? v] to [0]\n    Get Tile Type at X ((__PLAYER X) + ((width) - (_EXTRASMALL))) Y ((__PLAYER Y) + (_EXTRASMALL))\n    check for tiles\n    Get Tile Type at X ((__PLAYER X) + ((width) - (_EXTRASMALL))) Y ((__PLAYER Y) + ((height) - (_EXTRASMALL)))\n    check for tiles\n    Get Tile Type at X ((__PLAYER X) - ((width) - (_EXTRASMALL))) Y ((__PLAYER Y) + (_EXTRASMALL))\n    check for tiles\n    Get Tile Type at X ((__PLAYER X) - ((width) - (_EXTRASMALL))) Y ((__PLAYER Y) + ((height) - (_EXTRASMALL)))\n    check for tiles\n    if <(height) > [1]> then\n        Get Tile Type at X ((__PLAYER X) - ((width) - (_EXTRASMALL))) Y ((__PLAYER Y) + ((height) / (2)))\n        check for tiles\n        Get Tile Type at X ((__PLAYER X) + ((width) - (_EXTRASMALL))) Y ((__PLAYER Y) + ((height) / (2)))\n        check for tiles\n    end\nend\nchange [time count v] by (0.0333333333)\nif <(time count) > [0.4]> then\n    set [time count v] to [0]\n    change [#time v] by (00)\n    if <(#TIME) = [100]> then\n        broadcast (_MUSIC SPEED UPPPP v)\n    else\n        if <(#TIME) < [1]> then\n            set [_exit v] to [1]\n        end\n    end\nend\nif <(__PLAYER MODE) = [3]> then\n    add (__PLAYER X) to [@mob dangers v]\n    add (__PLAYER Y) to [@mob dangers v]\n    add (width) to [@mob dangers v]\n    add (height) to [@mob dangers v]\n    add [9999999999] to [@mob dangers v]\n    add [1] to [@mob dangers v]\n    set [color v] effect to ((_IN GAME TIMER) * (25))\n    set [brightness v] effect to (([sin v] of ((_IN GAME TIMER) * (50)) ) * (25))\n    change [_starman timer v] by (1)\n    if <(_STARMAN TIMER) > [300]> then\n        set [__player mode v] to [1]\n        set [_music v] to (__LEVEL MUSIC)\n        stop all sounds\n        set [color v] effect to (0)\n        set [brightness v] effect to (0)\n    end\nelse\n    set [color v] effect to (0)\n    set [brightness v] effect to (0)\nend\nScroll | Smoothness: [4]\nDraw\n\nwhen I receive [power up v]\nstart sound [Power Up v]\nif <(__POWER UP LEVEL) < [2]> then\n    set [temp v] to (__PLAYER MODE)\n    set [__player mode v] to []\n    change [__power up level v] by (1)\n    set [_crouch v] to [0]\n    if <(__POWER UP LEVEL) = [1]> then\n        set [ghost v] effect to (0)\n        switch costume to (idle v)\n        idle player tick [3]\n        switch costume to (transition v)\n        idle player tick [3]\n        switch costume to (idle v)\n        idle player tick [3]\n        switch costume to (transition v)\n        idle player tick [3]\n        switch costume to (bigidle v)\n        idle player tick [3]\n        switch costume to (transition v)\n        idle player tick [3]\n        switch costume to (bigidle v)\n    end\n    set [__player mode v] to (temp)\nend\nAdjust Height\n\nwhen I receive [@editor tick v]\nset [__player x vel v] to ((__PLAYER X VEL) * (0.9))\nif <<key (z v) pressed?> or <<key (m v) pressed?> or <key (space v) pressed?>>> then\n    set [editor speed v] to [0.07]\nelse\n    set [editor speed v] to [0.04]\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    point in direction (90)\n    change [__player x vel v] by (editor speed)\nelse\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        point in direction (-90)\n        change [__player x vel v] by ((0) - (editor speed))\n    end\nend\nset [__player y vel v] to ((__PLAYER Y VEL) * (0.9))\nif <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n    change [__player y vel v] by (editor speed)\nelse\n    if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n        change [__player y vel v] by ((0) - (editor speed))\n    end\nend\nset [offset x v] to [0]\nchange [__player x v] by (__PLAYER X VEL)\nchange [__player y v] by (__PLAYER Y VEL)\nif <(__PLAYER Y) < [0]> then\n    set [__player y v] to [0]\n    set [__player y vel v] to [0]\nelse\n    if <(__PLAYER Y) > (_MAP HEIGHT)> then\n        set [__player y v] to (_MAP HEIGHT)\n        set [__player y vel v] to [0]\n    end\nend\nif <(__PLAYER X) < [0]> then\n    set [__player x v] to [0]\n    set [__player x vel v] to [0]\nelse\n    if <(__PLAYER X) > (_MAP WIDTH)> then\n        set [__player x v] to (_MAP WIDTH)\n        set [__player x vel v] to [0]\n    end\nend\nScroll | Smoothness: [4]\nDraw\n\nwhen flag clicked\nhide\n\nwhen I receive [@climb vine v]\nset [_bounced tile v] to [0]\nchange [__player y v] by (0.07)\nif <not <((__PLAYER Y) + (height)) < (_MAP HEIGHT)>> then\n    set [_exit v] to [6]\n    set [__player x vel v] to [0]\n    set [__player y vel v] to [0]\n    set [_is in water????? v] to [0]\n    if <(__GAME SUB LEVEL) = [0]> then\n        set [warp x v] to ((__PLAYER X) + (1))\n        set [warp y v] to (__PLAYER Y)\n        set [spawn block v] to [6]\n        set [__game sub level v] to [1]\n    else\n        if <(__GAME SUB LEVEL) = [-1]> then\n            set [spawn block v] to [40]\n            set [__game sub level v] to [0]\n        else\n            if <(__GAME SUB LEVEL) = [1]> then\n                set [spawn block v] to [41]\n                set [__game sub level v] to [0]\n            end\n        end\n    end\nelse\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        point in direction (-90)\n    else\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            point in direction (90)\n        end\n    end\n    Get Tile Type at X (__PLAYER X) Y ((__PLAYER Y) + ((height) - (_EXTRASMALL)))\n    if <not <(tile shape) = [^]>> then\n        set [__player mode v] to [1]\n        set [__player x vel v] to ((-0.15) * ((direction) / ([abs v] of (direction) )))\n        set [__player y vel v] to [0.3]\n        set [__player in air v] to [9999999]\n        change [__player x v] by (((0) - ((0.5) + (width))) * ((direction) / ([abs v] of (direction) )))\n    end\nend\nScroll | Smoothness: [4]\nDraw\nswitch costume to ((([floor v] of (((timer) * (4)) mod (2)) ) + (10)) + ((__POWER UP LEVEL) * (18)))\n\ndefine Get isSolid at X (x) Y (y)\nif <(isSolid) = [0]> then\n    if <<(y) < (_MAP HEIGHT)> and <(__PLAYER Y) > [0]>> then\n        set [idx v] to (((([floor v] of (x) ) * (_MAP HEIGHT)) + ([floor v] of (y) )) + (1))\n        if <(item (item (idx) of [#tile grid v]) of [#tile shape v]) = [#]> then\n            set [issolid v] to [1]\n        else\n            if <(x) < ([floor v] of (((__SCROLL X) - (240)) / (_TILE SIZE)) )> then\n                set [issolid v] to [1]\n            end\n        end\n    end\nend\n\ndefine Change Y by (steps)\nchange [__player y v] by (steps)\nset [issolid v] to [0]\nif <(steps) > [0]> then\n    if <(__PLAYER IN AIR) > [0]> then\n        Get Tile Type at X (__PLAYER X) Y ((__PLAYER Y) + (height))\n        Bump Head\n        if <(_BOUNCED TILE) = [0]> then\n            Get Tile Type at X ((__PLAYER X) + (((width) - (_EXTRASMALL)) * ((direction) / ([abs v] of (direction) )))) Y ((__PLAYER Y) + (height))\n            Bump Head\n            if <(_BOUNCED TILE) = [0]> then\n                Get Tile Type at X ((__PLAYER X) - (((width) - (_EXTRASMALL)) * ((direction) / ([abs v] of (direction) )))) Y ((__PLAYER Y) + (height))\n                Bump Head\n                if <(_BOUNCED TILE) = [0]> then\n            else\n                set [issolid v] to [1]\n            end\n        else\n            set [issolid v] to [1]\n        end\n    end\n    Get isSolid at X ((__PLAYER X) + ((width) - (_EXTRASMALL))) Y ((__PLAYER Y) + (height))\n    Get isSolid at X ((__PLAYER X) - ((width) - (_EXTRASMALL))) Y ((__PLAYER Y) + (height))\n    if <(isSolid) > [0]> then\n        set [__player y v] to (([floor v] of ((__PLAYER Y) + (height)) ) - (height))\n        set [__player y vel v] to [0]\n    end\nelse\n    Get isSolid at X ((__PLAYER X) + ((width) - (_EXTRASMALL))) Y (__PLAYER Y)\n    Get isSolid at X ((__PLAYER X) - ((width) - (_EXTRASMALL))) Y (__PLAYER Y)\n    if <(isSolid) > [0]> then\n        set [__player y v] to ([ceiling v] of (__PLAYER Y) )\n        set [__player in air v] to [0]\n        set [__player y vel v] to [0]\n        set [__stomped enemies v] to [0]\n    end\nend\n\ndefine Change X by (steps)\nchange [__player x v] by (steps)\nset [issolid v] to [0]\nif <(steps) > [0]> then\n    Get isSolid at X ((__PLAYER X) + (width)) Y (__PLAYER Y)\n    Get isSolid at X ((__PLAYER X) + (width)) Y ((__PLAYER Y) + ((height) - (_EXTRASMALL)))\n    if <(height) > [1]> then\n        Get isSolid at X ((__PLAYER X) + (width)) Y ((__PLAYER Y) + ((height) / (2)))\n    end\n    if <(isSolid) > [0]> then\n        set [__player x v] to (([floor v] of ((__PLAYER X) + (width)) ) - (width))\n        set [__player x vel v] to [0]\n    end\nelse\n    Get isSolid at X ((__PLAYER X) - (width)) Y (__PLAYER Y)\n    if <(height) > [1]> then\n        Get isSolid at X ((__PLAYER X) - (width)) Y ((__PLAYER Y) + ((height) / (2)))\n    end\n    Get isSolid at X ((__PLAYER X) - (width)) Y ((__PLAYER Y) + ((height) - (_EXTRASMALL)))\n    if <(isSolid) > [0]> then\n        set [__player x v] to (([ceiling v] of ((__PLAYER X) - (width)) ) + (width))\n        set [__player x vel v] to [0]\n    end\nend\n\ndefine Controls | Speed: (speed) Slide: (slide) Jump Height: (jump)\nset [__player x vel v] to ((__PLAYER X VEL) * ((slide) / (10)))\nif <(_CROUCH) = [0]> then\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > ((x position) + (16))>>> then\n        change [__player x vel v] by (speed)\n        point in direction (90)\n    else\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < ((x position) - (16))>>> then\n            change [__player x vel v] by ((0) - (speed))\n            point in direction (-90)\n        end\n    end\nend\nchange [jump cooldown v] by (1)\nif <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<mouse down?> and <(mouse y) < ((y position) - (50))>>> then\n    if <(__PLAYER IN AIR) = [0]> then\n        if <(__POWER UP LEVEL) > [0]> then\n            if <(_CROUCH) = [0]> then\n                set [_crouch v] to [1]\n                Adjust Height\n            end\n        end\n        Get Tile Type at X ((__PLAYER X) + (0.65)) Y ((__PLAYER Y) + (0.5))\n        if <(tile type) = [143]> then\n            Get Tile Type at X ((__PLAYER X) - (0.65)) Y ((__PLAYER Y) + (0.5))\n            if <(tile type) = [143]> then\n                if <(__GAME SUB LEVEL) = [0]> then\n                    set [warp x v] to (__PLAYER X)\n                    set [warp y v] to ((__PLAYER Y) - (2))\n                end\n                set [_exit v] to [5]\n                set [_crouch v] to [0]\n                point in direction (90)\n            end\n        end\n    end\nelse\n    if <(_CROUCH) = [1]> then\n        set [_crouch v] to [0]\n        Adjust Height\n        set [issolid v] to [0]\n        Get isSolid at X ((__PLAYER X) + ((width) - (_EXTRASMALL))) Y ((__PLAYER Y) + ((height) - (_EXTRASMALL)))\n        Get isSolid at X ((__PLAYER X) - ((width) - (_EXTRASMALL))) Y ((__PLAYER Y) + ((height) - (_EXTRASMALL)))\n        if <(isSolid) > [0]> then\n            set [_crouch v] to [1]\n            Adjust Height\n            if <<(__PLAYER IN AIR) = [0]> and <([abs v] of (__PLAYER X VEL) ) < [0.04]>> then\n                set [issolid v] to [0]\n                Get isSolid at X ((__PLAYER X) - (((width) - (_EXTRASMALL)) * (((direction) / ([abs v] of (direction) )) * (1.5)))) Y ((__PLAYER Y) + ((1.4) - (_EXTRASMALL)))\n                if <(isSolid) > [0]> then\n                    Change X by ((0.07) * ((direction) / ([abs v] of (direction) )))\n                else\n                    Change X by ((-0.07) * ((direction) / ([abs v] of (direction) )))\n                end\n            end\n        end\n    end\nend\nif <(_CROUCH) > [0]> then\nif <(__PLAYER Y VEL) < [-0.5]> then\n    set [__player y vel v] to [-0.5]\nend\n\ndefine Scroll | Smoothness: (smooth)\nchange [__scroll x v] by (((((__PLAYER X) * (_TILE SIZE)) + (offset x)) - (__SCROLL X)) / (smooth))\nchange [__scroll y v] by (((((__PLAYER Y) * (_TILE SIZE)) - (__SCROLL Y)) - (12)) / (smooth))\nif <(__SCROLL Y) < [180]> then\n    set [__scroll y v] to [180]\nelse\n    if <(__SCROLL Y) > ((((_TILE SIZE) * (_MAP HEIGHT)) - ((_TILE SIZE) / (2))) - (181))> then\n        set [__scroll y v] to ((((_TILE SIZE) * (_MAP HEIGHT)) - ((_TILE SIZE) / (2))) - (181))\n    end\nend\nif <(_EDITOR \(ON/OFF\)) = [0]> then\n    if <(__SCROLL X) < (_LEFT EDGE)> then\n        set [__scroll x v] to (_LEFT EDGE)\n    else\n        if <((__SCROLL X) - (150)) > (_LEFT EDGE)> then\n            set [_left edge v] to ((__SCROLL X) - (150))\n        end\n    end\nend\nif <(__SCROLL X) < [240]> then\n    set [__scroll x v] to [240]\nelse\n    if <(__SCROLL X) > (((_TILE SIZE) * (_MAP WIDTH)) - (240))> then\n        set [__scroll x v] to (((_TILE SIZE) * (_MAP WIDTH)) - (240))\n    end\nend\n\ndefine Draw\nswitch costume to (large v)\ngo to x: (round (((__PLAYER X) * (_TILE SIZE)) - (__SCROLL X))) y: (round (((__PLAYER Y) * (_TILE SIZE)) - (__SCROLL Y)))\nif <(_CROUCH) > [0]> then\n    set [costume v] to [12]\nelse\n    if <(__PLAYER IN AIR) > [0]> then\n        if <(_IS IN WATER?????) = [0]> then\n            set [costume v] to [6]\n        else\n            set [costume v] to (([floor v] of (((timer) * (8)) mod (6)) ) + (13))\n        end\n    else\n        if <([abs v] of (__PLAYER X VEL) ) > [0.03]> then\n            if <<<(direction) > [0]> and <(__PLAYER X VEL) < [0]>> or <<(direction) < [0]> and <(__PLAYER X VEL) > [0]>>> then\n                set [costume v] to [9]\n            else\n                set [costume v] to (([floor v] of (((timer) * (8)) mod (4)) ) + (2))\n            end\n        else\n            set [costume v] to [1]\n        end\n    end\nend\nswitch costume to ((costume) + ((__POWER UP LEVEL) * (18)))\n\nwhen I receive [_adjust size v]\nset size to ([ceiling v] of ((100) * ((_TILE SIZE) / (41))) ) %\n\ndefine Init Player\nset [offset x v] to [0]\nif <[@mob grid v] contains (spawn block)?> then\n    set [idx v] to (item # of (spawn block) in [@mob grid v])\n    set [__player x v] to (([floor v] of ((idx) / (_MAP HEIGHT)) ) + (0.5))\n    set [__player y v] to (((idx) - ((_MAP HEIGHT) * ([floor v] of ((idx) / (_MAP HEIGHT)) ))) - (1))\nelse\n    if <<<(warp x) > []> and <(warp y) > []>> and <(__GAME SUB LEVEL) = [0]>> then\n        set [__player x v] to (warp x)\n        set [__player y v] to (warp y)\n        set [spawn block v] to [9999]\n    else\n        if <[@mob grid v] contains [6]?> then\n            set [spawn block v] to [6]\n        else\n            set [spawn block v] to [0]\n        end\n        if <(spawn block) > [0]> then\n            set [idx v] to (item # of (spawn block) in [@mob grid v])\n            set [__player x v] to (([floor v] of ((idx) / (_MAP HEIGHT)) ) + (0.5))\n            set [__player y v] to (((idx) - ((_MAP HEIGHT) * ([floor v] of ((idx) / (_MAP HEIGHT)) ))) - (1))\n        else\n            set [__player x v] to [3.5]\n            set [__player y v] to [2]\n        end\n    end\nend\nset [__player x vel v] to [0]\nset [__player y vel v] to [0]\nset [_crouch v] to [0]\nset [_exit v] to [0]\nset [width v] to [0.3]\nset [damage cooldown v] to [-50]\nset [_left edge v] to (([floor v] of (((__PLAYER X) - (1)) * (_TILE SIZE)) ) + (100))\nAdjust Height\nScroll | Smoothness: [1]\nshow\nDraw\nset [issolid v] to [0]\nGet isSolid at X ((__PLAYER X) + ((width) - (_EXTRASMALL))) Y ((__PLAYER Y) + (_EXTRASMALL))\nGet isSolid at X ((__PLAYER X) + ((width) - (_EXTRASMALL))) Y ((__PLAYER Y) + ((height) - (_EXTRASMALL)))\nGet isSolid at X ((__PLAYER X) - ((width) - (_EXTRASMALL))) Y ((__PLAYER Y) + (_EXTRASMALL))\nGet isSolid at X ((__PLAYER X) - ((width) - (_EXTRASMALL))) Y ((__PLAYER Y) + ((height) - (_EXTRASMALL)))\nif <(isSolid) > [0]> then\n    if <(spawn block) > [0]> then\n        hide\n        broadcast (@SPAWN CYCLE v)\n        broadcast (@MOB TICK v)\n        set [__player in air v] to [0]\n        set [__player x vel v] to [0]\n        set [__player y vel v] to [0]\n        if <not <(spawn block) = [9999]>> then\n            change [__player x v] by (0.5)\n        end\n        broadcast (@ANIMATE v) and wait\n        start sound [Warp v]\n        broadcast (_LAYER1 v) and wait\n        broadcast (_LAYER2 v) and wait\n        if <(height) > [1]> then\n            change [__player y v] by (-1)\n        end\n        repeat (13)\n            broadcast (@ANIMATE v)\n        end\n        show\n        repeat until <(isSolid) = [0]>\n            repeat (13)\n                change [__player y v] by (0.0769)\n                Draw\n                broadcast (@ANIMATE v)\n            end\n            set [__player y v] to ([floor v] of ((__PLAYER Y) + (0.5)) )\n            set [issolid v] to [0]\n            Get isSolid at X ((__PLAYER X) + ((width) - (_EXTRASMALL))) Y ((__PLAYER Y) + (_EXTRASMALL))\n            Get isSolid at X ((__PLAYER X) + ((width) - (_EXTRASMALL))) Y ((__PLAYER Y) + ((height) - (_EXTRASMALL)))\n            Get isSolid at X ((__PLAYER X) - ((width) - (_EXTRASMALL))) Y ((__PLAYER Y) + (_EXTRASMALL))\n            Get isSolid at X ((__PLAYER X) - ((width) - (_EXTRASMALL))) Y ((__PLAYER Y) + ((height) - (_EXTRASMALL)))\n        end\n    else\n        Rise out of Incorrect Spawn\n    end\n    go to [front v] layer\nelse\n    set [issolid v] to [0]\n    Get isSolid at X ((__PLAYER X) + ((width) - (_EXTRASMALL))) Y ((__PLAYER Y) - (1))\n    Get isSolid at X ((__PLAYER X) - ((width) - (_EXTRASMALL))) Y ((__PLAYER Y) - (1))\n    if <(isSolid) > [0]> then\n        set [__player in air v] to [0]\n    else\n        set [__player in air v] to [99999999]\n    end\nend\n\nwhen I receive [player die v]\nif <<(__PLAYER MODE) = [1]> and <(_EXIT) = [0]>> then\n    if <(damage cooldown) > [0]> then\n        set [_crouch v] to [0]\n        if <(__POWER UP LEVEL) < [1]> then\n            set [_exit v] to [1]\n        else\n            set [temp v] to (__PLAYER MODE)\n            set [__player mode v] to []\n            set [damage cooldown v] to [-100]\n            set [__power up level v] to [0]\n            set [height v] to [0.8]\n            start sound [Warp v]\n            set [ghost v] effect to (0)\n            switch costume to (bigidle v)\n            wait (0.07) seconds\n            switch costume to (transition v)\n            wait (0.07) seconds\n            switch costume to (bigidle v)\n            wait (0.07) seconds\n            switch costume to (transition v)\n            wait (0.07) seconds\n            switch costume to (idle v)\n            wait (0.07) seconds\n            switch costume to (transition v)\n            wait (0.07) seconds\n            switch costume to (idle v)\n            wait (0.07) seconds\n            set [__player mode v] to (temp)\n        end\n    end\nend\n\ndefine Particle | X: (x) Y: (y) Type: (id) Direction: (dir)\nadd (x) to [_spawn particles v]\nadd (y) to [_spawn particles v]\nadd (id) to [_spawn particles v]\nadd (dir) to [_spawn particles v]\n\ndefine Spawn Mob | X: (x) Y: (y) Type: (id)\nadd (x) to [@mob spawns v]\nadd (y) to [@mob spawns v]\nadd (id) to [@mob spawns v]\n\ndefine Adjust Height\nif <(__POWER UP LEVEL) > [0]> then\n    if <(_CROUCH) > [0]> then\n        set [height v] to [0.8]\n    else\n        set [height v] to [1.4]\n    end\nelse\n    set [height v] to [0.8]\nend\n\ndefine open/close editor\nset [__player y vel v] to [0]\nset [__player x vel v] to [0]\nbroadcast (_DELETE CLONES v) and wait\nif <(_EDITOR \(ON/OFF\)) = [1]> then\n    broadcast (_SAVE LEVEL v) and wait\n    broadcast (_DELETE OBJECTS v) and wait\n    broadcast (_DELETE EDITOR v) and wait\n    set [_editor \(on/off\) v] to [0]\n    set [__player mode v] to [1]\n    delete all of [_spawn particles v]\n    delete all of [@mob spawns v]\n    delete all of [#placed tiles v]\n    broadcast (_BEGIN LEVEL v) and wait\n    broadcast (_LOAD SCREEN v)\n    set [_left edge v] to [0]\nelse\n    clear graphic effects\n    set [__player mode v] to [1]\n    set [_starman timer v] to [0]\n    set [damage cooldown v] to [0]\n    delete all of [@mob spawns v]\n    delete all of [_spawn particles v]\n    delete all of [#placed tiles v]\n    broadcast (_DELETE OBJECTS v) and wait\n    broadcast (_LOAD LEVEL v) and wait\n    broadcast (_LOAD EDITOR v) and wait\n    set [_editor \(on/off\) v] to [1]\nend\nset [_fireball# v] to [0]\nset [_crouch v] to [0]\nset [#time v] to [2]\nbroadcast (_CREATE CLONES v) and wait\n\ndefine Bump Head\nset [tile type v] to (item (idx) of [#tile grid v])\nif <(tile type) = [1]> then\n    stop [this script v]\nend\nif <<(tile type) = [5]> or <(tile type) = [34]>> then\n    replace item (idx) of [#tile grid v] with [10]\n    set [_bounced tile v] to (idx)\n    if <(item (idx) of [@mob grid v]) > [0]> then\n        start sound [Bump Head v]\n        if <<(item (idx) of [@mob grid v]) = [4]> and <(__POWER UP LEVEL) > [0]>> then\n            Spawn Mob | X: (([floor v] of ((idx) / (_MAP HEIGHT)) ) + (0.5)) Y: (((idx) - ((_MAP HEIGHT) * ([floor v] of ((idx) / (_MAP HEIGHT)) ))) - (1)) Type: [7]\n        else\n            Spawn Mob | X: (([floor v] of ((idx) / (_MAP HEIGHT)) ) + (0.5)) Y: (((idx) - ((_MAP HEIGHT) * ([floor v] of ((idx) / (_MAP HEIGHT)) ))) - (1)) Type: (item (idx) of [@mob grid v])\n        end\n        replace item (idx) of [@mob grid v] with [0]\n    else\n        start sound [Coin v]\n        change [#score v] by (200)\n        change [#coins v] by (1)\n        if <(#COINS) = [100]> then\n            change [#lives v] by (1)\n            set [#coins v] to [0]\n            start sound [1 Up v]\n        end\n        Particle | X: (([floor v] of ((idx) / (_MAP HEIGHT)) ) + (0.5)) Y: ((idx) - ((_MAP HEIGHT) * ([floor v] of ((idx) / (_MAP HEIGHT)) ))) Type: [13] Direction: [90]\n    end\nelse\n    if <<(tile type) = [3]> or <<(tile type) = [36]> or <(tile type) = [153]>>> then\n        set [_bounced tile v] to (idx)\n        if <(item (idx) of [@mob grid v]) > [0]> then\n            if <<(item (idx) of [@mob grid v]) = [4]> and <(__POWER UP LEVEL) > [0]>> then\n                Spawn Mob | X: (([floor v] of ((idx) / (_MAP HEIGHT)) ) + (0.5)) Y: (((idx) - ((_MAP HEIGHT) * ([floor v] of ((idx) / (_MAP HEIGHT)) ))) - (1)) Type: [7]\n            else\n                Spawn Mob | X: (([floor v] of ((idx) / (_MAP HEIGHT)) ) + (0.5)) Y: (((idx) - ((_MAP HEIGHT) * ([floor v] of ((idx) / (_MAP HEIGHT)) ))) - (1)) Type: (item (idx) of [@mob grid v])\n            end\n            replace item (idx) of [#tile grid v] with [10]\n            replace item (idx) of [@mob grid v] with [0]\n            start sound [Bump Head v]\n        else\n            if <(__POWER UP LEVEL) > [0]> then\n                if <(tile type) = [3]> then\n                    set [temp v] to [11]\n                else\n                    if <(tile type) = [36]> then\n                        set [temp v] to [12]\n                    else\n                        set [temp v] to [16]\n                    end\n                end\n                Particle | X: (([floor v] of ((idx) / (_MAP HEIGHT)) ) + (0.25)) Y: (((idx) - ((_MAP HEIGHT) * ([floor v] of ((idx) / (_MAP HEIGHT)) ))) - (1.25)) Type: (temp) Direction: [-90]\n                Particle | X: (([floor v] of ((idx) / (_MAP HEIGHT)) ) + (0.75)) Y: (((idx) - ((_MAP HEIGHT) * ([floor v] of ((idx) / (_MAP HEIGHT)) ))) - (1.25)) Type: (temp) Direction: [90]\n                Particle | X: (([floor v] of ((idx) / (_MAP HEIGHT)) ) + (0.25)) Y: (((idx) - ((_MAP HEIGHT) * ([floor v] of ((idx) / (_MAP HEIGHT)) ))) - (0.5)) Type: (temp) Direction: [-35]\n                Particle | X: (([floor v] of ((idx) / (_MAP HEIGHT)) ) + (0.75)) Y: (((idx) - ((_MAP HEIGHT) * ([floor v] of ((idx) / (_MAP HEIGHT)) ))) - (0.5)) Type: (temp) Direction: [35]\n                change [#score v] by (50)\n                replace item (idx) of [#tile grid v] with [1]\n                start sound [Brick Break v]\n            else\n                start sound [Bump Head v]\n            end\n        end\n    end\nend\nif <(_BOUNCED TILE) > [0]> then\n    set [tile type v] to (item ((_BOUNCED TILE) + (1)) of [#tile grid v])\n    if <(tile type) = [100]> then\n        replace item ((_BOUNCED TILE) + (1)) of [#tile grid v] with [1]\n        Particle | X: (([floor v] of ((_BOUNCED TILE) / (_MAP HEIGHT)) ) + (0.5)) Y: ((_BOUNCED TILE) - ((_MAP HEIGHT) * ([floor v] of ((idx) / (_MAP HEIGHT)) ))) Type: [13] Direction: [90]\n        change [#score v] by (200)\n        change [#coins v] by (1)\n        if <(#COINS) = [100]> then\n            change [#lives v] by (1)\n            set [#coins v] to [0]\n            start sound [1 Up v]\n        end\n        start sound [Coin v]\n    end\nend\n\ndefine Check for Goal\nGet Tile Type at X (__PLAYER X) Y ((__PLAYER Y) - (0.5))\nrepeat (2)\n    if <(tile shape) = [>]> then\n        set [_exit v] to [2]\n        set [__player x v] to (([floor v] of (__PLAYER X) ) + (0.5))\n        stop [this script v]\n    end\n    Get Tile Type at X (__PLAYER X) Y ((__PLAYER Y) + ((height) / (2)))\nend\nif <<(direction) > [0]> and <(__PLAYER IN AIR) = [0]>> then\n    Get Tile Type at X (((__PLAYER X) + (width)) + (0.2)) Y ((__PLAYER Y) + ((height) / (2)))\n    if <<<(tile type) = [58]> or <(tile type) = [59]>> or <<(tile type) = [173]> or <(tile type) = [174]>>> then\n        set [_exit v] to [3]\n        stop [this script v]\n    end\nend\nGet Tile Type at X ((__PLAYER X) + ((width) - (_EXTRASMALL))) Y (__PLAYER Y)\nif <(tile type) = [69]> then\n    set [_exit v] to [4]\nend\nGet Tile Type at X ((__PLAYER X) - ((width) - (_EXTRASMALL))) Y (__PLAYER Y)\nif <(tile type) = [69]> then\n    set [_exit v] to [4]\nend\nGet Tile Type at X ((__PLAYER X) - ((width) - (_EXTRASMALL))) Y ((__PLAYER Y) - (0.999))\nif <(tile type) = [69]> then\n    set [_exit v] to [4]\nend\n\nwhen I receive [player stomp v]\nset [__player y vel v] to [0.2]\n\ndefine check for tiles\nif <(tile type) = [1]> then\n    stop [this script v]\nend\nif <(tile shape) = [~]> then\n    set [_is in water????? v] to [1]\n    if <(tile type) = [106]> then\n        replace item (idx) of [#tile grid v] with [89]\n        change [#score v] by (200)\n        change [#coins v] by (1)\n        if <(#COINS) = [100]> then\n            change [#lives v] by (1)\n            set [#coins v] to [0]\n            start sound [1 Up v]\n        end\n        start sound [Coin v]\n    end\n    stop [this script v]\nend\nif <(tile type) = [100]> then\n    replace item (idx) of [#tile grid v] with [1]\n    change [#score v] by (200)\n    change [#coins v] by (1)\n    if <(#COINS) = [100]> then\n        change [#lives v] by (1)\n        set [#coins v] to [0]\n        start sound [1 Up v]\n    end\n    start sound [Coin v]\n    stop [this script v]\nend\nif <<(tile type) = [66]> or <(tile type) = [67]>> then\n    set [_exit v] to [1]\n    stop [this script v]\nend\nif <(tile shape) = [^]> then\n    set [__player mode v] to [2]\n    set [__player x v] to (([floor v] of ((idx) / (_MAP HEIGHT)) ) + (0.5))\n    point in direction (-90)\n    clear graphic effects\nend\n\nwhen I receive [_init player v]\nset volume to (_VOLUME SOUND) %\nset [_extrasmall v] to [0.01]\nset [__power up level v] to [0]\nset [#lives v] to [3]\nset [#score v] to [0]\nset [#coins v] to [0]\nReset Level\nbroadcast (_DELETE EDITOR v) and wait\nset [__game sub level v] to [0]\nset [_editor \(on/off\) v] to [0]\nset [warp x v] to []\nset [warp y v] to []\nset [level init v] to [1]\nhide\nrepeat until <(#LIVES) < [1]>\n    delete all of [@mob spawns v]\n    delete all of [_spawn particles v]\n    broadcast (_DELETE OBJECTS v) and wait\n    broadcast (_LOAD LEVEL v) and wait\n    if <(level init) = [1]> then\n        if <(__GAME TYPE) = [3]> then\n            open/close editor\n        end\n    end\n    set [__player mode v] to [1]\n    broadcast (_BEGIN LEVEL v) and wait\n    if <(_EDITOR \(ON/OFF\)) = [0]> then\n        broadcast (_LOAD SCREEN v)\n    end\n    set [_in game timer v] to [0]\n    set [_starman timer v] to [0]\n    Init Player\n    broadcast (_BEGIN MUSIC LOOP v)\n    broadcast (@ANIMATE v) and wait\n    clear graphic effects\n    set [level init v] to [0]\n    repeat until <(_EXIT) > [0]>\n        go to [front v] layer\n        if <(__PLAYER MODE) > []> then\n            if <(_EDITOR \(ON/OFF\)) = [0]> then\n                if <(__PLAYER MODE) = [2]> then\n                    broadcast (@CLIMB VINE v)\n                    broadcast (@SPAWN CYCLE v)\n                    broadcast (@ANIMATE v)\n                else\n                    if <(_BOUNCED TILE) > [0]> then\n                        broadcast (@BOUNCED TILE v)\n                    end\n                    broadcast (@PLAYER PRE ANIMATE v)\n                    broadcast (@SPAWN CYCLE v)\n                    broadcast (@PROJECTILE TICK v)\n                    broadcast (@MOB TICK v)\n                    broadcast (@ANIMATE v)\n                end\n            else\n                broadcast (@EDITOR UI TICK v)\n                broadcast (@EDITOR TICK v)\n                broadcast (@EDITOR MOB SPAWN v)\n                broadcast (@EDITOR MOB TICK v)\n                broadcast (@ANIMATE v)\n            end\n            if <key (e v) pressed?> then\n                if <(username) = (username)> then\n                    open/close editor\n                    wait until <not <key (e v) pressed?>>\n                end\n            end\n            delete all of [@mob dangers v]\n            change [_in game timer v] by (1)\n        end\n    end\n    stop all sounds\n    set [color v] effect to (0)\n    set [brightness v] effect to (0)\n    set [ghost v] effect to (0)\n    show\n    if <(_EXIT) = [1]> then\n        show variable [___level name v]\n        switch costume to (dead v)\n        point in direction (90)\n        go to [front v] layer\n        set [__player y vel v] to [12]\n        start sound [Dies v]\n        repeat (70)\n            switch costume to (([floor v] of (((timer) * (5)) mod (2)) ) + (7))\n            change [__player y vel v] by (-0.5)\n            change y by (__PLAYER Y VEL)\n            Scroll | Smoothness: [4]\n            broadcast (@ANIMATE v)\n        end\n        repeat (15)\n            Scroll | Smoothness: [4]\n            broadcast (@ANIMATE v)\n        end\n        set [__power up level v] to [0]\n        if <(__GAME TYPE) = [1]> then\n            change [#lives v] by (-1)\n        else\n            if <(#LIVES) < [2]> then\n        end\n        Reset Level\n    else\n        if <(_EXIT) = [2]> then\n            point in direction (90)\n            start sound [Flag Pole v]\n            set [issolid v] to [0]\n            repeat until <(isSolid) > [0]>\n                Change Y by [-0.15]\n                Scroll | Smoothness: [4]\n                Draw\n                switch costume to ((([floor v] of (((timer) * (4)) mod (2)) ) + (10)) + ((__POWER UP LEVEL) * (18)))\n                idle player tick [1]\n            end\n            idle player tick [6]\n            point in direction (-90)\n            idle player tick [12]\n            point in direction (90)\n            start sound [Stage Clear v]\n            set [__player y vel v] to [0.4]\n            repeat (120)\n                set [__player x vel v] to [0.15]\n                Change X by (__PLAYER X VEL)\n                change [__player y vel v] by (-0.03)\n                change [__player in air v] by (1)\n                Change Y by (__PLAYER Y VEL)\n                Draw\n                if <(#TIME) > [0]> then\n                    change [#score v] by (50)\n                    change [#time v] by (-1)\n                    if <(#TIME) > [0]> then\n                        change [#score v] by (50)\n                        change [#time v] by (-1)\n                    end\n                    start sound [Coin v]\n                end\n                idle player tick [1]\n            end\n            repeat ([ceiling v] of ((#TIME) / (2)) )\n                if <(#TIME) > [0]> then\n                    change [#score v] by (50)\n                    change [#time v] by (-1)\n                    if <(#TIME) > [0]> then\n                        change [#score v] by (50)\n                        change [#time v] by (-1)\n                    end\n                    start sound [Coin v]\n                end\n                idle player tick [1]\n            end\n            idle player tick [30]\n            wait (1) seconds\n            if <(__GAME TYPE) = [1]> then\n                change [__game level v] by (1)\n                Reset Level\n            else\n                if <(__GAME TYPE) = [3]> then\n                    open/close editor\n                    Reset Level\n                else\n                    if <(__GAME TYPE) = [4]> then\n                        hide\n                    end\n                    stop [this script v]\n                end\n            end\n        else\n            if <(_EXIT) = [3]> then\n                broadcast (_LAYER1 v) and wait\n                broadcast (_LAYER2 v) and wait\n                start sound [Warp v]\n                set [__player x vel v] to [0]\n                set [__player y vel v] to [0]\n                set [_is in water????? v] to [0]\n                repeat (13)\n                    change [__player x v] by (0.06666)\n                    Draw\n                    broadcast (@ANIMATE v)\n                end\n                hide\n                wait (0.8) seconds\n                if <(__GAME SUB LEVEL) = [0]> then\n                    set [__game sub level v] to [1]\n                    set [spawn block v] to [6]\n                else\n                    if <(__GAME SUB LEVEL) = [-1]> then\n                        set [__game sub level v] to [0]\n                        set [spawn block v] to [40]\n                    else\n                        if <(__GAME SUB LEVEL) = [1]> then\n                            set [__game sub level v] to [0]\n                            set [spawn block v] to [41]\n                        end\n                    end\n                end\n            else\n                if <(_EXIT) = [4]> then\n                    start sound [Bowser Defeated v]\n                    wait (0.2) seconds\n                    point in direction (90)\n                    repeat (80)\n                        set [__player x vel v] to [0.1]\n                        Change X by [0.1]\n                        if <<(__PLAYER X VEL) = [0]> and <(__PLAYER IN AIR) < [2]>> then\n                            set [__player y vel v] to [0.3]\n                        end\n                        change [__player y vel v] by (-0.03)\n                        change [__player in air v] by (1)\n                        Change Y by (__PLAYER Y VEL)\n                        Scroll | Smoothness: [3]\n                        Draw\n                        broadcast (@ANIMATE v)\n                    end\n                    set [__player x vel v] to [0]\n                    if <<(__GAME TYPE) = [1]> and <(__GAME LEVEL) = (length of [levels - game v])>> then\n                        Particle | X: ((__PLAYER X) + (2)) Y: ((__PLAYER Y) + (4)) Type: [18] Direction: [90]\n                        broadcast (@SPAWN CYCLE v)\n                        repeat (180)\n                            Draw\n                            broadcast (@ANIMATE v)\n                        end\n                    else\n                        Particle | X: ((__PLAYER X) + (2)) Y: ((__PLAYER Y) + (4)) Type: [17] Direction: [90]\n                        broadcast (@SPAWN CYCLE v)\n                        repeat (120)\n                            Draw\n                            broadcast (@ANIMATE v)\n                        end\n                    end\n                    if <(__GAME TYPE) = [1]> then\n                        change [__game level v] by (1)\n                        Reset Level\n                    else\n                        wait (1) seconds\n                        if <(__GAME TYPE) = [3]> then\n                            open/close editor\n                            Reset Level\n                        else\n                            if <(__GAME TYPE) = [4]> then\n                                hide\n                            end\n                            stop [this script v]\n                        end\n                    end\n                else\n                    if <(_EXIT) = [5]> then\n                        broadcast (_LAYER1 v) and wait\n                        broadcast (_LAYER2 v) and wait\n                        start sound [Warp v]\n                        set [__player x vel v] to [0]\n                        set [__player y vel v] to [0]\n                        set [_is in water????? v] to [0]\n                        repeat (26)\n                            change [__player y v] by (-0.0769)\n                            Draw\n                            broadcast (@ANIMATE v)\n                        end\n                        hide\n                        wait (0.8) seconds\n                        if <(__GAME SUB LEVEL) = [0]> then\n                            set [__game sub level v] to [-1]\n                            set [spawn block v] to [6]\n                        else\n                            if <(__GAME SUB LEVEL) = [-1]> then\n                                set [__game sub level v] to [0]\n                                set [spawn block v] to [40]\n                            else\n                                if <(__GAME SUB LEVEL) = [1]> then\n                                    set [__game sub level v] to [0]\n                                    set [spawn block v] to [41]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    if <(__GAME TYPE) = [1]> then\n        if <(__GAME LEVEL) > (length of [levels - game v])> then\n            hide\n            stop [this script v]\n        end\n    else\n        if <(__GAME TYPE) = [2]> then\n            if <(__GAME LEVEL) > (length of [levels - community v])> then\n                hide\n                stop [this script v]\n            end\n        else\n            if <(__GAME TYPE) = [3]> then\n                if <(__GAME LEVEL) > (length of [levels - editor v])> then\n                    hide\n                    stop [this script v]\n                end\n            end\n        end\n    end\nend\nbroadcast (_DELETE CLONES v) and wait\nhide\nswitch backdrop to (game over v)\nplay sound [Game Over v] until done\nwait (2) seconds\n\ndefine Reset Level\nset [#time v] to [400]\nset [__game sub level v] to [0]\nset [spawn block v] to [6]\nset [warp x v] to []\nset [warp y v] to []\npoint in direction (90)\n\ndefine Get Tile Type at X (x) Y (y)\nset [idx v] to (((([floor v] of (x) ) * (_MAP HEIGHT)) + ([floor v] of (y) )) + (1))\nset [tile shape v] to (item (item (idx) of [#tile grid v]) of [#tile shape v])\nset [tile type v] to (item (idx) of [#tile grid v])\n\ndefine idle player tick (#)\nrepeat (#)\n    delete all of [@mob dangers v]\n    change [_in game timer v] by (1)\n    broadcast (@SPAWN CYCLE v)\n    broadcast (@PROJECTILE TICK v)\n    broadcast (@MOB TICK v)\n    broadcast (@ANIMATE v)\nend\n\ndefine Rise out of Incorrect Spawn\nrepeat until <(isSolid) = [0]>\n    change [__player y v] by (1)\n    set [issolid v] to [0]\n    Get isSolid at X ((__PLAYER X) + ((width) - (_EXTRASMALL))) Y ((__PLAYER Y) + (_EXTRASMALL))\n    Get isSolid at X ((__PLAYER X) + ((width) - (_EXTRASMALL))) Y ((__PLAYER Y) + ((height) - (_EXTRASMALL)))\n    Get isSolid at X ((__PLAYER X) - ((width) - (_EXTRASMALL))) Y ((__PLAYER Y) + (_EXTRASMALL))\n    Get isSolid at X ((__PLAYER X) - ((width) - (_EXTRASMALL))) Y ((__PLAYER Y) + ((height) - (_EXTRASMALL)))\nend\n\n@Save/Load\n\ndefine Read Value\nset [invalid code v] to [0]\nset [decoded v] to []\nchange [scanner v] by (1)\nrepeat until <[delimiters v] contains (letter (scanner) of (level to load))?>\n    if <(letter (scanner) of (level to load)) = []> then\n        set [invalid code v] to [1]\n        stop [this script v]\n    else\n        set [decoded v] to (join (decoded) (letter (scanner) of (level to load)))\n        change [scanner v] by (1)\n    end\nend\nif <(decoded) = []> then\n    set [decoded v] to [1]\nend\nset [delimiter found v] to (letter (scanner) of (level to load))\n\ndefine Fill level with (tile type)\nif <(tile type) > []> then\n    delete all of [level v]\n    repeat ((_MAP HEIGHT) * (_MAP WIDTH))\n        add (tile type) to [level v]\n    end\nend\n\ndefine Load Tile Level | Code: (level save code)\nset [level to load v] to (level save code)\nFill level with [1]\nset [y v] to [0]\nrepeat (_MAP HEIGHT)\n    set [x v] to [0]\n    repeat until <not <(x) < (_MAP WIDTH)>>\n        Read Value\n        if <(invalid code) = [1]> then\n            stop [this script v]\n        end\n        repeat (item # of (delimiter found) in [delimiters v])\n            replace item ((((x) * (_MAP HEIGHT)) + (y)) + (1)) of [level v] with (decoded)\n            change [x v] by (1)\n        end\n    end\n    change [y v] by (1)\nend\n\ndefine Save Map\nShrink Level Width Intelligently\nShrink Level Height Intelligently\nset [idx v] to [0]\ndelete all of [level v]\nrepeat (length of [#tile grid v])\n    change [idx v] by (1)\n    add (item (idx) of [#tile grid v]) to [level v]\nend\nWrite to save code (join (join (_MAP HEIGHT) [_]) (join (_MAP WIDTH) [_]))\nWrite to save code (join (_BACKDROP) [_])\nWrite to save code (join (_MUSIC) [_])\nsave tile grid\nWrite to save code [|]\nset [idx v] to [0]\ndelete all of [level v]\nrepeat (length of [@mob grid v])\n    change [idx v] by (1)\n    add (item (idx) of [@mob grid v]) to [level v]\nend\nsave tile grid\nWrite to save code [|]\n\nwhen I receive [_load level v]\nif <(__GAME TYPE) = [1]> then\n    set [game level code v] to (item (__GAME LEVEL) of [levels - game v])\nelse\n    if <(__GAME TYPE) = [2]> then\n        set [game level code v] to (item (__GAME LEVEL) of [levels - community v])\n    else\n        if <(__GAME TYPE) = [3]> then\n            if <(__GAME LEVEL) > (length of [levels - editor v])> then\n                Create New Level\n                broadcast (_SAVE LEVEL v) and wait\n                broadcast (_BEGIN LEVEL v) and wait\n                stop [this script v]\n            else\n                set [game level code v] to (item (__GAME LEVEL) of [levels - editor v])\n            end\n        else\n            if <(__GAME TYPE) = [4]> then\n                if <(_LOADED LEVEL CODE) = []> then\n                    ask [Please input your level code.] and wait\n                    repeat until <not <(answer) = []>>\n                        ask [You can't use a blank code!!] and wait\n                    end\n                    set [game level code v] to (answer)\n                    set [_loaded level code v] to (game level code)\n                else\n                    set [game level code v] to (_LOADED LEVEL CODE)\n                end\n            end\n        end\n    end\nend\nforever\n    if <(game level code) > []> then\n        set [scanner v] to [0]\n        set [level to load v] to (game level code)\n        Read Value\n        Decode Numbers to Letters (decoded)\n        set [___level name v] to (decoded)\n        Read Value\n        Decode Numbers to Letters (decoded)\n        set [___level creator v] to (decoded)\n        change [scanner v] by (1)\n        Separate Sub Levels (game level code)\n        set [#level code v] to (decoded)\n        Separate Sub Levels (game level code)\n        set [#underworld code v] to (decoded)\n        Separate Sub Levels (game level code)\n        set [#above code v] to (decoded)\n        if <(__GAME SUB LEVEL) = [0]> then\n            if <(#LEVEL CODE) > []> then\n                Load Map (#LEVEL CODE)\n            else\n                set [invalid code v] to [1]\n            end\n        else\n            if <(__GAME SUB LEVEL) = [-1]> then\n                if <(#UNDERWORLD CODE) > []> then\n                    Load Map (#UNDERWORLD CODE)\n                end\n            else\n                if <(#ABOVE CODE) > []> then\n                    Load Map (#ABOVE CODE)\n                end\n            end\n        end\n        if <(invalid code) = [0]> then\n            stop [this script v]\n        else\n            set [__game type v] to [4]\n            ask [Invalid level code.] and wait\n            set [game level code v] to (answer)\n            set [_loaded level code v] to (game level code)\n        end\n    else\n        stop [all v]\n    end\nend\n\nwhen I receive [_save level v]\nCreate Save Code\nif <(__GAME TYPE) = [1]> then\n    replace item (__GAME LEVEL) of [levels - game v] with (save code)\nelse\n    if <(__GAME TYPE) = [2]> then\n        replace item (__GAME LEVEL) of [levels - community v] with (save code)\n    else\n        if <(__GAME TYPE) = [3]> then\n            replace item (__GAME LEVEL) of [levels - editor v] with (save code)\n        end\n    end\nend\n\ndefine Write to save code (info)\nset [save code v] to (join (save code) (info))\n\ndefine Load Map (code)\nset [scanner v] to [0]\nset [decoded v] to []\nrepeat until <(letter (scanner) of (code)) = [|]>\n    set [decoded v] to (join (decoded) (letter (scanner) of (code)))\n    change [scanner v] by (1)\n    if <(scanner) > (length of (code))> then\n        set [invalid code v] to [1]\n        stop [this script v]\n    end\nend\nset [temp v] to (scanner)\nset [scanner v] to [0]\nset [level to load v] to (decoded)\nRead Value\nset [_map height v] to (decoded)\nRead Value\nset [_map width v] to (decoded)\nRead Value\nset [_backdrop v] to (decoded)\nRead Value\nset [_music v] to (decoded)\nset [__level music v] to (_MUSIC)\nLoad Tile Level | Code: (level to load)\nif <(invalid code) = [1]> then\n    stop [this script v]\nend\nset [idx v] to [0]\ndelete all of [#tile grid v]\nrepeat (length of [level v])\n    change [idx v] by (1)\n    add (item (idx) of [level v]) to [#tile grid v]\nend\nset [decoded v] to []\nset [scanner v] to ((temp) + (1))\nrepeat until <(letter (scanner) of (code)) = [|]>\n    set [decoded v] to (join (decoded) (letter (scanner) of (code)))\n    change [scanner v] by (1)\n    if <(scanner) > (length of (code))> then\n        set [invalid code v] to [1]\n        stop [this script v]\n    end\nend\nset [scanner v] to [0]\nset [level to load v] to (decoded)\nLoad Tile Level | Code: (level to load)\nif <(invalid code) = [1]> then\n    stop [this script v]\nend\nset [idx v] to [0]\ndelete all of [@mob grid v]\nrepeat (length of [level v])\n    change [idx v] by (1)\n    add (item (idx) of [level v]) to [@mob grid v]\nend\n\ndefine save tile grid\nset [repeatcount v] to [1]\nset [y v] to [0]\nrepeat (_MAP HEIGHT)\n    set [x v] to [0]\n    set [lastdiscovery v] to (item ((((x) * (_MAP HEIGHT)) + (y)) + (1)) of [level v])\n    repeat (_MAP WIDTH)\n        change [x v] by (1)\n        set [idx v] to ((((x) * (_MAP HEIGHT)) + (y)) + (1))\n        if <<(item (idx) of [level v]) = (lastDiscovery)> and <(repeatCount) < (length of [delimiters v])>> then\n            change [repeatcount v] by (1)\n        else\n            if <(item ((idx) - (_MAP HEIGHT)) of [level v]) = [1]> then\n                Write to save code (item (repeatCount) of [delimiters v])\n                set [repeatcount v] to [1]\n            else\n                Write to save code (join (item ((idx) - (_MAP HEIGHT)) of [level v]) (item (repeatCount) of [delimiters v]))\n                set [repeatcount v] to [1]\n            end\n        end\n        set [lastdiscovery v] to (item (idx) of [level v])\n    end\n    change [y v] by (1)\nend\n\ndefine Create New Level\nset [_map height v] to [18]\nset [_map width v] to [18]\nset [__player x v] to [3.5]\nset [__player y v] to [2]\nset [___level name v] to [UNTITLED WORLD]\nif <(username) > []> then\n    set [___level creator v] to (username)\nelse\n    set [___level creator v] to [User]\nend\nif <(__GAME TYPE) = [1]> then\n    set [__game level v] to ((length of [levels - game v]) + (1))\nelse\n    if <(__GAME TYPE) = [2]> then\n        set [__game level v] to ((length of [levels - community v]) + (1))\n    else\n        if <(__GAME TYPE) = [3]> then\n            set [__game level v] to ((length of [levels - editor v]) + (1))\n        end\n    end\nend\nset [__game sub level v] to [0]\ndelete all of [@mob spawns v]\ndelete all of [#tile grid v]\ndelete all of [@mob grid v]\nrepeat ((_MAP HEIGHT) * (_MAP WIDTH))\n    add [1] to [#tile grid v]\n    add [0] to [@mob grid v]\nend\nreplace item (((_MAP HEIGHT) * (4)) + (2)) of [#tile grid v] with [2]\nreplace item (((_MAP HEIGHT) * (3)) + (2)) of [#tile grid v] with [2]\nreplace item (((_MAP HEIGHT) * (2)) + (2)) of [#tile grid v] with [2]\nset [save code v] to []\nset [_music v] to [1]\nset [_backdrop v] to [1]\nSave Map\nreplace item (((_MAP HEIGHT) * (4)) + (2)) of [#tile grid v] with [35]\nreplace item (((_MAP HEIGHT) * (3)) + (2)) of [#tile grid v] with [35]\nreplace item (((_MAP HEIGHT) * (2)) + (2)) of [#tile grid v] with [35]\nset [_music v] to [2]\nset [_backdrop v] to [2]\nSave Map\nreplace item (((_MAP HEIGHT) * (4)) + (2)) of [#tile grid v] with [206]\nreplace item (((_MAP HEIGHT) * (3)) + (2)) of [#tile grid v] with [206]\nreplace item (((_MAP HEIGHT) * (2)) + (2)) of [#tile grid v] with [206]\nset [_music v] to [4]\nset [_backdrop v] to [3]\nSave Map\nif <(__GAME TYPE) = [1]> then\n    add (save code) to [levels - game v]\nelse\n    if <(__GAME TYPE) = [2]> then\n        add (save code) to [levels - community v]\n    else\n        if <(__GAME TYPE) = [3]> then\n            add (save code) to [levels - editor v]\n        end\n    end\nend\nset [_music v] to [1]\nset [_backdrop v] to [1]\nreplace item (((_MAP HEIGHT) * (4)) + (2)) of [#tile grid v] with [2]\nreplace item (((_MAP HEIGHT) * (3)) + (2)) of [#tile grid v] with [2]\nreplace item (((_MAP HEIGHT) * (2)) + (2)) of [#tile grid v] with [2]\nstop all sounds\n\nwhen flag clicked\nhide\n\ndefine Shorten Level Height by (#) blocks\nset [scanner v] to [1]\nrepeat (_MAP WIDTH)\n    change [scanner v] by ((_MAP HEIGHT) - (#))\n    repeat (#)\n        delete (scanner) of [#tile grid v]\n        delete (scanner) of [@mob grid v]\n    end\nend\nset [_map height v] to ((_MAP HEIGHT) - (#))\n\ndefine Grow Level Height by (#) blocks\nset [scanner v] to [1]\nrepeat (_MAP WIDTH)\n    change [scanner v] by (_MAP HEIGHT)\n    repeat (#)\n        insert [1] at (scanner) of [#tile grid v] \n        insert [0] at (scanner) of [@mob grid v] \n        change [scanner v] by (1)\n    end\nend\nset [_map height v] to ((_MAP HEIGHT) + (#))\n\ndefine Separate Sub Levels (code)\nset [decoded v] to []\nrepeat (2)\n    repeat until <<(letter (scanner) of (code)) = [|]> or <(scanner) > (length of (code))>>\n        set [decoded v] to (join (decoded) (letter (scanner) of (code)))\n        change [scanner v] by (1)\n    end\n    set [decoded v] to (join (decoded) (letter (scanner) of (code)))\n    change [scanner v] by (1)\nend\n\ndefine Shorten Level Width by (#) blocks\nrepeat ((#) * (_MAP HEIGHT))\n    delete (length of [#tile grid v]) of [#tile grid v]\n    delete (length of [@mob grid v]) of [@mob grid v]\nend\nset [_map width v] to ((_MAP WIDTH) - (#))\n\ndefine Grow Level Width by (#) blocks\nrepeat ((#) * (_MAP HEIGHT))\n    add [1] to [#tile grid v]\n    add [0] to [@mob grid v]\nend\nset [_map width v] to ((_MAP WIDTH) + (#))\n\ndefine Shrink Level Width Intelligently\nrepeat ((_MAP WIDTH) - (16))\n    set [idx v] to (length of [#tile grid v])\n    repeat (_MAP HEIGHT)\n        if <<(item (idx) of [#tile grid v]) > [1]> or <(item (idx) of [@mob grid v]) > [0]>> then\n            stop [this script v]\n        end\n        change [idx v] by (-1)\n    end\n    Shorten Level Width by [1] blocks\nend\n\ndefine Shrink Level Height Intelligently\nrepeat ((_MAP HEIGHT) - (18))\n    set [idx v] to [0]\n    repeat (_MAP WIDTH)\n        change [idx v] by (_MAP HEIGHT)\n        if <<(item (idx) of [#tile grid v]) > [1]> or <(item (idx) of [@mob grid v]) > [0]>> then\n            stop [this script v]\n        end\n    end\n    Shorten Level Height by [1] blocks\nend\n\ndefine Encode Letters to Numbers (encode)\nset [encoded v] to []\nset [temp v] to (scanner)\nset [scanner v] to [1]\nrepeat (length of (encode))\n    set [encoded v] to (join (encoded) (item # of (letter (scanner) of (encode)) in [letters v]))\n    change [scanner v] by (1)\nend\nset [scanner v] to (temp)\n\ndefine Decode Numbers to Letters (decode)\nset [decoded v] to []\nset [temp v] to (scanner)\nset [scanner v] to [1]\nrepeat (length of (decode))\n    if <<(letter (length of (decoded)) of (decoded)) = [ ]> or <(letter (length of (decoded)) of (decoded)) = []>> then\n        set [decoded v] to (join (decoded) (item (join (letter (scanner) of (decode)) (letter ((scanner) + (1)) of (decode))) of [letters - caps v]))\n    else\n        set [decoded v] to (join (decoded) (item (join (letter (scanner) of (decode)) (letter ((scanner) + (1)) of (decode))) of [letters v]))\n    end\n    change [scanner v] by (2)\nend\nset [scanner v] to (temp)\n\ndefine Create Save Code\nif <(username) > [cokelinkster]> then\n    set [___level creator v] to (username)\nelse\n    set [___level creator v] to [User]\nend\nset [save code v] to []\nif <(__GAME TYPE) = [1]> then\n    set [level to load v] to (item (__GAME LEVEL) of [levels - game v])\nelse\n    if <(__GAME TYPE) = [2]> then\n        set [level to load v] to (item (__GAME LEVEL) of [levels - community v])\n    else\n        if <(__GAME TYPE) = [3]> then\n            set [level to load v] to (item (__GAME LEVEL) of [levels - editor v])\n        end\n    end\nend\nSave Map\nset [scanner v] to [0]\nRead Value\nRead Value\nchange [scanner v] by (1)\nSeparate Sub Levels (level to load)\nset [#level code v] to (decoded)\nSeparate Sub Levels (level to load)\nset [#underworld code v] to (decoded)\nSeparate Sub Levels (level to load)\nset [#above code v] to (decoded)\nif <(__GAME SUB LEVEL) = [0]> then\n    set [#level code v] to (save code)\nelse\n    if <(__GAME SUB LEVEL) = [-1]> then\n        set [#underworld code v] to (save code)\n    else\n        if <(__GAME SUB LEVEL) = [1]> then\n            set [#above code v] to (save code)\n        end\n    end\nend\nEncode Letters to Numbers (___LEVEL NAME)\nset [encoded level name v] to (encoded)\nEncode Letters to Numbers (___LEVEL CREATOR)\nset [encoded level creator v] to (encoded)\nset [save code v] to (join (join (encoded level name) (join [_] (join (encoded level creator) [_]))) (join (join (#LEVEL CODE) (#UNDERWORLD CODE)) (#ABOVE CODE)))\n\nwhen I receive [__generate save code v]\nCreate Save Code\ndelete all of [here is your save code! v]\nadd [Select the entire code below by triple clicking it.] to [here is your save code! v]\nadd [] to [here is your save code! v]\nadd (save code) to [here is your save code! v]\nadd [] to [here is your save code! v]\nadd [Right click and select 'copy'.] to [here is your save code! v]\nadd [Paste it in the discussion forum in the Notes and Credits to share your level.] to [here is your save code! v]\nadd [Or into a text document to keep it safe.] to [here is your save code! v]\nadd [!!DO NOT PASTE CODES IN COMMENTS!!] to [here is your save code! v]\nadd [Click or press any key to close this popup.] to [here is your save code! v]\nhide list [here is your save code! v]\nwait until <not <<key (any v) pressed?> or <mouse down?>>>\nwait until <<key (any v) pressed?> or <mouse down?>>\nshow list [here is your save code! v]\n\n@Editor\n\nwhen I receive [@editor ui tick v]\nif <([floor v] of (__PLAYER X) ) > ((_MAP WIDTH) - ([ceiling v] of (_GRID WIDTH) ))> then\n    if <((_MAP HEIGHT) * (_MAP WIDTH)) < [200000]> then\n        Grow Level Width by [1] blocks\n    end\nend\nif <<(_EDITORBRUSH) = [77]> or <(_EDITORBRUSH) = [78]>> then\n    set [idx v] to ((([floor v] of ((((mouse x) + ((_TILE SIZE) / (2))) + (__SCROLL X)) / (_TILE SIZE)) ) * (_MAP HEIGHT)) + (([floor v] of ((((mouse y) + ((_TILE SIZE) / (2))) + (__SCROLL Y)) / (_TILE SIZE)) ) + (1)))\nelse\n    set [idx v] to ((([floor v] of (((mouse x) + (__SCROLL X)) / (_TILE SIZE)) ) * (_MAP HEIGHT)) + (([floor v] of ((((mouse y) + ((_TILE SIZE) / (2))) + (__SCROLL Y)) / (_TILE SIZE)) ) + (1)))\nend\nif <mouse down?> then\n    if <(_TILEBRUSH DISABLED TEMPORARILY) = [0]> then\n        if <(isMouseDown) = [0]> then\n            if <(_EDITORBRUSH) = [1]> then\n                if <(item (idx) of [@mob grid v]) > [0]> then\n                    set [layer v] to [2]\n                else\n                    change [idx v] by (_MAP HEIGHT)\n                    if <<(item (idx) of [@mob grid v]) = [19]> or <(item (idx) of [@mob grid v]) = [20]>> then\n                        set [layer v] to [2]\n                    else\n                        set [layer v] to [1]\n                    end\n                    change [idx v] by ((0) - (_MAP HEIGHT))\n                end\n            end\n        end\n        Paint Tile\n    end\n    set [ismousedown v] to [1]\nelse\n    set [ismousedown v] to [0]\n    delete all of [#placed tiles v]\n    set [_tilebrush disabled temporarily v] to [0]\nend\n\ndefine Paint Tile\nif <(_EDITORBRUSH) = [1]> then\n    if <(layer) = [1]> then\n        if <not <(item (idx) of [#tile grid v]) = [1]>> then\n            start sound (((((item (item (idx) of [#tile grid v]) of [#tile sounds v]) - (1)) * (4)) + (1)) + (pick random (0) to (3)))\n            replace item (idx) of [#tile grid v] with [1]\n            Update Surrounding Tiles\n        end\n    else\n        if <not <(item (idx) of [@mob grid v]) = [0]>> then\n            Erase Mob\n        end\n        change [idx v] by (_MAP HEIGHT)\n        if <<(item (idx) of [@mob grid v]) = [19]> or <(item (idx) of [@mob grid v]) = [20]>> then\n            Erase Mob\n        end\n        change [idx v] by ((0) - (_MAP HEIGHT))\n    end\nelse\n    if <(item (_EDITORBRUSH) of [#tile shape v]) = [entity]> then\n        Paint Mob\n    else\n        if <(_EDITORBRUSH) = [114]> then\n            replace item ((idx) + (1)) of [#tile grid v] with [115]\n        else\n            if <(_EDITORBRUSH) = [143]> then\n                set [issolid v] to [0]\n                Get isSolid at Idx ((idx) - (1))\n                if <(isSolid) = [0]> then\n                    stop [this script v]\n                end\n                set [issolid v] to [0]\n                Get isSolid at Idx ((idx) - (2))\n                if <(isSolid) = [0]> then\n                    stop [this script v]\n                end\n            else\n                if <(_EDITORBRUSH) = [207]> then\n                    if <(item (item (idx) of [#tile grid v]) of [#tile shape v]) = [#]> then\n                        set [_editorbrush v] to [192]\n                        Paint Mob\n                        set [_editorbrush v] to [207]\n                        stop [this script v]\n                    end\n                end\n            end\n        end\n        replace item (idx) of [#tile grid v] with (_EDITORBRUSH)\n        Choose Correct Tile (idx)\n        if <not <key (space v) pressed?>> then\n            Update Surrounding Tiles\n        end\n        if <not <[#placed tiles v] contains (idx)?>> then\n            add (idx) to [#placed tiles v]\n            start sound (((((item (item (idx) of [#tile grid v]) of [#tile sounds v]) - (1)) * (4)) + (1)) + (pick random (0) to (3)))\n        end\n    end\nend\n\ndefine Choose Correct Tile (idx)\nset [tile group v] to (item (item (idx) of [#tile grid v]) of [#tile groups v])\nif <<(tile group) > []> and <(item (item (idx) of [#tile grid v]) of [#tile recipes v]) > []>> then\n    set [tile recipe v] to []\n    if <<(tile group) = [7]> or <(tile group) = [21]>> then\n        if <[#placed tiles v] contains (idx)?> then\n            build controlled recipe ((idx) + (1))\n            build controlled recipe ((idx) + (_MAP HEIGHT))\n            build controlled recipe ((idx) - (1))\n            build controlled recipe ((idx) - (_MAP HEIGHT))\n        else\n            stop [this script v]\n        end\n    else\n        if <<(tile group) = [1]> or <(tile group) = [13]>> then\n            build recipe ((idx) + (1))\n            if <[#placed tiles v] contains (idx)?> then\n                build controlled recipe ((idx) + (_MAP HEIGHT))\n            else\n                set [tile recipe v] to (join (tile recipe) [0])\n            end\n            build recipe ((idx) - (1))\n            if <[#placed tiles v] contains (idx)?> then\n                build controlled recipe ((idx) - (_MAP HEIGHT))\n            else\n                set [tile recipe v] to (join (tile recipe) [0])\n            end\n        else\n            build recipe ((idx) + (1))\n            build recipe ((idx) + (_MAP HEIGHT))\n            build recipe ((idx) - (1))\n            build recipe ((idx) - (_MAP HEIGHT))\n        end\n    end\n    set [tile v] to [1]\n    repeat (length of [#tile groups v])\n        if <(item (tile) of [#tile groups v]) = (tile group)> then\n            Check if Tile Recipe is Correct\n            if <(i) > [0]> then\n                replace item (idx) of [#tile grid v] with (tile)\n                stop [this script v]\n            end\n        end\n        change [tile v] by (1)\n    end\nend\n\ndefine build recipe (idx)\nif <(item (item (idx) of [#tile grid v]) of [#tile groups v]) = (tile group)> then\n    set [tile recipe v] to (join (tile recipe) [1])\nelse\n    if <<<(item (item (idx) of [#tile grid v]) of [#tile shape v]) = [#]> and <not <(item (idx) of [#tile grid v]) = [52]>>> or <<(item (item (idx) of [#tile grid v]) of [#tile shape v]) = [~]> and <(item (item (idx) of [#tile grid v]) of [#tile shape v]) = [~]>>> then\n        set [tile recipe v] to (join (tile recipe) [2])\n    else\n        set [tile recipe v] to (join (tile recipe) [0])\n    end\nend\n\ndefine Update Surrounding Tiles\nChoose Correct Tile ((idx) + (1))\nChoose Correct Tile ((idx) - (1))\nChoose Correct Tile ((idx) + (_MAP HEIGHT))\nChoose Correct Tile ((idx) - (_MAP HEIGHT))\n\ndefine Paint Mob\nset [tile recipe v] to [0]\nset [i v] to [0]\nrepeat until <(i) = (_EDITORBRUSH)>\n    change [i v] by (1)\n    if <(item (i) of [#tile shape v]) = [entity]> then\n        change [tile recipe v] by (1)\n    end\nend\nif <(tile recipe) = [6]> then\n    delete (item # of (item # of [6] in [@mob grid v]) in [@mob spawns v]) of [@mob spawns v]\n    replace item (item # of [6] in [@mob grid v]) of [@mob grid v] with [0]\nelse\n    if <(tile recipe) = [40]> then\n        delete (item # of (item # of [40] in [@mob grid v]) in [@mob spawns v]) of [@mob spawns v]\n        replace item (item # of [40] in [@mob grid v]) of [@mob grid v] with [0]\n    else\n        if <(tile recipe) = [41]> then\n            delete (item # of (item # of [41] in [@mob grid v]) in [@mob spawns v]) of [@mob spawns v]\n            replace item (item # of [41] in [@mob grid v]) of [@mob grid v] with [0]\n        end\n    end\nend\nif <not <(item (idx) of [@mob grid v]) = (tile recipe)>> then\n    replace item (idx) of [@mob grid v] with (tile recipe)\n    start sound (((((item (_EDITORBRUSH) of [#tile sounds v]) - (1)) * (4)) + (1)) + (pick random (0) to (3)))\nend\n\nwhen [t v] key pressed\nset [tile group v] to (item (_EDITORBRUSH) of [#tile groups v])\nif <(tile group) > []> then\n    change [_editorbrush v] by (1)\n    if <not <(item (_EDITORBRUSH) of [#tile groups v]) = (tile group)>> then\n        set [_editorbrush v] to (item # of (tile group) in [#tile groups v])\n    end\nend\n\ndefine Check if Tile Recipe is Correct\nset [i v] to [1]\nrepeat (4)\n    if <<(letter (i) of (item (tile) of [#tile recipes v])) = (letter (i) of (tile recipe))> or <<(letter (i) of (item (tile) of [#tile recipes v])) = [-]> or <<<(letter (i) of (item (tile) of [#tile recipes v])) = [2]> and <(letter (i) of (tile recipe)) = [1]>> or <<(letter (i) of (item (tile) of [#tile recipes v])) = [0]> and <(letter (i) of (tile recipe)) = [2]>>>>> then\n        change [i v] by (1)\n    else\n        set [i v] to [0]\n        stop [this script v]\n    end\nend\n\ndefine Shorten Level Height by (#) blocks\nset [scanner v] to [0]\nrepeat (_MAP WIDTH)\n    repeat ((_MAP HEIGHT) - (#))\n        change [scanner v] by (1)\n    end\n    repeat (#)\n        delete (scanner) of [#tile grid v]\n        delete (scanner) of [@mob grid v]\n    end\nend\nset [_map height v] to ((_MAP HEIGHT) - (#))\n\ndefine Shorten Level Width by (#) blocks\nrepeat ((#) * (_MAP HEIGHT))\n    delete (length of [#tile grid v]) of [#tile grid v]\n    delete (length of [@mob grid v]) of [@mob grid v]\nend\nset [_map width v] to ((_MAP WIDTH) - (#))\n\ndefine Grow Level Width by (#) blocks\nrepeat ((#) * (_MAP HEIGHT))\n    add [1] to [#tile grid v]\n    add [0] to [@mob grid v]\nend\nset [_map width v] to ((_MAP WIDTH) + (#))\n\ndefine Grow Level Height by (#) blocks\nset [scanner v] to [1]\nrepeat (_MAP WIDTH)\n    change [scanner v] by (_MAP HEIGHT)\n    repeat (#)\n        insert [1] at (scanner) of [#tile grid v] \n        insert [0] at (scanner) of [@mob grid v] \n        change [scanner v] by (1)\n    end\nend\nset [_map height v] to ((_MAP HEIGHT) + (#))\n\nwhen I receive [_green flag v]\nset volume to (_VOLUME SOUND) %\nset [_editorbrush v] to [2]\n\ndefine build controlled recipe (#)\nif <[#placed tiles v] contains (#)?> then\n    build recipe (#)\nelse\n    set [tile recipe v] to (join (tile recipe) [0])\nend\n\ndefine Erase Mob\nset [tile recipe v] to [0]\nset [i v] to [0]\nrepeat until <(tile recipe) = (item (idx) of [@mob grid v])>\n    change [i v] by (1)\n    if <(item (i) of [#tile shape v]) = [entity]> then\n        change [tile recipe v] by (1)\n    end\nend\nstart sound (((((item (i) of [#tile sounds v]) - (1)) * (4)) + (1)) + (pick random (0) to (3)))\ndelete (item # of (idx) in [@mob spawns v]) of [@mob spawns v]\nreplace item (idx) of [@mob grid v] with [0]\n\ndefine Get isSolid at Idx (idx)\nif <(isSolid) = [0]> then\n    if <(item (item (idx) of [#tile grid v]) of [#tile shape v]) = [#]> then\n        set [issolid v] to [1]\n    end\nend\n\nwhen I receive [_load editor v]\nif <(_MAP HEIGHT) < [30]> then\n    Grow Level Height by ((30) - (_MAP HEIGHT)) blocks\n    delete all of [@mob spawns v]\n    delete all of [#placed tiles v]\nend\n\n@Particles\n\nwhen I receive [@animate v]\nif <(id) > []> then\n    Tick Particles\n    if <(life) < [1]> then\n        set [id v] to []\n    end\nelse\n    hide\nend\n\nwhen I receive [_delete objects v]\nset [id v] to []\n\ndefine Tick Particles\nswitch costume to (costume)\nPosition\nif <<(id) > [0]> and <(id) < [11]>> then\n    change [life v] by (-3)\n    change [y v] by (0.04)\n    stop [this script v]\nend\nif <<<(id) = [11]> or <(id) = [12]>> or <(id) = [16]>> then\n    set [xv v] to ((xv) * (0.9))\n    change [x v] by (xv)\n    change [yv v] by (-0.04)\n    change [y v] by (yv)\n    change [direction v] by ((10) * ((xv) * (20)))\n    if <(y) < [-2]> then\n        set [id v] to []\n    end\n    stop [this script v]\nend\nif <(id) = [13]> then\n    if <(yv) < [0]> then\n        set [id v] to []\n    end\n    set [costume v] to (([floor v] of (((timer) * (18)) mod (6)) ) + (13))\n    change y by (((2.8125) * ([sin v] of (yv) )) * (_TILE SIZE))\n    change [yv v] by (-6)\n    stop [this script v]\nend\nif <(id) = [14]> then\n    change [life v] by (pick random (-1) to (-3))\n    change [y v] by (0.06)\n    set [issolid v] to [0]\n    Get Tile at X (x) Y ((y) + (0.5))\n    if <(tile shape) = []> then\n        set [id v] to []\n    end\n    stop [this script v]\nend\nif <(id) = [15]> then\n\ndefine Init Particle\nset size to ([ceiling v] of ((100) * ((_TILE SIZE) / (32))) ) %\nset [life v] to [100]\nif <<(id) > [0]> and <(id) < [11]>> then\n    set [costume v] to (id)\nend\nif <<<(id) = [11]> or <(id) = [12]>> or <(id) = [16]>> then\n    set [xv v] to (([sin v] of (direction) ) / (4))\n    set [yv v] to (([cos v] of (direction) ) / (3))\n    if <(id) = [11]> then\n        set [costume v] to [11]\n    else\n        if <(id) = [12]> then\n            set [costume v] to [12]\n        else\n            if <(id) = [16]> then\n                set [costume v] to [21]\n            end\n        end\n    end\nelse\n    if <(id) = [13]> then\n        set [yv v] to [180]\n        set [costume v] to (([floor v] of (((timer) * (18)) mod (6)) ) + (13))\n    else\n        if <(id) = [14]> then\n            set size to (([ceiling v] of ((100) * ((_TILE SIZE) / (32))) ) * (pick random (1) to (1.5000))) %\n            set [costume v] to [19]\n        else\n            if <(id) = [15]> then\n                set [costume v] to [20]\n            else\n                if <(id) = [17]> then\n                    set [costume v] to [22]\n                else\n                    if <(id) = [18]> then\n                        set [costume v] to [23]\n                    end\n                end\n            end\n        end\n    end\nend\nswitch costume to (costume)\ngo to [front v] layer\ngo [backward v] (1) layers\nclear graphic effects\nshow\npoint in direction (90)\nPosition\n\nwhen I receive [@spawn cycle v]\nif <(id) > []> then\n\ndefine Create Clones\nif <(_EDITOR \(ON/OFF\)) = [0]> then\n    repeat (10)\n        create clone of (_myself_ v)\n    end\nend\n\ndefine Get Tile at X (x) Y (y)\nif <(isSolid) = [0]> then\n    if <<(y) < (_MAP HEIGHT)> and <(__PLAYER Y) > [0]>> then\n        set [idx v] to (((([floor v] of (x) ) * (_MAP HEIGHT)) + ([floor v] of (y) )) + (1))\n        set [tile shape v] to (item (item (idx) of [#tile grid v]) of [#tile shape v])\n        set [tile type v] to (item (idx) of [#tile grid v])\n        if <(tile shape) = [#]> then\n            set [issolid v] to [1]\n        else\n            if <(x) < ([floor v] of (((__SCROLL X) - (240)) / (_TILE SIZE)) )> then\n                set [issolid v] to [1]\n            end\n        end\n    end\nend\n\nwhen I receive [_create clones v]\nset [id v] to []\nCreate Clones\n\nwhen I receive [_delete clones v]\nhide\ndelete this clone\n\nwhen flag clicked\nhide\n\ndefine Position\ngo to x: (round (((x) * (_TILE SIZE)) - (__SCROLL X))) y: (round (((y) * (_TILE SIZE)) - (__SCROLL Y)))\npoint in direction (direction)\nshow\n\n@Background\n\nwhen I receive [@animate v]\nif <(id) > []> then\n    Loop\n    set [costume v] to (((parallax) / (2)) + (((_BACKDROP) - (1)) * (2)))\n    go to x: (round (((x) * (480)) - ((__SCROLL X) / (parallax)))) y: ((round (((y) * (360)) - ((__SCROLL Y) / (parallax)))) + (100))\n    set [x pos v] to (round (((x) * (480)) - ((__SCROLL X) / (parallax))))\n    set [y pos v] to ((round (((y) * (360)) - ((__SCROLL Y) / (parallax)))) + (100))\n    if <<(x position) = (x pos)> and <(y position) = (y pos)>> then\n        if <not <(costume [number v]) = (costume)>> then\n            switch costume to (costume)\n        end\n    else\n        switch costume to (large v)\n        go to x: (x pos) y: (y pos)\n        switch costume to (costume)\n    end\n    go to [back v] layer\nelse\n    hide\nend\n\ndefine Create Clones\nshow\ngo to [back v] layer\nset [parallax v] to [2]\nset [y v] to [0]\nset [x v] to [0]\ncreate clone of (_myself_ v)\nset [x v] to [1]\ncreate clone of (_myself_ v)\nchange [parallax v] by (2)\nset [y v] to [0]\nrepeat (2)\n    go to [back v] layer\n    set [x v] to [0]\n    create clone of (_myself_ v)\n    set [x v] to [1]\n    create clone of (_myself_ v)\n    change [y v] by (1)\nend\nhide\n\nwhen I start as a clone\nset [id v] to [backdrop]\nswitch costume to (empty v)\n\ndefine Loop\nif <([abs v] of (round (((x) * (480)) - ((__SCROLL X) / (parallax)))) ) > [480]> then\n    repeat until <(round (((x) * (480)) - ((__SCROLL X) / (parallax)))) < [480]>\n        change [x v] by (-2)\n    end\n    repeat until <(round (((x) * (480)) - ((__SCROLL X) / (parallax)))) > [-480]>\n        change [x v] by (2)\n    end\nend\nif <((parallax) / (2)) > [1]> then\n    if <([abs v] of ((round (((y) * (360)) - ((__SCROLL Y) / (parallax)))) + (100)) ) > [360]> then\n        repeat until <((round (((y) * (360)) - ((__SCROLL Y) / (parallax)))) + (100)) < [360]>\n            change [y v] by (-2)\n        end\n        repeat until <((round (((y) * (360)) - ((__SCROLL Y) / (parallax)))) + (100)) > [-360]>\n            change [y v] by (2)\n        end\n    end\nend\n\nwhen I receive [_create clones v]\nset [id v] to []\nCreate Clones\n\nwhen I receive [_delete clones v]\ndelete this clone\n\n@Music\n\nwhen I receive [_begin music loop v]\nstop all sounds\nif <(_MUSIC) = [7]> then\n    set volume to ((_VOLUME MUSIC) * (1.5)) %\nelse\n    set volume to (_VOLUME MUSIC) %\nend\nif <not <(#TIME) > [100]>> then\n    set [pitch v] effect to (0)\nelse\n    set [pitch v] effect to (0)\nend\nset [music v] to (_MUSIC)\nrepeat until <(_EXIT) > [0]>\n    play sound (_MUSIC) until done\nend\nset [music v] to []\n\nwhen I receive [_music speed upppp v]\nset [pitch v] effect to (20)\n\nwhen I receive [_green flag v]\nset [music v] to []\n\nwhen I receive [_music fade out v]\nstop [other scripts in sprite v]\n\nwhen flag clicked\nforever\n    hide variable [___level name v]\nend\n\n@Stats\n\nwhen I receive [_load screen v]\nif <(_EDITOR \(ON/OFF\)) = [0]> then\n    go to x: (0) y: (0)\n    switch costume to (screen v)\n    go [backward v] (1) layers\n    go to [front v] layer\n    set size to (101) %\n    show\n    show variable [#coins v]\n    show variable [#lives v]\n    show variable [#score v]\n    show variable [#time v]\n    show variable [___level name v]\n    repeat (31)\n        wait (0) seconds\n    end\n    hide variable [___level name v]\nelse\n    hide\n    hide variable [___level name v]\n    hide variable [#coins v]\n    hide variable [#lives v]\n    hide variable [#score v]\n    hide variable [#time v]\nend\n\nwhen I receive [_delete clones v]\nhide\nhide variable [___level name v]\nhide variable [#coins v]\nhide variable [#lives v]\nhide variable [#score v]\nhide variable [#time v]\n\nwhen I receive [_load editor v]\nhide\nhide variable [___level name v]\nhide variable [#coins v]\nhide variable [#lives v]\nhide variable [#score v]\nhide variable [#time v]\n\nwhen I receive [_layer2 v]\ngo to [front v] layer\n\nwhen flag clicked\nhide\nhide variable [___level name v]\nhide variable [#coins v]\nhide variable [#lives v]\nhide variable [#score v]\nhide variable [#time v]\n\n@Mob\n\nwhen I receive [@mob tick v]\nif <(id) > []> then\n    if <((x) * (_TILE SIZE)) < ((_LEFT EDGE) - (360))> then\n        if <not <(id) = [28]>> then\n            set [id v] to []\n        end\n    end\n    if <(mob state) = [0]> then\n        set [x pos v] to ((([floor v] of (((x) * (_TILE SIZE)) / ((_TILE SIZE) * (3))) ) * ((_TILE SIZE) * (3))) - (__SCROLL X))\n        if <(x pos) < [270]> then\n            if <(x pos) > [-330]> then\n                if <([abs v] of (((y) * (_TILE SIZE)) - (__SCROLL Y)) ) < [300]> then\n                    set [mob state v] to [1]\n                end\n            end\n        end\n        show\n    else\n        if <(mob state) = [2]> then\n            // [Rising From Block]\n            change [timer v] by (1)\n            if <(timer) > [10]> then\n                show\n                change [y v] by (0.05)\n                if <(timer) > [30]> then\n                    set [mob state v] to [1]\n                    set [timer v] to [0]\n                    go to [front v] layer\n                end\n            else\n                hide\n            end\n        else\n            if <(mob state) = [3]> then\n                // [squished]\n                change [timer v] by (1)\n                if <(timer) > [5]> then\n                    set [id v] to []\n                end\n            else\n                if <(mob state) = [4]> then\n                    // [bounce and die]\n                    change [y velocity v] by (-0.02)\n                    change [y v] by (y velocity)\n                    if <(y position) < [-175]> then\n                        set [id v] to []\n                    end\n                end\n            end\n        end\n        if <(id) < [4]> then\n            if <(id) = [1]> then\n                _Tick Goomba\n                if <(mob state) = [3]> then\n                    set [costume v] to [5]\n                else\n                    set [costume v] to (([floor v] of (((timer) * (8)) mod (4)) ) + (1))\n                end\n                stop [this script v]\n            end\n            if <(id) = [2]> then\n                _Tick Koopa\n                set [costume v] to (([floor v] of (((timer) * (8)) mod (4)) ) + (6))\n                stop [this script v]\n            end\n            if <(id) = [3]> then\n                _Tick Koopa Shell\n                if <([abs v] of (speed) ) > [0]> then\n                    set [costume v] to (([floor v] of (((timer) * (8)) mod (4)) ) + (10))\n                else\n                    set [costume v] to [10]\n                end\n            end\n        else\n            if <(id) < [7]> then\n                if <(id) = [4]> then\n                    _Tick Magic Mushroom\n                    set [costume v] to (([floor v] of (((timer) * (8)) mod (4)) ) + (14))\n                    stop [this script v]\n                end\n                if <(id) = [5]> then\n                    _Tick 1Up\n                    set [costume v] to (([floor v] of (((timer) * (8)) mod (4)) ) + (18))\n                    stop [this script v]\n                end\n                if <(id) = [6]> then\n                    // [Spawn]\n                    set [costume v] to (([floor v] of (((timer) * (4)) mod (4)) ) + (22))\n                end\n            else\n                if <(id) < [10]> then\n                    if <(id) = [7]> then\n                        _Tick Fire Flower\n                        set [costume v] to (([floor v] of (((timer) * (8)) mod (4)) ) + (26))\n                        stop [this script v]\n                    end\n                    if <(id) = [8]> then\n                        _Tick Fireball\n                        if <(mob state) = [3]> then\n                            set [costume v] to (([floor v] of ((timer) / (1.5)) ) + (30))\n                        else\n                            set [costume v] to [30]\n                        end\n                        stop [this script v]\n                    end\n                    if <(id) = [9]> then\n                        _Tick Starman\n                        set [costume v] to (([floor v] of (((timer) * (8)) mod (5)) ) + (34))\n                    end\n                else\n                    if <(id) < [13]> then\n                        if <(id) = [10]> then\n                            _Tick Goomba\n                            if <(mob state) = [3]> then\n                                set [costume v] to [43]\n                            else\n                                set [costume v] to (([floor v] of (((timer) * (8)) mod (4)) ) + (39))\n                            end\n                            stop [this script v]\n                        end\n                        if <(id) = [11]> then\n                            _Tick Koopa\n                            set [costume v] to (([floor v] of (((timer) * (8)) mod (4)) ) + (44))\n                            stop [this script v]\n                        end\n                        if <(id) = [12]> then\n                            _Tick Koopa Shell\n                            if <([abs v] of (speed) ) > [0]> then\n                                set [costume v] to (([floor v] of (((timer) * (8)) mod (4)) ) + (48))\n                            else\n                                set [costume v] to [48]\n                            end\n                        end\n                    else\n                        if <(id) < [16]> then\n                            if <(id) = [13]> then\n                                _Tick Smart Koopa\n                                set [costume v] to (([floor v] of (((timer) * (8)) mod (4)) ) + (52))\n                                stop [this script v]\n                            end\n                            if <(id) = [14]> then\n                                _Tick Koopa Shell\n                                if <([abs v] of (speed) ) > [0]> then\n                                    set [costume v] to (([floor v] of (((timer) * (8)) mod (4)) ) + (56))\n                                else\n                                    set [costume v] to [56]\n                                end\n                                stop [this script v]\n                            end\n                            if <(id) = [15]> then\n                                _Tick Flying Koopa\n                                set [costume v] to (([floor v] of (((timer) * (8)) mod (6)) ) + (60))\n                                stop [this script v]\n                            end\n                        else\n                            if <(id) < [19]> then\n                                if <(id) = [16]> then\n                                    _Tick Fake Bowser\n                                    set [costume v] to (([floor v] of (((timer) * (6)) mod (4)) ) + (66))\n                                    stop [this script v]\n                                end\n                                if <(id) = [17]> then\n                                    _Tick Bowser Fire\n                                    set [costume v] to [70]\n                                    stop [this script v]\n                                end\n                                if <(id) = [18]> then\n                                    _Tick Fire Bar\n                                    set [costume v] to (([floor v] of (((timer) * (4)) mod (6)) ) + (71))\n                                    stop [this script v]\n                                end\n                            else\n                                if <(id) < [22]> then\n                                    if <(id) = [19]> then\n                                        _Tick Piranha Plant\n                                        set [costume v] to (([floor v] of (((timer) * (12)) mod (9)) ) + (77))\n                                        stop [this script v]\n                                    end\n                                    if <(id) = [20]> then\n                                        _Tick Piranha Plant\n                                        set [costume v] to (([floor v] of (((timer) * (12)) mod (9)) ) + (86))\n                                        stop [this script v]\n                                    end\n                                    if <(id) = [21]> then\n                                        _Tick Blooper\n                                        if <(y velocity) < [0]> then\n                                            set [costume v] to [96]\n                                        else\n                                            set [costume v] to [95]\n                                        end\n                                    end\n                                else\n                                    if <(id) < [25]> then\n                                        if <(id) = [22]> then\n                                            _Tick Fish Cheep Cheep\n                                            set [costume v] to (([floor v] of (((timer) * (4)) mod (4)) ) + (97))\n                                            stop [this script v]\n                                        end\n                                        if <(id) = [23]> then\n                                            _Tick Fish Cheep Cheep\n                                            set [costume v] to (([floor v] of (((timer) * (4)) mod (4)) ) + (101))\n                                            stop [this script v]\n                                        end\n                                        if <(id) = [24]> then\n                                            _Tick Cheep Cheep Spawner\n                                            set [costume v] to [171]\n                                            stop [this script v]\n                                        end\n                                    else\n                                        if <(id) < [28]> then\n                                            if <(id) = [25]> then\n                                                _Tick Flying Cheep Cheep\n                                                set [costume v] to (([floor v] of (((timer) * (4)) mod (4)) ) + (97))\n                                                stop [this script v]\n                                            end\n                                            if <(id) = [26]> then\n                                                _Tick Bouncy Koopa\n                                                set [costume v] to (([floor v] of (((timer) * (8)) mod (6)) ) + (107))\n                                                stop [this script v]\n                                            end\n                                            if <(id) = [27]> then\n                                                _Tick Fire Bubble\n                                                if <(y velocity) < [0]> then\n                                                    set [costume v] to [114]\n                                                else\n                                                    set [costume v] to [113]\n                                                end\n                                                stop [this script v]\n                                            end\n                                        else\n                                            if <(id) < [31]> then\n                                                if <(id) = [28]> then\n                                                    _Tick Lakitu\n                                                    if <(timer) > [65]> then\n                                                        set [costume v] to [116]\n                                                    else\n                                                        set [costume v] to [115]\n                                                    end\n                                                    stop [this script v]\n                                                end\n                                                if <(id) = [29]> then\n                                                    _Tick Spiny Egg\n                                                    set [costume v] to [117]\n                                                    stop [this script v]\n                                                end\n                                                if <(id) = [30]> then\n                                                    _Tick Spiny\n                                                    set [costume v] to (([floor v] of ((((timer) + ((mob#) * (1.3))) * (6)) mod (4)) ) + (118))\n                                                end\n                                            else\n                                                if <(id) < [34]> then\n                                                    if <(id) = [31]> then\n                                                        // [normal beetle]\n                                                        _Tick Buzzy Beetle\n                                                        set [costume v] to (([floor v] of ((((timer) + ((mob#) * (1.3))) * (6)) mod (4)) ) + (122))\n                                                        stop [this script v]\n                                                    end\n                                                    if <(id) = [32]> then\n                                                        _Tick Buzzy Shell\n                                                        if <([abs v] of (speed) ) > [0]> then\n                                                            set [costume v] to (([floor v] of (((timer) * (8)) mod (4)) ) + (126))\n                                                        else\n                                                            set [costume v] to [126]\n                                                        end\n                                                        stop [this script v]\n                                                    end\n                                                    if <(id) = [33]> then\n                                                        // [blue beetle]\n                                                        _Tick Buzzy Beetle\n                                                        set [costume v] to (([floor v] of ((((timer) + ((mob#) * (1.3))) * (6)) mod (4)) ) + (130))\n                                                    end\n                                                else\n                                                    if <(id) < [37]> then\n                                                        if <(id) = [34]> then\n                                                            // [blue beetle shell]\n                                                            _Tick Buzzy Shell\n                                                            if <([abs v] of (speed) ) > [0]> then\n                                                                set [costume v] to (([floor v] of (((timer) * (8)) mod (4)) ) + (134))\n                                                            else\n                                                                set [costume v] to [134]\n                                                            end\n                                                            stop [this script v]\n                                                        end\n                                                        if <(id) = [35]> then\n                                                            // [grey beetle]\n                                                            _Tick Buzzy Beetle\n                                                            set [costume v] to (([floor v] of ((((timer) + ((mob#) * (1.3))) * (6)) mod (4)) ) + (138))\n                                                            stop [this script v]\n                                                        end\n                                                        if <(id) = [36]> then\n                                                            _Tick Buzzy Shell\n                                                            if <([abs v] of (speed) ) > [0]> then\n                                                                set [costume v] to (([floor v] of (((timer) * (8)) mod (4)) ) + (142))\n                                                            else\n                                                                set [costume v] to [142]\n                                                            end\n                                                        end\n                                                    else\n                                                        if <(id) < [40]> then\n                                                            if <(id) = [37]> then\n                                                                // [hammer bro]\n                                                                _Tick Hammer Bro\n                                                                set [costume v] to (([floor v] of (((timer) * (6)) mod (6)) ) + (146))\n                                                                stop [this script v]\n                                                            end\n                                                            if <(id) = [38]> then\n                                                                // [hammer bro]\n                                                                _Tick Hammer Bro\n                                                                set [costume v] to (([floor v] of (((timer) * (6)) mod (6)) ) + (152))\n                                                                stop [this script v]\n                                                            end\n                                                            if <(id) = [39]> then\n                                                                // [hammer]\n                                                                _Tick Hammer\n                                                                set [costume v] to (([floor v] of (((timer) * (6)) mod (4)) ) + (158))\n                                                                stop [this script v]\n                                                            end\n                                                        else\n                                                            if <(id) < [43]> then\n                                                                if <(id) = [40]> then\n                                                                    stop [this script v]\n                                                                end\n                                                                if <(id) = [41]> then\n                                                                    stop [this script v]\n                                                                end\n                                                                if <(id) = [42]> then\n                                                                    // [bullet bill]\n                                                                    _Tick Bullet Bill\n                                                                    set [costume v] to [170]\n                                                                    stop [this script v]\n                                                                end\n                                                            else\n                                                                if <(id) < [46]> then\n                                                                    if <(id) = [43]> then\n                                                                        // [bill blaster]\n                                                                        _Tick Bill Blaster [42]\n                                                                        stop [this script v]\n                                                                    end\n                                                                    if <(id) = [44]> then\n                                                                        // [grey goomba]\n                                                                        _Tick Goomba\n                                                                        if <(mob state) = [3]> then\n                                                                            set [costume v] to [176]\n                                                                        else\n                                                                            set [costume v] to (([floor v] of (((timer) * (8)) mod (4)) ) + (172))\n                                                                        end\n                                                                        stop [this script v]\n                                                                    end\n                                                                    if <(id) = [45]> then\n                                                                        // [spooky grey koopa]\n                                                                        stop [this script v]\n                                                                    end\n                                                                else\n                                                                    if <(id) < [49]> then\n                                                                        if <(id) = [46]> then\n                                                                            // [spooky grey koopa shell]\n                                                                            stop [this script v]\n                                                                        end\n                                                                        if <(id) = [47]> then\n                                                                            // [bullet bill]\n                                                                            _Tick Bullet Bill\n                                                                            set [costume v] to [185]\n                                                                            stop [this script v]\n                                                                        end\n                                                                        if <(id) = [48]> then\n                                                                            // [bill blaster]\n                                                                            _Tick Bill Blaster [47]\n                                                                            stop [this script v]\n                                                                        end\n                                                                    else\n                                                                        if <(id) < [52]> then\n                                                                            if <(id) = [49]> then\n                                                                                // [vine]\n                                                                                _Tick Vine\n                                                                            end\n                                                                            if <(id) = [50]> then\n                                                                            if <(id) = [51]> then\n                                                                        end\n                                                                    end\n                                                                end\n                                                            end\n                                                        end\n                                                    end\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [@animate v]\nif <(id) > []> then\n    if <(id) = [8]> then\n        if <(mob state) = [1]> then\n            if <(item (danger id) of [@mob dangers v]) < [1]> then\n                set [mob state v] to [3]\n                start sound [fireball hit v]\n            end\n        end\n    end\n    Draw\nelse\n    hide\nend\n\ndefine Get isSolid at X (x) Y (y)\nif <(isSolid) = [0]> then\n    if <(x) < [0]> then\n        set [issolid v] to [0]\n    else\n        if <<(y) < (_MAP HEIGHT)> and <(y) > [0]>> then\n            set [idx v] to (((([floor v] of (x) ) * (_MAP HEIGHT)) + ([floor v] of (y) )) + (1))\n            if <(item (item (idx) of [#tile grid v]) of [#tile shape v]) = [#]> then\n                set [issolid v] to [1]\n            end\n        end\n    end\nend\n\ndefine Change Y by (steps)\nchange [y v] by (steps)\nset [issolid v] to [0]\nif <(steps) > [0]> then\n    Get isSolid at X ((x) + ((width) - (_EXTRASMALL))) Y ((y) + (height))\n    Get isSolid at X ((x) - ((width) - (_EXTRASMALL))) Y ((y) + (height))\n    if <(isSolid) > [0]> then\n        set [y v] to (([floor v] of ((y) + (height)) ) - (height))\n        set [y velocity v] to [0]\n    end\nelse\n    Get isSolid at X ((x) + ((width) - (_EXTRASMALL))) Y (y)\n    Get isSolid at X ((x) - ((width) - (_EXTRASMALL))) Y (y)\n    if <(isSolid) > [0]> then\n        set [y v] to ([ceiling v] of (y) )\n        set [in air v] to [0]\n        set [y velocity v] to [0]\n    end\nend\n\ndefine Change X by (steps)\nif <([abs v] of (steps) ) > [0]> then\n    change [x v] by (steps)\n    set [issolid v] to [0]\n    if <(steps) > [0]> then\n        Get isSolid at X ((x) + (width)) Y (y)\n        Get isSolid at X ((x) + (width)) Y ((y) + ((height) - (_EXTRASMALL)))\n        if <(isSolid) > [0]> then\n            set [x v] to (([floor v] of ((x) + (width)) ) - (width))\n            set [x velocity v] to [0]\n        end\n    else\n        Get isSolid at X ((x) - (width)) Y (y)\n        Get isSolid at X ((x) - (width)) Y ((y) + ((height) - (_EXTRASMALL)))\n        if <(isSolid) > [0]> then\n            set [x v] to (([ceiling v] of ((x) - (width)) ) + (width))\n            set [x velocity v] to [0]\n        end\n    end\nend\n\ndefine Draw\nif <(mob state) > [0]> then\n    set [x pos v] to (round (((x) * (_TILE SIZE)) - (__SCROLL X)))\n    set [y pos v] to (round (((y) * (_TILE SIZE)) - (__SCROLL Y)))\n    point in direction (90)\n    switch costume to (large v)\n    go to x: (x pos) y: (y pos)\n    if <<([abs v] of (x pos) ) < [280]> and <([abs v] of (y pos) ) < [210]>> then\n        if <(mob state) = [1]> then\n            show\n        end\n        if <not <(costume [number v]) = (costume)>> then\n            switch costume to (costume)\n        end\n        if <(id) = [8]> then\n            if <(mob state) = [1]> then\n                set rotation style [all around v]\n                point in direction ((dir) * ((timer) * (6)))\n                change y by ((0) - ((_TILE SIZE) / (4)))\n            end\n        else\n            point in direction (dir)\n        end\n    else\n        if <(_EDITOR \(ON/OFF\)) > [0]> then\n            delete (mob#) of [@mob spawns v]\n            set [id v] to []\n            hide\n        else\n            hide\n        end\n    end\nelse\n    hide\nend\n\nwhen I receive [_adjust size v]\nswitch costume to (large v)\nset size to ([ceiling v] of ((100) * ((_TILE SIZE) / (41))) ) %\n\ndefine Check for Player Collision\nset [issolid v] to [0]\nif <([abs v] of ((x) - (__PLAYER X)) ) < (([width v] of [player v]) + (width))> then\n    if <([abs v] of (((y) + ((height) / (2))) - ((__PLAYER Y) + (([height v] of [player v]) / (2)))) ) < (((height) / (2)) + (([height v] of [player v]) / (2)))> then\n        set [issolid v] to [1]\n        if <(__PLAYER MODE) = [1]> then\n            if <<<(__PLAYER Y) > (y)> and <<(__PLAYER Y VEL) < [0.01]> or <(y velocity) > [0]>>> and <<(__PLAYER IN AIR) > [0]> or <(in air) > [0]>>> then\n                set [issolid v] to [2]\n            end\n        end\n    end\nend\n\nwhen I receive [_delete objects v]\nset [id v] to []\n\ndefine STATS | speed: (speed) dir: (dir) | Width: (w) Height: (h) pts: (pts) Costume: (costume)\nset [speed v] to (speed)\nif <(dir) = [player]> then\n    if <(__PLAYER X) > (x)> then\n        set [dir v] to [90]\n    else\n        set [dir v] to [-90]\n    end\nelse\n    set [dir v] to (dir)\nend\nset [issolid v] to [0]\nset [mob points value v] to (pts)\nset [width v] to (w)\nset [height v] to (h)\nset [costume v] to (costume)\n\ndefine // (comment)\n\ndefine Check For Danger Collisions\nset [idx v] to [1]\nrepeat ((length of [@mob dangers v]) / (6))\n    if <not <((idx) + (5)) = (danger id)>> then\n        if <([abs v] of ((item (idx) of [@mob dangers v]) - (x)) ) < ((item ((idx) + (2)) of [@mob dangers v]) + (width))> then\n            if <([abs v] of (((item ((idx) + (1)) of [@mob dangers v]) + ((item ((idx) + (3)) of [@mob dangers v]) / (2))) - ((y) + ((height) / (2)))) ) < ((((item ((idx) + (3)) of [@mob dangers v]) + (height)) / (2)) + (0.2))> then\n                set [issolid v] to [1]\n                set [projectile collision id v] to (item ((idx) + (4)) of [@mob dangers v])\n                replace item ((idx) + (5)) of [@mob dangers v] with [0]\n                stop [this script v]\n            end\n        end\n    end\n    change [idx v] by (6)\nend\nset [issolid v] to [0]\n\nwhen I receive [@projectile tick v]\nif <(id) > []> then\n    if <(mob state) = [1]> then\n        if <(isDangerous) = [1]> then\n            add (x) to [@mob dangers v]\n            add (y) to [@mob dangers v]\n            add (width) to [@mob dangers v]\n            add (height) to [@mob dangers v]\n            add (id) to [@mob dangers v]\n            add [1] to [@mob dangers v]\n            set [danger id v] to (length of [@mob dangers v])\n        else\n            set [danger id v] to [0]\n        end\n    end\nend\n\ndefine Set Costume (#)\n\nwhen I receive [@editor mob tick v]\nset [idx v] to (item (mob#) of [@mob spawns v])\nif <(idx) > []> then\n    if <not <(id) = (item (idx) of [@mob grid v])>> then\n        set [id v] to (item (idx) of [@mob grid v])\n        Init Mob\n        set [mob state v] to [1]\n        show\n        go to [front v] layer\n    end\n    if <<(id) = [19]> or <(id) = [20]>> then\n        set [x v] to ([floor v] of ((idx) / (_MAP HEIGHT)) )\n    else\n        set [x v] to (([floor v] of ((idx) / (_MAP HEIGHT)) ) + (0.5))\n    end\n    set [y v] to (((idx) - ((_MAP HEIGHT) * ([floor v] of ((idx) / (_MAP HEIGHT)) ))) - (1))\n    if <<((([floor v] of ((x) / (3)) ) * (3)) mod (2)) > [0]> and <key (space v) pressed?>> then\n        set [brightness v] effect to (22)\n    else\n        set [brightness v] effect to (0)\n    end\nelse\n    set [id v] to []\nend\n\ndefine Init Mob\nset rotation style [left-right v]\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nset [in air v] to [9999999]\nset [height v] to [0.9]\nset [width v] to [0.4]\nset [timer v] to [0]\nset [danger id v] to [0]\nset [isdangerous v] to [0]\ngo to [front v] layer\nshow\nif <(id) < [4]> then\n    if <(id) = [1]> then\n        // [goomba]\n        STATS | speed: [0.08] dir: [-90] | Width: [0.4] Height: [0.8] pts: [100] Costume: [1]\n        Check for Solid Block Spawn\n        stop [this script v]\n    end\n    if <(id) = [2]> then\n        // [koopa]\n        STATS | speed: [0.08] dir: [-90] | Width: [0.4] Height: [1.3] pts: [200] Costume: [6]\n        Check for Solid Block Spawn\n        stop [this script v]\n    end\n    if <(id) = [3]> then\n        // [koopa shell]\n        STATS | speed: [0] dir: (dir) | Width: [0.4] Height: [0.8] pts: [100] Costume: [10]\n        Check for Solid Block Spawn\n    end\nelse\n    if <(id) < [7]> then\n        if <(id) = [4]> then\n            // [mushroom]\n            STATS | speed: [0.08] dir: [90] | Width: [0.4] Height: [0.8] pts: [1000] Costume: [14]\n            Check for Solid Block Spawn\n            stop [this script v]\n        end\n        if <(id) = [5]> then\n            // [1up]\n            STATS | speed: [0.08] dir: [90] | Width: [0.4] Height: [0.8] pts: [500] Costume: [18]\n            Check for Solid Block Spawn\n            stop [this script v]\n        end\n        if <(id) = [6]> then\n            set rotation style [don't rotate v]\n            // [spawn]\n            STATS | speed: [0] dir: [90] | Width: [0] Height: [0] pts: [0] Costume: [22]\n        end\n    else\n        if <(id) < [10]> then\n            if <(id) = [7]> then\n                // [fire flower]\n                STATS | speed: [0] dir: [90] | Width: [0.4] Height: [0.8] pts: [1000] Costume: [26]\n                Check for Solid Block Spawn\n                stop [this script v]\n            end\n            if <(id) = [8]> then\n                // [fireball]\n                STATS | speed: [0.35] dir: [player] | Width: [0.2] Height: [0.4] pts: [] Costume: [30]\n                set [dir v] to ((0) - (dir))\n                set [isdangerous v] to [1]\n                set [mob state v] to [1]\n                stop [this script v]\n            end\n            if <(id) = [9]> then\n                // [starman]\n                STATS | speed: [0.1] dir: [90] | Width: [0.4] Height: [0.8] pts: [] Costume: [34]\n                Check for Solid Block Spawn\n            end\n        else\n            if <(id) < [13]> then\n                if <(id) = [10]> then\n                    // [goomba dark theme]\n                    STATS | speed: [0.08] dir: [-90] | Width: [0.4] Height: [0.8] pts: [100] Costume: [39]\n                    Check for Solid Block Spawn\n                    stop [this script v]\n                end\n                if <(id) = [11]> then\n                    // [koopa dark theme]\n                    STATS | speed: [0.08] dir: [-90] | Width: [0.4] Height: [1.3] pts: [200] Costume: [44]\n                    Check for Solid Block Spawn\n                    stop [this script v]\n                end\n                if <(id) = [12]> then\n                    // [koopa dark shell]\n                    STATS | speed: [0] dir: (dir) | Width: [0.4] Height: [0.8] pts: [100] Costume: [48]\n                    Check for Solid Block Spawn\n                end\n            else\n                if <(id) < [16]> then\n                    if <(id) = [13]> then\n                        // [smart koopa]\n                        STATS | speed: [0.08] dir: [-90] | Width: [0.4] Height: [1.3] pts: [200] Costume: [52]\n                        Check for Solid Block Spawn\n                        stop [this script v]\n                    end\n                    if <(id) = [14]> then\n                        // [red koopa shell]\n                        STATS | speed: [0] dir: (dir) | Width: [0.4] Height: [0.8] pts: [100] Costume: [56]\n                        Check for Solid Block Spawn\n                        stop [this script v]\n                    end\n                    if <(id) = [15]> then\n                        // [flying koopa]\n                        STATS | speed: [0] dir: [-90] | Width: [0.4] Height: [0.8] pts: [100] Costume: [60]\n                        set [origin v] to (y)\n                    end\n                else\n                    if <(id) < [19]> then\n                        if <(id) = [16]> then\n                            // [fake bowser]\n                            STATS | speed: [0] dir: [-90] | Width: [0.4] Height: [1.4] pts: [1000] Costume: [66]\n                            set [bowser health v] to [5]\n                            set [mob state v] to [1]\n                            stop [this script v]\n                        end\n                        if <(id) = [17]> then\n                            // [bowser fire]\n                            STATS | speed: [0.2] dir: [-90] | Width: [0.3] Height: [0.2] pts: [0] Costume: [70]\n                            set [origin v] to (__PLAYER Y)\n                            set [mob state v] to [1]\n                            stop [this script v]\n                        end\n                        if <(id) = [18]> then\n                            set rotation style [all around v]\n                            // [fire bar]\n                            STATS | speed: [0] dir: [90] | Width: [2] Height: [0] pts: [0] Costume: [71]\n                        end\n                    else\n                        if <(id) < [22]> then\n                            if <(id) = [19]> then\n                                set rotation style [don't rotate v]\n                                // [piranha plant]\n                                STATS | speed: [0.05] dir: [90] | Width: [0.4] Height: [1.4] pts: [200] Costume: [83]\n                                set [timer v] to [9999]\n                                change [x v] by (-0.5)\n                                set [origin v] to (y)\n                                set [y v] to ((origin) - (2.1))\n                                go to [back v] layer\n                                set [mob state v] to [0]\n                                stop [this script v]\n                            end\n                            if <(id) = [20]> then\n                                set rotation style [don't rotate v]\n                                // [bluepiranha plant]\n                                STATS | speed: [0.05] dir: [90] | Width: [0.4] Height: [1.4] pts: [200] Costume: [94]\n                                set [timer v] to [9999]\n                                change [x v] by (-0.5)\n                                set [origin v] to (y)\n                                set [y v] to ((origin) - (2.1))\n                                go to [back v] layer\n                                set [mob state v] to [0]\n                                stop [this script v]\n                            end\n                            if <(id) = [21]> then\n                                set rotation style [don't rotate v]\n                                // [blooper]\n                                STATS | speed: [0.03] dir: [-90] | Width: [0.4] Height: [1] pts: [200] Costume: [95]\n                                set [y velocity v] to [0.2]\n                            end\n                        else\n                            if <(id) < [25]> then\n                                if <(id) = [22]> then\n                                    // [red cheep cheep]\n                                    STATS | speed: [0.05] dir: [-90] | Width: [0.4] Height: [0.8] pts: [100] Costume: [97]\n                                    stop [this script v]\n                                end\n                                if <(id) = [23]> then\n                                    // [grey cheep cheep]\n                                    STATS | speed: [0.03] dir: [-90] | Width: [0.4] Height: [0.8] pts: [100] Costume: [101]\n                                    stop [this script v]\n                                end\n                                if <(id) = [24]> then\n                                    // [flying cheep cheep spawner]\n                                    STATS | speed: [0] dir: [-90] | Width: [0.4] Height: [0.8] pts: [0] Costume: [105]\n                                    set [timer v] to (pick random (0) to (60))\n                                end\n                            else\n                                if <(id) < [28]> then\n                                    if <(id) = [25]> then\n                                        // [flying cheep cheep]\n                                        STATS | speed: (pick random (0.02) to (0.08)) dir: (((pick random (0) to (1)) * (180)) - (90)) | Width: [0.4] Height: [0.8] pts: [100] Costume: [97]\n                                        set [y velocity v] to (pick random (0.6) to (0.8))\n                                        stop [this script v]\n                                    end\n                                    if <(id) = [26]> then\n                                        // [bouncy koopa]\n                                        STATS | speed: [0.08] dir: [-90] | Width: [0.4] Height: [1.3] pts: [100] Costume: [107]\n                                        Check for Solid Block Spawn\n                                        stop [this script v]\n                                    end\n                                    if <(id) = [27]> then\n                                        // [fire bubble]\n                                        STATS | speed: [0.08] dir: [90] | Width: [0.4] Height: [0.8] pts: [0] Costume: [113]\n                                    end\n                                else\n                                    if <(id) < [31]> then\n                                        if <(id) = [28]> then\n                                            // [lakitu]\n                                            STATS | speed: [0.1] dir: [90] | Width: [0.4] Height: [0.8] pts: [800] Costume: [115]\n                                            Check for Solid Block Spawn\n                                            set [origin v] to (x)\n                                            stop [this script v]\n                                        end\n                                        if <(id) = [29]> then\n                                            // [spiny egg]\n                                            STATS | speed: [0] dir: [90] | Width: [0.4] Height: [0.8] pts: [100] Costume: [117]\n                                            set [y velocity v] to [0.4]\n                                            stop [this script v]\n                                        end\n                                        if <(id) = [30]> then\n                                            // [spiny]\n                                            STATS | speed: [0.06] dir: [player] | Width: [0.4] Height: [0.8] pts: [100] Costume: [118]\n                                            Check for Solid Block Spawn\n                                        end\n                                    else\n                                        if <(id) < [34]> then\n                                            if <(id) = [31]> then\n                                                // [buzzy beetle]\n                                                STATS | speed: [0.06] dir: [-90] | Width: [0.4] Height: [0.8] pts: [200] Costume: [122]\n                                                Check for Solid Block Spawn\n                                                stop [this script v]\n                                            end\n                                            if <(id) = [32]> then\n                                                // [buzzy beetle shell]\n                                                STATS | speed: [0.4] dir: (dir) | Width: [0.4] Height: [0.8] pts: [100] Costume: [126]\n                                                Check for Solid Block Spawn\n                                                stop [this script v]\n                                            end\n                                            if <(id) = [33]> then\n                                                // [blue beetle]\n                                                STATS | speed: [0.06] dir: [-90] | Width: [0.4] Height: [0.8] pts: [200] Costume: [130]\n                                                Check for Solid Block Spawn\n                                            end\n                                        else\n                                            if <(id) < [37]> then\n                                                if <(id) = [34]> then\n                                                    // [blue beetle shell]\n                                                    STATS | speed: [0.4] dir: (dir) | Width: [0.4] Height: [0.8] pts: [100] Costume: [134]\n                                                    Check for Solid Block Spawn\n                                                    stop [this script v]\n                                                end\n                                                if <(id) = [35]> then\n                                                    // [grey beetle]\n                                                    STATS | speed: [0.06] dir: [-90] | Width: [0.4] Height: [0.8] pts: [200] Costume: [138]\n                                                    Check for Solid Block Spawn\n                                                    stop [this script v]\n                                                end\n                                                if <(id) = [36]> then\n                                                    // [grey beetle shell]\n                                                    STATS | speed: [0.4] dir: (dir) | Width: [0.4] Height: [0.8] pts: [100] Costume: [142]\n                                                    Check for Solid Block Spawn\n                                                end\n                                            else\n                                                if <(id) < [40]> then\n                                                    if <(id) = [37]> then\n                                                        // [hammer bro]\n                                                        STATS | speed: [0.06] dir: [-90] | Width: [0.4] Height: [1.3] pts: [200] Costume: [146]\n                                                        Check for Solid Block Spawn\n                                                        stop [this script v]\n                                                    end\n                                                    if <(id) = [38]> then\n                                                        // [hammer bro blue theme]\n                                                        STATS | speed: [0.06] dir: [-90] | Width: [0.4] Height: [1.3] pts: [200] Costume: [152]\n                                                        Check for Solid Block Spawn\n                                                        stop [this script v]\n                                                    end\n                                                    if <(id) = [39]> then\n                                                        // [hammer]\n                                                        STATS | speed: (pick random (0.15) to (0.2)) dir: [player] | Width: [0.2] Height: [0.4] pts: [0] Costume: [158]\n                                                        set [y velocity v] to (pick random (0.350) to (0.400))\n                                                        set [mob state v] to [1]\n                                                    end\n                                                else\n                                                    if <(id) < [43]> then\n                                                        if <(id) = [40]> then\n                                                            set rotation style [don't rotate v]\n                                                            // [spawn]\n                                                            STATS | speed: [0] dir: [90] | Width: [0] Height: [0] pts: [0] Costume: [162]\n                                                            stop [this script v]\n                                                        end\n                                                        if <(id) = [41]> then\n                                                            set rotation style [don't rotate v]\n                                                            // [spawn]\n                                                            STATS | speed: [0] dir: [90] | Width: [0] Height: [0] pts: [0] Costume: [166]\n                                                            stop [this script v]\n                                                        end\n                                                        if <(id) = [42]> then\n                                                            // [bullet bill]\n                                                            STATS | speed: [0.08] dir: [player] | Width: [0.4] Height: [0.8] pts: [200] Costume: [170]\n                                                            if <(_EDITOR \(ON/OFF\)) = [0]> then\n                                                                set [issolid v] to [0]\n                                                                Get isSolid at X (x) Y (y)\n                                                                if <(isSolid) = [0]> then\n                                                                    set [mob state v] to [0]\n                                                                else\n                                                                    set [mob state v] to [1]\n                                                                end\n                                                            end\n                                                        end\n                                                    else\n                                                        if <(id) < [46]> then\n                                                            if <(id) = [43]> then\n                                                                set rotation style [don't rotate v]\n                                                                // [bill blaster]\n                                                                STATS | speed: [0] dir: [90] | Width: [0] Height: [0] pts: [0] Costume: [171]\n                                                                set [mob state v] to [1]\n                                                                stop [this script v]\n                                                            end\n                                                            if <(id) = [44]> then\n                                                                // [ grey goomba]\n                                                                STATS | speed: [0.08] dir: [-90] | Width: [0.4] Height: [0.8] pts: [100] Costume: [172]\n                                                                Check for Solid Block Spawn\n                                                                stop [this script v]\n                                                            end\n                                                            if <(id) = [45]> then\n                                                                // [spooky koopa]\n                                                                STATS | speed: [0.08] dir: [-90] | Width: [0.4] Height: [1.3] pts: [200] Costume: [177]\n                                                                Check for Solid Block Spawn\n                                                            end\n                                                        else\n                                                            if <(id) < [49]> then\n                                                                if <(id) = [46]> then\n                                                                    // [spooky koopa shell]\n                                                                    STATS | speed: [0] dir: (dir) | Width: [0.4] Height: [0.8] pts: [100] Costume: [10]\n                                                                    Check for Solid Block Spawn\n                                                                    stop [this script v]\n                                                                end\n                                                                if <(id) = [47]> then\n                                                                    // [bullet bill]\n                                                                    STATS | speed: [0.08] dir: [player] | Width: [0.4] Height: [0.8] pts: [200] Costume: [185]\n                                                                    if <(_EDITOR \(ON/OFF\)) = [0]> then\n                                                                        set [issolid v] to [0]\n                                                                        Get isSolid at X (x) Y (y)\n                                                                        if <(isSolid) = [0]> then\n                                                                            set [mob state v] to [0]\n                                                                        else\n                                                                            set [mob state v] to [1]\n                                                                        end\n                                                                    end\n                                                                    stop [this script v]\n                                                                end\n                                                                if <(id) = [48]> then\n                                                                    set rotation style [don't rotate v]\n                                                                    // [bill blaster]\n                                                                    STATS | speed: [0] dir: [90] | Width: [0] Height: [0] pts: [0] Costume: [171]\n                                                                    set [mob state v] to [1]\n                                                                end\n                                                            else\n                                                                if <(id) < [52]> then\n                                                                    if <(id) = [49]> then\n                                                                        // [vine]\n                                                                        STATS | speed: [0] dir: [90] | Width: [0.05] Height: [0.1] pts: [0] Costume: [186]\n                                                                        if <(_EDITOR \(ON/OFF\)) = [0]> then\n                                                                            Get isSolid at X (x) Y (y)\n                                                                            if <(isSolid) > [0]> then\n                                                                                start sound [dispense v]\n                                                                                set [mob state v] to [2]\n                                                                                change [y v] by (1)\n                                                                                hide\n                                                                            end\n                                                                        end\n                                                                        stop [this script v]\n                                                                    end\n                                                                    if <(id) = [50]> then\n                                                                    if <(id) = [51]> then\n                                                                end\n                                                            end\n                                                        end\n                                                    end\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Create Clones\nset [mob# v] to [51]\nrepeat (50)\n    create clone of (_myself_ v)\n    change [mob# v] by (-1)\nend\n\nwhen I receive [@spawn cycle v]\nif <(id) > []> then\n\ndefine _Tick Fireball\nif <(mob state) = [1]> then\n    set [isdangerous v] to [1]\n    change [_fireball# v] by (1)\n    change [x v] by ((speed) * ((dir) / ([abs v] of (dir) )))\n    set [issolid v] to [0]\n    Get isSolid at X ((x) + ((width) + (_EXTRASMALL))) Y ((y) + ((height) / (2)))\n    Get isSolid at X ((x) - ((width) + (_EXTRASMALL))) Y ((y) + ((height) / (2)))\n    if <(isSolid) > [0]> then\n        start sound [fireball hit v]\n        set [mob state v] to [3]\n        set [dir v] to [90]\n    else\n        change [in air v] by (1)\n        change [y velocity v] by (-0.03)\n        if <(y velocity) < [-0.99]> then\n            set [y velocity v] to [-0.99]\n        end\n        Change Y by (y velocity)\n        if <(in air) = [0]> then\n            set [y velocity v] to [0.2]\n        end\n        if <([abs v] of ((__PLAYER X) - (x)) ) > [15]> then\n            set [id v] to []\n        end\n    end\nend\nif <(y) < [-1]> then\n    set [id v] to []\nend\n\ndefine Platformer Physics\nset [x velocity v] to ((speed) * ((dir) / ([abs v] of (dir) )))\nif <([abs v] of (x velocity) ) > [0]> then\n    Change X by (x velocity)\nend\nchange [y velocity v] by (-0.04)\nif <(y velocity) < [-0.99]> then\n    set [y velocity v] to [-0.99]\nend\nif <([abs v] of (y velocity) ) > [0.04]> then\n    change [in air v] by (1)\n    Change Y by (y velocity)\nend\n\ndefine Stomped\nstart sound [smb_stomp v]\nset [__player y v] to ((y) + (height))\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nset [timer v] to [0]\nset [__player in air v] to [9999999]\nchange [__stomped enemies v] by (1)\nif <((mob points value) + (((__STOMPED ENEMIES) - (1)) * (100))) > [1000]> then\n    change [#score v] by (1000)\n    Particle | X: (x) Y: ((y) + (1)) Type: [10] Direction: [90]\nelse\n    change [#score v] by ((mob points value) + (((__STOMPED ENEMIES) - (1)) * (100)))\n    Particle | X: (x) Y: ((y) + (1)) Type: ([floor v] of (((mob points value) + (((__STOMPED ENEMIES) - (1)) * (100))) / (100)) ) Direction: [90]\nend\nif <(__STOMPED ENEMIES) = [8]> then\n    start sound [1 Up v]\n    change [#lives v] by (1)\nend\nbroadcast (Player Stomp v)\n\nwhen I receive [@bounced tile v]\nif <(id) > []> then\n    if <not <<<(id) = [28]> or <(id) = [29]>> or <(id) = [39]>>> then\n        if <(mob state) = [1]> then\n            Bumped - Tile: (x) ((y) - (0.2))\n            if <(idx) = (_BOUNCED TILE)> then\n                stop [this script v]\n            else\n                Bumped - Tile: ((x) + ((width) - (_EXTRASMALL))) ((y) - (0.2))\n                if <(idx) = (_BOUNCED TILE)> then\n                    stop [this script v]\n                else\n                    Bumped - Tile: ((x) - ((width) - (_EXTRASMALL))) ((y) - (0.2))\n                end\n            end\n        end\n    end\nend\n\ndefine _Tick Goomba\nif <(mob state) = [1]> then\n    Platformer Physics\n    if <(x velocity) = [0]> then\n        set [dir v] to ((0) - (dir))\n    end\n    Check For Danger Collisions\n    if <(isSolid) > [0]> then\n        Death by Projectile\n    end\n    if <(mob state) = [1]> then\n        Check for Player Collision\n        if <(isSolid) > [0]> then\n            if <(isSolid) = [1]> then\n                broadcast (Player Die v)\n            else\n                if <(isSolid) = [2]> then\n                    set [mob state v] to [3]\n                    Stomped\n                end\n            end\n        end\n    end\nend\nif <(y) < [-1]> then\n    set [id v] to []\nend\n\ndefine _Tick Koopa\nif <(mob state) = [1]> then\n    Platformer Physics\n    if <(x velocity) = [0]> then\n        set [dir v] to ((0) - (dir))\n    end\n    Check For Danger Collisions\n    if <(isSolid) > [0]> then\n        Death by Projectile\n    end\n    if <(mob state) = [1]> then\n        Check for Player Collision\n        if <(isSolid) > [0]> then\n            if <(isSolid) = [1]> then\n                broadcast (Player Die v)\n            else\n                if <(isSolid) = [2]> then\n                    // [koopa troopa becomes shell]\n                    Stomped\n                    change [id v] by (1)\n                    Init Mob\n                end\n            end\n        end\n    end\nend\nif <(y) < [-1]> then\n    set [id v] to []\nend\n\ndefine _Tick Koopa Shell\nif <(mob state) = [1]> then\n    Platformer Physics\n    if <([abs v] of (speed) ) > [0]> then\n        if <(x velocity) = [0]> then\n            set [dir v] to ((0) - (dir))\n        end\n    end\n    Check For Danger Collisions\n    if <(speed) = [0]> then\n        set [isdangerous v] to [0]\n        if <(isSolid) > [0]> then\n            Death by Projectile\n        end\n    else\n        set [isdangerous v] to [1]\n        if <(isSolid) > [0]> then\n            if <<(projectile collision id) = [8]> or <(projectile collision id) > [1000000]>> then\n                Death by Projectile\n            end\n        end\n    end\n    if <(mob state) = [1]> then\n        Check for Player Collision\n        if <(isSolid) > [0]> then\n            if <(isSolid) = [1]> then\n                if <(speed) > [0]> then\n                    broadcast (Player Die v)\n                else\n                    STATS | speed: [0.4] dir: [player] | Width: (width) Height: (height) pts: [100] Costume: []\n                    set [dir v] to ((0) - (dir))\n                    change [x v] by ((0.6) * ((dir) / ([abs v] of (dir) )))\n                    start sound [smb_stomp v]\n                end\n            else\n                if <(isSolid) = [2]> then\n                    if <([abs v] of (speed) ) > [0]> then\n                        // [koopa shell stops]\n                        STATS | speed: [0] dir: [player] | Width: (width) Height: (height) pts: [100] Costume: []\n                        set [dir v] to ((0) - (dir))\n                    else\n                        // [koopa shell starts moving when jumped on]\n                        STATS | speed: [0.4] dir: [player] | Width: (width) Height: (height) pts: [100] Costume: []\n                        set [dir v] to ((0) - (dir))\n                    end\n                    Stomped\n                end\n            end\n        end\n    end\nend\nif <(y) < [-1]> then\n    set [id v] to []\nend\n\ndefine _Tick Magic Mushroom\nif <(mob state) = [1]> then\n    Platformer Physics\n    if <(x velocity) = [0]> then\n        set [dir v] to ((0) - (dir))\n    end\n    if <(__PLAYER MODE) > []> then\n        Check for Player Collision\n        if <(isSolid) > [0]> then\n            broadcast (POWER UP v)\n            set [id v] to []\n            Particle | X: (x) Y: ((y) + (1)) Type: ([floor v] of ((mob points value) / (100)) ) Direction: [90]\n            change [#score v] by (mob points value)\n        end\n    end\nend\nif <(y) < [-1]> then\n    set [id v] to []\nend\n\ndefine _Tick 1Up\nif <(mob state) = [1]> then\n    Platformer Physics\n    if <(x velocity) = [0]> then\n        set [dir v] to ((0) - (dir))\n    end\n    Check for Player Collision\n    if <(isSolid) > [0]> then\n        start sound [1 Up v]\n        change [#lives v] by (1)\n        set [id v] to []\n    end\nend\nif <(y) < [-1]> then\n    set [id v] to []\nend\n\ndefine _Tick Fire Flower\nif <(mob state) = [1]> then\n    Check for Player Collision\n    if <(isSolid) > [0]> then\n        broadcast (POWER UP v)\n        set [id v] to []\n        Particle | X: (x) Y: ((y) + (1)) Type: ([floor v] of ((mob points value) / (100)) ) Direction: [90]\n        change [#score v] by (mob points value)\n    end\nend\n\ndefine _Tick Starman\nif <(mob state) = [1]> then\n    Platformer Physics\n    if <(x velocity) = [0]> then\n        set [dir v] to ((0) - (dir))\n    end\n    if <(in air) = [0]> then\n        set [y velocity v] to [0.4]\n        set [in air v] to [999999999]\n    end\n    Check for Player Collision\n    if <(isSolid) > [0]> then\n        set [_starman timer v] to [0]\n        set [__player mode v] to [3]\n        set [_music v] to [4]\n        set [id v] to []\n        stop all sounds\n    end\nend\nif <(y) < [-1]> then\n    set [id v] to []\nend\n\ndefine Check for Solid Block Spawn\nif <(_EDITOR \(ON/OFF\)) = [0]> then\n    set [issolid v] to [0]\n    Get isSolid at X ((x) + ((width) - (_EXTRASMALL))) Y ((y) + ((height) - (_EXTRASMALL)))\n    Get isSolid at X ((x) - ((width) - (_EXTRASMALL))) Y ((y) + ((height) - (_EXTRASMALL)))\n    Get isSolid at X ((x) + ((width) - (_EXTRASMALL))) Y ((y) + (_EXTRASMALL))\n    Get isSolid at X ((x) - ((width) - (_EXTRASMALL))) Y ((y) + (_EXTRASMALL))\n    if <(isSolid) > [0]> then\n        go to [back v] layer\n        go [forward v] (5) layers\n        start sound [dispense v]\n        set [mob state v] to [2]\n        hide\n    else\n        go to [front v] layer\n        show\n    end\nend\n\ndefine _Tick Smart Koopa\nif <(mob state) = [1]> then\n    _Tick Koopa\n    if <(in air) = [0]> then\n        set [issolid v] to [0]\n        Get isSolid at X ((x) + ((0.5) * ((dir) / ([abs v] of (dir) )))) Y ((y) + (-0.5))\n        if <(isSolid) = [0]> then\n            set [dir v] to ((0) - (dir))\n        end\n    end\nend\nif <(y) < [-1]> then\n    set [id v] to []\nend\n\ndefine _Tick Flying Koopa\nif <(mob state) = [1]> then\n    set [in air v] to [9999999]\n    set [y v] to ((origin) + (([sin v] of (((_IN GAME TIMER) + ((x) * (8))) * (4)) ) * (2)))\n    Check For Danger Collisions\n    if <(isSolid) > [0]> then\n        Death by Projectile\n    end\n    if <(mob state) = [1]> then\n        Check for Player Collision\n        if <(isSolid) > [0]> then\n            if <(isSolid) = [1]> then\n                broadcast (Player Die v)\n            else\n                if <(isSolid) = [2]> then\n                    set [id v] to [13]\n                    Init Mob\n                    Stomped\n                end\n            end\n        end\n    end\nend\nif <(y) < [-1]> then\n    set [id v] to []\nend\n\ndefine _Tick Fake Bowser\nif <(mob state) = [1]> then\n    Platformer Physics\n    Check For Danger Collisions\n    if <(isSolid) > [0]> then\n        if <(projectile collision id) = [8]> then\n            change [bowser health v] by (-1)\n            if <(bowser health) < [1]> then\n                Death by Projectile\n            end\n        else\n            Death by Projectile\n        end\n    end\n    if <(mob state) = [1]> then\n        Check for Player Collision\n        if <(isSolid) > [0]> then\n            broadcast (Player Die v)\n        end\n        if <(in air) = [0]> then\n            if <([abs v] of ((x) - (__PLAYER X)) ) < [15]> then\n                if <(pick random (1) to (25)) = [1]> then\n                    set [speed v] to (pick random (1) to (3))\n                    if <(speed) = [1]> then\n                        set [speed v] to [-0.07]\n                    else\n                        if <(speed) = [2]> then\n                            set [speed v] to [0]\n                        else\n                            if <(speed) = [3]> then\n                                set [speed v] to [0.07]\n                            end\n                        end\n                    end\n                    Jump Intelligently | Height: [0.35]\n                else\n                    if <(pick random (1) to (30)) = [1]> then\n                        set [speed v] to (pick random (1) to (3))\n                        if <(speed) = [1]> then\n                            set [speed v] to [-0.07]\n                        else\n                            if <(speed) = [2]> then\n                                set [speed v] to [0]\n                            else\n                                if <(speed) = [3]> then\n                                    set [speed v] to [0.07]\n                                end\n                            end\n                        end\n                    end\n                    if <([abs v] of (speed) ) > [0]> then\n                        set [issolid v] to [0]\n                        Get isSolid at X ((x) + ((0.4) * (((speed) / ([abs v] of (speed) )) * ((dir) / ([abs v] of (dir) ))))) Y ((y) - (0.5))\n                        if <(isSolid) = [0]> then\n                            set [speed v] to ((0) - (speed))\n                        end\n                    end\n                end\n            end\n        end\n        if <([abs v] of ((x) - (__PLAYER X)) ) < [38]> then\n            change [timer v] by (1)\n            if <<(timer) = [60]> or <(timer) = [110]>> then\n                start sound [Bowser Fire v]\n                Spawn Mob | X: ((x) + ((1) * ((dir) / ([abs v] of (dir) )))) Y: ((y) + (0.8)) Type: [17]\n            end\n            if <(timer) > [150]> then\n                set [timer v] to [0]\n            end\n        end\n    end\nend\nif <(y) < [-1]> then\n    set [id v] to []\nend\n\ndefine Spawn Mob | X: (x) Y: (y) Type: (id)\nadd (x) to [@mob spawns v]\nadd (y) to [@mob spawns v]\nadd (id) to [@mob spawns v]\n\ndefine _Tick Bowser Fire\nCheck for Player Collision\nif <(isSolid) > [0]> then\n    broadcast (Player Die v)\nend\nchange [x v] by ((speed) * ((dir) / ([abs v] of (dir) )))\nif <(origin) > ((y) + (0.06))> then\n    change [y v] by (0.09)\nelse\n    if <(origin) < ((y) - (0.06))> then\n        change [y v] by (-0.09)\n    end\nend\nif <([abs v] of ((__PLAYER X) - (x)) ) > [45]> then\n    set [id v] to []\nend\n\ndefine _Tick Fire Bar\nset [dir v] to ([floor v] of ((((_IN GAME TIMER) + (((x) + (y)) * (6))) * (5)) mod (360)) )\nif <([abs v] of ((__PLAYER X) - ((x) + (([sin v] of (dir) ) * (1.7)))) ) < ((0.2) + ([width v] of [player v]))> then\n    if <([abs v] of (((__PLAYER Y) + (([height v] of [player v]) / (2))) - ((y) + (([cos v] of (dir) ) * (1.7)))) ) < ((0.2) + (([height v] of [player v]) / (2)))> then\n        broadcast (Player Die v)\n        stop [this script v]\n    end\nend\nif <([abs v] of ((__PLAYER X) - ((x) + ([sin v] of (dir) ))) ) < ((0.2) + ([width v] of [player v]))> then\n    if <([abs v] of (((__PLAYER Y) + (([height v] of [player v]) / (2))) - ((y) + ([cos v] of (dir) ))) ) < ((0.2) + (([height v] of [player v]) / (2)))> then\n        broadcast (Player Die v)\n        stop [this script v]\n    end\nend\nif <([abs v] of ((__PLAYER X) - ((x) + (([sin v] of (dir) ) * (0.5)))) ) < ((0.2) + ([width v] of [player v]))> then\n    if <([abs v] of (((__PLAYER Y) + (([height v] of [player v]) / (2))) - ((y) + (([cos v] of (dir) ) * (0.5)))) ) < ((0.2) + (([height v] of [player v]) / (2)))> then\n        broadcast (Player Die v)\n        stop [this script v]\n    end\nend\n\ndefine _Tick Piranha Plant\nif <(mob state) = [1]> then\n    go to [back v] layer\n    Check For Danger Collisions\n    if <(isSolid) > [0]> then\n        Particle | X: (x) Y: ((y) + (1)) Type: ([floor v] of ((mob points value) / (100)) ) Direction: [90]\n        change [#score v] by (mob points value)\n        set [id v] to []\n        stop [this script v]\n    end\n    if <(y) > ((origin) - (1))> then\n        Check for Player Collision\n        if <(isSolid) > [0]> then\n            broadcast (Player Die v)\n        end\n    end\n    if <(y) > (origin)> then\n        change [timer v] by (1)\n        set [speed v] to [0]\n        if <(timer) > [15]> then\n            set [speed v] to [-0.06]\n            set [y v] to (origin)\n            set [timer v] to [0]\n        end\n    else\n        if <(y) < ((origin) - (2))> then\n            set [speed v] to [0]\n            change [timer v] by (1)\n            if <(timer) > [35]> then\n                if <not <<((__PLAYER Y) - (y)) < [4]> and <([abs v] of ((__PLAYER X) - (x)) ) < ((1.05) + ([width v] of [player v]))>>> then\n                    set [speed v] to [0.06]\n                    set [y v] to ((origin) - (2))\n                    set [timer v] to [0]\n                end\n            end\n        end\n    end\n    change [y v] by (speed)\nend\n\ndefine _Tick Blooper\nif <(mob state) = [1]> then\n    change [y velocity v] by (-0.005)\n    change [x v] by ((speed) * ((dir) / ([abs v] of (dir) )))\n    if <(y velocity) < [-0.04]> then\n        if <(__PLAYER Y) > ((y) - (2))> then\n            if <not <(item (item ((((x) * (_MAP HEIGHT)) + ((y) + (1))) + (1)) of [#tile grid v]) of [#tile shape v]) = []>> then\n                set [y velocity v] to [0.2]\n                if <(__PLAYER X) > (x)> then\n                    set [dir v] to [90]\n                else\n                    set [dir v] to [-90]\n                end\n            end\n        end\n    end\n    change [y v] by (y velocity)\n    Check For Danger Collisions\n    if <(isSolid) > [0]> then\n        Death by Projectile\n    end\n    if <(mob state) = [1]> then\n        Check for Player Collision\n        if <(isSolid) > [0]> then\n            broadcast (Player Die v)\n        end\n    end\nend\n\ndefine _Tick Fish Cheep Cheep\nif <(mob state) = [1]> then\n    change [x v] by ((speed) * ((dir) / ([abs v] of (dir) )))\n    change [y v] by (0.005)\n    Check For Danger Collisions\n    if <(isSolid) > [0]> then\n        Death by Projectile\n    end\n    if <(mob state) = [1]> then\n        Check for Player Collision\n        if <(isSolid) > [0]> then\n            broadcast (Player Die v)\n        end\n    end\nend\n\ndefine _Tick Cheep Cheep Spawner\nif <([abs v] of ((x) - (__PLAYER X)) ) < [8]> then\n    change [timer v] by (1)\n    if <(timer) > (pick random (30) to (220))> then\n        set [timer v] to [0]\n        Spawn Mob | X: ((x) + (pick random (-2) to (2))) Y: [-1] Type: [25]\n    end\nend\n\ndefine _Tick Flying Cheep Cheep\nif <(mob state) = [1]> then\n    set [in air v] to [9999999]\n    Check For Danger Collisions\n    if <(isSolid) > [0]> then\n        Death by Projectile\n    end\n    if <(mob state) = [1]> then\n        Check for Player Collision\n        if <(isSolid) > [0]> then\n            if <(isSolid) = [1]> then\n                broadcast (Player Die v)\n            else\n                if <(isSolid) = [2]> then\n                    set [mob state v] to [4]\n                    Stomped\n                end\n            end\n        end\n        change [y v] by (y velocity)\n        change [x v] by ((speed) * ((dir) / ([abs v] of (dir) )))\n        change [y velocity v] by (-0.02)\n    end\nend\nif <(y) < [-1]> then\n    set [id v] to []\nend\n\nwhen I receive [_begin level v]\nif <(mob#) = [1]> then\n    Spawn All Mobs in Level\nend\n\ndefine Spawn All Mobs in Level\nif <(_EDITOR \(ON/OFF\)) = [0]> then\n    set [idx v] to [0]\n    repeat (length of [@mob grid v])\n        change [idx v] by (1)\n        if <(item (idx) of [#tile grid v]) = [148]> then\n            Spawn Mob | X: (([floor v] of (((idx) - (1)) / (_MAP HEIGHT)) ) + (0.5)) Y: (((idx) - (1)) - ((_MAP HEIGHT) * ([floor v] of (((idx) - (1)) / (_MAP HEIGHT)) ))) Type: [43]\n        else\n            if <(item (idx) of [#tile grid v]) = [187]> then\n                Spawn Mob | X: (([floor v] of (((idx) - (1)) / (_MAP HEIGHT)) ) + (0.5)) Y: (((idx) - (1)) - ((_MAP HEIGHT) * ([floor v] of (((idx) - (1)) / (_MAP HEIGHT)) ))) Type: [48]\n            else\n                set [temp v] to (item (idx) of [@mob grid v])\n                if <(temp) > [0]> then\n                    if <<<<<(temp) = [8]> or <(temp) = [17]>> or <(temp) = [18]>> or <(temp) = [27]>> or <<(item (item (idx) of [#tile grid v]) of [#tile shape v]) = []> or <(item (item (idx) of [#tile grid v]) of [#tile shape v]) = [~]>>> then\n                        if <not <<<(temp) = [6]> or <(temp) = [40]>> or <(temp) = [41]>>> then\n                            Spawn Mob | X: (([floor v] of (((idx) - (1)) / (_MAP HEIGHT)) ) + (0.5)) Y: (((idx) - (1)) - ((_MAP HEIGHT) * ([floor v] of (((idx) - (1)) / (_MAP HEIGHT)) ))) Type: (item (idx) of [@mob grid v])\n                            replace item (idx) of [@mob grid v] with [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine _Tick Bouncy Koopa\nif <(mob state) = [1]> then\n    Platformer Physics\n    if <(x velocity) = [0]> then\n        set [dir v] to ((0) - (dir))\n    end\n    if <(in air) = [0]> then\n        set [y velocity v] to [0.4]\n        set [in air v] to [999999999]\n    end\n    Check For Danger Collisions\n    if <(isSolid) > [0]> then\n        Death by Projectile\n    end\n    if <(mob state) = [1]> then\n        Check for Player Collision\n        if <(isSolid) > [0]> then\n            if <(isSolid) = [1]> then\n                broadcast (Player Die v)\n            else\n                if <(isSolid) = [2]> then\n                    set [id v] to [2]\n                    set [temp v] to (dir)\n                    Init Mob\n                    set [dir v] to (temp)\n                    set [y velocity v] to [0]\n                    Stomped\n                end\n            end\n        end\n    end\nend\nif <(y) < [-1]> then\n    set [id v] to []\nend\n\ndefine Particle | X: (x) Y: (y) Type: (id) Direction: (dir)\nadd (x) to [_spawn particles v]\nadd (y) to [_spawn particles v]\nadd (id) to [_spawn particles v]\nadd (dir) to [_spawn particles v]\n\nwhen I receive [_create clones v]\nset [id v] to []\nCreate Clones\nhide\n\nwhen I receive [_delete clones v]\nhide\ndelete this clone\n\ndefine _Tick Fire Bubble\nif <(mob state) = [1]> then\n    Check for Player Collision\n    if <(isSolid) > [0]> then\n        broadcast (Player Die v)\n    end\n    set [y velocity v] to (y)\n    set [y v] to (([sin v] of (((_IN GAME TIMER) + (x)) * (4)) ) * (8))\n    set [y velocity v] to ((y) - (y velocity))\nend\n\ndefine _Tick Lakitu\nif <(mob state) = [1]> then\n    Check For Danger Collisions\n    if <(isSolid) > [0]> then\n        Death by Projectile\n    end\n    if <(mob state) = [1]> then\n        Check for Player Collision\n        if <(isSolid) > [0]> then\n            if <(isSolid) = [1]> then\n                broadcast (Player Die v)\n            else\n                if <(isSolid) = [2]> then\n                    Stomped\n                    set rotation style [all around v]\n                    set [dir v] to [-90]\n                    set [mob state v] to [4]\n                end\n            end\n        end\n        change [timer v] by (1)\n        if <(timer) > [80]> then\n            set [timer v] to [0]\n            Spawn Mob | X: (x) Y: ((y) + (1)) Type: [29]\n        end\n        change [x v] by (((origin) - (x)) / (25))\n        if <([abs v] of ((origin) - (x)) ) < [1.5]> then\n            set [origin v] to ((__PLAYER X) + (pick random (-2) to (8)))\n            if <(origin) > ((_MAP WIDTH) - (35))> then\n                set [origin v] to (((_MAP WIDTH) - (35)) + (pick random (-6) to (4)))\n            end\n        end\n    end\nend\n\ndefine _Tick Spiny Egg\nif <(mob state) = [1]> then\n    Platformer Physics\n    if <(mob state) = [1]> then\n        if <(in air) = [0]> then\n            set [id v] to [30]\n            Init Mob\n            stop [this script v]\n        end\n        Check for Player Collision\n        if <(isSolid) > [0]> then\n            broadcast (Player Die v)\n        end\n    end\nend\nif <(y) < [-1]> then\n    set [id v] to []\nend\n\ndefine _Tick Spiny\nif <(mob state) = [1]> then\n    Platformer Physics\n    if <(x velocity) = [0]> then\n        set [dir v] to ((0) - (dir))\n    end\n    Check For Danger Collisions\n    if <(isSolid) > [0]> then\n        Death by Projectile\n    end\n    if <(mob state) = [1]> then\n        Check for Player Collision\n        if <(isSolid) > [0]> then\n            broadcast (Player Die v)\n        end\n    end\nend\nif <(y) < [-1]> then\n    set [id v] to []\nend\n\ndefine Death by Projectile\nreplace item ((idx) + (5)) of [@mob dangers v] with [0]\nset rotation style [all around v]\nset [dir v] to [-90]\nset [mob state v] to [4]\nset [x velocity v] to [0]\nset [y velocity v] to [0.23]\nParticle | X: (x) Y: ((y) + (1)) Type: ([floor v] of ((mob points value) / (100)) ) Direction: [90]\nchange [#score v] by (mob points value)\n\ndefine _Tick Buzzy Beetle\nif <(mob state) = [1]> then\n    Platformer Physics\n    if <(x velocity) = [0]> then\n        set [dir v] to ((0) - (dir))\n    end\n    Check For Danger Collisions\n    if <(isSolid) > [0]> then\n        if <not <(projectile collision id) = [8]>> then\n            Death by Projectile\n        end\n    end\n    if <(mob state) = [1]> then\n        Check for Player Collision\n        if <(isSolid) > [0]> then\n            if <(isSolid) = [1]> then\n                broadcast (Player Die v)\n            else\n                if <(isSolid) = [2]> then\n                    // [buzzy beetle becomes shell]\n                    Stomped\n                    change [id v] by (1)\n                    if <(__PLAYER X) > (x)> then\n                        set [dir v] to [-90]\n                    else\n                        set [dir v] to [90]\n                    end\n                    Init Mob\n                end\n            end\n        end\n        if <(in air) = [0]> then\n            set [issolid v] to [0]\n            Get isSolid at X (x) Y ((y) + (-0.5))\n            if <(isSolid) = [0]> then\n                set [dir v] to ((0) - (dir))\n            end\n        end\n    end\nend\nif <(y) < [-1]> then\n    set [id v] to []\nend\n\ndefine _Tick Buzzy Shell\nif <(mob state) = [1]> then\n    Platformer Physics\n    if <([abs v] of (speed) ) > [0]> then\n        set [isdangerous v] to [1]\n        if <(x velocity) = [0]> then\n            set [dir v] to ((0) - (dir))\n        end\n    else\n        set [isdangerous v] to [0]\n    end\n    Check For Danger Collisions\n    if <(isSolid) > [0]> then\n        if <([abs v] of (speed) ) > [0]> then\n            if <not <(projectile collision id) = [8]>> then\n                Death by Projectile\n            end\n        else\n            if <(projectile collision id) > [1000000]> then\n                Death by Projectile\n            end\n        end\n    end\n    if <(mob state) = [1]> then\n        Check for Player Collision\n        if <(isSolid) > [0]> then\n            if <(isSolid) = [1]> then\n                if <(speed) > [0]> then\n                    broadcast (Player Die v)\n                else\n                    STATS | speed: [0.4] dir: [player] | Width: (width) Height: (height) pts: [100] Costume: []\n                    set [dir v] to ((0) - (dir))\n                    change [x v] by ((0.6) * ((dir) / ([abs v] of (dir) )))\n                    start sound [smb_stomp v]\n                end\n            else\n                if <(isSolid) = [2]> then\n                    if <([abs v] of (speed) ) > [0]> then\n                        // [shell stops]\n                        STATS | speed: [0] dir: [player] | Width: (width) Height: (height) pts: [100] Costume: []\n                        set [dir v] to ((0) - (dir))\n                    else\n                        // [shell starts moving when jumped on]\n                        STATS | speed: [0.4] dir: [player] | Width: (width) Height: (height) pts: [100] Costume: []\n                        set [dir v] to ((0) - (dir))\n                    end\n                    Stomped\n                end\n            end\n        end\n    end\nend\nif <(y) < [-1]> then\n    set [id v] to []\nend\n\ndefine Bumped - Tile: (x) (y)\nset [idx v] to (((([floor v] of (x) ) * (_MAP HEIGHT)) + ([floor v] of (y) )) + (1))\nif <(idx) = (_BOUNCED TILE)> then\n    if <<<(id) = [4]> or <(id) = [5]>> or <(id) = [30]>> then\n        if <(x) > (([floor v] of (x) ) + (0.5))> then\n            set [dir v] to [90]\n        else\n            set [dir v] to [-90]\n        end\n    else\n        set rotation style [all around v]\n        set [dir v] to [-90]\n        set [mob state v] to [4]\n        set [x velocity v] to [0]\n    end\n    set [y velocity v] to [0.23]\nend\n\ndefine _Tick Hammer Bro\nif <(mob state) = [1]> then\n    set [x velocity v] to ((speed) * ((dir) / ([abs v] of (dir) )))\n    change [y velocity v] by (-0.04)\n    if <(y velocity) < [-0.99]> then\n        set [y velocity v] to [-0.99]\n    end\n    set [issolid v] to [0]\n    if <([abs v] of (y velocity) ) > [0.04]> then\n        change [in air v] by (1)\n        if <(y velocity) > [0]> then\n            Get isSolid at X ((x) + (-1)) Y ((y) + ((height) + (1.5)))\n            Get isSolid at X (x) Y ((y) + ((height) + (1.5)))\n            Get isSolid at X ((x) + (1)) Y ((y) + ((height) + (1.5)))\n            if <(isSolid) = [0]> then\n                change [y v] by (y velocity)\n                if <([abs v] of (x velocity) ) > [0]> then\n                    change [x v] by (x velocity)\n                end\n            else\n                Change Y by (y velocity)\n                if <([abs v] of (x velocity) ) > [0]> then\n                    Change X by (x velocity)\n                end\n            end\n        else\n            Get isSolid at X ((x) + ((width) - (_EXTRASMALL))) Y ((y) + ((height) - (_EXTRASMALL)))\n            Get isSolid at X ((x) - ((width) - (_EXTRASMALL))) Y ((y) + ((height) - (_EXTRASMALL)))\n            Get isSolid at X ((x) + ((width) - (_EXTRASMALL))) Y ((y) + ((height) / (2)))\n            Get isSolid at X ((x) - ((width) - (_EXTRASMALL))) Y ((y) + ((height) / (2)))\n            Get isSolid at X ((x) + ((width) - (_EXTRASMALL))) Y ((y) + (_EXTRASMALL))\n            Get isSolid at X ((x) - ((width) - (_EXTRASMALL))) Y ((y) + (_EXTRASMALL))\n            if <(isSolid) = [0]> then\n                Change Y by (y velocity)\n                if <([abs v] of (x velocity) ) > [0]> then\n                    Change X by (x velocity)\n                end\n            else\n                change [y v] by (y velocity)\n                if <([abs v] of (x velocity) ) > [0]> then\n                    change [x v] by (x velocity)\n                end\n            end\n        end\n    end\n    change [timer v] by (1)\n    if <(timer) > [30]> then\n        set [speed v] to ((0) - (speed))\n        set [timer v] to [0]\n    end\n    if <(in air) = [0]> then\n        if <(__PLAYER X) > (x)> then\n            set [dir v] to [90]\n        else\n            set [dir v] to [-90]\n        end\n        if <(speed) = [0]> then\n            set [speed v] to [0.06]\n        end\n        set [issolid v] to [0]\n        Get isSolid at X ((x) + (((width) * ((speed) / ([abs v] of (speed) ))) * ((dir) / ([abs v] of (dir) )))) Y ((y) + (-0.5))\n        if <(isSolid) = [0]> then\n            set [speed v] to ((0) - (speed))\n            set [timer v] to [0]\n        end\n        if <([abs v] of ((x) - (__PLAYER X)) ) < [10]> then\n            if <<([floor v] of ((_IN GAME TIMER) mod (140)) ) > [49]> and <([floor v] of ((_IN GAME TIMER) mod (140)) ) < [91]>> then\n                if <([floor v] of ((_IN GAME TIMER) mod (11)) ) > [9]> then\n                    Spawn Mob | X: (x) Y: ((y) + (height)) Type: [39]\n                end\n            end\n        end\n        if <([floor v] of ((_IN GAME TIMER) mod (140)) ) > [138]> then\n            if <(pick random (1) to (2)) = [1]> then\n                Jump Intelligently | Height: [0.6]\n            else\n                set [issolid v] to [0]\n                Get isSolid at X ((x) + (-1)) Y ((y) - (1.5))\n                Get isSolid at X (x) Y ((y) - (1.5))\n                Get isSolid at X ((x) + (1)) Y ((y) - (1.5))\n                if <(isSolid) = [0]> then\n                    set [y velocity v] to [-0.01]\n                    change [y v] by (-0.06)\n                else\n                    Jump Intelligently | Height: [0.6]\n                end\n            end\n        end\n    end\n    Check For Danger Collisions\n    if <(isSolid) > [0]> then\n        Death by Projectile\n    end\n    if <(mob state) = [1]> then\n        Check for Player Collision\n        if <(isSolid) > [0]> then\n            if <(isSolid) = [1]> then\n                broadcast (Player Die v)\n            else\n                if <(isSolid) = [2]> then\n                    set rotation style [all around v]\n                    set [dir v] to [-90]\n                    set [mob state v] to [4]\n                    Stomped\n                end\n            end\n        end\n    end\nend\nif <(y) < [-1]> then\n    set [id v] to []\nend\n\ndefine Jump Intelligently | Height: (height)\nset [y velocity v] to (height)\nset [in air v] to [9999999]\nif <([abs v] of (speed) ) > [0]> then\n    set [issolid v] to [0]\n    Get isSolid at X ((x) + ((1.2) * (((speed) / ([abs v] of (speed) )) * ((dir) / ([abs v] of (dir) ))))) Y ((y) - (0.5))\n    if <(isSolid) = [0]> then\n        set [speed v] to ((0) - (speed))\n        set [issolid v] to [0]\n        Get isSolid at X ((x) + ((1.2) * (((speed) / ([abs v] of (speed) )) * ((dir) / ([abs v] of (dir) ))))) Y ((y) - (0.5))\n        if <(isSolid) = [0]> then\n            set [speed v] to [0]\n        end\n    else\n        set [issolid v] to [0]\n        Get isSolid at X ((x) + ((1) * (((speed) / ([abs v] of (speed) )) * ((dir) / ([abs v] of (dir) ))))) Y ((y) + (0.5))\n        Get isSolid at X ((x) + ((2) * (((speed) / ([abs v] of (speed) )) * ((dir) / ([abs v] of (dir) ))))) Y ((y) + (0.5))\n        Get isSolid at X ((x) + ((3) * (((speed) / ([abs v] of (speed) )) * ((dir) / ([abs v] of (dir) ))))) Y ((y) + (0.5))\n        if <(isSolid) > [0]> then\n            set [speed v] to ((0) - (speed))\n            set [issolid v] to [0]\n            Get isSolid at X ((x) + ((1) * (((speed) / ([abs v] of (speed) )) * ((dir) / ([abs v] of (dir) ))))) Y ((y) + (0.5))\n            Get isSolid at X ((x) + ((2) * (((speed) / ([abs v] of (speed) )) * ((dir) / ([abs v] of (dir) ))))) Y ((y) + (0.5))\n            Get isSolid at X ((x) + ((3) * (((speed) / ([abs v] of (speed) )) * ((dir) / ([abs v] of (dir) ))))) Y ((y) + (0.5))\n            if <(isSolid) > [0]> then\n                set [speed v] to [0]\n            end\n        end\n    end\nend\n\ndefine _Tick Hammer\nchange [y velocity v] by (-0.04)\nif <(y velocity) < [-0.99]> then\n    set [y velocity v] to [-0.99]\nend\nchange [y v] by (y velocity)\nchange [x v] by ((speed) * ((dir) / ([abs v] of (dir) )))\nCheck for Player Collision\nif <(isSolid) > [0]> then\n    broadcast (Player Die v)\nend\nif <(y) < [-1]> then\n    set [id v] to []\nend\n\nwhen I receive [_layer2 v]\nif <<(id) = [19]> or <(id) = [20]>> then\n    go to [back v] layer\nelse\n    go to [front v] layer\nend\n\ndefine _Tick Bullet Bill\nif <(mob state) = [1]> then\n    Check For Danger Collisions\n    if <(isSolid) > [0]> then\n        Death by Projectile\n    end\n    if <(mob state) = [1]> then\n        change [x v] by ((speed) * ((dir) / ([abs v] of (dir) )))\n        Check for Player Collision\n        if <(isSolid) = [1]> then\n            broadcast (Player Die v)\n        else\n            if <(isSolid) = [2]> then\n                set rotation style [all around v]\n                set [dir v] to [-90]\n                set [mob state v] to [4]\n                Stomped\n            end\n        end\n    end\nend\n\ndefine _Tick Bill Blaster (bullet)\nset [costume v] to [171]\nchange [timer v] by (1)\nif <(timer) > [80]> then\n    if <([abs v] of ((x) - (__PLAYER X)) ) < [20]> then\n        if <([abs v] of ((y) - (__PLAYER Y)) ) < [16]> then\n            if <([abs v] of ((x) - (__PLAYER X)) ) > [2.5]> then\n                set [temp v] to (item (((([floor v] of (x) ) * (_MAP HEIGHT)) + ([floor v] of (y) )) + (1)) of [@mob grid v])\n                if <(temp) > [0]> then\n                    Spawn Mob | X: ((x) + (((__PLAYER X) - (x)) / ([abs v] of ((__PLAYER X) - (x)) ))) Y: (y) Type: (temp)\n                else\n                    Spawn Mob | X: ((x) + ((0.4) * (((__PLAYER X) - (x)) / ([abs v] of ((__PLAYER X) - (x)) )))) Y: (y) Type: (bullet)\n                end\n            end\n        end\n    end\n    set [timer v] to [-135]\nend\n\ndefine _Tick Vine\nset [costume v] to [171]\nchange [timer v] by (1)\nif <(timer) > [5]> then\n    set [issolid v] to [0]\n    Get isSolid at X (x) Y (y)\n    if <<(isSolid) = [0]> and <not <(y) > (_MAP HEIGHT)>>> then\n        replace item (idx) of [#tile grid v] with [192]\n        change [y v] by (1)\n    else\n        set [id v] to []\n    end\n    set [timer v] to [0]\nend\n\nwhen I receive [_green flag v]\nhide\n\nwhen I start as a clone\nset volume to (_VOLUME SOUND) %\n\nadd [11242330288036474737802817142121802820302120_30281427_24_243_5_1_59a61f58a61c58a61b63ac58a61a63ac59a61a63ab11a13bc59a61a58a61f58a54a56a58e3fc3dd3ag3ax5a3b11a13a11t13a11a14a13c11ac11a13a58ab59a61a63a58ac3ca3en11a13bb11a12c13a11a13c11a13a11a13c11a13a11a13a11a13a11d13r14av58a60e62a60c62a60c62ac58cc58a60a58ab11a14a13ac58d60d58b54a55c56a3hc3dd3ag3af58a59a63ad58a63a58a61d63ad5b11a13a11a13a12a14q11a12a11a14c11ac11a13a58ab59a60a63a58ac3ca3en11a14a13ab11c12a13a12a14a11a12b11a14a12a14b12a14a12a14a11b13b14g12l14a11aq154ef58ic58a61a58ac58b62ab11b13ac58a61a58d60b58b5k3bc3dd3ag3af58b62ae58c60a58a60a62a58bd11a13a11a13an12a14ag12a14ac11a13a58ab58a60a58bc3ca3en11b13ab11a13a11b13an12b14a11a12a11c12o13a11avr58a61a58ac58a63a58ab11b12ac58a61a58b60d58bk5bc3dd3ag3ae59a61a58bf58ic11a13a11a13aⓑ12a14a58ab58a60a58bc3ca3en11b13ab11c12a13aq11a13b11b13a14c11k14a11avr58a61a58ac58a60a63ab11a13bc58a61a58a60e58bp3dd3ag3ad59a61c63a59a63af36ad36ad11a13a11a13af58b59at36ac58dc3ca3en11b13ab11a13b11a13aq12a11a13a11a12a14a11a14b11g13a11c13a11avr58a60a62ac58b62ab11a13bc58a61a58b60d58bp5dd3ag3ad58a60c62a58a62ap11a13a11a13af58a59a62ae11bq58a22a58a62ac3ca3en11b13ab11a13dr12a13a11a13a11a13b14a11a14f11a13a14b11a13a11aux58a63a62ab11b13ac58a61a58b60d58bx3ag3af36at12a14a11a13af58b62ae11bq11a22a11a58ac3ca3en11a13bb11a13c11as11b13d11a14h11a14b13a11bux58a60a62ab11cc58a61a58b60d58bb58cs5ag5aⓐ12a14a11a13af58ce11bx5ca3en11b13ab11a13c11as11a13a11b13a11a13a11i13a11a14a11buⓒ12a11a14ac58a61a58b60d58bb58cs36ag36aⓐ12a14a12a14af58ce11bⓑ3en12a14bb11b13b11at11c13a11d14a13a11a13a12a11b13c11buⓒ58cc58a61a58hb58cʟ58ce11bⓑ5b3cs11c13a11au11a13a11a13a11a13a11a14a13a11b13a11a13b11duⓘ58a61a62a59a61d63a58ab58cʟ58ce11bⓓ5c68do12a14a11b13au11a13a11d13a12b13a11a13a11c14a11cuⓘ58a62a58b60d62a58ab58cʟ58ce11bⓔ36ae68el11a12a14av11a13a11b13b11a13a12a11a12c14a13a11cuⓒ58co58cʟ58ce11b>11a13a11b13a11c13d11a13a11cuⓒ58a11a13ao58cʟ58ce11b<11a67a11b14a11a13c11a13a11a13a11a13a11auⓒ11a12a13ac58ci58cʟ58ce11b:11b13a11a13c14c11a13a11cuⓒ11a14bc59a61a63ai58cʟ58ce11b;12a11d13a11c13b11cuⓒ11b13ac58b63a58i60a58bʟ58ce11b{12a13a11d12a11b13b11buⓒ11b13ac58a60a59a61j58bʟ58ce11b}11b13a11b13a11c13a11buⓒ11a12a13ac58a60a58a62a58h60a62a58aʟ58cf11a\[11b13d11b13a11buⓒ11b13ac58a60a58b60b61a60d59a61b58aʟ58cf11a\]12a14h11auⓒ11b13ac58b59a61h60b59a61a63aᴜ11aそ32avⓒ11cc58a60a58a60h62a59a58cすⓦ179avⓒ12a13ap58a60b62aすᴛⓓ11aすず|0す0す0c0す0す0c0げ30a0f30a0f30a0ご0_30a0す0ᴘ0す0す0c0す0す0c0す0す0c0す0す0c0す0<29a0ⓞ0す0す0c0す0す0c0す0す0c0す0ⓣ29a0ʏ0す0す0c0す0す0c0す0\]29a0ⓘ0す0す0c0す0す0c0す0す0c0す0=30a0ⓔ0す0す0c0す0す0c0す0す0c0す0す0c|18_16_2_2_pb35ckpppppppppppppppp|0p0p0p0p0p0p0p0p0p0p0p0p0p0p0p0p0p0p|18_16_3_4_pb206ckpppppppppppppppp|0p0p0p0p0p0p0p0p0p0p0p0p0p0p0p0p0p0p|] to [levels - community v]\n\n@Tiles\n\ndefine Create Grid | Width: (width) Height: (height)\nclear graphic effects\nset [origin x v] to [0]\nrepeat (width)\n    set [origin y v] to [0]\n    repeat (height)\n        create clone of (_myself_ v)\n        change [origin y v] by (1)\n    end\n    change [origin x v] by (1)\nend\nhide\n\nwhen I receive [_create clones v]\nif <(id) = []> then\n    set [_grid width v] to (([ceiling v] of ((480) / (_TILE SIZE)) ) + (1))\n    set [_grid height v] to (([ceiling v] of ((360) / (_TILE SIZE)) ) + (1))\n    Create Grid | Width: (_GRID WIDTH) Height: (_GRID HEIGHT)\nend\n\nwhen I start as a clone\nset [id v] to [1]\nset [bounce v] to [0]\nswitch costume to (empty v)\ngo to [back v] layer\ngo [forward v] (4) layers\nshow\n\nwhen flag clicked\nset [id v] to []\nhide\n\nwhen I receive [_delete clones v]\ndelete this clone\n\nwhen I receive [@animate v]\nif <(id) > []> then\n    set [x v] to ((origin x) + (([floor v] of (((((__SCROLL X) - ((origin x) * (_TILE SIZE))) + (240)) / (_TILE SIZE)) / (_GRID WIDTH)) ) * (_GRID WIDTH)))\n    set [y v] to ((origin y) + (([floor v] of (((((__SCROLL Y) - (((origin y) - (0.5)) * (_TILE SIZE))) + (180)) / (_TILE SIZE)) / (_GRID HEIGHT)) ) * (_GRID HEIGHT)))\n    set [idx v] to ((((x) * (_MAP HEIGHT)) + (y)) + (1))\n    set [tile v] to (item (idx) of [#tile grid v])\n    if <(tile) > [1]> then\n        if <(_BOUNCED TILE) = (idx)> then\n            set [bounce v] to [200]\n        end\n        set [x pos v] to ((((x) + (0.5)) * (_TILE SIZE)) - (__SCROLL X))\n        set [y pos v] to (((y) * (_TILE SIZE)) - (__SCROLL Y))\n        Set Correct Costume (tile)\n        go to x: (x pos) y: (y pos)\n        if <<(x position) = (x pos)> and <(y position) = (y pos)>> then\n            if <not <(costume [number v]) = (costume)>> then\n                switch costume to (costume)\n            end\n        else\n            switch costume to (large v)\n            go to x: (x pos) y: (y pos)\n            switch costume to (costume)\n        end\n        if <(bounce) > [0]> then\n            change [bounce v] by (-20)\n            change y by ((12) * ([sin v] of (bounce) ))\n        end\n    else\n        if <not <(costume [number v]) = [1]>> then\n            switch costume to (empty v)\n        end\n    end\nelse\n    if <(_EDITOR \(ON/OFF\)) > [0]> then\n        switch costume to (large v)\n        set [x v] to (([floor v] of ((([idx v] of [editor v]) - (1)) / (_MAP HEIGHT)) ) + (0.5))\n        set [y v] to ((([idx v] of [editor v]) - (1)) - ((_MAP HEIGHT) * ([floor v] of ((([idx v] of [editor v]) - (1)) / (_MAP HEIGHT)) )))\n        change x by (((((x) * (_TILE SIZE)) - (__SCROLL X)) - (x position)) / (1.4))\n        change y by (((((y) * (_TILE SIZE)) - (__SCROLL Y)) - (y position)) / (1.4))\n        if <(_EDITORBRUSH) = [1]> then\n            switch costume to (air v)\n        else\n            Set Correct Costume (_EDITORBRUSH)\n            switch costume to (costume)\n        end\n        go to [front v] layer\n        go [backward v] (19) layers\n        set [ghost v] effect to (65)\n        set [brightness v] effect to (20)\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [_adjust size v]\nswitch costume to (large v)\nset size to ([ceiling v] of ((100) * ((_TILE SIZE) / (41))) ) %\n\ndefine Set Correct Costume (costume)\nset [costume v] to (costume)\nif <<<<(costume) = [5]> or <(costume) = [100]>> or <(costume) = [106]>> or <(costume) = [93]>> then\n    change [costume v] by ([floor v] of (((timer) * (5)) mod (5)) )\n    stop [this script v]\nend\nif <(costume) = [192]> then\n    change [costume v] by ([floor v] of (((timer) * (31)) mod (14)) )\n    stop [this script v]\nend\nif <(_EDITOR \(ON/OFF\)) > [0]> then\n    if <(costume) = [34]> then\n        set [costume v] to [117]\n    else\n        if <(costume) = [52]> then\n            set [costume v] to [118]\n        else\n            if <(costume) = [143]> then\n                set [costume v] to [144]\n            end\n        end\n    end\nend\n\nwhen I receive [@editor mob spawn v]\nif <(id) > []> then\n    set [temp v] to (item (idx) of [@mob grid v])\n    if <(temp) > [0]> then\n        if <not <[@mob spawns v] contains (idx)?>> then\n            add (idx) to [@mob spawns v]\n        end\n    end\n    if <[#placed tiles v] contains (idx)?> then\n        set [brightness v] effect to (20)\n    else\n        set [brightness v] effect to (0)\n    end\n    set [bounce v] to [0]\nend\n\nwhen I receive [_layer1 v]\nif <<([abs v] of ((x) - (__PLAYER X)) ) < [4]> and <([abs v] of ((y) - (__PLAYER Y)) ) < [4]>> then\n    set [temp v] to (item (item (idx) of [#tile grid v]) of [#tile groups v])\n    if <<(temp) = [1]> or <<(temp) = [7]> or <<(temp) = [13]> or <(temp) = [21]>>>> then\n        go to [front v] layer\n    end\nend\n\nwhen flag clicked\nforever\n    set [#lives v] to [3]\n    hide variable [#lives v]\nend\n\nwhen I receive [_music fade out v]\nif <(___LEVEL NAME) = [The end]> then\n    change [☁ winners v] by (1)\nend\n\n@Editor Menu\n\nwhen I receive [@editor ui tick v]\nif <(id) > []> then\n    if <(id) = [1]> then\n        // [eraser]\n        set [costume v] to [1]\n        Draw\n        if <(_EDITOR MENU OPEN/CLOSE) = [1]> then\n            Change Size <(_EDITORBRUSH) = [1]>\n            Get IsClicked\n            if <(IsClicked) = [1]> then\n                set [_editorbrush v] to [1]\n            end\n        else\n            set size to (65) %\n        end\n    else\n        if <(id) = [2]> then\n            if <(_EDITOR MENU OPEN/CLOSE) = [1]> then\n                if <(_EDITOR CATEGORY) = (idx)> then\n                    set [ghost v] effect to (0)\n                    set [costume v] to (join (idx) [ Category2])\n                else\n                    set [ghost v] effect to (50)\n                    set [costume v] to (join (idx) [ Category])\n                end\n                Draw\n                Get IsClicked\n                if <(IsClicked) = [1]> then\n                    Encode Editor Menu\n                    replace item (_EDITOR CATEGORY) of [editor menu codes v] with (code)\n                    set [_editor category v] to (idx)\n                    Decode Menu Code (item (_EDITOR CATEGORY) of [editor menu codes v])\n                    if <(_EDITOR SCROLL) > ((_EDITOR SIZE) * ((length of [editor menu v]) - (4.2)))> then\n                        set [_editor scroll v] to ((_EDITOR SIZE) * ((length of [editor menu v]) - (4.2)))\n                    end\n                    if <(_EDITOR SCROLL) < [190]> then\n                        set [_editor scroll v] to [190]\n                    end\n                    set [_editor scroll offset v] to (_EDITOR SCROLL)\n                end\n            else\n                set [costume v] to (join (idx) [ Category])\n                Draw\n            end\n        else\n            if <(id) = [3]> then\n                // [items]\n                _Tick Item\n            else\n                if <(id) = [4]> then\n                    if <(_EDITOR MENU OPEN/CLOSE) = [0]> then\n                        set [costume v] to [Arrow Down]\n                    else\n                        set [costume v] to [Arrow Up]\n                    end\n                    Draw\n                    Get IsClicked\n                    if <(IsClicked) = [1]> then\n                        if <(_EDITOR MENU OPEN/CLOSE) = [0]> then\n                            set [_editor menu open/close v] to [1]\n                        else\n                            set [_editor menu open/close v] to [0]\n                        end\n                    end\n                else\n                    if <(id) = [5]> then\n                        set [costume v] to [Music]\n                        Draw\n                        if <(_EDITOR MENU OPEN/CLOSE) = [1]> then\n                            Get IsClicked\n                            Change Size <(IsClicked) = [1]>\n                            if <(IsClicked) = [1]> then\n                                change [_music v] by (1)\n                                if <(_MUSIC) > [6]> then\n                                    set [_music v] to [1]\n                                end\n                                broadcast (_BEGIN MUSIC LOOP v)\n                            end\n                        else\n                            set size to (65) %\n                        end\n                    else\n                        if <(id) = [6]> then\n                            set [costume v] to [Background]\n                            Draw\n                            if <(_EDITOR MENU OPEN/CLOSE) = [1]> then\n                                Get IsClicked\n                                Change Size <(IsClicked) = [1]>\n                                if <(IsClicked) = [1]> then\n                                    change [_backdrop v] by (1)\n                                    if <(_BACKDROP) > [4]> then\n                                        set [_backdrop v] to [1]\n                                    end\n                                end\n                            else\n                                set size to (65) %\n                            end\n                        else\n                            if <(id) = [7]> then\n                                set [costume v] to [Save]\n                                Draw\n                                if <(_EDITOR MENU OPEN/CLOSE) = [1]> then\n                                    Get IsClicked\n                                    if <(IsClicked) = [1]> then\n                                        set [__player mode v] to []\n                                        hide\n                                        ask (join [Rename level | Current name: ] (___LEVEL NAME)) and wait\n                                        if <(answer) > []> then\n                                            if <<(length of (answer)) > [1]> and <(length of (answer)) < [30]>> then\n                                                set [___level name v] to (answer)\n                                            else\n                                                repeat until <<<(length of (answer)) > [1]> and <(length of (answer)) < [30]>> or <(answer) = []>>\n                                                    ask [Level name must be between 1 and 30 characters.] and wait\n                                                end\n                                                if <(answer) > []> then\n                                                    set [___level name v] to (answer)\n                                                end\n                                            end\n                                        end\n                                        broadcast (__GENERATE SAVE CODE v) and wait\n                                        show\n                                        set [__player mode v] to [1]\n                                    end\n                                else\n                                    set size to (65) %\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nelse\n    if <<key (. v) pressed?> or <key ((join [] [>]) v) pressed?>> then\n        change [_editor scroll offset v] by (15)\n    else\n        if <<key (, v) pressed?> or <key ((join [] [<]) v) pressed?>> then\n            change [_editor scroll offset v] by (-15)\n        end\n    end\n    if <(mouse y) > [132]> then\n        if <(mouse x) > [215]> then\n            change [_editor scroll offset v] by (20)\n        else\n            if <(mouse x) < [-215]> then\n                change [_editor scroll offset v] by (-20)\n            end\n        end\n    end\n    if <(_EDITOR SCROLL OFFSET) < [260]> then\n        set [_editor scroll offset v] to [260]\n    else\n        if <(_EDITOR SCROLL OFFSET) > ((_EDITOR SIZE) * ((length of [editor menu v]) - (4.2)))> then\n            set [_editor scroll offset v] to ((_EDITOR SIZE) * ((length of [editor menu v]) - (4.2)))\n        end\n    end\n    change [_editor scroll v] by (((_EDITOR SCROLL OFFSET) - (_EDITOR SCROLL)) / (2))\n    hide\nend\n\ndefine Clone List\n// [clone eraser]\nset [id v] to [1]\nset [x v] to [-210]\nset [y v] to [105]\ncreate clone of (_myself_ v)\n// [clone categories]\nset [id v] to [2]\nset [idx v] to [1]\nset [x v] to [-150]\nset [y v] to [110]\nrepeat (3)\n    create clone of (_myself_ v)\n    change [idx v] by (1)\n    change [x v] by (42)\nend\n// [clone items]\nset [id v] to [3]\nset [y v] to [155]\nset [idx v] to [1]\nrepeat (10)\n    create clone of (_myself_ v)\n    change [idx v] by (1)\nend\n// [clone arrow]\nset [id v] to [4]\nset [x v] to [215]\nset [y v] to [62]\ncreate clone of (_myself_ v)\n// [clone backdrop button]\nset [id v] to [6]\nset [x v] to [165]\nset [y v] to [105]\ncreate clone of (_myself_ v)\n// [clone music button]\nset [id v] to [5]\nset [x v] to [215]\ncreate clone of (_myself_ v)\n// [clone save button]\nset [id v] to [7]\nset [y v] to [-154]\nset [x v] to [212]\ncreate clone of (_myself_ v)\nset [id v] to []\n\nwhen [up arrow v] key pressed\nif <(id) = []> then\n    if <not <key (up arrow v) pressed?>> then\n        wait (0) seconds\n        if <not <key (up arrow v) pressed?>> then\n            change [_editor scroll offset v] by (-120)\n        end\n    end\nend\n\nwhen [down arrow v] key pressed\nif <(id) = []> then\n    if <not <key (down arrow v) pressed?>> then\n        wait (0) seconds\n        if <not <key (down arrow v) pressed?>> then\n            change [_editor scroll offset v] by (120)\n        end\n    end\nend\n\nwhen I receive [_delete editor v]\nhide\ndelete this clone\n\nwhen I receive [_load editor v]\nif <(id) = []> then\n    set [_editor menu open/close v] to [1]\n    Clone List\nend\n\ndefine // (comment)\n\ndefine Draw\nswitch costume to (large v)\nset x to (x)\nif <(y) > [0]> then\n    change y by ((((y) + (([abs v] of ((_EDITOR MENU OPEN/CLOSE) - (1)) ) * (100))) - (y position)) / (2))\nelse\n    change y by ((((y) - (([abs v] of ((_EDITOR MENU OPEN/CLOSE) - (1)) ) * (100))) - (y position)) / (2))\nend\ngo to [front v] layer\nswitch costume to (costume)\nif <<([abs v] of ((x position) - (mouse x)) ) < ((_EDITOR SIZE) / (2))> and <([abs v] of ((y position) - (mouse y)) ) < ((_EDITOR SIZE) / (2))>> then\n    set [brightness v] effect to (20)\n    set [_tilebrush disabled temporarily v] to [1]\nelse\n    set [brightness v] effect to (0)\nend\nshow\n\ndefine _Tick Item\nif <((((idx) - (0.5)) * (_EDITOR SIZE)) - (_EDITOR SCROLL)) > [230]> then\n    change [idx v] by (-10)\nelse\n    if <((((idx) + (0.5)) * (_EDITOR SIZE)) - (_EDITOR SCROLL)) < [-230]> then\n        change [idx v] by (10)\n    end\nend\nif <(item (idx) of [editor menu v]) > []> then\n    set [x v] to (((idx) * (_EDITOR SIZE)) - (_EDITOR SCROLL))\n    set [ghost v] effect to (0)\n    set [costume v] to (item (idx) of [editor menu v])\n    Draw\n    if <(_EDITOR MENU OPEN/CLOSE) = [1]> then\n        if <(costume) = (_EDITORBRUSH)> then\n            change size by (((75) - (size)) / (2))\n        else\n            change size by (((65) - (size)) / (2))\n        end\n        Get IsClicked\n        if <(IsClicked) = [1]> then\n            set [_editorbrush v] to (item (idx) of [editor menu v])\n        end\n    end\nelse\n    hide\nend\n\ndefine Get IsClicked\nset [isclicked v] to [0]\nif <mouse down?> then\n    if <<([abs v] of ((x position) - (mouse x)) ) < ((_EDITOR SIZE) / (2))> and <([abs v] of ((y position) - (mouse y)) ) < ((_EDITOR SIZE) / (2))>> then\n        if <(mouse down) = [0]> then\n            set [isclicked v] to [1]\n            start sound [snap v]\n        end\n    end\n    set [mouse down v] to [1]\nelse\n    set [mouse down v] to [0]\nend\n\ndefine Encode Editor Menu\nset [code v] to []\nset [i v] to [1]\nrepeat (length of [editor menu v])\n    set [code v] to (join (code) (join (item (i) of [editor menu v]) [x]))\n    change [i v] by (1)\nend\n\ndefine Decode Menu Code (#)\ndelete all of [editor menu v]\nset [i v] to [1]\nset [code v] to []\nrepeat (length of (#))\n    if <(letter (i) of (#)) = [x]> then\n        add (code) to [editor menu v]\n        set [code v] to []\n    else\n        set [code v] to (join (code) (letter (i) of (#)))\n    end\n    change [i v] by (1)\nend\n\nwhen I start as a clone\nswitch costume to (large v)\ngo to x: (x) y: (y)\nset volume to (_VOLUME SOUND) %\nhide\n\nwhen flag clicked\nset [_editor size v] to [50]\nset [_editor category v] to [1]\nDecode Menu Code (item (_EDITOR CATEGORY) of [editor menu codes v])\nset [_editor scroll v] to [260]\nset [_editor scroll offset v] to (_EDITOR SCROLL)\nset [id v] to []\n\ndefine Change Size <condition>\nif <condition> then\n    change size by (((80) - (size)) / (2))\nelse\n    change size by (((65) - (size)) / (2))\nend\n\nbroadcast (_BEGIN LEVEL v)\n\nwhen I receive [_load editor v]\n\nbroadcast (_LOAD EDITOR v)\n\nbroadcast (_BEGIN LEVEL v)\n\n@Sprite2\n\nwhen flag clicked\nshow\ngo to x: (-83) y: (204)\nglide (0.3) secs to x: (-83) y: (14)\n\nchange y by (-10)\n\nforever\n\nwhen flag clicked\nset size to (100) %\nrepeat until <[2.20] < (timer)>\n    repeat (5)\n        change [pixelate v] effect by (-5)\n    end\n    repeat (5)\n        change [pixelate v] effect by (5)\n    end\nend\n\nwhen I receive [intro over v]\nhide\n\n@Sprite1\n\nwhen flag clicked\nswitch costume to (costume4 v)\nset size to (100) %\nshow\nstart sound [Project Name v]\nstart sound [5801085298802688 v]\nstart sound [5204514844704768 v]\nplay sound [5616101795561472 v] until done\nwait (3) seconds\nbroadcast (INTRO OVER v)\n\nwhen I receive [intro over v]\nrepeat (20)\n    switch costume to (costume3 v)\n    change [whirl v] effect by (50)\n    change size by (-5)\nend\nhide\n\n@Sprite3\n\nwhen flag clicked\nshow\ngo to x: (-18) y: (-204)\nglide (1.32) secs to x: (-18) y: (17)\npoint in direction (90)\n\nchange y by (-10)\n\nwhen flag clicked\nset size to (100) %\nrepeat until <[1.47] < (timer)>\n    repeat (3)\n        turn left (5) degrees\n    end\n    repeat (3)\n        turn right (5) degrees\n    end\n    repeat (3)\n        turn right (5) degrees\n    end\n    repeat (3)\n        turn left (5) degrees\n    end\nend\npoint in direction (90)\nstop [this script v]\n\nchange size by (-1)\n\nwhen I receive [intro over v]\nhide\n\n@Sprite4\n\nwhen flag clicked\nshow\ngo to x: (32) y: (204)\nglide (1.32) secs to x: (32) y: (15)\n\nchange y by (-10)\n\nwhen flag clicked\nset size to (100) %\nrepeat until <[1.98] < (timer)>\n    repeat (5)\n        change [fisheye v] effect by (10)\n    end\n    repeat (5)\n        change [fisheye v] effect by (-10)\n    end\nend\nstop [this script v]\n\nwhen I receive [intro over v]\nhide\n\n@Sprite5\n\nwhen flag clicked\nshow\ngo to x: (85) y: (-204)\nglide (2.10) secs to x: (85) y: (19)\n\nchange y by (-10)\n\nwhen flag clicked\nset size to (100) %\nrepeat until <[2.05] < (timer)>\n    repeat (5)\n        change [brightness v] effect by (5)\n    end\n    repeat (5)\n        change [brightness v] effect by (-5)\n    end\nend\n\nwhen I receive [intro over v]\nhide\n\n@Sprite6\n\nwhen I receive [studios show v]\n\nwhen flag clicked\nhide\nwait (2.20) seconds\nshow\nset size to (2) %\nset [whirl v] effect to (1000)\nchange size by (8)\nrepeat (10)\n    change size by (10)\n    change [whirl v] effect by (-100)\nend\nset size to (100) %\n\nwhen I receive [intro over v]\nhide\n\nwhen I receive [intro over v]\nhide\n\n
Press E to Enter/exit editor\nAny bugs? make sure to post in comments!\nI unshared this and forgot to reshare it so uhh here it is\n\n@Chipm0nk Hearted! (the engine creator)\nPlay Here for less lag https://turbowarp.org/795820259\nWelcome to Minecraft Platformer 2 The sequel to Minecraft Platformer\nMobile controls\nWASD or arrow keys\nHold Space to run\nCan you find the 2 our world easter egg?