GameKit 2 [Platformer Mode Only]


@Stage\n\nwhen flag clicked\nforever\n    if <(playState) = [intro]> then\n        switch backdrop to (bg_std v)\n    end\n    if <(playState) = [menu]> then\n        switch backdrop to (join (join [HomeBG] [_]) (language))\n    end\n    if <(playState) = [modeSelect]> then\n        switch backdrop to (join (join [typeSelectBG] [_]) (language))\n    end\n    if <(playState) = [platformer]> then\n        switch backdrop to (gridplat v)\n    end\n    if <(playState) = [platTest]> then\n        switch backdrop to (bg_std v)\n    end\n    if <(playState) = [isometric]> then\n        switch backdrop to (iso bg v)\n    end\n    if <(playState) = [isoTest]> then\n        switch backdrop to (bg_std v)\n    end\n    if <(playState) = [kart]> then\n        switch backdrop to (kartbg v)\n    end\n    if <(playState) = [kartTest]> then\n        switch backdrop to (bg_std v)\n    end\n    if <(playState) = [modifyPLAT]> then\n        switch backdrop to (bg_std v)\n    end\n    if <(playState) = [isoTest]> then\n        switch backdrop to (join [background_iso_] [2])\n    end\n    if <(playState) = [golf]> then\n        switch backdrop to (bg_std v)\n    end\nend\n\nwhen stage clicked\nif <(platTRANSITION) = [0]> then\n    if <(extendedPLAT) = [1]> then\n        broadcast (closeADD v)\n    end\nend\n\nwhen I receive [off v]\nstart sound [switchOFF v]\n\nwhen I receive [on v]\nstart sound [switchON v]\n\nplay sound [Music_Affinix v] until done\n\nforever\n    play sound [surface_loop v] until done\nend\n\nset [pitch v] effect to (0)\n\nset [pitch v] effect to (100)\n\nwhen flag clicked\n\nplay sound [DearFriendsFromFarawayLands v] until done\n\n@initiate\n\ndefine smoothly move to x: (xdestination) y: (ydestination)\nset [initialx v] to (x position)\nset [initialy v] to (y position)\nset [accelerationv v] to [0]\nrepeat (10)\n    change [accelerationv v] by (1)\n    change x by (((accelerationV) / (55)) * (((xdestination) - (initialX)) / (2)))\n    change y by (((accelerationV) / (55)) * (((ydestination) - (initialY)) / (2)))\nend\nrepeat (10)\n    change [accelerationv v] by (-1)\n    change x by (((accelerationV) / (45)) * (((xdestination) - (initialX)) / (2)))\n    change y by (((accelerationV) / (45)) * (((ydestination) - (initialY)) / (2)))\nend\n\nwhen flag clicked\nset [language v] to [EN]\nset [playstate v] to [intro]\nbroadcast (introSequence v)\nbroadcast (resetALL v)\n\nwhen I receive [resetall v]\nbroadcast (resetPlatformer v)\nbroadcast (resetKart v)\nbroadcast (resetIsometric v)\nbroadcast (resetGolf v)\nbroadcast (resetMetro v)\nbroadcast (resetRPG v)\n\nwhen I receive [resetplatformer v]\nbroadcast (clearAllPlatformerLevelElements v)\nset [numberofstages v] to [1]\ndelete all of [platformerleveldata v]\nrepeat (5)\n    add [00000000000000000000000000000000] to [platformerleveldata v]\n    add [00000000000000000000000000000000] to [platformerleveldata v]\n    add [00b000000000000000000000000000000] to [platformerleveldata v]\n    repeat (11)\n        add [00000000000000000000000000000000] to [platformerleveldata v]\n    end\n    add [00000000000000000000000000000f00] to [platformerleveldata v]\n    add [00000000000000000000000000000000] to [platformerleveldata v]\n    add [00000000000000000000000000000000] to [platformerleveldata v]\nend\n\nwhen I receive [introsequence v]\nwait until <(amiOKtoGO?????) = [1]>\nswitch costume to (join [logo_] (language))\nset [ghost v] effect to (100)\ngo to x: (0) y: (-15)\nshow\nwait (0.1) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (-1)\nend\nwait (3) seconds\nset [myfluster v] to [-5]\nrepeat (5)\n    change y by (() - (myFluster))\n    change [ghost v] effect by (20)\n    change [myfluster v] by (1)\nend\nset [playstate v] to [menu]\nhide\nwait (0.15) seconds\nbroadcast (home v)\n\nwhen I receive [clearallplatformerlevelelements v]\nset [portalyet? v] to [0]\n\nwhen flag clicked\nhide\nset [amioktogo????? v] to [0]\n\n@Language-Setup\n\nwhen I receive [introsequence v]\nclone\n\ndefine clone\nset [aaaa v] to [0]\nrepeat (1)\n    change [aaaa v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nif <(AAAA) = [7]> then\n    wait until <(easterEggStringOne) = [meow]>\n    set [ghost v] effect to (100)\n    show\n    go to x: (0) y: (-15)\n    set [myfluster v] to [5]\n    repeat (5)\n        change y by (myFluster)\n        change [ghost v] effect by (-20)\n        change [myfluster v] by (-1)\n    end\nelse\n    set [ghost v] effect to (100)\n    show\n    go to x: (0) y: (-15)\n    wait ((0.1) + (join [0.] ((((AAAA) + (1)) / (2)) * (10)))) seconds\n    set [myfluster v] to [5]\n    repeat (5)\n        change y by (myFluster)\n        change [ghost v] effect by (-20)\n        change [myfluster v] by (-1)\n    end\nend\n\nwhen I start as a clone\nforever\n    switch costume to (AAAA)\nend\n\nwhen this sprite clicked\nbroadcast (endPICKLANG v)\nset [language v] to (costume [name v])\nwait (0.1) seconds\nset [amioktogo????? v] to [1]\n\nwhen I receive [endpicklang v]\nwait ((0.1) + (join [0.] ((((AAAA) + (1)) / (2)) * (10)))) seconds\nset [myfluster v] to [-5]\nrepeat (5)\n    change y by (() - (myFluster))\n    change [ghost v] effect by (20)\n    change [myfluster v] by (1)\nend\nif <(AAAA) = [6]> then\n    set [amioktogo????? v] to [1]\nend\ndelete this clone\n\n@make\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(playState) = [menu]> then\n        show\n    else\n        go to x: (0) y: (0)\n        hide\n    end\nend\n\nwhen this sprite clicked\nbroadcast (madeSelect v)\nset [playstate v] to [modeSelect]\n\nwhen I receive [home v]\nset [ghost v] effect to (100)\ngo to x: (0) y: (-15)\nwait (0.1) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (-1)\nend\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\n@play\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(playState) = [menu]> then\n        show\n    else\n        go to x: (0) y: (0)\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (mouse-pointer v)?> or <(extendMenu) = [1]>> then\n        if <not <(costume [number v]) = [4]>> then\n            next costume\n        end\n    else\n        if <not <(costume [number v]) = [1]>> then\n            switch costume to ((costume [number v]) - (1))\n        end\n    end\nend\n\nwhen I receive [home v]\nset [ghost v] effect to (100)\ngo to x: (0) y: (-15)\nwait (0.15) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (-1)\nend\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\n@explore\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(playState) = [menu]> then\n        show\n    else\n        go to x: (0) y: (0)\n        hide\n    end\nend\n\nwhen I receive [home v]\nset [ghost v] effect to (100)\ngo to x: (0) y: (-15)\nwait (0.2) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (-1)\nend\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\n@online\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(playState) = [menu]> then\n        show\n    else\n        go to x: (0) y: (0)\n        hide\n    end\nend\n\nwhen I receive [home v]\nset [ghost v] effect to (100)\ngo to x: (0) y: (-15)\nwait (0.25) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (-1)\nend\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\n@multiplayer\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(playState) = [menu]> then\n        show\n    else\n        go to x: (0) y: (0)\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (mouse-pointer v)?> or <(extendMenu) = [1]>> then\n        if <not <(costume [number v]) = [4]>> then\n            next costume\n        end\n    else\n        if <not <(costume [number v]) = [1]>> then\n            switch costume to ((costume [number v]) - (1))\n        end\n    end\nend\n\nwhen I receive [home v]\nset [ghost v] effect to (100)\ngo to x: (0) y: (-15)\nwait (0.3) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (-1)\nend\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\n@tutorials\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(playState) = [menu]> then\n        show\n    else\n        go to x: (0) y: (0)\n        hide\n    end\nend\n\nwhen I receive [home v]\nset [ghost v] effect to (100)\ngo to x: (0) y: (-15)\nwait (0.35) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (-1)\nend\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\n@kartSelect\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(playState) = [modeSelect]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nbroadcast (enterKart v)\nset [playstate v] to [kart]\n\n@platformerSelect\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(playState) = [modeSelect]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nbroadcast (enterPlatformer v)\nset [playstate v] to [platformer]\n\n@isoSelect\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(playState) = [modeSelect]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nbroadcast (enterIsometric v)\nset [playstate v] to [isometric]\n\n@golfSelect\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(playState) = [modeSelect]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nbroadcast (enterGolf v)\nset [playstate v] to [golf]\n\n@conditionalSelect\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(playState) = [modeSelect]> then\n        show\n    else\n        hide\n    end\nend\n\n@RPGSelect\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(playState) = [modeSelect]> then\n        show\n    else\n        hide\n    end\nend\n\n@editor\n\nwhen flag clicked\nhide\nset [activeplatedit v] to [0]\n\nwhen flag clicked\nset size to (100) %\nswitch costume to (n001 v)\nforever\n    if <<(playState) = [platformer]> and <not <(activePlatEdit) = [0]>>> then\n        show\n        if <(materialPlat) = [slope]> then\n            if <[6] > (item # of (slopeMaterial) in [availableslopematerials v])> then\n                translate ((32) - ((1) + (item (item # of (slopeMaterial) in [availableslopematerials v]) of [slopeheights v]))) ((1) + (item (item # of (slopeMaterial) in [availableslopematerials v]) of [slopeheights v]))\n                if <(round (((15) * (round (((mouse x) + (7.5)) / (15)))) - (7.5))) > (XtranslatedForPositionLock)> then\n                    set x to (XtranslatedForPositionLock)\n                else\n                    set x to (((15) * (round (((mouse x) + (7.5)) / (15)))) - (7.5))\n                end\n                if <not <<(round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))) < [-127]> or <(YtranslatedForPositionLock) < (round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5)))>>> then\n                    set y to (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))\n                    if <<[239] < (mouse x)> or <(mouse x) < [-239]>> then\n                        if <(materialPlat) = [E]> then\n                            set [ghost v] effect to (100)\n                        else\n                            set [ghost v] effect to (50)\n                        end\n                    else\n                        if <(materialPlat) = [E]> then\n                            set [ghost v] effect to (90)\n                        else\n                            set [ghost v] effect to (0)\n                        end\n                    end\n                else\n                    if <(round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))) < [-127]> then\n                        set y to (-127)\n                        set [ghost v] effect to (50)\n                    else\n                        set y to (YtranslatedForPositionLock)\n                        set [ghost v] effect to (50)\n                    end\n                end\n            else\n                translate ((2) + (item (item # of (slopeMaterial) in [availableslopematerials v]) of [slopeheights v])) ((1) + (item (item # of (slopeMaterial) in [availableslopematerials v]) of [slopeheights v]))\n                if <(XtranslatedForPositionLock) > (round (((15) * (round (((mouse x) + (7.5)) / (15)))) - (7.5)))> then\n                    set x to (XtranslatedForPositionLock)\n                else\n                    if <(round (((15) * (round (((mouse x) + (7.5)) / (15)))) - (7.5))) > [233]> then\n                        set x to (233)\n                    else\n                        set x to (((15) * (round (((mouse x) + (7.5)) / (15)))) - (7.5))\n                    end\n                end\n                if <not <<(round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))) < [-127]> or <(YtranslatedForPositionLock) < (round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5)))>>> then\n                    set y to (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))\n                    if <<[239] < (mouse x)> or <(mouse x) < [-239]>> then\n                        if <(materialPlat) = [E]> then\n                            set [ghost v] effect to (100)\n                        else\n                            set [ghost v] effect to (50)\n                        end\n                    else\n                        if <(materialPlat) = [E]> then\n                            set [ghost v] effect to (90)\n                        else\n                            set [ghost v] effect to (0)\n                        end\n                    end\n                else\n                    if <(round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))) < [-127]> then\n                        set y to (-127)\n                        set [ghost v] effect to (50)\n                    else\n                        set y to (YtranslatedForPositionLock)\n                        set [ghost v] effect to (50)\n                    end\n                end\n            end\n        else\n            if <(round (((15) * (round (((mouse x) + (7.5)) / (15)))) - (7.5))) > [233]> then\n                set x to (233)\n            else\n                set x to (((15) * (round (((mouse x) + (7.5)) / (15)))) - (7.5))\n            end\n            if <not <<(round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))) < [-127]> or <[113] < (round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5)))>>> then\n                set y to (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))\n                if <<[239] < (mouse x)> or <(mouse x) < [-239]>> then\n                    if <(materialPlat) = [E]> then\n                        set [ghost v] effect to (100)\n                    else\n                        set [ghost v] effect to (50)\n                    end\n                else\n                    if <(materialPlat) = [E]> then\n                        set [ghost v] effect to (90)\n                    else\n                        set [ghost v] effect to (0)\n                    end\n                end\n            else\n                if <(round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))) < [-127]> then\n                    set y to (-127)\n                    set [ghost v] effect to (50)\n                else\n                    set y to (113)\n                    set [ghost v] effect to (50)\n                end\n            end\n        end\n        set [row v] to ((1) + ([abs v] of ((16) - (((round (((15) * (round (((y position) + (7.5)) / (15)))) - (7.5))) + (127)) / (15))) ))\n        set [column v] to (round (((round (((15) * (round (((x position) + (7.5)) / (15)))) - (7.5))) / (15)) + (16.47)))\n        if <(materialPlat) = [slope]> then\n            switch costume to (slopeMaterial)\n        else\n            if <not <(materialPlat) = [E]>> then\n                switch costume to (join (themePlat) (join (materialPlat) [01]))\n            else\n                switch costume to (eraseblock v)\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen [space v] key pressed\nif <not <(keyEditing) = [door]>> then\n    broadcast (cancelFlagMOVE v)\n    if <(activePlatEdit) = [1]> then\n        set [activeplatedit v] to [0]\n    else\n        set [activeplatedit v] to [1]\n        if <(extendedPLAT) = [1]> then\n            broadcast (closeADD v)\n        end\n    end\nend\n\ndefine saveInASnap (material)\nset [tempsave v] to (item ((row) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v])\nset [rep v] to [0]\ndelete all of [tempsavelist v]\nrepeat (32)\n    change [rep v] by (1)\n    if <(rep) = (column)> then\n        add (material) to [tempsavelist v]\n    else\n        add (letter (rep) of (tempSave)) to [tempsavelist v]\n    end\nend\nreplace item ((row) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v] with []\nset [rep v] to [0]\nrepeat (32)\n    change [rep v] by (1)\n    replace item ((row) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v] with (join (item ((row) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v]) (item (rep) of [tempsavelist v]))\nend\nset [myrowid v] to (row)\nset [mycolumnid v] to (column)\nif <(materialPlat) = [slope]> then\n    set [mymaterialid v] to (costume [name v])\nelse\n    set [mymaterialid v] to (materialPlat)\nend\nset [mystageid v] to (stagePlat)\ncreate clone of (_myself_ v)\nif <(materialPlat) = [slope]> then\n    if <[6] > (item # of (slopeMaterial) in [availableslopematerials v])> then\n        set [tempsave v] to (item (((row) - (item (item # of (slopeMaterial) in [availableslopematerials v]) of [slopeheights v])) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v])\n        set [rep v] to [0]\n        delete all of [tempsavelist v]\n        repeat (32)\n            change [rep v] by (1)\n            if <(rep) = ((column) + ((1) + (item (item # of (slopeMaterial) in [availableslopematerials v]) of [slopeheights v])))> then\n                add [!] to [tempsavelist v]\n            else\n                add (letter (rep) of (tempSave)) to [tempsavelist v]\n            end\n        end\n        replace item (((row) - (item (item # of (slopeMaterial) in [availableslopematerials v]) of [slopeheights v])) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v] with []\n        set [rep v] to [0]\n        repeat (32)\n            change [rep v] by (1)\n            replace item (((row) - (item (item # of (slopeMaterial) in [availableslopematerials v]) of [slopeheights v])) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v] with (join (item (((row) - (item (item # of (slopeMaterial) in [availableslopematerials v]) of [slopeheights v])) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v]) (item (rep) of [tempsavelist v]))\n        end\n    else\n        set [tempsave v] to (item (((row) - (item (item # of (slopeMaterial) in [availableslopematerials v]) of [slopeheights v])) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v])\n        set [rep v] to [0]\n        delete all of [tempsavelist v]\n        repeat (32)\n            change [rep v] by (1)\n            if <(rep) = ((column) - ((1) + (item (item # of (slopeMaterial) in [availableslopematerials v]) of [slopeheights v])))> then\n                add [!] to [tempsavelist v]\n            else\n                add (letter (rep) of (tempSave)) to [tempsavelist v]\n            end\n        end\n        replace item (((row) - (item (item # of (slopeMaterial) in [availableslopematerials v]) of [slopeheights v])) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v] with []\n        set [rep v] to [0]\n        repeat (32)\n            change [rep v] by (1)\n            replace item (((row) - (item (item # of (slopeMaterial) in [availableslopematerials v]) of [slopeheights v])) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v] with (join (item (((row) - (item (item # of (slopeMaterial) in [availableslopematerials v]) of [slopeheights v])) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v]) (item (rep) of [tempsavelist v]))\n        end\n    end\nend\n\nwhen flag clicked\nset [amiaclone? v] to [0]\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        if <(activePlatEdit) = [1]> then\n            if <(materialPlat) = [E]> then\n                broadcast (ERASEblock v)\n                erase\n                set [materialplat v] to [E]\n            else\n                if <(letter (column) of (item ((row) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v])) = [0]> then\n                    if <(materialPlat) = [slope]> then\n                        if <(letter ((column) + ((1) + (item (item # of (slopeMaterial) in [availableslopematerials v]) of [slopeheights v]))) of (item (((row) - (item (item # of (slopeMaterial) in [availableslopematerials v]) of [slopeheights v])) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v])) = [0]> then\n                            saveInASnap (costume [name v])\n                            set [activeplatedit v] to [0]\n                            set [materialplat v] to [1]\n                        end\n                    else\n                        saveInASnap ((materialPlat) + (1))\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    checkALL\n    if <[availableslopematerials v] contains (myMaterialID)?> then\n        switch costume to (myMaterialID)\n    else\n        adaptiveTiling\n    end\n    if <not <(myStageID) = (stagePlat)>> then\n        delete this clone\n    end\nend\n\ndefine adaptiveTiling\nif <(myCheckVar) = [0000]> then\n    switch costume to (join (themePlat) (join (myMaterialID) [01]))\nend\nif <(myCheckVar) = [0001]> then\n    switch costume to (join (themePlat) (join (myMaterialID) [02]))\nend\nif <(myCheckVar) = [0100]> then\n    switch costume to (join (themePlat) (join (myMaterialID) [03]))\nend\nif <<<<(myCheckVar) = [1010]> or <(myCheckVar) = [0101]>> or <<(myCheckVar) = [1110]> or <(myCheckVar) = [0111]>>> or <<(myCheckVar) = [1101]> or <<(myCheckVar) = [1111]> or <(myCheckVar) = [1011]>>>> then\n    switch costume to (join (themePlat) (join (myMaterialID) [04]))\nend\nif <(myCheckVar) = [1000]> then\n    switch costume to (join (themePlat) (join (myMaterialID) [05]))\nend\nif <(myCheckVar) = [0010]> then\n    switch costume to (join (themePlat) (join (myMaterialID) [06]))\nend\nif <(myCheckVar) = [0011]> then\n    switch costume to (join (themePlat) (join (myMaterialID) [07]))\nend\nif <(myCheckVar) = [0110]> then\n    switch costume to (join (themePlat) (join (myMaterialID) [08]))\nend\nif <(myCheckVar) = [1100]> then\n    switch costume to (join (themePlat) (join (myMaterialID) [09]))\nend\nif <(myCheckVar) = [1001]> then\n    switch costume to (join (themePlat) (join (myMaterialID) [10]))\nend\n\ndefine checkALL\nset [mycheckvar v] to [0000]\nif <<<(letter ((myColumnID) - (1)) of (item ((myRowID) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v])) = [!]> or <(letter ((myColumnID) - (1)) of (item ((myRowID) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v])) = ((myMaterialID) + (1))>> or <<(myMaterialID) = [0]> and <[availableslopematerials v] contains (letter ((myColumnID) - (1)) of (item ((myRowID) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v]))?>>> then\n    set [mycheckvar v] to (join [1] (join (letter (2) of (myCheckVar)) (join (letter (3) of (myCheckVar)) (letter (4) of (myCheckVar)))))\nend\nif <<<(letter (myColumnID) of (item (((myRowID) + (((stagePlat) - (1)) * (17))) - (1)) of [platformerleveldata v])) = [!]> or <(letter (myColumnID) of (item (((myRowID) + (((stagePlat) - (1)) * (17))) - (1)) of [platformerleveldata v])) = ((myMaterialID) + (1))>> or <<(myMaterialID) = [0]> and <[availableslopematerials v] contains (letter (myColumnID) of (item (((myRowID) + (((stagePlat) - (1)) * (17))) - (1)) of [platformerleveldata v]))?>>> then\n    set [mycheckvar v] to (join (letter (1) of (myCheckVar)) (join [1] (join (letter (3) of (myCheckVar)) (letter (4) of (myCheckVar)))))\nend\nif <<<(letter ((myColumnID) - (-1)) of (item ((myRowID) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v])) = [!]> or <(letter ((myColumnID) - (-1)) of (item ((myRowID) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v])) = ((myMaterialID) + (1))>> or <<(myMaterialID) = [0]> and <[availableslopematerials v] contains (letter ((myColumnID) - (-1)) of (item ((myRowID) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v]))?>>> then\n    set [mycheckvar v] to (join (letter (1) of (myCheckVar)) (join (letter (2) of (myCheckVar)) (join [1] (letter (4) of (myCheckVar)))))\nend\nif <<<(letter (myColumnID) of (item (((myRowID) + (((stagePlat) - (1)) * (17))) - (-1)) of [platformerleveldata v])) = [!]> or <(letter (myColumnID) of (item (((myRowID) + (((stagePlat) - (1)) * (17))) - (-1)) of [platformerleveldata v])) = ((myMaterialID) + (1))>> or <<(myMaterialID) = [0]> and <[availableslopematerials v] contains (letter (myColumnID) of (item (((myRowID) + (((stagePlat) - (1)) * (17))) - (-1)) of [platformerleveldata v]))?>>> then\n    set [mycheckvar v] to (join (letter (1) of (myCheckVar)) (join (letter (2) of (myCheckVar)) (join (letter (3) of (myCheckVar)) [1])))\nend\n\nwhen I receive [resetplatformer v]\ndelete this clone\n\nwhen I receive [resetplatformer v]\nset [themeplat v] to [n]\nset [activeplatedit v] to [0]\nset [materialplat v] to [0]\n\nwhen I start as a clone\nset [amiaclone? v] to [1]\nset [ghost v] effect to (0)\nshow\nforever\n    if <(playState) = [platTest]> then\n        switch costume to (join (costume [name v]) [b])\n        stamp\n        delete this clone\n    end\nend\n\ndefine redrawSCREEN\nerase all\ngo to x: (-232) y: (113)\nset [countrow v] to (((stagePlat) - (1)) * (17))\nrepeat (17)\n    set x to (-232)\n    change [countrow v] by (1)\n    set [countcolumn v] to [0]\n    repeat (32)\n        change [countcolumn v] by (1)\n        if <<[availableslopematerials v] contains (letter (countCOLUMN) of (item (countROW) of [platformerleveldata v]))?> or <[availableplatformermaterials v] contains (letter (countCOLUMN) of (item (countROW) of [platformerleveldata v]))?>> then\n            set [myrowid v] to ((countROW) - (((stagePlat) - (1)) * (17)))\n            set [mycolumnid v] to (countCOLUMN)\n            if <[availableslopematerials v] contains (letter (countCOLUMN) of (item (countROW) of [platformerleveldata v]))?> then\n                set [mymaterialid v] to (letter (countCOLUMN) of (item (countROW) of [platformerleveldata v]))\n            else\n                set [mymaterialid v] to ((letter (countCOLUMN) of (item (countROW) of [platformerleveldata v])) - (1))\n            end\n            set [mystageid v] to (stagePlat)\n            create clone of (_myself_ v)\n        end\n        change x by (15)\n    end\n    change y by (-15)\nend\n\nwhen I receive [enterstage v]\nif <(amiaclone?) = [0]> then\n    redrawSCREEN\nelse\n    delete this clone\nend\n\nwhen flag clicked\ndelete all of [availableplatformermaterials v]\nadd [1] to [availableplatformermaterials v]\nadd [2] to [availableplatformermaterials v]\nadd [3] to [availableplatformermaterials v]\nadd [4] to [availableplatformermaterials v]\n\nwhen I receive [enterstage v]\nset [activeplatedit v] to [0]\n\ndefine erase\nset [tempsave v] to (item ((row) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v])\nset [rep v] to [0]\ndelete all of [tempsavelist v]\nrepeat (32)\n    change [rep v] by (1)\n    if <(rep) = (column)> then\n        add [0] to [tempsavelist v]\n    else\n        add (letter (rep) of (tempSave)) to [tempsavelist v]\n    end\nend\nreplace item ((row) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v] with []\nset [rep v] to [0]\nrepeat (32)\n    change [rep v] by (1)\n    replace item ((row) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v] with (join (item ((row) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v]) (item (rep) of [tempsavelist v]))\nend\nredrawSCREEN\n\nwhen I receive [eraseblock v]\nif <(amiaclone?) = [0]> then\n    redrawSCREEN\nelse\n    delete this clone\nend\n\nwhen I receive [platformereditmode v]\nset [portalyet? v] to [0]\ndelete this clone\n\nset [materialplat v] to [slope]\n\nwhen flag clicked\ndelete all of [availableslopematerials v]\nadd [z] to [availableslopematerials v]\nadd [y] to [availableslopematerials v]\nadd [x] to [availableslopematerials v]\nadd [w] to [availableslopematerials v]\nadd [n] to [availableslopematerials v]\nadd [m] to [availableslopematerials v]\nadd [s] to [availableslopematerials v]\nadd [t] to [availableslopematerials v]\nadd [u] to [availableslopematerials v]\nadd [v] to [availableslopematerials v]\n\nwhen flag clicked\ndelete all of [slopeheights v]\nadd [5] to [slopeheights v]\nadd [4] to [slopeheights v]\nadd [3] to [slopeheights v]\nadd [2] to [slopeheights v]\nadd [1] to [slopeheights v]\nadd [1] to [slopeheights v]\nadd [2] to [slopeheights v]\nadd [3] to [slopeheights v]\nadd [4] to [slopeheights v]\nadd [5] to [slopeheights v]\n\ndefine translate (x) (y)\nset [xtranslatedforpositionlock v] to ((-232) + (((x) - (1)) * (15)))\nset [ytranslatedforpositionlock v] to ((113) - (((y) - (1)) * (15)))\n\ntranslate ((32) - ((1) + (item (item # of (slopeMaterial) in [availableslopematerials v]) of [slopeheights v]))) (item (item # of (slopeMaterial) in [availableslopematerials v]) of [slopeheights v])\n\n@tab1\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(playState) = [platformer]> then\n        show\n        if <(stagePlat) = [1]> then\n            if <not <(costume [number v]) = [3]>> then\n                next costume\n            end\n        else\n            if <not <(costume [number v]) = [1]>> then\n                switch costume to ((costume [number v]) - (1))\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [enterplatformer v]\nswitch costume to (page1_5 v)\nset [ghost v] effect to (100)\ngo to x: (0) y: (-15)\nwait (0.3) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (-1)\nend\n\nwhen I receive [resetplatformer v]\nset [stageplat v] to [1]\nset [numberofstages v] to [1]\n\nwhen this sprite clicked\nif <[1] = (portalEDITING)> then\n    broadcast (CANCEL portal v)\nend\nwait (0) seconds\nif <not <(stagePlat) = [1]>> then\n    set [stageplat v] to [1]\n    broadcast (enterStage v)\n    broadcast (newStagePlat v)\nend\n\nwhen this sprite clicked\n\nbroadcast (newStagePlat v)\n\n@tab2\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <<(playState) = [platformer]> and <[1] < (numberOfStages)>> then\n        show\n        if <(stagePlat) = [2]> then\n            if <not <(costume [number v]) = [3]>> then\n                next costume\n            end\n        else\n            if <not <(costume [number v]) = [1]>> then\n                switch costume to ((costume [number v]) - (1))\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <[1] = (portalEDITING)> then\n    broadcast (CANCEL portal v)\nend\nwait (0) seconds\nif <not <(stagePlat) = [2]>> then\n    set [stageplat v] to [2]\n    broadcast (newStagePlat v)\n    broadcast (enterStage v)\nend\n\nwhen this sprite clicked\n\nif <[1] = (portalEDITING)> then\n    broadcast (CANCEL portal v)\nend\nwait (0) seconds\n\n@tab3\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <<(playState) = [platformer]> and <[2] < (numberOfStages)>> then\n        show\n        if <(stagePlat) = [3]> then\n            if <not <(costume [number v]) = [3]>> then\n                next costume\n            end\n        else\n            if <not <(costume [number v]) = [1]>> then\n                switch costume to ((costume [number v]) - (1))\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <[1] = (portalEDITING)> then\n    broadcast (CANCEL portal v)\nend\nwait (0) seconds\nif <not <(stagePlat) = [3]>> then\n    set [stageplat v] to [3]\n    broadcast (newStagePlat v)\n    broadcast (enterStage v)\nend\n\nwhen this sprite clicked\n\n@tab4\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <<(playState) = [platformer]> and <[3] < (numberOfStages)>> then\n        show\n        if <(stagePlat) = [4]> then\n            if <not <(costume [number v]) = [3]>> then\n                next costume\n            end\n        else\n            if <not <(costume [number v]) = [1]>> then\n                switch costume to ((costume [number v]) - (1))\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <[1] = (portalEDITING)> then\n    broadcast (CANCEL portal v)\nend\nwait (0) seconds\nif <not <(stagePlat) = [4]>> then\n    set [stageplat v] to [4]\n    broadcast (newStagePlat v)\n    broadcast (enterStage v)\nend\n\nwhen this sprite clicked\nif <[1] = (portalEDITING)> then\n    broadcast (CANCEL portal v)\nend\n\n@tab5\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <<(playState) = [platformer]> and <[4] < (numberOfStages)>> then\n        show\n        if <(stagePlat) = [5]> then\n            if <not <(costume [number v]) = [3]>> then\n                next costume\n            end\n        else\n            if <not <(costume [number v]) = [1]>> then\n                switch costume to ((costume [number v]) - (1))\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <[1] = (portalEDITING)> then\n    broadcast (CANCEL portal v)\nend\nwait (0) seconds\nif <not <(stagePlat) = [5]>> then\n    set [stageplat v] to [5]\n    broadcast (newStagePlat v)\n    broadcast (enterStage v)\nend\n\nwhen this sprite clicked\nif <[1] = (portalEDITING)> then\n    broadcast (CANCEL portal v)\nend\n\n@Sprite5\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(playState) = [platformer]> then\n        show\n        if <(numberOfStages) = [5]> then\n            switch costume to (plusdeactive v)\n        else\n            switch costume to (plusactive v)\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [enterplatformer v]\nswitch costume to (plusactive v)\nset [ghost v] effect to (100)\ngo to x: (0) y: (-15)\nwait (0.35) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (-1)\nend\n\nwhen this sprite clicked\nif <[1] = (portalEDITING)> then\n    broadcast (CANCEL portal v)\nend\nwait (0) seconds\nif <not <(numberOfStages) = [5]>> then\n    change [numberofstages v] by (1)\n    set [stageplat v] to (numberOfStages)\n    broadcast (enterStage v)\n    broadcast (rightSHIFT v)\nend\n\nwhen I receive [rightshift v]\nset [shiftvar v] to [5]\nrepeat (5)\n    change x by ((2) * (SHIFTvar))\n    change [shiftvar v] by (-1)\nend\n\ngo to x: (0) y: (0)\n\nwhen I receive [leftshift v]\nset [shiftvar v] to [5]\nwait (0.05) seconds\nrepeat (5)\n    change x by ((-2) * (SHIFTvar))\n    change [shiftvar v] by (-1)\nend\n\nwhen this sprite clicked\nif <[1] = (portalEDITING)> then\n    broadcast (CANCEL portal v)\nend\n\n@Sprite6\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(playState) = [platformer]> then\n        show\n        if <(numberOfStages) = [1]> then\n            switch costume to (deletedeactive v)\n        else\n            switch costume to (deleteactive v)\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [enterplatformer v]\nswitch costume to (plusactive v)\nset [ghost v] effect to (100)\ngo to x: (0) y: (-15)\nwait (0.4) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (-1)\nend\n\nwhen I receive [rightshift v]\nset [shiftvar v] to [5]\nwait (0.05) seconds\nrepeat (5)\n    change x by ((2) * (SHIFTvar))\n    change [shiftvar v] by (-1)\nend\n\nwhen this sprite clicked\nif <[1] = (portalEDITING)> then\n    broadcast (CANCEL portal v)\nend\nwait (0) seconds\nif <not <(numberOfStages) = [1]>> then\n    change [numberofstages v] by (-1)\n    set [stageplat v] to (numberOfStages)\n    broadcast (enterStage v)\n    broadcast (leftSHIFT v)\nend\n\nwhen I receive [leftshift v]\nset [shiftvar v] to [5]\nrepeat (5)\n    change x by ((-2) * (SHIFTvar))\n    change [shiftvar v] by (-1)\nend\n\nwhen this sprite clicked\nif <[1] = (portalEDITING)> then\n    broadcast (CANCEL portal v)\nend\n\n@back\n\ngo to x: (0) y: (0)\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <<<(playState) = [platformer]> or <(playState) = [modifyPLAT]>> or <(playState) = [platTest]>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <(playState) = [platformer]> then\n    set [playstate v] to [menu]\n    broadcast (home v)\n    if <<(flagMOVE) = [1]> or <(ballMOVE) = [1]>> then\n        broadcast (cancelFlagMOVE v)\n    end\n    broadcast (resetPlatformer v)\nelse\n    set [playstate v] to [platformer]\n    broadcast (enterStage v)\nend\n\nwhen I receive [enterplatformer v]\nset [ghost v] effect to (100)\ngo to x: (0) y: (-15)\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (-1)\nend\n\nwhen this sprite clicked\nif <[1] = (portalEDITING)> then\n    broadcast (CANCEL portal v)\nend\n\nif <(playState) = [platTest]> then\n    set [playstate v] to [platformer]\n    broadcast (enterStage v)\nelse\nend\n\n@add\n\ngo to x: (0) y: (0)\n\nwhen flag clicked\nset [extendedplat v] to [0]\ngo to x: (0) y: (0)\nforever\n    if <(playState) = [platformer]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [enterplatformer v]\nset [ghost v] effect to (100)\ngo to x: (0) y: (-15)\nwait (0.05) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (-1)\nend\n\nwhen this sprite clicked\nset [activeplatedit v] to [0]\nif <<(flagMOVE) = [1]> or <(ballMOVE) = [1]>> then\n    broadcast (cancelFlagMOVE v)\nend\nif <(platTRANSITION) = [0]> then\n    if <(extendedPLAT) = [0]> then\n        broadcast (extendADD v)\n        set [extendedplat v] to [1]\n    else\n        broadcast (closeADD v)\n    end\nend\n\nwhen this sprite clicked\nif <[1] = (portalEDITING)> then\n    broadcast (CANCEL portal v)\nend\n\n@decoration\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <<(playState) = [platformer]> and <(extendedPLAT) = [1]>> then\n        go to [front v] layer\n        show\n        if <(Theme) = [1]> then\n            switch costume to (add copy 2 v)\n        else\n            switch costume to (add copy 5 v)\n        end\n    else\n        set [ghost v] effect to (100)\n        hide\n    end\nend\n\nwhen I receive [extendadd v]\ngo to x: (0) y: (-51)\nset [myanimvar v] to [6]\nrepeat (6)\n    change y by (myanimVAR)\n    change [myanimvar v] by (-1)\n    change [ghost v] effect by (-20)\nend\n\nwhen I receive [closeadd v]\nset [plattransition v] to [1]\nwait (0.2) seconds\nset [myanimvar v] to [-6]\nrepeat (6)\n    change y by (myanimVAR)\n    change [myanimvar v] by (1)\n    change [ghost v] effect by (20)\nend\nset [extendedplat v] to [0]\nset [plattransition v] to [0]\n\nwhen this sprite clicked\nbroadcast (closeADD v)\n\ngo to [front v] layer\n\n@portal\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <<(playState) = [platformer]> and <(extendedPLAT) = [1]>> then\n        go to [front v] layer\n        show\n        if <(portalYET?) = [0]> then\n            switch costume to (add copy 4 v)\n        else\n            switch costume to (add copy 2 v)\n        end\n    else\n        set [ghost v] effect to (100)\n        hide\n    end\nend\n\nwhen I receive [extendadd v]\ngo to x: (0) y: (-81)\nwait (0.05) seconds\nset [myanimvar v] to [6]\nrepeat (6)\n    change y by (myanimVAR)\n    change [myanimvar v] by (-1)\n    change [ghost v] effect by (-20)\nend\n\nwhen I receive [closeadd v]\nwait (0.15) seconds\nset [myanimvar v] to [-6]\nrepeat (6)\n    change y by (myanimVAR)\n    change [myanimvar v] by (1)\n    change [ghost v] effect by (20)\nend\n\nwhen this sprite clicked\nif <(portalYET?) = [0]> then\n    broadcast (closeADD v)\n    wait (0.1) seconds\n    set [portalediting v] to [1]\nend\n\nwhen I receive [resetplatformer v]\nset [portalediting v] to [0]\n\nwhen flag clicked\nset [portalyet? v] to [0]\n\ngo to [front v] layer\n\n@slope\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <<(playState) = [platformer]> and <(extendedPLAT) = [1]>> then\n        show\n        go to [front v] layer\n    else\n        set [ghost v] effect to (100)\n        hide\n    end\nend\n\nwhen I receive [extendadd v]\ngo to x: (0) y: (-111)\nwait (0.1) seconds\nset [myanimvar v] to [6]\nrepeat (6)\n    change y by (myanimVAR)\n    change [myanimvar v] by (-1)\n    change [ghost v] effect by (-20)\nend\n\nwhen I receive [closeadd v]\nwait (0.1) seconds\nset [myanimvar v] to [-6]\nrepeat (6)\n    change y by (myanimVAR)\n    change [myanimvar v] by (1)\n    change [ghost v] effect by (20)\nend\n\nwhen this sprite clicked\nif <<(ballMOVE) = [1]> or <(flagMOVE) = [1]>> then\n    broadcast (cancelFlagMOVE v)\n    wait (0) seconds\nend\nbroadcast (closeADD v)\nwait (0.1) seconds\nset [activeplatedit v] to [1]\nset [slopematerial v] to [n]\nset [materialplat v] to [slope]\n\nwhen [left arrow v] key pressed\nif <<(activePlatEdit) = [1]> and <(materialPlat) = [slope]>> then\n    if <not <([costume name v] of [editor v]) = [v]>> then\n        set [slopematerial v] to (item ((1) + (item # of (slopeMaterial) in [availableslopematerials v])) of [availableslopematerials v])\n    end\nend\n\nwhen [right arrow v] key pressed\nif <<(activePlatEdit) = [1]> and <(materialPlat) = [slope]>> then\n    if <not <([costume name v] of [editor v]) = [z]>> then\n        set [slopematerial v] to (item ((-1) + (item # of (slopeMaterial) in [availableslopematerials v])) of [availableslopematerials v])\n    end\nend\n\n@key\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <<(playState) = [platformer]> and <(extendedPLAT) = [1]>> then\n        show\n        go to [front v] layer\n    else\n        set [ghost v] effect to (100)\n        hide\n    end\nend\n\nwhen I receive [extendadd v]\ngo to x: (0) y: (-141)\nwait (0.15) seconds\nset [myanimvar v] to [6]\nrepeat (6)\n    change y by (myanimVAR)\n    change [myanimvar v] by (-1)\n    change [ghost v] effect by (-20)\nend\n\nwhen I receive [closeadd v]\nwait (0.05) seconds\nset [myanimvar v] to [-6]\nrepeat (6)\n    change y by (myanimVAR)\n    change [myanimvar v] by (1)\n    change [ghost v] effect by (20)\nend\n\nwhen this sprite clicked\nif <(inKeyDrawerTransition) = [0]> then\n    broadcast (openKeyDrawer v)\n    set [inkeydrawertransition v] to [1]\nelse\n    broadcast (closeKeyDrawer v)\nend\n\nwhen flag clicked\nset [inkeydrawertransition v] to [0]\n\n@rocket\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <<(playState) = [platformer]> and <(extendedPLAT) = [1]>> then\n        show\n        go to [front v] layer\n    else\n        set [ghost v] effect to (100)\n        hide\n    end\nend\n\nwhen I receive [extendadd v]\nset [plattransition v] to [1]\ngo to x: (0) y: (-171)\nwait (0.2) seconds\nset [myanimvar v] to [6]\nrepeat (6)\n    change y by (myanimVAR)\n    change [myanimvar v] by (-1)\n    change [ghost v] effect by (-20)\nend\nset [plattransition v] to [0]\n\nwhen I receive [closeadd v]\nset [myanimvar v] to [-6]\nrepeat (6)\n    change y by (myanimVAR)\n    change [myanimvar v] by (1)\n    change [ghost v] effect by (20)\nend\n\nwhen I receive [resetplatformer v]\nset [rocketsenabled? v] to [00000]\n\nwhen this sprite clicked\nbroadcast (closeADD v)\nif <(letter (stagePlat) of (rocketsEnabled?)) = [0]> then\n    set [temporarytranscriptionforrocketrewriting v] to []\n    repeat ((stagePlat) - (1))\n        set [temporarytranscriptionforrocketrewriting v] to (join (temporaryTranscriptionForRocketRewriting) (letter ((length of (temporaryTranscriptionForRocketRewriting)) + (1)) of (rocketsEnabled?)))\n    end\n    set [temporarytranscriptionforrocketrewriting v] to (join (temporaryTranscriptionForRocketRewriting) [1])\n    repeat ((5) - (stagePlat))\n        set [temporarytranscriptionforrocketrewriting v] to (join (temporaryTranscriptionForRocketRewriting) (letter ((length of (temporaryTranscriptionForRocketRewriting)) + (1)) of (rocketsEnabled?)))\n    end\n    set [rocketsenabled? v] to (temporaryTranscriptionForRocketRewriting)\nelse\n    set [temporarytranscriptionforrocketrewriting v] to []\n    repeat ((stagePlat) - (1))\n        set [temporarytranscriptionforrocketrewriting v] to (join (temporaryTranscriptionForRocketRewriting) (letter ((length of (temporaryTranscriptionForRocketRewriting)) + (1)) of (rocketsEnabled?)))\n    end\n    set [temporarytranscriptionforrocketrewriting v] to (join (temporaryTranscriptionForRocketRewriting) [0])\n    repeat ((5) - (stagePlat))\n        set [temporarytranscriptionforrocketrewriting v] to (join (temporaryTranscriptionForRocketRewriting) (letter ((length of (temporaryTranscriptionForRocketRewriting)) + (1)) of (rocketsEnabled?)))\n    end\n    set [rocketsenabled? v] to (temporaryTranscriptionForRocketRewriting)\nend\nbroadcast (rocketIndicatorVisualEffectActivate v)\n\nwhen I receive [resetplatformer v]\nset [rocketsenabled? v] to [00000]\n\n@edit\n\ngo to x: (0) y: (0)\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(playState) = [platformer]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [enterplatformer v]\nset [ghost v] effect to (100)\ngo to x: (0) y: (-15)\nwait (0.1) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (-1)\nend\n\nwhen this sprite clicked\nif <<(flagMOVE) = [1]> or <(ballMOVE) = [1]>> then\n    broadcast (cancelFlagMOVE v)\nend\n\nwhen this sprite clicked\nif <[1] = (portalEDITING)> then\n    broadcast (CANCEL portal v)\nend\nwait (0) seconds\nset [playstate v] to [modifyPLAT]\nbroadcast (platformerEDITmode v)\n\n@save\n\ngo to x: (0) y: (0)\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(playState) = [platformer]> then\n        show\n        if <key (f v) pressed?> then\n            switch costume to (l01 copy 2 v)\n        else\n            switch costume to (l01 copy 90 v)\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [enterplatformer v]\nset [ghost v] effect to (100)\ngo to x: (0) y: (-15)\nwait (0.15) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (-1)\nend\n\nwhen this sprite clicked\nif <<(flagMOVE) = [1]> or <(ballMOVE) = [1]>> then\n    broadcast (cancelFlagMOVE v)\nend\n\nwhen this sprite clicked\nif <[1] = (portalEDITING)> then\n    broadcast (CANCEL portal v)\nend\n\n@test\n\ngo to x: (0) y: (0)\n\nwhen flag clicked\nerase all\ngo to x: (0) y: (0)\nforever\n    if <(playState) = [platformer]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nbroadcast (BeginPlatTest v)\nset [playstate v] to [platTest]\n\nwhen I receive [enterplatformer v]\nset [ghost v] effect to (100)\ngo to x: (0) y: (-15)\nwait (0.2) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (-1)\nend\n\nwhen this sprite clicked\nif <<(flagMOVE) = [1]> or <(ballMOVE) = [1]>> then\n    broadcast (cancelFlagMOVE v)\nend\n\nwhen this sprite clicked\nif <[1] = (portalEDITING)> then\n    broadcast (CANCEL portal v)\nend\n\n@clear\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(playState) = [platformer]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [enterplatformer v]\nset [ghost v] effect to (100)\ngo to x: (0) y: (-15)\nwait (0.25) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (-1)\nend\n\nwhen this sprite clicked\nzap\nbroadcast (enterStage v)\n\ndefine zap\nset [count v] to (((stagePlat) - (1)) * (17))\nrepeat (2)\n    change [count v] by (1)\n    replace item (count) of [platformerleveldata v] with [00000000000000000000000000000000]\nend\nchange [count v] by (1)\nreplace item (count) of [platformerleveldata v] with [00b00000000000000000000000000000]\nrepeat (11)\n    change [count v] by (1)\n    replace item (count) of [platformerleveldata v] with [00000000000000000000000000000000]\nend\nchange [count v] by (1)\nreplace item (count) of [platformerleveldata v] with [00b00000000000000000000000000f00]\nrepeat (2)\n    change [count v] by (1)\n    replace item (count) of [platformerleveldata v] with [00000000000000000000000000000000]\nend\n\nwhen this sprite clicked\nif <<(flagMOVE) = [1]> or <(ballMOVE) = [1]>> then\n    broadcast (cancelFlagMOVE v)\nend\n\nwhen this sprite clicked\nif <[1] = (portalEDITING)> then\n    broadcast (CANCEL portal v)\nend\n\n@Flag\n\nwhen flag clicked\nforever\n    if <<(playState) = [platformer]> or <(playState) = [platTest]>> then\n        show\n        if <(playState) = [platformer]> then\n            if <(flagLock) = [1]> then\n                switch costume to (join [LockedFlag] (stagePlat))\n            else\n                switch costume to (join [Flag] (stagePlat))\n            end\n        else\n            if <<(flagLock) = [1]> and <(keyObtained?) = [0]>> then\n                switch costume to (join [LockedFlag] (stagePlat))\n            else\n                switch costume to (join [Flag] (stagePlat))\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [enterstage v]\ngo to x: (0) y: (0)\nfindLOCATION [f]\ntranslateANDmove (countLOCATION) (countROW)\n\ndefine findLOCATION (find)\nset [countrow v] to (((stagePlat) - (1)) * (17))\nrepeat (17)\n    change [countrow v] by (1)\n    set [countlocation v] to [0]\n    repeat (32)\n        change [countlocation v] by (1)\n        if <(find) = (letter (countLOCATION) of (item (countROW) of [platformerleveldata v]))> then\n            change [countrow v] by (() - (((stagePlat) - (1)) * (17)))\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [enterplatformer v]\nbroadcast (enterStage v)\n\ndefine translateANDmove (x) (y)\ngo to x: ((-232) + (((x) - (1)) * (15))) y: ((113) - (((y) - (1)) * (15)))\n\nwhen this sprite clicked\nif <not <(playState) = [platTest]>> then\n    if <(flagMOVE) = [0]> then\n        set [activeplatedit v] to [0]\n        set [flagmove v] to [1]\n        repeat until <(flagMOVE) = [0]>\n            show\n            if <(round (((15) * (round (((mouse x) + (7.5)) / (15)))) - (7.5))) > [218]> then\n                set x to (218)\n            else\n                set x to (((15) * (round (((mouse x) + (7.5)) / (15)))) - (7.5))\n            end\n            if <not <<(round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))) < [-127]> or <[83] < (round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5)))>>> then\n                set y to (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))\n                if <<[224] < (mouse x)> or <(mouse x) < [-239]>> then\n                    set [ghost v] effect to (50)\n                else\n                    set [ghost v] effect to (0)\n                end\n            else\n                if <(round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))) < [-127]> then\n                    set y to (-127)\n                    set [ghost v] effect to (50)\n                else\n                    set y to (83)\n                    set [ghost v] effect to (50)\n                end\n            end\n            set [row v] to ((1) + ([abs v] of ((16) - (((round (((15) * (round (((y position) + (7.5)) / (15)))) - (7.5))) + (127)) / (15))) ))\n            set [column v] to (round (((round (((15) * (round (((x position) + (7.5)) / (15)))) - (7.5))) / (15)) + (16.47)))\n        end\n    else\n        replace\n        broadcast (enterStage v)\n    end\nend\n\nwhen flag clicked\nset [flagmove v] to [0]\n\nwhen I receive [enterstage v]\nset [flagmove v] to [0]\n\ndefine decodeLOCATION (x) (y)\nset [countlocation v] to (round (((247) + (x)) / (15)))\nset [countrow v] to (round (() - (((y) - (128)) / (15))))\n\ndefine replace\nif <(letter (round (((247) + (x position)) / (15))) of (item ((round (() - (((y position) - (128)) / (15)))) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v])) = [0]> then\n    set [flagmove v] to [0]\n    findLOCATION [f]\n    set [transcribe v] to []\n    set [repround v] to [0]\n    repeat (32)\n        change [repround v] by (1)\n        if <(repRound) = (countLOCATION)> then\n            set [transcribe v] to (join (transcribe) [0])\n        else\n            set [transcribe v] to (join (transcribe) (letter (repRound) of (item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v])))\n        end\n    end\n    replace item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v] with (transcribe)\n    decodeLOCATION (x position) (y position)\n    set [transcribe v] to []\n    set [repround v] to [0]\n    repeat (32)\n        change [repround v] by (1)\n        if <(repRound) = (countLOCATION)> then\n            set [transcribe v] to (join (transcribe) [f])\n        else\n            set [transcribe v] to (join (transcribe) (letter (repRound) of (item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v])))\n        end\n    end\n    replace item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v] with (transcribe)\nend\n\nwhen flag clicked\nforever\n    if <(playState) = [platformer]> then\n        if <(flagMOVE) = [0]> then\n            set [ghost v] effect to (0)\n        end\n    end\nend\n\nwhen I receive [cancelflagmove v]\nbroadcast (enterStage v)\n\nwhen this sprite clicked\nbroadcast (closeADD v)\n\nwhen this sprite clicked\nif <(ballMOVE) = [1]> then\n    broadcast (cancelFlagMOVE v)\nend\n\nwhen this sprite clicked\nif <[1] = (portalEDITING)> then\n    broadcast (CANCEL portal v)\nend\n\nwhen I receive [beginplattest v]\nif <(flagPhysics?) = [1]> then\n    set [myinitialx v] to (x position)\n    set [myinitialy v] to (y position)\n    resetPlatPlayVariables\n    repeat until <not <(playState) = [platTest]>>\n        physics\n    end\n    resetPlatPlayVariables\nend\n\ndefine Check All\nset [mycheckvar v] to [0]\nset [mywatercheckvar v] to [0]\nif <(Theme) = [1]> then\n    if <touching color (#3bbd1c)?> then\n        set [mycheckvar v] to [1]\n    end\n    if <touching color (#fdcf01)?> then\n        set [mycheckvar v] to [2]\n    end\n    if <touching color (#4397df)?> then\n        set [mywatercheckvar v] to [1]\n    end\n    if <touching color (#ef1e50)?> then\n        set [mycheckvar v] to [1]\n    end\n    if <[0] < (gravity)> then\n        if <(y position) < [-175]> then\n            resetPlatPlayVariables\n            go to x: (myInitialX) y: (myInitialY)\n        end\n    else\n        if <[175] < (y position)> then\n            resetPlatPlayVariables\n            go to x: (myInitialX) y: (myInitialY)\n        end\n    end\nend\n\ndefine Snap up\nCheck All\nset [mychangdetvar v] to (() - ((myY) / ([abs v] of (myY) )))\nrepeat until <(myCheckVar) = [0]>\n    change y by (myChangDETVAR)\n    set [myy v] to [0]\n    Check All\nend\n\ndefine Gravity\nif <<(myCheckVar) = [0]> and <(myWaterCheckVar) = [1]>> then\n    set [myy v] to ((myY) * (0.9))\n    change [myy v] by (() - ((gravity) * ((density) - (0.8))))\nelse\n    change [myy v] by (() - (gravity))\nend\nchange y by (myY)\nSnap up\nchange y by (-1)\nCheck All\nif <(myCheckVar) = [2]> then\n    set [myy v] to [12]\nend\nchange y by (1)\n\ndefine physics\nCheck All\nportals\nGravity\n\ndefine resetPlatPlayVariables\nset [myx v] to [0]\nset [myy v] to [0]\n\nif <not <(playState) = [platTest]>> then\n    stop [this script v]\nend\n\ndefine portals\nif <(flagsThroughPortals?) = [1]> then\n    if <<touching (portal-2 v)?> or <touching (portal-1 v)?>> then\n        if <<touching (portal-1 v)?> and <(myTouchingPortal?) = [0]>> then\n            resetPlatPlayVariables\n            repeat (10)\n                change [ghost v] effect by (10)\n                if <not <(playState) = [platTest]>> then\n                    stop [this script v]\n                end\n            end\n            go to (portal-2 v)\n            change x by (7.5)\n            change y by (7.5)\n            repeat (10)\n                change [ghost v] effect by (-10)\n                if <not <(playState) = [platTest]>> then\n                    stop [this script v]\n                end\n            end\n            set [mytouchingportal? v] to [1]\n        end\n        if <<touching (portal-2 v)?> and <(myTouchingPortal?) = [0]>> then\n            resetPlatPlayVariables\n            repeat (10)\n                change [ghost v] effect by (10)\n                if <not <(playState) = [platTest]>> then\n                    stop [this script v]\n                end\n            end\n            go to (portal-1 v)\n            change x by (7.5)\n            change y by (7.5)\n            repeat (10)\n                change [ghost v] effect by (-10)\n                if <not <(playState) = [platTest]>> then\n                    stop [this script v]\n                end\n            end\n            set [mytouchingportal? v] to [1]\n        end\n    else\n        set [mytouchingportal? v] to [0]\n    end\nend\n\n\n\n@Ball\n\nwhen flag clicked\nswitch costume to (1ball1 v)\nforever\n    if <<(playState) = [platTest]> or <(playState) = [platformer]>> then\n        show\n        switch costume to (join [1] (join (shape) (color)))\n    else\n        hide\n    end\nend\n\nwhen I receive [enterstage v]\ngo to x: (0) y: (0)\nfindLOCATION [b]\ntranslateANDmove (countLOCATION) (countROW)\n\ndefine findLOCATION (find)\nset [countrow v] to (((stagePlat) - (1)) * (17))\nrepeat (17)\n    change [countrow v] by (1)\n    set [countlocation v] to [0]\n    repeat (32)\n        change [countlocation v] by (1)\n        if <(find) = (letter (countLOCATION) of (item (countROW) of [platformerleveldata v]))> then\n            change [countrow v] by (() - (((stagePlat) - (1)) * (17)))\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [enterplatformer v]\nbroadcast (enterStage v)\n\ndefine translateANDmove (x) (y)\ngo to x: ((-232) + (((x) - (1)) * (15))) y: ((113) - (((y) - (1)) * (15)))\n\nwhen this sprite clicked\nif <(playState) = [platformer]> then\n    if <(ballMOVE) = [0]> then\n        set [activeplatedit v] to [0]\n        set [ballmove v] to [1]\n        repeat until <(ballMOVE) = [0]>\n            show\n            if <(round (((15) * (round (((mouse x) + (7.5)) / (15)))) - (7.5))) > [233]> then\n                set x to (233)\n            else\n                set x to (((15) * (round (((mouse x) + (7.5)) / (15)))) - (7.5))\n            end\n            if <not <<(round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))) < [-127]> or <[113] < (round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5)))>>> then\n                set y to (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))\n                if <<[239] < (mouse x)> or <(mouse x) < [-239]>> then\n                    set [ghost v] effect to (50)\n                else\n                    set [ghost v] effect to (0)\n                end\n            else\n                if <(round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))) < [-127]> then\n                    set y to (-127)\n                    set [ghost v] effect to (50)\n                else\n                    set y to (113)\n                    set [ghost v] effect to (50)\n                end\n            end\n            set [row v] to ((1) + ([abs v] of ((16) - (((round (((15) * (round (((y position) + (7.5)) / (15)))) - (7.5))) + (127)) / (15))) ))\n            set [column v] to (round (((round (((15) * (round (((x position) + (7.5)) / (15)))) - (7.5))) / (15)) + (16.47)))\n        end\n    else\n        replace\n        broadcast (enterStage v)\n    end\nend\n\nwhen flag clicked\nset [ballmove v] to [0]\n\nwhen I receive [enterstage v]\nset [ballmove v] to [0]\n\ndefine decodeLOCATION (x) (y)\nset [countlocation v] to (round (((247) + (x)) / (15)))\nset [countrow v] to (round (() - (((y) - (128)) / (15))))\n\ndefine replace\nif <(letter (round (((247) + (x position)) / (15))) of (item ((round (() - (((y position) - (128)) / (15)))) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v])) = [0]> then\n    set [ballmove v] to [0]\n    findLOCATION [b]\n    set [transcribe v] to []\n    set [repround v] to [0]\n    repeat (32)\n        change [repround v] by (1)\n        if <(repRound) = (countLOCATION)> then\n            set [transcribe v] to (join (transcribe) [0])\n        else\n            set [transcribe v] to (join (transcribe) (letter (repRound) of (item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v])))\n        end\n    end\n    replace item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v] with (transcribe)\n    decodeLOCATION (x position) (y position)\n    set [transcribe v] to []\n    set [repround v] to [0]\n    repeat (32)\n        change [repround v] by (1)\n        if <(repRound) = (countLOCATION)> then\n            set [transcribe v] to (join (transcribe) [b])\n        else\n            set [transcribe v] to (join (transcribe) (letter (repRound) of (item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v])))\n        end\n    end\n    replace item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v] with (transcribe)\nend\n\nwhen flag clicked\nforever\n    if <(ballMOVE) = [0]> then\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen I receive [cancelflagmove v]\nbroadcast (enterStage v)\n\nwhen this sprite clicked\nif <(flagMOVE) = [1]> then\n    broadcast (cancelFlagMOVE v)\nend\n\nwhen this sprite clicked\nif <[1] = (portalEDITING)> then\n    broadcast (CANCEL portal v)\nend\n\nwhen I receive [beginplattest v]\nset [initialx v] to (x position)\nset [initialy v] to (y position)\nresetPlatPlayVariables\nrepeat until <not <(playState) = [platTest]>>\n    Physics Engine\nend\nresetPlatPlayVariables\ngo to x: (initialX) y: (initialY)\n\ndefine Physics Engine\nGravity\nX Movement\nJumping\n\ndefine Check All\nset [checkvar v] to [0]\nset [watercheck v] to [0]\nif <(Theme) = [1]> then\n    if <touching color (#3bbd1c)?> then\n        set [checkvar v] to [1]\n    end\n    if <touching color (#fdcf01)?> then\n        set [checkvar v] to [2]\n    end\n    if <touching color (#4397df)?> then\n        set [watercheck v] to [1]\n    end\n    if <touching color (#ef1e50)?> then\n        resetPlatPlayVariables\n        go to x: (initialX) y: (initialY)\n    end\n    if <touching (keypart v)?> then\n        set [keyobtained? v] to [1]\n    end\n    if <touching (lockpart v)?> then\n        set [keyobtained? v] to [0]\n    end\n    if <touching (flag v)?> then\n        if <<<(keyObtained?) = [1]> and <(flagLock) = [1]>> or <(flagLock) = [0]>> then\n            go to x: (initialX) y: (initialY)\n            set [playstate v] to [platformer]\n            broadcast (enterStage v)\n        end\n    end\n    if <<touching (portal-2 v)?> or <touching (portal-1 v)?>> then\n        if <<touching (portal-1 v)?> and <(touching portal) = [0]>> then\n            go to (portal-2 v)\n            set [y v] to [0]\n            change x by (7.5)\n            change y by (7.5)\n            set [touching portal v] to [1]\n        end\n        if <<touching (portal-2 v)?> and <(touching portal) = [0]>> then\n            go to (portal-1 v)\n            set [y v] to [0]\n            change x by (7.5)\n            change y by (7.5)\n            set [touching portal v] to [1]\n        end\n        set [touching portal v] to [1]\n    else\n        set [touching portal v] to [0]\n    end\n    if <[0] < (gravity)> then\n        if <(y position) < [-175]> then\n            resetPlatPlayVariables\n            go to x: (initialX) y: (initialY)\n        end\n    else\n        if <[175] < (y position)> then\n            resetPlatPlayVariables\n            go to x: (initialX) y: (initialY)\n        end\n    end\nend\n\nwhen I receive [resetplatformer v]\nset [theme v] to [1]\n\nset [checkvar v] to [2]\n\nset [checkvar v] to [F]\n\ndefine resetPlatPlayVariables\nset [x v] to [0]\nset [y v] to [0]\nset [keyobtained? v] to [0]\n\ndefine Gravity\nCheck All\nif <<(checkVar) = [0]> and <(waterCheck) = [1]>> then\n    set [y v] to ((Y) * (0.9))\n    change [y v] by (() - ((gravity) * ((density) - (0.8))))\nelse\n    change [y v] by (() - (gravity))\nend\nchange y by (Y)\nSnap up\n\ndefine Snap up\nCheck All\nset [changedetvar v] to (() - ((Y) / ([abs v] of (Y) )))\nrepeat until <(checkVar) = [0]>\n    change y by (changeDETVAR)\n    set [y v] to [0]\n    Check All\nend\n\nwhen I receive [enterstage v]\nerase all\n\nset [playstate v] to [platformer]\nbroadcast (enterStage v)\n\ndefine X Movement\nCheck All\nif <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n    if <[] = [1]> then\n        change [x v] by ((.75) * ((speed) / (2)))\n    else\n        change [x v] by ((speed) / (2))\n    end\nend\nif <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n    if <[] = [1]> then\n        change [x v] by (() - ((.75) * ((speed) / (2))))\n    else\n        change [x v] by (() - ((speed) / (2)))\n    end\nend\nchange x by (X)\nCheck Walls\nif <[] = [1]> then\n    set [x v] to ((X) * ((1) - (((friction) / (10)) - (0.1))))\nelse\n    set [x v] to ((X) * ((1) - ((friction) / (10))))\nend\n\ndefine Check Walls\nset [upsnapcounter v] to [0]\nCheck All\nrepeat until <<(checkVar) = [0]> or <(upSnapCounter) = [7]>>\n    change [upsnapcounter v] by (1)\n    change y by (1)\n    Check All\nend\nif <(upSnapCounter) = [7]> then\n    change y by (-7)\n    Check All\n    repeat until <(checkVar) = [0]>\n        change x by (() - ((X) / ([abs v] of (X) )))\n        Check All\n    end\n    change x by ((5) * ((X) / ([abs v] of (X) )))\n    Check All\n    change x by (() - ((5) * ((X) / ([abs v] of (X) ))))\n    if <[0] < (gravity)> then\n        if <<(waterCheck) = [0]> and <<<(checkVar) = [1]> or <(checkVar) = [2]>> and <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <<<<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> or <key (d v) pressed?>> or <key (a v) pressed?>>>>> then\n            set [y v] to ((jumpHeight) * (5))\n            set [x v] to (() - ((10) * ((X) / ([abs v] of (X) ))))\n        else\n            set [x v] to [0]\n        end\n    else\n        if <<(waterCheck) = [0]> and <<<(checkVar) = [1]> or <(checkVar) = [2]>> and <<<key (down arrow v) pressed?> or <key (s v) pressed?>> and <<<<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> or <key (d v) pressed?>> or <key (a v) pressed?>>>>> then\n            set [y v] to ((jumpHeight) * (-5))\n            set [x v] to (() - ((10) * ((X) / ([abs v] of (X) ))))\n        else\n            set [x v] to [0]\n        end\n    end\nend\n\nif  then\n\ndefine Jumping\nif <[0] < (gravity)> then\n    change y by (-1)\n    Check All\n    change y by (1)\n    if <<<<(waterCheck) = [1]> or <(checkVar) = [1]>> and <<key (w v) pressed?> or <key (up arrow v) pressed?>>> or <(checkVar) = [2]>> then\n        if <(waterCheck) = [1]> then\n            set [y v] to ((jumpHeight) * (2))\n        else\n            if <(checkVar) = [2]> then\n                if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n                    set [y v] to ((jumpHeight) * (7))\n                else\n                    set [y v] to ((jumpHeight) * (5))\n                end\n            else\n                set [y v] to ((jumpHeight) * (5))\n            end\n        end\n    end\n    if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n        change [y v] by (() - (gravity))\n    end\nelse\n    change y by (1)\n    Check All\n    change y by (-1)\n    if <<<<(waterCheck) = [1]> or <(checkVar) = [1]>> and <<key (s v) pressed?> or <key (down arrow v) pressed?>>> or <(checkVar) = [2]>> then\n        if <(waterCheck) = [1]> then\n            set [y v] to ((jumpHeight) * (-2))\n        else\n            if <(checkVar) = [2]> then\n                if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n                    set [y v] to ((jumpHeight) * (-7))\n                else\n                    set [y v] to ((jumpHeight) * (-5))\n                end\n            else\n                set [y v] to ((jumpHeight) * (-5))\n            end\n        end\n    end\n    if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n        change [y v] by (() - (gravity))\n    end\nend\n\n@ground\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(activePlatEdit) = [1]> then\n        if <(materialPlat) = [0]> then\n            repeat until <(costume [number v]) = [1]>\n                switch costume to ((costume [number v]) - (1))\n            end\n        else\n            repeat until <(costume [number v]) = [4]>\n                next costume\n            end\n        end\n    else\n        repeat until <(costume [number v]) = [4]>\n            next costume\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(playState) = [platformer]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [enterplatformer v]\nset [ghost v] effect to (100)\ngo to x: (0) y: (-15)\nwait (0.5) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (-1)\nend\n\nwhen [right arrow v] key pressed\nif <not <(materialPlat) = [slope]>> then\n    if <(activePlatEdit) = [1]> then\n        if <[3] = (materialPlat)> then\n            set [materialplat v] to [E]\n        else\n            if <[E] = (materialPlat)> then\n                set [materialplat v] to [0]\n            else\n                change [materialplat v] by (1)\n            end\n        end\n    end\nend\n\nwhen [left arrow v] key pressed\nif <not <(materialPlat) = [slope]>> then\n    if <(activePlatEdit) = [1]> then\n        if <[E] = (materialPlat)> then\n            set [materialplat v] to [3]\n        else\n            if <[0] = (materialPlat)> then\n                set [materialplat v] to [E]\n            else\n                change [materialplat v] by (-1)\n            end\n        end\n    end\nend\n\nwhen this sprite clicked\nif <<(ballMOVE) = [1]> or <(flagMOVE) = [1]>> then\n    broadcast (cancelFlagMOVE v)\n    wait (0) seconds\nend\nif <(activePlatEdit) = [1]> then\n    if <[0] = (materialPlat)> then\n        set [activeplatedit v] to [0]\n    else\n        set [materialplat v] to [0]\n    end\nelse\n    set [activeplatedit v] to [1]\n    set [materialplat v] to [0]\n    if <(extendedPLAT) = [1]> then\n        broadcast (closeADD v)\n    end\nend\n\nwhen this sprite clicked\nif <[1] = (portalEDITING)> then\n    broadcast (CANCEL portal v)\nend\n\n@lava\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(activePlatEdit) = [1]> then\n        if <(materialPlat) = [1]> then\n            repeat until <(costume [number v]) = [1]>\n                switch costume to ((costume [number v]) - (1))\n            end\n        else\n            repeat until <(costume [number v]) = [4]>\n                next costume\n            end\n        end\n    else\n        repeat until <(costume [number v]) = [4]>\n            next costume\n        end\n    end\nend\n\nwhen this sprite clicked\n\nwhen flag clicked\nforever\n    if <(playState) = [platformer]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [enterplatformer v]\nset [ghost v] effect to (100)\ngo to x: (0) y: (-15)\nwait (0.55) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (-1)\nend\n\nwhen this sprite clicked\nif <<(ballMOVE) = [1]> or <(flagMOVE) = [1]>> then\n    broadcast (cancelFlagMOVE v)\n    wait (0) seconds\nend\nif <(activePlatEdit) = [1]> then\n    if <[1] = (materialPlat)> then\n        set [activeplatedit v] to [0]\n    else\n        set [materialplat v] to [1]\n    end\nelse\n    set [activeplatedit v] to [1]\n    set [materialplat v] to [1]\n    if <(extendedPLAT) = [1]> then\n        broadcast (closeADD v)\n    end\nend\n\nwhen this sprite clicked\nif <[1] = (portalEDITING)> then\n    broadcast (CANCEL portal v)\nend\n\n@bounce\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(activePlatEdit) = [1]> then\n        if <(materialPlat) = [2]> then\n            repeat until <(costume [number v]) = [1]>\n                switch costume to ((costume [number v]) - (1))\n            end\n        else\n            repeat until <(costume [number v]) = [4]>\n                next costume\n            end\n        end\n    else\n        repeat until <(costume [number v]) = [4]>\n            next costume\n        end\n    end\nend\n\nwhen this sprite clicked\n\nwhen flag clicked\nforever\n    if <(playState) = [platformer]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [enterplatformer v]\nset [ghost v] effect to (100)\ngo to x: (0) y: (-15)\nwait (0.6) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (-1)\nend\n\nwhen this sprite clicked\nif <<(ballMOVE) = [1]> or <(flagMOVE) = [1]>> then\n    broadcast (cancelFlagMOVE v)\n    wait (0) seconds\nend\nif <(activePlatEdit) = [1]> then\n    if <[2] = (materialPlat)> then\n        set [activeplatedit v] to [0]\n    else\n        set [materialplat v] to [2]\n    end\nelse\n    set [activeplatedit v] to [1]\n    set [materialplat v] to [2]\n    if <(extendedPLAT) = [1]> then\n        broadcast (closeADD v)\n    end\nend\n\nwhen this sprite clicked\nif <[1] = (portalEDITING)> then\n    broadcast (CANCEL portal v)\nend\n\n@water\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(activePlatEdit) = [1]> then\n        if <(materialPlat) = [3]> then\n            repeat until <(costume [number v]) = [1]>\n                switch costume to ((costume [number v]) - (1))\n            end\n        else\n            repeat until <(costume [number v]) = [4]>\n                next costume\n            end\n        end\n    else\n        repeat until <(costume [number v]) = [4]>\n            next costume\n        end\n    end\nend\n\nwhen this sprite clicked\n\nwhen flag clicked\nforever\n    if <(playState) = [platformer]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [enterplatformer v]\nset [ghost v] effect to (100)\ngo to x: (0) y: (-15)\nwait (0.65) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (-1)\nend\n\nwhen this sprite clicked\nif <<(ballMOVE) = [1]> or <(flagMOVE) = [1]>> then\n    broadcast (cancelFlagMOVE v)\n    wait (0) seconds\nend\nif <(activePlatEdit) = [1]> then\n    if <[3] = (materialPlat)> then\n        set [activeplatedit v] to [0]\n    else\n        set [materialplat v] to [3]\n    end\nelse\n    set [activeplatedit v] to [1]\n    set [materialplat v] to [3]\n    if <(extendedPLAT) = [1]> then\n        broadcast (closeADD v)\n    end\nend\n\nwhen this sprite clicked\nif <[1] = (portalEDITING)> then\n    broadcast (CANCEL portal v)\nend\n\n@erase\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen this sprite clicked\n\nwhen I receive [enterplatformer v]\nset [ghost v] effect to (100)\ngo to x: (0) y: (-15)\nwait (0.7) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (-1)\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(activePlatEdit) = [1]> then\n        if <(materialPlat) = [E]> then\n            repeat until <(costume [number v]) = [1]>\n                switch costume to ((costume [number v]) - (1))\n            end\n        else\n            repeat until <(costume [number v]) = [4]>\n                next costume\n            end\n        end\n    else\n        repeat until <(costume [number v]) = [4]>\n            next costume\n        end\n    end\nend\n\nswitch costume to (gamekit 2 copy 228 v)\n\nwhen flag clicked\nforever\n    if <(playState) = [platformer]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <<(ballMOVE) = [1]> or <(flagMOVE) = [1]>> then\n    broadcast (cancelFlagMOVE v)\n    wait (0) seconds\nend\nif <(activePlatEdit) = [1]> then\n    if <(materialPlat) = [E]> then\n        set [activeplatedit v] to [0]\n    else\n        set [materialplat v] to [E]\n    end\nelse\n    set [activeplatedit v] to [1]\n    set [materialplat v] to [E]\n    if <(extendedPLAT) = [1]> then\n        broadcast (closeADD v)\n    end\nend\n\nwhen this sprite clicked\nif <[1] = (portalEDITING)> then\n    broadcast (CANCEL portal v)\nend\n\n@Sprite4\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(playState) = [isometric]> then\n        if <(drawerUP?) = [0]> then\n            hide\n            change [ghost v] effect by (10)\n        else\n            show\n            change [ghost v] effect by (-10)\n        end\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nbroadcast (DRAWER v)\n\n@DrawerComponents\n\nwhen flag clicked\nswitch costume to (l01 copy 108 v)\nhide\n\nwhen I start as a clone\nforever\n    if <(drawerUP?) = [0]> then\n        delete this clone\n    end\nend\n\nwhen I receive [closedrawer v]\nset [amiintransition? v] to [1]\nset [drawerup? v] to [0]\nset [myfluster v] to [10]\nrepeat (10)\n    change y by (() - ((myFluster) * ((120) / (55))))\n    change [myfluster v] by (-1)\nend\nset [amiintransition? v] to [0]\ndelete this clone\n\ndefine clone\nset [myid v] to [0]\nrepeat (13)\n    change [myid v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [opendrawer v]\nclone\n\nwhen I start as a clone\ngo to x: (0) y: (-120)\nshow\nswitch costume to (myID)\ngo to [front v] layer\nset [amiintransition? v] to [1]\nset [drawerup? v] to [1]\nset [myfluster v] to [10]\nrepeat (10)\n    change y by ((myFluster) * ((120) / (55)))\n    change [myfluster v] by (-1)\nend\nset [amiintransition? v] to [0]\n\nwhen this sprite clicked\nif <(myID) = [3]> then\n    if <(dragBlockYet?) = [0]> then\n        set [what v] to (myID)\n        broadcast (DRAWER v)\n        broadcast (u got it just chill for a second v)\n    end\nelse\n    set [what v] to (myID)\n    broadcast (DRAWER v)\n    broadcast (u got it just chill for a second v)\nend\n\nwhen I receive [enteriso v]\nset [isoedit v] to [0]\n\nset [isoedit v] to [1]\n\nwhen I start as a clone\nforever\n    if <<(myID) = [3]> and <(dragBlockYet?) = [1]>> then\n        set [ghost v] effect to (50)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\n@Sprite14\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <[platformer] = (playState)> then\n        if <<(letter (stagePlat) of (rocketsEnabled?)) = [0]> and <(rocketIndicatorInTransition) = [0]>> then\n            set [ghost v] effect to (100)\n        end\n        if <(letter (stagePlat) of (rocketsEnabled?)) = [1]> then\n            show\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [rocketindicatorvisualeffectactivate v]\nset [rocketindicatorintransition v] to [1]\nif <(letter (stagePlat) of (rocketsEnabled?)) = [1]> then\n    set [ghost v] effect to (100)\n    show\n    go to x: (0) y: (-15)\n    set [myfluster v] to [5]\n    repeat (5)\n        change y by (myFluster)\n        change [ghost v] effect by (-20)\n        change [myfluster v] by (-1)\n    end\nelse\n    set [ghost v] effect to (0)\n    show\n    go to x: (0) y: (0)\n    set [myfluster v] to [-5]\n    repeat (5)\n        change y by (myFluster)\n        change [ghost v] effect by (20)\n        change [myfluster v] by (1)\n    end\nend\nset [rocketindicatorintransition v] to [0]\n\nwhen I receive [newstageplat v]\nset [rocketindicatorintransition v] to [1]\nif <(letter (stagePlat) of (rocketsEnabled?)) = [1]> then\n    set [ghost v] effect to (100)\n    show\n    go to x: (0) y: (-15)\n    set [myfluster v] to [5]\n    repeat (5)\n        change y by (myFluster)\n        change [ghost v] effect by (-20)\n        change [myfluster v] by (-1)\n    end\nelse\n    set [ghost v] effect to (0)\n    show\n    go to x: (0) y: (0)\n    set [myfluster v] to [-5]\n    repeat (5)\n        change y by (myFluster)\n        change [ghost v] effect by (20)\n        change [myfluster v] by (1)\n    end\nend\nset [rocketindicatorintransition v] to [0]\n\n@eraserVIEW\n\nwhen flag clicked\nforever\n    if <<(playState) = [platformer]> and <<(activePlatEdit) = [1]> and <(materialPlat) = [E]>>> then\n        show\n        if <(round (((15) * (round (((mouse x) + (7.5)) / (15)))) - (7.5))) > [233]> then\n            set x to (233)\n        else\n            set x to (((15) * (round (((mouse x) + (7.5)) / (15)))) - (7.5))\n        end\n        if <not <<(round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))) < [-127]> or <[113] < (round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5)))>>> then\n            set y to (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))\n            if <<[239] < (mouse x)> or <(mouse x) < [-239]>> then\n                set [ghost v] effect to (50)\n            else\n                set [ghost v] effect to (0)\n            end\n        else\n            if <(round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))) < [-127]> then\n                set y to (-127)\n                set [ghost v] effect to (50)\n            else\n                set y to (113)\n                set [ghost v] effect to (50)\n            end\n        end\n        set [row v] to ((1) + ([abs v] of ((16) - (((round (((15) * (round (((y position) + (7.5)) / (15)))) - (7.5))) + (127)) / (15))) ))\n        set [column v] to (round (((round (((15) * (round (((x position) + (7.5)) / (15)))) - (7.5))) / (15)) + (16.47)))\n    else\n        hide\n    end\nend\n\n@Portal-1\n\ndefine findLOCATION (find)\nset [countrow v] to (((stagePlat) - (1)) * (17))\nrepeat (17)\n    change [countrow v] by (1)\n    set [countlocation v] to [0]\n    repeat (32)\n        change [countlocation v] by (1)\n        if <(find) = (letter (countLOCATION) of (item (countROW) of [platformerleveldata v]))> then\n            change [countrow v] by (() - (((stagePlat) - (1)) * (17)))\n            set [portalyet? v] to [1]\n            stop [this script v]\n        end\n    end\nend\nset [portalyet? v] to [0]\n\ndefine translateANDmove (x) (y)\ngo to x: ((-232) + (((x) - (1)) * (15))) y: ((113) - (((y) - (1)) * (15)))\n\ndefine decodeLOCATION (x) (y)\nset [countlocation v] to (round (((247) + (x)) / (15)))\nset [countrow v] to (round (() - (((y) - (128)) / (15))))\n\ndefine erase (id_char)\ndecodeLOCATION (x position) (y position)\nset [transcribe v] to []\nset [repround v] to [0]\nrepeat (32)\n    change [repround v] by (1)\n    if <(repRound) = (countLOCATION)> then\n        set [transcribe v] to (join (transcribe) [0])\n    else\n        set [transcribe v] to (join (transcribe) (letter (repRound) of (item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v])))\n    end\nend\nreplace item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v] with (transcribe)\n\nfindLOCATION [p]\n\nwhen flag clicked\nforever\n    if <<(portalEDITING) = [1]> and <(portalYET?) = [0]>> then\n        show\n        if <(round (((15) * (round (((mouse x) + (7.5)) / (15)))) - (7.5))) > [218]> then\n            set x to (218)\n        else\n            set x to (((15) * (round (((mouse x) + (7.5)) / (15)))) - (7.5))\n        end\n        if <not <<(round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))) < [-127]> or <[98] < (round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5)))>>> then\n            set y to (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))\n            if <<[224] < (mouse x)> or <(mouse x) < [-239]>> then\n                set [ghost v] effect to (50)\n            else\n                set [ghost v] effect to (0)\n            end\n        else\n            if <(round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))) < [-127]> then\n                set y to (-127)\n                set [ghost v] effect to (50)\n            else\n                set y to (98)\n                set [ghost v] effect to (50)\n            end\n        end\n        set [row v] to ((1) + ([abs v] of ((16) - (((round (((15) * (round (((y position) + (7.5)) / (15)))) - (7.5))) + (127)) / (15))) ))\n        set [column v] to (round (((round (((15) * (round (((x position) + (7.5)) / (15)))) - (7.5))) / (15)) + (16.47)))\n    else\n        if <<(portalEDITING) = [1]> or <not <(portalYET?) = [0]>>> then\n            show\n        else\n            hide\n        end\n    end\nend\n\nwhen this sprite clicked\nif <<(portalEDITING) = [1]> and <(portalYET?) = [0]>> then\n    decodeLOCATION (x position) (y position)\n    if <[0] = (letter (countLOCATION) of (item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v]))> then\n        record [p]\n        set [portalyet? v] to [A]\n    end\nend\n\ndefine record (id_char)\ndecodeLOCATION (x position) (y position)\nset [transcribe v] to []\nset [repround v] to [0]\nrepeat (32)\n    change [repround v] by (1)\n    if <(repRound) = (countLOCATION)> then\n        set [transcribe v] to (join (transcribe) (id_char))\n    else\n        set [transcribe v] to (join (transcribe) (letter (repRound) of (item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v])))\n    end\nend\nreplace item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v] with (transcribe)\n\nwhen I receive [cancel portal v]\nif <(portalYET?) = [A]> then\n    erase [p]\n    set [portalediting v] to [0]\n    set [portalyet? v] to [0]\nend\nif <(portalYET?) = [0]> then\n    set [portalediting v] to [0]\nend\n\nset [portalediting v] to [0]\n\nwhen I receive [enterstage v]\nfindLOCATION [p]\nif <(portalYET?) = [1]> then\n    broadcast (enterSECONDPORTAL v)\n    translateANDmove (countLOCATION) (countROW)\nend\n\n@Portal-2\n\ndefine findLOCATION (find)\nset [countrow v] to (((stagePlat) - (1)) * (17))\nrepeat (17)\n    change [countrow v] by (1)\n    set [countlocation v] to [0]\n    repeat (32)\n        change [countlocation v] by (1)\n        if <(find) = (letter (countLOCATION) of (item (countROW) of [platformerleveldata v]))> then\n            change [countrow v] by (() - (((stagePlat) - (1)) * (17)))\n            stop [this script v]\n        end\n    end\nend\n\ndefine translateANDmove (x) (y)\ngo to x: ((-232) + (((x) - (1)) * (15))) y: ((113) - (((y) - (1)) * (15)))\n\ndefine decodeLOCATION (x) (y)\nset [countlocation v] to (round (((247) + (x)) / (15)))\nset [countrow v] to (round (() - (((y) - (128)) / (15))))\n\ndefine erase (id_char)\ndecodeLOCATION (x position) (y position)\nset [transcribe v] to []\nset [repround v] to [0]\nrepeat (32)\n    change [repround v] by (1)\n    if <(repRound) = (countLOCATION)> then\n        set [transcribe v] to (join (transcribe) [0])\n    else\n        set [transcribe v] to (join (transcribe) (letter (repRound) of (item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v])))\n    end\nend\nreplace item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v] with (transcribe)\n\nwhen flag clicked\nforever\n    if <<(portalEDITING) = [1]> and <(portalYET?) = [A]>> then\n        show\n        if <(round (((15) * (round (((mouse x) + (7.5)) / (15)))) - (7.5))) > [218]> then\n            set x to (218)\n        else\n            set x to (((15) * (round (((mouse x) + (7.5)) / (15)))) - (7.5))\n        end\n        if <not <<(round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))) < [-127]> or <[98] < (round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5)))>>> then\n            set y to (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))\n            if <<[224] < (mouse x)> or <(mouse x) < [-239]>> then\n                set [ghost v] effect to (50)\n            else\n                set [ghost v] effect to (0)\n            end\n        else\n            if <(round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))) < [-127]> then\n                set y to (-127)\n                set [ghost v] effect to (50)\n            else\n                set y to (98)\n                set [ghost v] effect to (50)\n            end\n        end\n        set [row v] to ((1) + ([abs v] of ((16) - (((round (((15) * (round (((y position) + (7.5)) / (15)))) - (7.5))) + (127)) / (15))) ))\n        set [column v] to (round (((round (((15) * (round (((x position) + (7.5)) / (15)))) - (7.5))) / (15)) + (16.47)))\n    else\n        if <(portalYET?) = [1]> then\n            show\n        else\n            hide\n        end\n    end\nend\n\nwhen this sprite clicked\nif <<(portalEDITING) = [1]> and <(portalYET?) = [A]>> then\n    decodeLOCATION (x position) (y position)\n    if <[0] = (letter (countLOCATION) of (item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v]))> then\n        record [q]\n        set [portalyet? v] to [1]\n        set [portalediting v] to [0]\n    end\nend\n\ndefine record (id_char)\ndecodeLOCATION (x position) (y position)\nset [transcribe v] to []\nset [repround v] to [0]\nrepeat (32)\n    change [repround v] by (1)\n    if <(repRound) = (countLOCATION)> then\n        set [transcribe v] to (join (transcribe) (id_char))\n    else\n        set [transcribe v] to (join (transcribe) (letter (repRound) of (item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v])))\n    end\nend\nreplace item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v] with (transcribe)\n\nwhen I receive [entersecondportal v]\nfindLOCATION [q]\ntranslateANDmove (countLOCATION) (countROW)\n\n@Sprite1\n\nwhen flag clicked\nhide\ngo to x: (5) y: (-5)\nforever\n    if <(playState) = [modifyPLAT]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [platformereditmode v]\nset [ghost v] effect to (100)\ngo to x: (5) y: (-20)\nwait (0) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    if <(platEditMenuPage) = [1]> then\n        change [ghost v] effect by (-20)\n    else\n        change [ghost v] effect by (-10)\n    end\n    change [myfluster v] by (-1)\nend\nrepeat until <not <(playState) = [modifyPLAT]>>\n    if <(platEditMenuPage) = [1]> then\n        set [ghost v] effect to (0)\n    else\n        set [ghost v] effect to (50)\n    end\nend\n\nwhen I receive [enterplatformer v]\n\nwhen this sprite clicked\nif <not <(platEditMenuPage) = [1]>> then\n    broadcast (platEditPageChangeActivate v)\n    set [plateditmenupage v] to [1]\nend\n\n@Sprite2\n\nwhen flag clicked\nhide\ngo to x: (5) y: (-5)\nforever\n    if <(playState) = [modifyPLAT]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [enterplatformer v]\n\nwhen this sprite clicked\nif <not <(platEditMenuPage) = [2]>> then\n    broadcast (platEditPageChangeActivate v)\n    set [plateditmenupage v] to [2]\nend\n\nwhen I receive [platformereditmode v]\nset [ghost v] effect to (100)\ngo to x: (5) y: (-20)\nwait (0.05) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    if <(platEditMenuPage) = [2]> then\n        change [ghost v] effect by (-20)\n    else\n        change [ghost v] effect by (-10)\n    end\n    change [myfluster v] by (-1)\nend\nrepeat until <not <(playState) = [modifyPLAT]>>\n    if <(platEditMenuPage) = [2]> then\n        set [ghost v] effect to (0)\n    else\n        set [ghost v] effect to (50)\n    end\nend\n\n@Sprite3\n\nwhen flag clicked\nhide\ngo to x: (5) y: (-5)\nforever\n    if <(playState) = [modifyPLAT]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [enterplatformer v]\n\nwhen this sprite clicked\nif <not <(platEditMenuPage) = [3]>> then\n    broadcast (platEditPageChangeActivate v)\n    set [plateditmenupage v] to [3]\nend\n\nif <(platEditMenuPage) = [3]> then\n    change [ghost v] effect by (-20)\nelse\n    change [ghost v] effect by (-10)\nend\nchange [myfluster v] by (1)\n\nwhen I receive [platformereditmode v]\nset [ghost v] effect to (100)\ngo to x: (5) y: (-20)\nwait (0.1) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    if <(platEditMenuPage) = [3]> then\n        change [ghost v] effect by (-20)\n    else\n        change [ghost v] effect by (-10)\n    end\n    change [myfluster v] by (-1)\nend\nrepeat until <not <(playState) = [modifyPLAT]>>\n    if <(platEditMenuPage) = [3]> then\n        set [ghost v] effect to (0)\n    else\n        set [ghost v] effect to (50)\n    end\nend\n\n@Sprite7\n\nwhen flag clicked\nhide\ngo to x: (5) y: (-5)\nforever\n    if <(playState) = [modifyPLAT]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [enterplatformer v]\n\nwhen this sprite clicked\nif <not <(platEditMenuPage) = [4]>> then\n    broadcast (platEditPageChangeActivate v)\n    set [plateditmenupage v] to [4]\nend\n\nwhen I receive [platformereditmode v]\nset [ghost v] effect to (100)\ngo to x: (5) y: (-20)\nwait (0.15) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    if <(platEditMenuPage) = [4]> then\n        change [ghost v] effect by (-20)\n    else\n        change [ghost v] effect by (-10)\n    end\n    change [myfluster v] by (-1)\nend\nrepeat until <not <(playState) = [modifyPLAT]>>\n    if <(platEditMenuPage) = [4]> then\n        set [ghost v] effect to (0)\n    else\n        set [ghost v] effect to (50)\n    end\nend\n\n@Sprite8\n\nwhen flag clicked\nset [plateditmenupage v] to [1]\nhide\ngo to x: (5) y: (-5)\nforever\n    if <(playState) = [modifyPLAT]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [resetplatformer v]\nset [plateditmenupage v] to [1]\n\nwhen this sprite clicked\nif <not <(platEditMenuPage) = [5]>> then\n    broadcast (platEditPageChangeActivate v)\n    set [plateditmenupage v] to [5]\nend\n\nwhen I receive [platformereditmode v]\nset [ghost v] effect to (100)\ngo to x: (5) y: (-20)\nwait (0.2) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    if <(platEditMenuPage) = [5]> then\n        change [ghost v] effect by (-20)\n    else\n        change [ghost v] effect by (-10)\n    end\n    change [myfluster v] by (-1)\nend\nrepeat until <not <(playState) = [modifyPLAT]>>\n    if <(platEditMenuPage) = [5]> then\n        set [ghost v] effect to (0)\n    else\n        set [ghost v] effect to (50)\n    end\nend\n\n@Sprite9\n\nwhen flag clicked\nhide\ngo to x: (5) y: (-5)\nforever\n    if <(playState) = [modifyPLAT]> then\n        show\n    else\n        hide\n        set [ghost v] effect to (100)\n    end\nend\n\nwhen I receive [platformereditmode v]\nbroadcast (platEditPageChangeActivate v)\n\nwhen I receive [plateditpagechangeactivate v]\nif <(platEditMenuPage) = [1]> then\n    set [ghost v] effect to (100)\n    go to x: (5) y: (-20)\n    wait (0.1) seconds\n    set [myfluster v] to [5]\n    repeat (5)\n        change y by (myFluster)\n        change [ghost v] effect by (-20)\n        change [myfluster v] by (-1)\n    end\nelse\n    go to x: (5) y: (-5)\n    set [myfluster v] to [-5]\n    repeat (5)\n        change y by (myFluster)\n        change [ghost v] effect by (20)\n        change [myfluster v] by (1)\n    end\nend\n\n@Sprite10\n\nwhen flag clicked\nhide\ngo to x: (5) y: (-5)\nforever\n    if <(playState) = [modifyPLAT]> then\n        show\n    else\n        hide\n        set [ghost v] effect to (100)\n    end\nend\n\nwhen I receive [plateditpagechangeactivate v]\nif <(platEditMenuPage) = [2]> then\n    set [ghost v] effect to (100)\n    go to x: (5) y: (-20)\n    wait (0.1) seconds\n    set [myfluster v] to [5]\n    repeat (5)\n        change y by (myFluster)\n        change [ghost v] effect by (-20)\n        change [myfluster v] by (-1)\n    end\nelse\n    go to x: (5) y: (-5)\n    set [myfluster v] to [-5]\n    repeat (5)\n        change y by (myFluster)\n        change [ghost v] effect by (20)\n        change [myfluster v] by (1)\n    end\nend\n\n@Sprite11\n\nwhen flag clicked\nhide\ngo to x: (5) y: (-5)\nforever\n    if <(playState) = [modifyPLAT]> then\n        show\n    else\n        hide\n        set [ghost v] effect to (100)\n    end\nend\n\nwhen I receive [plateditpagechangeactivate v]\nif <(platEditMenuPage) = [3]> then\n    set [ghost v] effect to (100)\n    go to x: (5) y: (-20)\n    wait (0.1) seconds\n    set [myfluster v] to [5]\n    repeat (5)\n        change y by (myFluster)\n        change [ghost v] effect by (-20)\n        change [myfluster v] by (-1)\n    end\nelse\n    go to x: (5) y: (-5)\n    set [myfluster v] to [-5]\n    repeat (5)\n        change y by (myFluster)\n        change [ghost v] effect by (20)\n        change [myfluster v] by (1)\n    end\nend\n\n@Sprite12\n\nwhen flag clicked\nhide\ngo to x: (5) y: (-5)\nforever\n    if <(playState) = [modifyPLAT]> then\n        show\n        if <(stageAdditives) = [1]> then\n            if <(stageAdditiveType) = [water]> then\n                switch costume to (elements_en_2 v)\n            else\n                switch costume to (elements_en_3 v)\n            end\n        else\n            switch costume to (elements_en_1 v)\n        end\n    else\n        set [ghost v] effect to (100)\n        hide\n    end\nend\n\nwhen I receive [plateditpagechangeactivate v]\nif <(platEditMenuPage) = [4]> then\n    set [ghost v] effect to (100)\n    go to x: (5) y: (-20)\n    wait (0.1) seconds\n    set [myfluster v] to [5]\n    repeat (5)\n        change y by (myFluster)\n        change [ghost v] effect by (-20)\n        change [myfluster v] by (-1)\n    end\nelse\n    go to x: (5) y: (-5)\n    set [myfluster v] to [-5]\n    repeat (5)\n        change y by (myFluster)\n        change [ghost v] effect by (20)\n        change [myfluster v] by (1)\n    end\nend\n\nset [stageadditives v] to [1]\n\nset [stageadditives v] to [0]\n\n@Sprite15\n\nwhen flag clicked\nhide\ngo to x: (5) y: (-5)\nforever\n    if <(playState) = [modifyPLAT]> then\n        show\n    else\n        hide\n        set [ghost v] effect to (100)\n    end\nend\n\nwhen I receive [plateditpagechangeactivate v]\nif <(platEditMenuPage) = [5]> then\n    switch costume to (pick random (1) to (24))\n    set [ghost v] effect to (100)\n    wait (0.1) seconds\n    repeat (5)\n        change [ghost v] effect by (-20)\n    end\nelse\n    repeat (5)\n        change [ghost v] effect by (20)\n    end\nend\n\n@Page1\n\nwhen I receive [resetplatformer v]\nset [rocketarchtype v] to [arch]\nset [flaglock v] to [0]\nset [rocketslockable? v] to [0]\nset [walljumpondoors v] to [0]\n\nwhen I receive [plateditpagechangeactivate v]\nif <(platEditMenuPage) = [1]> then\n    clone\nend\n\nwhen I start as a clone\nforever\n    if <not <<(playState) = [modifyPLAT]> and <(platEditMenuPage) = [1]>>> then\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nset [ghost v] effect to (100)\nshow\ngo to x: (0) y: (-20)\nwait ((0.1) + (join [0.] ((((myID) + (1)) / (2)) * (10)))) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (-1)\nend\n\ndefine clone\nset [myid v] to [1]\nrepeat (7)\n    create clone of (_myself_ v)\n    change [myid v] by (1)\nend\n\nwhen I start as a clone\nif <(myID) = [6]> then\n    if <(rocketsLockable?) = [1]> then\n        switch costume to (pr6a v)\n    else\n        switch costume to (pr6b v)\n    end\nend\nif <(myID) = [7]> then\n    if <(walljumpOnDoors) = [1]> then\n        switch costume to (pr7a v)\n    else\n        switch costume to (pr7b v)\n    end\nend\nforever\n    if <(myID) = [1]> then\n        if <(flagLock) = [1]> then\n            switch costume to (join [pr] (join (myID) [a]))\n        else\n            switch costume to (join [pr] (join (myID) [b]))\n        end\n    end\n    if <(myID) = [2]> then\n        if <(flagLock) = [0]> then\n            switch costume to (join [pr] (join (myID) [a]))\n        else\n            switch costume to (join [pr] (join (myID) [b]))\n        end\n    end\n    if <(myID) = [3]> then\n        if <(rocketArchType) = [arch]> then\n            switch costume to (join [pr] (join (myID) [a]))\n        else\n            switch costume to (join [pr] (join (myID) [b]))\n        end\n    end\n    if <(myID) = [4]> then\n        if <(rocketArchType) = [up]> then\n            switch costume to (join [pr] (join (myID) [a]))\n        else\n            switch costume to (join [pr] (join (myID) [b]))\n        end\n    end\n    if <(myID) = [5]> then\n        if <(rocketArchType) = [down]> then\n            switch costume to (join [pr] (join (myID) [a]))\n        else\n            switch costume to (join [pr] (join (myID) [b]))\n        end\n    end\n    if <(myID) = [6]> then\n        if <(rocketsLockable?) = [1]> then\n            repeat until <(costume [name v]) = [pr6a]>\n                switch costume to ((costume [number v]) - (1))\n            end\n        else\n            repeat until <(costume [name v]) = [pr6b]>\n                next costume\n            end\n        end\n    end\n    if <(myID) = [7]> then\n        if <(walljumpOnDoors) = [1]> then\n            repeat until <(costume [name v]) = [pr7a]>\n                switch costume to ((costume [number v]) - (1))\n            end\n        else\n            repeat until <(costume [name v]) = [pr7b]>\n                next costume\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nif <(myID) = [1]> then\n    set [flaglock v] to [1]\nend\nif <(myID) = [2]> then\n    set [flaglock v] to [0]\nend\nif <(myID) = [3]> then\n    set [rocketarchtype v] to [arch]\nend\nif <(myID) = [4]> then\n    set [rocketarchtype v] to [up]\nend\nif <(myID) = [5]> then\n    set [rocketarchtype v] to [down]\nend\nif <(myID) = [6]> then\n    if <(rocketsLockable?) = [0]> then\n        set [rocketslockable? v] to [1]\n    else\n        set [rocketslockable? v] to [0]\n    end\nend\nif <(myID) = [7]> then\n    if <(walljumpOnDoors) = [0]> then\n        set [walljumpondoors v] to [1]\n    else\n        set [walljumpondoors v] to [0]\n    end\nend\n\n\n\n@Page2\n\nwhen I receive [resetplatformer v]\nset [speed v] to [2]\nset [jumpheight v] to [2]\nset [friction v] to [1]\nset [gravity v] to [1]\nset [density v] to [1]\n\nwhen I receive [plateditpagechangeactivate v]\nif <(platEditMenuPage) = [2]> then\n    clone\nend\n\nwhen I start as a clone\nforever\n    if <not <<(playState) = [modifyPLAT]> and <(platEditMenuPage) = [2]>>> then\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nset [ghost v] effect to (100)\nshow\ngo to x: (0) y: (-20)\nwait ((0.1) + (join [0.] ((((myID) + (1)) / (2)) * (10)))) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (-1)\nend\n\ndefine clone\nset [myid v] to [1]\nrepeat (9)\n    create clone of (_myself_ v)\n    change [myid v] by (1)\nend\n\nwhen I start as a clone\nforever\n    if <(myID) = [1]> then\n        if <(jumpHeight) = [1]> then\n            switch costume to (join [ph] (join (myID) [a]))\n        else\n            switch costume to (join [ph] (join (myID) [b]))\n        end\n    end\n    if <(myID) = [2]> then\n        if <(jumpHeight) = [2]> then\n            switch costume to (join [ph] (join (myID) [a]))\n        else\n            switch costume to (join [ph] (join (myID) [b]))\n        end\n    end\n    if <(myID) = [3]> then\n        if <(jumpHeight) = [3]> then\n            switch costume to (join [ph] (join (myID) [a]))\n        else\n            switch costume to (join [ph] (join (myID) [b]))\n        end\n    end\n    if <(myID) = [4]> then\n        if <(speed) = [1]> then\n            switch costume to (join [ph] (join (myID) [a]))\n        else\n            switch costume to (join [ph] (join (myID) [b]))\n        end\n    end\n    if <(myID) = [5]> then\n        if <(speed) = [2]> then\n            switch costume to (join [ph] (join (myID) [a]))\n        else\n            switch costume to (join [ph] (join (myID) [b]))\n        end\n    end\n    if <(myID) = [6]> then\n        if <(speed) = [3]> then\n            switch costume to (join [ph] (join (myID) [a]))\n        else\n            switch costume to (join [ph] (join (myID) [b]))\n        end\n    end\n    if <(myID) = [7]> then\n        switch costume to (slider v)\n        go to x: ((-15) + (((friction) - (1)) * (200))) y: (-87.5)\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            repeat until <not <mouse down?>>\n                if <<(mouse x) > [-115]> and <[85] > (mouse x)>> then\n                    set [friction v] to ((round ((10) * ((1) + (((mouse x) - (-15)) / (200))))) / (10))\n                    go to x: ((-15) + (((friction) - (1)) * (200))) y: (-87.5)\n                else\n                    if <(mouse x) > [-115]> then\n                        go to x: (85) y: (-87.5)\n                        set [friction v] to [1.5]\n                    else\n                        go to x: (-115) y: (-87.5)\n                        set [friction v] to [0.5]\n                    end\n                end\n            end\n        end\n    end\n    if <(myID) = [8]> then\n        switch costume to (slider v)\n        if <([abs v] of (gravity) ) = [1]> then\n            go to x: (((gravity) * (30)) + (-15)) y: (-117.5)\n        end\n        if <([abs v] of (gravity) ) = [2]> then\n            go to x: ((((gravity) / (2)) * (100)) + (-15)) y: (-117.5)\n        end\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            repeat until <not <mouse down?>>\n                if <[-77] > (mouse x)> then\n                    set [gravity v] to [-2]\n                end\n                if <<[-15] > (mouse x)> and <(mouse x) > [-78]>> then\n                    set [gravity v] to [-1]\n                end\n                if <<(mouse x) > [-15]> and <[63] > (mouse x)>> then\n                    set [gravity v] to [1]\n                end\n                if <(mouse x) > [62]> then\n                    set [gravity v] to [2]\n                end\n                if <([abs v] of (gravity) ) = [1]> then\n                    go to x: (((gravity) * (30)) + (-15)) y: (-117.5)\n                end\n                if <([abs v] of (gravity) ) = [2]> then\n                    go to x: ((((gravity) / (2)) * (100)) + (-15)) y: (-117.5)\n                end\n            end\n        end\n    end\n    if <(myID) = [9]> then\n        if <(density) < [0.9]> then\n            switch costume to (slider2 v)\n        else\n            switch costume to (slider v)\n        end\n        go to x: ((-15) + (((density) - (1)) * (200))) y: (-147.5)\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            repeat until <not <mouse down?>>\n                if <<(mouse x) > [-115]> and <[85] > (mouse x)>> then\n                    set [density v] to ((round ((10) * ((1) + (((mouse x) - (-15)) / (200))))) / (10))\n                    if <(density) < [0.9]> then\n                        switch costume to (slider2 v)\n                    else\n                        switch costume to (slider v)\n                    end\n                    go to x: ((-15) + (((density) - (1)) * (200))) y: (-147.5)\n                else\n                    if <(mouse x) > [-115]> then\n                        go to x: (85) y: (-147.5)\n                        set [density v] to [1.5]\n                    else\n                        go to x: (-115) y: (-147.5)\n                        set [density v] to [0.5]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nif <(myID) = [1]> then\n    set [jumpheight v] to [1]\nend\nif <(myID) = [2]> then\n    set [jumpheight v] to [2]\nend\nif <(myID) = [3]> then\n    set [jumpheight v] to [3]\nend\nif <(myID) = [4]> then\n    set [speed v] to [1]\nend\nif <(myID) = [5]> then\n    set [speed v] to [2]\nend\nif <(myID) = [6]> then\n    set [speed v] to [3]\nend\n\n@Page3\n\nwhen I receive [resetplatformer v]\nset [shape v] to [ball]\nset [color v] to [1]\nset [rocketsize v] to [S]\n\nwhen I receive [plateditpagechangeactivate v]\nif <(platEditMenuPage) = [3]> then\n    clone\nend\n\nwhen I start as a clone\nforever\n    if <not <<(playState) = [modifyPLAT]> and <(platEditMenuPage) = [3]>>> then\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nset [ghost v] effect to (100)\nshow\ngo to x: (0) y: (-20)\nwait ((0.1) + (join [0.] ((((myID) + (1)) / (2)) * (10)))) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (-1)\nend\n\ndefine clone\nset [myid v] to [1]\nrepeat (12)\n    create clone of (_myself_ v)\n    change [myid v] by (1)\nend\n\nwhen I start as a clone\nforever\n    if <(myID) = [1]> then\n        if <(shape) = [ball]> then\n            switch costume to (join [ap] (join (myID) [a]))\n        else\n            switch costume to (join [ap] (join (myID) [b]))\n        end\n    end\n    if <(myID) = [2]> then\n        if <(shape) = [square]> then\n            switch costume to (join [ap] (join (myID) [a]))\n        else\n            switch costume to (join [ap] (join (myID) [b]))\n        end\n    end\n    if <(myID) = [3]> then\n        if <(shape) = [triangle]> then\n            switch costume to (join [ap] (join (myID) [a]))\n        else\n            switch costume to (join [ap] (join (myID) [b]))\n        end\n    end\n    if <<[3] < (myID)> and <(myID) < [10]>> then\n        if <(color) = ((myID) - (3))> then\n            switch costume to (join [ap] (join (myID) [a]))\n        else\n            switch costume to (join [ap] (join (myID) [b]))\n        end\n    end\n    if <(myID) = [10]> then\n        if <(rocketSize) = [S]> then\n            switch costume to (join [ap] (join (myID) [a]))\n        else\n            switch costume to (join [ap] (join (myID) [b]))\n        end\n    end\n    if <(myID) = [11]> then\n        if <(rocketSize) = [T]> then\n            switch costume to (join [ap] (join (myID) [a]))\n        else\n            switch costume to (join [ap] (join (myID) [b]))\n        end\n    end\n    if <(myID) = [12]> then\n        if <(rocketSize) = [R]> then\n            switch costume to (join [ap] (join (myID) [a]))\n        else\n            switch costume to (join [ap] (join (myID) [b]))\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nif <(myID) = [1]> then\n    set [shape v] to [ball]\nend\nif <(myID) = [2]> then\n    set [shape v] to [square]\nend\nif <(myID) = [3]> then\n    set [shape v] to [triangle]\nend\nif <<[3] < (myID)> and <(myID) < [10]>> then\n    set [color v] to ((myID) - (3))\nend\nif <(myID) = [10]> then\n    set [rocketsize v] to [S]\nend\nif <(myID) = [11]> then\n    set [rocketsize v] to [T]\nend\nif <(myID) = [12]> then\n    set [rocketsize v] to [R]\nend\n\n@Page4\n\nwhen I receive [resetplatformer v]\nset [stageadditives v] to [0]\nset [stageadditivetype v] to [water]\nset [stageadditivewaterlevel v] to [1]\nset [rises and falls? v] to [0]\nset [portalsonetime? v] to [0]\nset [flagphysics? v] to [0]\nset [flagsthroughportals? v] to [0]\n\nwhen I receive [plateditpagechangeactivate v]\nif <(platEditMenuPage) = [4]> then\n    clone\nend\n\nwhen I start as a clone\nforever\n    if <not <<(playState) = [modifyPLAT]> and <(platEditMenuPage) = [4]>>> then\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nset [ghost v] effect to (100)\nshow\ngo to x: (0) y: (-15)\nwait ((0.1) + (join [0.] ((((myID) + (1)) / (2)) * (10)))) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (-1)\nend\n\ndefine clone\nset [myid v] to [1]\nrepeat (8)\n    create clone of (_myself_ v)\n    change [myid v] by (1)\nend\n\nwhen I start as a clone\nswitch costume to (a v)\nforever\n    if <(myID) = [1]> then\n        go to x: (-41.375) y: (71)\n        if <(stageAdditives) = [1]> then\n            repeat until <(costume [name v]) = [on]>\n                switch costume to ((costume [number v]) - (1))\n            end\n        else\n            repeat until <(costume [name v]) = [off]>\n                next costume\n            end\n        end\n    end\n    if <(myID) = [2]> then\n        go to x: (-21.375) y: (43)\n        if <(stageAdditives) = [1]> then\n            show\n        else\n            hide\n        end\n        if <(stageAdditiveType) = [lava]> then\n            repeat until <(costume [name v]) = [on]>\n                switch costume to ((costume [number v]) - (1))\n            end\n        else\n            repeat until <(costume [name v]) = [off]>\n                next costume\n            end\n        end\n    end\n    if <(myID) = [3]> then\n        go to x: (-21.375) y: (15)\n        if <(stageAdditives) = [1]> then\n            show\n        else\n            hide\n        end\n        if <(stageAdditiveType) = [water]> then\n            repeat until <(costume [name v]) = [on]>\n                switch costume to ((costume [number v]) - (1))\n            end\n        else\n            repeat until <(costume [name v]) = [off]>\n                next costume\n            end\n        end\n    end\n    if <(myID) = [4]> then\n        go to x: (-21.375) y: (-13)\n        if <(stageAdditives) = [1]> then\n            show\n        else\n            hide\n        end\n        if <(rises and falls?) = [1]> then\n            repeat until <(costume [name v]) = [on]>\n                switch costume to ((costume [number v]) - (1))\n            end\n        else\n            repeat until <(costume [name v]) = [off]>\n                next costume\n            end\n        end\n    end\n    if <(myID) = [5]> then\n        go to x: (-67.375) y: (-86)\n        if <(portalsOneTime?) = [1]> then\n            repeat until <(costume [name v]) = [on]>\n                switch costume to ((costume [number v]) - (1))\n            end\n        else\n            repeat until <(costume [name v]) = [off]>\n                next costume\n            end\n        end\n    end\n    if <(myID) = [6]> then\n        go to x: (-67.375) y: (-157)\n        if <(flagPhysics?) = [1]> then\n            repeat until <(costume [name v]) = [on]>\n                switch costume to ((costume [number v]) - (1))\n            end\n        else\n            repeat until <(costume [name v]) = [off]>\n                next costume\n            end\n        end\n    end\n    if <(myID) = [7]> then\n        go to x: (127.625) y: (-157)\n        if <(flagsThroughPortals?) = [1]> then\n            repeat until <(costume [name v]) = [on]>\n                switch costume to ((costume [number v]) - (1))\n            end\n        else\n            repeat until <(costume [name v]) = [off]>\n                next costume\n            end\n        end\n    end\n    if <(myID) = [8]> then\n        if <(stageAdditives) = [1]> then\n            show\n        else\n            hide\n        end\n        if <(stageAdditiveType) = [water]> then\n            switch costume to (slider1 v)\n        else\n            switch costume to (slider2 v)\n        end\n        if <[1] = (stageAdditiveWaterLevel)> then\n            go to x: (163) y: (-23)\n        end\n        if <[3] = (stageAdditiveWaterLevel)> then\n            go to x: (163) y: (77)\n        end\n        if <[2] = (stageAdditiveWaterLevel)> then\n            go to x: (163) y: (27)\n        end\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            repeat until <not <mouse down?>>\n                if <[2] > (mouse y)> then\n                    set [stageadditivewaterlevel v] to [1]\n                    go to x: (163) y: (-23)\n                end\n                if <(mouse y) > [52]> then\n                    set [stageadditivewaterlevel v] to [3]\n                    go to x: (163) y: (77)\n                end\n                if <<(mouse y) > [1]> and <[53] > (mouse y)>> then\n                    set [stageadditivewaterlevel v] to [2]\n                    go to x: (163) y: (27)\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nif <(myID) = [1]> then\n    if <(stageAdditives) = [1]> then\n        set [stageadditives v] to [0]\n        broadcast (OFF v)\n    else\n        set [stageadditives v] to [1]\n        broadcast (ON v)\n    end\nend\nif <(myID) = [2]> then\n    if <(stageAdditiveType) = [water]> then\n        set [stageadditivetype v] to [lava]\n        broadcast (ON v)\n    else\n        set [stageadditivetype v] to [water]\n        broadcast (OFF v)\n    end\nend\nif <(myID) = [3]> then\n    if <(stageAdditiveType) = [water]> then\n        set [stageadditivetype v] to [lava]\n        broadcast (OFF v)\n    else\n        set [stageadditivetype v] to [water]\n        broadcast (ON v)\n    end\nend\nif <(myID) = [4]> then\n    if <(rises and falls?) = [1]> then\n        set [rises and falls? v] to [0]\n        broadcast (OFF v)\n    else\n        set [rises and falls? v] to [1]\n        broadcast (ON v)\n    end\nend\nif <(myID) = [5]> then\n    if <(portalsOneTime?) = [1]> then\n        set [portalsonetime? v] to [0]\n        broadcast (OFF v)\n    else\n        set [portalsonetime? v] to [1]\n        broadcast (ON v)\n    end\nend\nif <(myID) = [6]> then\n    if <(flagPhysics?) = [1]> then\n        set [flagphysics? v] to [0]\n        broadcast (OFF v)\n    else\n        set [flagphysics? v] to [1]\n        broadcast (ON v)\n    end\nend\nif <(myID) = [7]> then\n    if <(flagsThroughPortals?) = [1]> then\n        set [flagsthroughportals? v] to [0]\n        broadcast (OFF v)\n    else\n        set [flagsthroughportals? v] to [1]\n        broadcast (ON v)\n    end\nend\n\nif <(myID) = [7]> then\n\nbroadcast (ON v)\n\nbroadcast (OFF v)\n\n@WaterIndication\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <<(stageAdditives) = [1]> and <(playState) = [platformer]>> then\n        switch costume to (join (stageAdditiveType) (stageAdditiveWaterLevel))\n        go to [back v] layer\n        show\n    else\n        hide\n    end\nend\n\n@Sprite13\n\nwhen flag clicked\nforever\n    if <<(extendedPLAT) = [1]> and <[platformer] = (playState)>> then\n        go to [front v] layer\n        if <(inKeyDrawerTransition) = [0]> then\n            set [ghost v] effect to (100)\n        end\n        show\n        set y to ([y position v] of [key v])\n    else\n        hide\n    end\n    if <(letter (stagePlat) of (keyYet?)) = [1]> then\n        switch costume to (add copy 10 v)\n    else\n        switch costume to (add copy 7 v)\n    end\nend\n\nwhen I receive [resetplatformer v]\nset [keyyet? v] to [00000]\nset [dooryet? v] to [00000]\nset [lockyet? v] to [00000]\n\nwhen I receive [openkeydrawer v]\nset [ghost v] effect to (100)\nshow\ngo to x: (20) y: (0)\nset [myfluster v] to [-5]\nrepeat (5)\n    change x by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (1)\nend\n\nwhen I receive [closeadd v]\nbroadcast (closeKeyDrawer v)\n\nwhen I receive [closekeydrawer v]\nset [myfluster v] to [5]\nwait (0.1) seconds\nrepeat (5)\n    change x by (myFluster)\n    change [ghost v] effect by (20)\n    change [myfluster v] by (-1)\nend\nset [inkeydrawertransition v] to [0]\n\nwhen this sprite clicked\nif <(letter (stagePlat) of (keyYet?)) = [0]> then\n    broadcast (closeADD v)\n    set [keyediting v] to [key]\nend\n\nwhen flag clicked\nset [keyediting v] to [0]\n\nwhen I receive [enterstage v]\nset [keyediting v] to [0]\n\nwhen I receive [resetplatformer v]\nset [keyediting v] to [0]\n\n@Sprite16\n\nwhen flag clicked\nforever\n    if <<(extendedPLAT) = [1]> and <[platformer] = (playState)>> then\n        go to [front v] layer\n        if <(inKeyDrawerTransition) = [0]> then\n            set [ghost v] effect to (100)\n        end\n        show\n        set y to ([y position v] of [key v])\n    else\n        hide\n    end\n    if <(letter (stagePlat) of (doorYet?)) = [1]> then\n        switch costume to (add copy 11 v)\n    else\n        switch costume to (add copy 8 v)\n    end\nend\n\nwhen I receive [resetplatformer v]\nset [keyyet? v] to [00000]\nset [dooryet? v] to [00000]\nset [lockyet? v] to [00000]\n\nwhen I receive [openkeydrawer v]\nset [ghost v] effect to (100)\nshow\ngo to x: (20) y: (0)\nset [myfluster v] to [-5]\nwait (0.05) seconds\nrepeat (5)\n    change x by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (1)\nend\n\nwhen I receive [closeadd v]\nbroadcast (closeKeyDrawer v)\n\nwhen I receive [closekeydrawer v]\nset [myfluster v] to [5]\nwait (0.05) seconds\nrepeat (5)\n    change x by (myFluster)\n    change [ghost v] effect by (20)\n    change [myfluster v] by (-1)\nend\nset [inkeydrawertransition v] to [0]\n\nwhen this sprite clicked\nif <(letter (stagePlat) of (doorYet?)) = [0]> then\n    broadcast (closeADD v)\n    set [keyediting v] to [door]\nend\n\n@Sprite17\n\nwhen flag clicked\nforever\n    if <<(extendedPLAT) = [1]> and <[platformer] = (playState)>> then\n        go to [front v] layer\n        if <(inKeyDrawerTransition) = [0]> then\n            set [ghost v] effect to (100)\n        end\n        show\n        set y to ([y position v] of [key v])\n    else\n        hide\n    end\n    if <(letter (stagePlat) of (lockYet?)) = [1]> then\n        switch costume to (add copy 10 v)\n    else\n        switch costume to (add copy 7 v)\n    end\nend\n\nwhen I receive [resetplatformer v]\nset [keyyet? v] to [00000]\nset [dooryet? v] to [00000]\nset [lockyet? v] to [00000]\n\nwhen I receive [openkeydrawer v]\nset [ghost v] effect to (100)\nshow\ngo to x: (20) y: (0)\nset [myfluster v] to [-5]\nwait (0.1) seconds\nrepeat (5)\n    change x by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (1)\nend\n\nwhen I receive [closeadd v]\nbroadcast (closeKeyDrawer v)\n\nwhen I receive [closekeydrawer v]\nset [myfluster v] to [5]\nrepeat (5)\n    change x by (myFluster)\n    change [ghost v] effect by (20)\n    change [myfluster v] by (-1)\nend\nset [inkeydrawertransition v] to [0]\n\nwhen this sprite clicked\nif <(letter (stagePlat) of (lockYet?)) = [0]> then\n    broadcast (closeADD v)\n    set [keyediting v] to [lock]\nend\n\n@keyPart\n\ndefine findLOCATION (find)\nset [countrow v] to (((stagePlat) - (1)) * (17))\nrepeat (17)\n    change [countrow v] by (1)\n    set [countlocation v] to [0]\n    repeat (32)\n        change [countlocation v] by (1)\n        if <(find) = (letter (countLOCATION) of (item (countROW) of [platformerleveldata v]))> then\n            change [countrow v] by (() - (((stagePlat) - (1)) * (17)))\n            stop [this script v]\n        end\n    end\nend\n\ndefine translateANDmove (x) (y)\ngo to x: ((-232) + (((x) - (1)) * (15))) y: ((113) - (((y) - (1)) * (15)))\n\ndefine decodeLOCATION (x) (y)\nset [countlocation v] to (round (((247) + (x)) / (15)))\nset [countrow v] to (round (() - (((y) - (128)) / (15))))\n\ndefine erase (id_char)\ndecodeLOCATION (x position) (y position)\nset [transcribe v] to []\nset [repround v] to [0]\nrepeat (32)\n    change [repround v] by (1)\n    if <(repRound) = (countLOCATION)> then\n        set [transcribe v] to (join (transcribe) [0])\n    else\n        set [transcribe v] to (join (transcribe) (letter (repRound) of (item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v])))\n    end\nend\nreplace item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v] with (transcribe)\n\nfindLOCATION [p]\n\nwhen flag clicked\nforever\n    if <<(keyEditing) = [key]> and <(letter (stagePlat) of (keyYet?)) = [0]>> then\n        show\n        if <(round (((15) * (round (((mouse x) + (7.5)) / (15)))) - (7.5))) > [218]> then\n            set x to (218)\n        else\n            set x to (((15) * (round (((mouse x) + (7.5)) / (15)))) - (7.5))\n        end\n        if <not <<(round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))) < [-127]> or <[98] < (round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5)))>>> then\n            set y to (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))\n            if <<[224] < (mouse x)> or <(mouse x) < [-239]>> then\n                set [ghost v] effect to (50)\n            else\n                set [ghost v] effect to (0)\n            end\n        else\n            if <(round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))) < [-127]> then\n                set y to (-127)\n                set [ghost v] effect to (50)\n            else\n                set y to (98)\n                set [ghost v] effect to (50)\n            end\n        end\n        set [row v] to ((1) + ([abs v] of ((16) - (((round (((15) * (round (((y position) + (7.5)) / (15)))) - (7.5))) + (127)) / (15))) ))\n        set [column v] to (round (((round (((15) * (round (((x position) + (7.5)) / (15)))) - (7.5))) / (15)) + (16.47)))\n    else\n        if <<<(playState) = [platformer]> or <(playState) = [platTest]>> and <<(keyEditing) = [key]> or <not <(letter (stagePlat) of (keyYet?)) = [0]>>>> then\n            if <(playState) = [platTest]> then\n                if <(keyObtained?) = [0]> then\n                    show\n                else\n                    hide\n                end\n            else\n                show\n            end\n        else\n            hide\n        end\n    end\nend\n\nwhen this sprite clicked\nif <<(keyEditing) = [key]> and <(letter (stagePlat) of (keyYet?)) = [0]>> then\n    decodeLOCATION (x position) (y position)\n    if <[0] = (letter (countLOCATION) of (item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v]))> then\n        record [k]\n        ummm...............\n    end\nend\n\ndefine record (id_char)\ndecodeLOCATION (x position) (y position)\nset [transcribe v] to []\nset [repround v] to [0]\nrepeat (32)\n    change [repround v] by (1)\n    if <(repRound) = (countLOCATION)> then\n        set [transcribe v] to (join (transcribe) (id_char))\n    else\n        set [transcribe v] to (join (transcribe) (letter (repRound) of (item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v])))\n    end\nend\nreplace item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v] with (transcribe)\n\nwhen I receive [enterstage v]\nfindLOCATION [k]\ntranslateANDmove (countLOCATION) (countROW)\n\ndefine ummm...............\nset [temporarytranscriptionvarforkey v] to []\nrepeat ((stagePlat) - (1))\n    set [temporarytranscriptionvarforkey v] to (join (temporaryTranscriptionVarForKey) (letter ((length of (temporaryTranscriptionVarForKey)) + (1)) of (keyYet?)))\nend\nset [temporarytranscriptionvarforkey v] to (join (temporaryTranscriptionVarForKey) [1])\nrepeat ((5) - (stagePlat))\n    set [temporarytranscriptionvarforkey v] to (join (temporaryTranscriptionVarForKey) (letter ((length of (temporaryTranscriptionVarForKey)) + (1)) of (keyYet?)))\nend\nset [keyyet? v] to (temporaryTranscriptionVarForKey)\n\nif  then\nend\n\n@doorPart\n\ndefine findLOCATION\nset [countrow v] to (((stagePlat) - (1)) * (17))\nrepeat (17)\n    change [countrow v] by (1)\n    set [countlocation v] to [0]\n    repeat (32)\n        change [countlocation v] by (1)\n        if <[availablekeydoormaterials v] contains (letter (countLOCATION) of (item (countROW) of [platformerleveldata v]))?> then\n            switch costume to (letter (countLOCATION) of (item (countROW) of [platformerleveldata v]))\n            change [countrow v] by (() - (((stagePlat) - (1)) * (17)))\n            stop [this script v]\n        end\n    end\nend\n\ndefine translateANDmove (x) (y)\ngo to x: ((-232) + (((x) - (1)) * (15))) y: ((113) - (((y) - (1)) * (15)))\n\ndefine decodeLOCATION (x) (y)\nset [countlocation v] to (round (((247) + (x)) / (15)))\nset [countrow v] to (round (() - (((y) - (128)) / (15))))\n\ndefine erase (id_char)\ndecodeLOCATION (x position) (y position)\nset [transcribe v] to []\nset [repround v] to [0]\nrepeat (32)\n    change [repround v] by (1)\n    if <(repRound) = (countLOCATION)> then\n        set [transcribe v] to (join (transcribe) [0])\n    else\n        set [transcribe v] to (join (transcribe) (letter (repRound) of (item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v])))\n    end\nend\nreplace item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v] with (transcribe)\n\nwhen flag clicked\nforever\n    if <<(keyEditing) = [door]> and <(letter (stagePlat) of (doorYet?)) = [0]>> then\n        show\n        if <(round (((15) * (round (((mouse x) + (7.5)) / (15)))) - (7.5))) > [218]> then\n            set x to (218)\n        else\n            set x to (((15) * (round (((mouse x) + (7.5)) / (15)))) - (7.5))\n        end\n        if <not <<(round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))) < [-127]> or <((113) - ((costume [number v]) * (15))) < (round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5)))>>> then\n            set y to (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))\n            if <<[224] < (mouse x)> or <(mouse x) < [-239]>> then\n                set [ghost v] effect to (50)\n            else\n                set [ghost v] effect to (0)\n            end\n        else\n            if <(round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))) < [-127]> then\n                set y to (-127)\n                set [ghost v] effect to (50)\n            else\n                set y to ((113) - ((costume [number v]) * (15)))\n                set [ghost v] effect to (50)\n            end\n        end\n        set [row v] to ((1) + ([abs v] of ((16) - (((round (((15) * (round (((y position) + (7.5)) / (15)))) - (7.5))) + (127)) / (15))) ))\n        set [column v] to (round (((round (((15) * (round (((x position) + (7.5)) / (15)))) - (7.5))) / (15)) + (16.47)))\n    else\n        if <<(playState) = [platformer]> and <<(keyEditing) = [door]> or <not <(letter (stagePlat) of (doorYet?)) = [0]>>>> then\n            show\n            set [ghost v] effect to (0)\n        else\n            hide\n            switch costume to (g v)\n        end\n    end\nend\n\nwhen this sprite clicked\nif <<(keyEditing) = [door]> and <(letter (stagePlat) of (doorYet?)) = [0]>> then\n    decodeLOCATION (x position) (y position)\n    if <[0] = (letter (countLOCATION) of (item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v]))> then\n        record (costume [name v])\n        ummm...............\n        set [keyediting v] to [0]\n    end\nend\n\ndefine record (id_char)\ndecodeLOCATION (x position) (y position)\nset [transcribe v] to []\nset [repround v] to [0]\nrepeat (32)\n    change [repround v] by (1)\n    if <(repRound) = (countLOCATION)> then\n        set [transcribe v] to (join (transcribe) (id_char))\n    else\n        set [transcribe v] to (join (transcribe) (letter (repRound) of (item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v])))\n    end\nend\nreplace item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v] with (transcribe)\n\nwhen I receive [enterstage v]\nfindLOCATION\ntranslateANDmove (countLOCATION) (countROW)\n\ndefine ummm...............\nset [temporarytranscriptionvarforkeydoorrecording v] to []\nrepeat ((stagePlat) - (1))\n    set [temporarytranscriptionvarforkeydoorrecording v] to (join (TemporaryTranscriptionVarForKeyDoorRecording) (letter ((length of (TemporaryTranscriptionVarForKeyDoorRecording)) + (1)) of (doorYet?)))\nend\nset [temporarytranscriptionvarforkeydoorrecording v] to (join (TemporaryTranscriptionVarForKeyDoorRecording) [1])\nrepeat ((5) - (stagePlat))\n    set [temporarytranscriptionvarforkeydoorrecording v] to (join (TemporaryTranscriptionVarForKeyDoorRecording) (letter ((length of (TemporaryTranscriptionVarForKeyDoorRecording)) + (1)) of (doorYet?)))\nend\nset [dooryet? v] to (TemporaryTranscriptionVarForKeyDoorRecording)\n\nwhen flag clicked\ndelete all of [availablekeydoormaterials v]\nadd [g] to [availablekeydoormaterials v]\nadd [h] to [availablekeydoormaterials v]\nadd [i] to [availablekeydoormaterials v]\nadd [j] to [availablekeydoormaterials v]\n\nwhen [space v] key pressed\nhide\nif <(keyEditing) = [door]> then\n    next costume\n    wait (0) seconds\n    show\nend\n\nif <<<(playState) = [platformer]> or <(playState) = [platTest]>> and <<(keyEditing) = [key]> or <not <(letter (stagePlat) of (keyYet?)) = [0]>>>> then\n    if <(playState) = [platTest]> then\n        if <(keyObtained?) = [0]> then\n            show\n        else\n            hide\n        end\n    else\n        show\n    end\nelse\n    hide\nend\n\n@lockPart\n\ndefine findLOCATION (number or text)\nset [countrow v] to (((stagePlat) - (1)) * (17))\nrepeat (17)\n    change [countrow v] by (1)\n    set [countlocation v] to [0]\n    repeat (32)\n        change [countlocation v] by (1)\n        if <(number or text) = (letter (countLOCATION) of (item (countROW) of [platformerleveldata v]))> then\n            change [countrow v] by (() - (((stagePlat) - (1)) * (17)))\n            stop [this script v]\n        end\n    end\nend\n\ndefine translateANDmove (x) (y)\ngo to x: ((-232) + (((x) - (1)) * (15))) y: ((113) - (((y) - (1)) * (15)))\n\ndefine decodeLOCATION (x) (y)\nset [countlocation v] to (round (((247) + (x)) / (15)))\nset [countrow v] to (round (() - (((y) - (128)) / (15))))\n\ndefine erase (id_char)\ndecodeLOCATION (x position) (y position)\nset [transcribe v] to []\nset [repround v] to [0]\nrepeat (32)\n    change [repround v] by (1)\n    if <(repRound) = (countLOCATION)> then\n        set [transcribe v] to (join (transcribe) [0])\n    else\n        set [transcribe v] to (join (transcribe) (letter (repRound) of (item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v])))\n    end\nend\nreplace item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v] with (transcribe)\n\nwhen flag clicked\nforever\n    if <<(keyEditing) = [lock]> and <(letter (stagePlat) of (lockYet?)) = [0]>> then\n        show\n        if <(round (((15) * (round (((mouse x) + (7.5)) / (15)))) - (7.5))) > [218]> then\n            set x to (218)\n        else\n            set x to (((15) * (round (((mouse x) + (7.5)) / (15)))) - (7.5))\n        end\n        if <not <<(round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))) < [-127]> or <[98] < (round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5)))>>> then\n            set y to (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))\n            if <<[224] < (mouse x)> or <(mouse x) < [-239]>> then\n                set [ghost v] effect to (50)\n            else\n                set [ghost v] effect to (0)\n            end\n        else\n            if <(round (((15) * (round (((mouse y) + (7.5)) / (15)))) - (7.5))) < [-127]> then\n                set y to (-127)\n                set [ghost v] effect to (50)\n            else\n                set y to (98)\n                set [ghost v] effect to (50)\n            end\n        end\n        set [row v] to ((1) + ([abs v] of ((16) - (((round (((15) * (round (((y position) + (7.5)) / (15)))) - (7.5))) + (127)) / (15))) ))\n        set [column v] to (round (((round (((15) * (round (((x position) + (7.5)) / (15)))) - (7.5))) / (15)) + (16.47)))\n    else\n        if <<<(playState) = [platformer]> or <(playState) = [platTest]>> and <<(keyEditing) = [lock]> or <not <(letter (stagePlat) of (lockYet?)) = [0]>>>> then\n            if <(playState) = [platTest]> then\n                if <(keyObtained?) = [1]> then\n                    show\n                else\n                    hide\n                end\n            else\n                show\n            end\n        else\n            hide\n        end\n    end\nend\n\nwhen this sprite clicked\nif <<(keyEditing) = [lock]> and <(letter (stagePlat) of (lockYet?)) = [0]>> then\n    decodeLOCATION (x position) (y position)\n    if <[0] = (letter (countLOCATION) of (item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v]))> then\n        record [l]\n        ummm...............\n        set [keyediting v] to [0]\n    end\nend\n\ndefine record (id_char)\ndecodeLOCATION (x position) (y position)\nset [transcribe v] to []\nset [repround v] to [0]\nrepeat (32)\n    change [repround v] by (1)\n    if <(repRound) = (countLOCATION)> then\n        set [transcribe v] to (join (transcribe) (id_char))\n    else\n        set [transcribe v] to (join (transcribe) (letter (repRound) of (item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v])))\n    end\nend\nreplace item ((countROW) + (((stagePlat) - (1)) * (17))) of [platformerleveldata v] with (transcribe)\n\nwhen I receive [enterstage v]\nfindLOCATION [l]\ntranslateANDmove (countLOCATION) (countROW)\n\ndefine ummm...............\nset [aaaaatemplocksavevarthing v] to []\nrepeat ((stagePlat) - (1))\n    set [aaaaatemplocksavevarthing v] to (join (aaaaaTempLockSaveVarThing) (letter ((length of (aaaaaTempLockSaveVarThing)) + (1)) of (lockYet?)))\nend\nset [aaaaatemplocksavevarthing v] to (join (aaaaaTempLockSaveVarThing) [1])\nrepeat ((5) - (stagePlat))\n    set [aaaaatemplocksavevarthing v] to (join (aaaaaTempLockSaveVarThing) (letter ((length of (aaaaaTempLockSaveVarThing)) + (1)) of (lockYet?)))\nend\nset [lockyet? v] to (aaaaaTempLockSaveVarThing)\n\n@Sprite19\n\nwhen flag clicked\nhide\nset [eastereggstringone v] to []\nforever\n    if <(playState) = [intro]> then\n        if <<not <(easterEggStringOne) = [meow]>> and <[0.75] < (timer)>> then\n            set [eastereggstringone v] to []\n        end\n    end\nend\n\nwhen [m v] key pressed\nif <(playState) = [intro]> then\n    if <(easterEggStringOne) = []> then\n        set [eastereggstringone v] to (join (easterEggStringOne) [m])\n        start sound [m v]\n        reset timer\n        set [ideeclone v] to [m]\n        create clone of (_myself_ v)\n    end\nend\n\nwhen [e v] key pressed\nif <(playState) = [intro]> then\n    if <(easterEggStringOne) = [m]> then\n        set [eastereggstringone v] to (join (easterEggStringOne) [e])\n        start sound [e v]\n        reset timer\n        set [ideeclone v] to [e]\n        create clone of (_myself_ v)\n    end\nend\n\nwhen [o v] key pressed\nif <(playState) = [intro]> then\n    if <(easterEggStringOne) = [me]> then\n        set [eastereggstringone v] to (join (easterEggStringOne) [o])\n        start sound [o v]\n        reset timer\n        set [ideeclone v] to [o]\n        create clone of (_myself_ v)\n    end\nend\n\nwhen [w v] key pressed\nif <(playState) = [intro]> then\n    if <(easterEggStringOne) = [meo]> then\n        set [eastereggstringone v] to (join (easterEggStringOne) [w])\n        start sound [w v]\n        reset timer\n        set [ideeclone v] to [w]\n        create clone of (_myself_ v)\n        broadcast (MEOW v)\n    end\nend\n\nwhen I start as a clone\nswitch costume to (idEEclone)\ngo to x: (0) y: (-15)\nset [ghost v] effect to (100)\nshow\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (-20)\n    change [myfluster v] by (-1)\nend\n\nwhen I start as a clone\nforever\n    if <(easterEggStringOne) = []> then\n        wait ((costume [number v]) * (0.05)) seconds\n        set [myfluster v] to [5]\n        repeat (5)\n            change y by (myFluster)\n            change [ghost v] effect by (20)\n            change [myfluster v] by (-1)\n        end\n        delete this clone\n    end\nend\n\nwhen I receive [endpicklang v]\nwait ((costume [number v]) * (0.05)) seconds\nset [myfluster v] to [5]\nrepeat (5)\n    change y by (myFluster)\n    change [ghost v] effect by (20)\n    change [myfluster v] by (-1)\nend\ndelete this clone\n\n@Instructions\n\nwhen flag clicked\nhide\nforever\n    go to x: (mouse x) y: (mouse y)\n    if <[isometric] = (playState)> then\n        if <[ERASE] = (isoEdit)> then\n            switch costume to (instruction_01 v)\n            show\n        else\n            hide\n        end\n    else\n        hide\n    end\nend\n\n@Sprite20\n\ngo to x: (0) y: (0)\n\nwhen flag clicked\nhide\n\n