Land - A Mobile Platformer

Instructions: ---------------------------------------------------------------------\nUse arrows to move (↑ to jump, ← & →)\n---------------------------------------------------------------------\nTouch the right wall to get to the next level\n--------------------------------------------------------------------

@Stage\n\nwhen flag clicked\nset [theme v] to [g]\nforever\n    play sound [vexento-masked-heroes-1-AHM56EBq6 \(1\) v] until done\nend\n\n@Hitbox\n\ndefine Physics\nif <([abs v] of (sx) ) < [8]> then\n    if  then\n        change [sx v] by (2)\n    else\n        if  then\n            change [sx v] by (-2)\n        end\n    end\nend\nif  then\n    if <not <[collision v] contains [4]?>> then\n        if <(in air) < [4]> then\n            set [sy v] to [8]\n        end\n    end\nend\nif <[collision v] contains [4]?> then\n    start sound [Splash v]\n    if <key (up arrow v) pressed?> then\n        set [sy v] to [3]\n    else\n        change [sy v] by (-1)\n    end\nelse\n    change [sy v] by (-1)\nend\nset [sx v] to ((sx) * (0.7))\nx (sx)\ny (sy)\nchange [scroll x v] by (round (((x) - (SCROLL X)) / (10)))\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (3)))\nif <(SCROLL Y) < [-200]> then\n    set [scroll y v] to [-200]\nend\ngoto\nset [die v] to [0]\nif <<[collision v] contains [2]?> or <[collision v] contains [5]?>> then\n    set [die v] to [1]\nend\nif <[collision v] contains [3]?> then\n    set [sy v] to [14]\n    set [bb v] to [100]\nend\nif <(y) < [-400]> then\n    set [die v] to [1]\nend\nif <[collision v] contains [10]?> then\n    change [x v] by (sx)\n    change [y v] by (1)\n    set [paused v] to [1]\n    broadcast (win v)\nend\nTtest\nif <[collision v] contains [9]?> then\n    set [checkpoint v] to (item # of [9] in [collision v])\n    start sound [Collect v]\nend\n\ndefine y (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\ngoto\nrepeat until <not <[collision v] contains [1]?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    goto\n    set [sy v] to [0]\nend\n\ndefine x (sx)\nchange [x v] by (sx)\ngoto\nif <[collision v] contains [1]?> then\n    repeat (10)\n        change [y v] by (1)\n        goto\n        if <not <[collision v] contains [1]?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-10)\n    repeat until <not <[collision v] contains [1]?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        goto\n        set [sx v] to [0]\n    end\n    if <(walljump) = [1]> then\n        if  then\n            if <([abs v] of (sx) ) = (sx)> then\n                set [sx v] to [-10]\n            else\n                set [sx v] to [10]\n            end\n            set [sy v] to [10]\n        end\n    end\nend\n\ndefine goto\nset [ghost v] effect to (0)\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\nTtest\n\ndefine Ttest\ndelete all of [collision v]\nset [i v] to [0]\nrepeat (length of [mode v])\n    add [0] to [collision v]\n    change [i v] by (1)\n    if <((item (i) of [x v]) - (20.5)) < (x)> then\n        if <not <((item (i) of [x v]) - (-20.5)) < (x)>> then\n            if <((item (i) of [y v]) - (20.5)) < (y)> then\n                if <not <((item (i) of [y v]) - (-20.5)) < (y)>> then\n                    replace item (i) of [collision v] with (item (i) of [mode v])\n                end\n            end\n        end\n    end\nend\n\ndefine Die\nrepeat (15)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\nforever\n    change [cooldown v] by (-2.7)\n    if <(mode) = [playing]> then\n        change [last v] by (-1)\n        if <(pick random (1) to (60)) = [1]> then\n            if <(last) < [0]> then\n                set [last v] to [5]\n                switch costume to (7 v)\n                repeat (5)\n                    next costume\n                end\n                repeat (1)\n                    switch costume to (10 v)\n                end\n                repeat (1)\n                    switch costume to (8 v)\n                end\n                repeat (1)\n                    switch costume to (11 v)\n                end\n                repeat (1)\n                    switch costume to (7 v)\n                end\n            end\n        else\n            if <<<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > [10]>>> and <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n                switch costume to (5 v)\n            else\n                if <<<key (left arrow v) pressed?> or <<mouse down?> and <[-10] > (mouse x)>>> and <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n                    switch costume to (6 v)\n                else\n                    if <<key (left arrow v) pressed?> or <<mouse down?> and <[-10] > (mouse x)>>> then\n                        switch costume to (2 v)\n                    else\n                        if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > [10]>>> then\n                            switch costume to (3 v)\n                        else\n                            if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n                                switch costume to (4 v)\n                            else\n                                switch costume to (1 v)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Import level\nset [checkpoint v] to [0]\ndelete all of [mode v]\ndelete all of [x v]\ndelete all of [y v]\nadd platfom [0] [-100] [1]\nFigureitout\n@CSCHECK\nif <not <(input) = []>> then\n\nwhen flag clicked\nset [input v] to []\nbroadcast (edit v)\n\nwhen I receive [edit v]\nset [mode v] to [editor]\nImport level\nset [ghost v] effect to (100)\nset [paused v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [blockselected v] to [1]\nforever\n    change [direction of the saw v] by (1)\n    set size to (50) %\n    if <(mode) = [editor]> then\n        set [checkpoint v] to [0]\n        broadcast (update v)\n        hide\n        Editormovemnet\n        set [sx v] to [0]\n        set [sy v] to [0]\n        set [x v] to [0]\n        set [y v] to [-75]\n        set [paused v] to [0]\n    else\n        show\n        if <(die) = [0]> then\n            if <(paused) = [0]> then\n                broadcast (update v)\n                set [die v] to [0]\n                Physics\n            end\n        else\n            Die\n            set [die v] to [0]\n            set [sy v] to [0]\n            set [sx v] to [0]\n            if <(checkpoint) = [0]> then\n                set [x v] to [0]\n                set [y v] to [-75]\n                set [scroll y v] to [0]\n                set [scroll x v] to [0]\n            else\n                set [x v] to (item (checkpoint) of [x v])\n                set [y v] to ((item (checkpoint) of [y v]) + (0))\n                set [scroll y v] to (y)\n                set [scroll x v] to (x)\n            end\n        end\n    end\nend\n\ndefine Editormovemnet\nif <key (right arrow v) pressed?> then\n    change [scroll x v] by (6.25)\nend\nif <key (left arrow v) pressed?> then\n    change [scroll x v] by (-6.25)\nend\nif <key (down arrow v) pressed?> then\n    if <(SCROLL Y) > [-100]> then\n        change [scroll y v] by (-6.25)\n    end\nend\nif <key (up arrow v) pressed?> then\n    change [scroll y v] by (6.25)\nend\nif <key (1 v) pressed?> then\n    set [blockselected v] to [1]\nend\nif <key (2 v) pressed?> then\n    set [blockselected v] to [2]\nend\nif <key (3 v) pressed?> then\n    set [blockselected v] to [3]\nend\nif <key (4 v) pressed?> then\n    set [blockselected v] to [4]\nend\nif <key (5 v) pressed?> then\n    set [blockselected v] to [5]\nend\nif <key (6 v) pressed?> then\n    set [blockselected v] to [9]\nend\nif <key (7 v) pressed?> then\n    set [blockselected v] to [10]\nend\nif <key (m v) pressed?> then\n    set [scroll y v] to [0]\n    set [scroll x v] to [0]\nend\n\nwhen I receive [loadcode v]\nImport level\n\ndefine Figureitout\nset [status v] to [0]\nset [0 v] to [0]\nset [zeile v] to [1]\nset [zwische v] to []\ndelete all of [ouoot v]\nadd [] to [ouoot v]\nif <not <(input) = []>> then\n    set [scroll x v] to [0]\n    set [scroll y v] to [0]\n    repeat (length of (input))\n        change [status v] by (1)\n        if <not <(letter (status) of (input)) = [0]>> then\n            set [0 v] to [0]\n            set [zwische v] to (join (zwische) (letter (status) of (input)))\n        else\n            change [0 v] by (1)\n            if <(0) = [1]> then\n                replace item (zeile) of [ouoot v] with (join (item (zeile) of [ouoot v]) (item (zwische) of [characterst v]))\n                set [zwische v] to []\n            end\n            if <(0) = [2]> then\n                change [zeile v] by (1)\n                add [] to [ouoot v]\n            end\n        end\n    end\n    delete (length of [ouoot v]) of [ouoot v]\n    set [status v] to [0]\n    set [g v] to [1]\n    if <(item (length of [ouoot v]) of [ouoot v]) = [z]> then\n        set [mal v] to [25]\n        set [theme v] to [g]\n        delete (length of [ouoot v]) of [ouoot v]\n    else\n        if <(item (length of [ouoot v]) of [ouoot v]) = [g]> then\n            set [theme v] to (item (length of [ouoot v]) of [ouoot v])\n            set [mal v] to [25]\n            set [g v] to [0]\n            delete (length of [ouoot v]) of [ouoot v]\n        else\n            set [mal v] to [1]\n            set [theme v] to [g]\n        end\n    end\n    repeat (((length of [ouoot v]) - (1)) / (3))\n        change [status v] by (1)\n        add ((item (status) of [ouoot v]) * (mal)) to [x v]\n    end\n    repeat (((length of [ouoot v]) - (1)) / (3))\n        change [status v] by (1)\n        add ((item (status) of [ouoot v]) * (mal)) to [y v]\n    end\n    repeat (((length of [ouoot v]) - (1)) / (3))\n        change [status v] by (1)\n        if <<(g) = [1]> and <(item (status) of [ouoot v]) = [6]>> then\n            add [10] to [mode v]\n        else\n            add (item (status) of [ouoot v]) to [mode v]\n        end\n    end\n    if <(item (length of [ouoot v]) of [ouoot v]) = [yes]> then\n        set [walljump v] to [1]\n    else\n        set [walljump v] to [0]\n    end\n    if <<<<not <(length of [x v]) = (length of [mode v])>> or <not <(length of [y v]) = (length of [mode v])>>> or <[ouoot v] contains []?>> or <not <(length of [x v]) = (length of [y v])>>> then\n        set [input v] to []\n        Import level\n        set [error v] to [1]\n        create clone of (_myself_ v)\n    end\n    if <not <<[ouoot v] contains [no]?> or <[ouoot v] contains [yes]?>>> then\n        set [input v] to []\n        Import level\n        set [error v] to [1]\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nif <(error) = [1]> then\n    go to x: (0) y: (180)\n    show\n    set [ghost v] effect to (100)\n    say [Invalid code] for (2) seconds\n    hide\nend\n\nwhen I receive [reset v]\nset [input v] to []\nImport level\n\nstart sound [Collect v]\n\ndefine @CSCHECK\ndelete all of [cs v]\nset [i v] to [0]\nrepeat (length of [mode v])\n    change [i v] by (1)\n    add [0] to [cs v]\n    set [e v] to [0]\n    repeat (length of [mode v])\n        change [e v] by (1)\n        if <(item (e) of [y v]) = ((item (i) of [y v]) + (25))> then\n            if <(item (e) of [x v]) = (item (i) of [x v])> then\n                if <(item (e) of [mode v]) = (item (i) of [mode v])> then\n                    replace item (length of [cs v]) of [cs v] with [1]\n                end\n            end\n        end\n    end\nend\n\ndefine remove platform (x) (y)\nset [o v] to [2]\nrepeat until <<<(item (o) of [x v]) = (x)> and <(item (o) of [y v]) = (y)>> or <(o) > (length of [mode v])>>\n    change [o v] by (1)\nend\nif <<(item (o) of [x v]) = (x)> and <(item (o) of [y v]) = (y)>> then\n    delete (o) of [x v]\n    delete (o) of [y v]\n    delete (o) of [mode v]\nend\n@CSCHECK\n\ndefine add platfom (xpos) (ypos) (id)\nset [o v] to [1]\nrepeat until <<<(item (o) of [x v]) = (xpos)> and <(item (o) of [y v]) = (ypos)>> or <(o) > (length of [mode v])>>\n    change [o v] by (1)\nend\nif <(o) > (length of [mode v])> then\n    add (xpos) to [x v]\n    add (ypos) to [y v]\n    add (id) to [mode v]\nend\n@CSCHECK\n\n@Sprite1\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    set [ghost v] effect to (6)\n    show\n    change y by (((y position) - (<(mode) = [editor]> * (-9))) / (-4))\n    go to [back v] layer\nend\n\n@Sprite2\n\nwhen I receive [edit v]\nset [bruh v] to [1]\ncreate clone of (_myself_ v)\nforever\n    hide\n    wait until <(mode) = [editor]>\n    wait (1) seconds\n    show\n    set [ghost v] effect to (100)\n    go to [back v] layer\n    repeat (10)\n        change [ghost v] effect by (-9)\n    end\n    repeat until <not <(mode) = [editor]>>\n        show\n        set [ghost v] effect to (10)\n        go to [back v] layer\n    end\n    repeat (10)\n        change [ghost v] effect by (9)\n    end\nend\n\nwhen I start as a clone\nif <(BRUH) = [1]> then\n    switch costume to (w v)\n    go to x: (0) y: (0)\n    hide\n    wait (1) seconds\n    forever\n        repeat until <not <(mode) = [editor]>>\n            show\n            set [ghost v] effect to (50)\n            go to [front v] layer\n            change y by (0)\n            set [brightness v] effect to (<touching (mouse-pointer v)?> * (20))\n            if <<mouse down?> and <touching (mouse-pointer v)?>> then\n                change [walljump v] by (-1)\n                set [walljump v] to ([abs v] of (walljump) )\n                repeat (10)\n                    set y to (pick random (1) to (5))\n                end\n            end\n            if <(walljump) = [1]> then\n                switch costume to (w2 v)\n            else\n                switch costume to (w v)\n            end\n        end\n        repeat (10)\n            change [ghost v] effect by (5)\n        end\n        hide\n        wait until <(mode) = [editor]>\n        hide\n        wait (1) seconds\n        show\n        set [ghost v] effect to (100)\n        go to [front v] layer\n        repeat (10)\n            change [ghost v] effect by (-5)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    wait until <(mode) = [editor]>\n    set [scroll y v] to [0]\n    set [scroll x v] to [0]\n    wait until <not <(mode) = [editor]>>\nend\n\nwhen I start as a clone\nforever\n    wait until <touching (mouse-pointer v)?>\n    start sound [Tap Conga v]\n    wait until <not <touching (mouse-pointer v)?>>\nend\n\n@normal\n\nwhen flag clicked\nhide\n\ndefine Stamp (theme)\nset size to (100) %\nset [i v] to [0]\nrepeat (length of [mode v])\n    change [i v] by (1)\n    if <not <(item (i) of [mode v]) = [1]>> then\n        if <<([abs v] of ((item (i) of [x v]) - (SCROLL X)) ) < [260]> and <([abs v] of ((item (i) of [y v]) - (SCROLL Y)) ) < [200]>> then\n            go to x: ((item (i) of [x v]) - (SCROLL X)) y: ((item (i) of [y v]) - (SCROLL Y))\n            switch costume to (item (i) of [mode v])\n            Cc (theme)\n            clear graphic effects\n            if <<(item (i) of [x v]) = [0]> and <(item (i) of [y v]) = [-100]>> then\n                switch costume to (100 v)\n                set [brightness v] effect to (10)\n            end\n            if <(item (i) of [mode v]) = [2]> then\n                set [brightness v] effect to ((([sin v] of ((timer) * (100)) ) * (10)) + (20))\n            end\n            if <(item (i) of [mode v]) = [3]> then\n                set [brightness v] effect to (bb)\n            end\n            point in direction (90)\n            if <(item (i) of [mode v]) = [5]> then\n                point in direction (direction of the saw)\n            end\n            if <(item (i) of [mode v]) = [9]> then\n                if <(checkpoint) = (i)> then\n                    set [brightness v] effect to (30)\n                end\n            end\n            stamp\n        end\n    end\nend\nset [i v] to [0]\nrepeat (length of [mode v])\n    change [i v] by (1)\n    if <(item (i) of [mode v]) = [1]> then\n        if <<([abs v] of ((item (i) of [x v]) - (SCROLL X)) ) < [260]> and <([abs v] of ((item (i) of [y v]) - (SCROLL Y)) ) < [200]>> then\n            go to x: ((item (i) of [x v]) - (SCROLL X)) y: ((item (i) of [y v]) - (SCROLL Y))\n            switch costume to (item (i) of [mode v])\n            Cc (theme)\n            clear graphic effects\n            point in direction (90)\n            if <<(item (i) of [x v]) = [0]> and <(item (i) of [y v]) = [-100]>> then\n                switch costume to (100 v)\n                set [brightness v] effect to (10)\n            end\n            stamp\n        end\n    end\nend\nif <(mode) = [editor]> then\n    if <(blockselected) < [1000]> then\n        if <((SCROLL Y) mod (1)) = [0]> then\n            if <((mouse y) - (([floor v] of ((mouse y) / (25)) ) * (25))) < [12]> then\n                set y to (((([floor v] of ((mouse y) / (25)) ) * (25)) + (0)) - ())\n            else\n                set y to (((([floor v] of ((mouse y) / (25)) ) * (25)) + (25)) - ())\n            end\n        else\n            if <((SCROLL Y) mod (1)) = [0.25]> then\n                if <((mouse y) - (([floor v] of ((mouse y) / (25)) ) * (25))) < [6.25]> then\n                    set y to (((([floor v] of (((mouse y) + ()) / (25)) ) * (25)) + (-6.25)) - ())\n                else\n                    set y to (((([floor v] of (((mouse y) + ()) / (25)) ) * (25)) + (25)) - (6.25))\n                end\n            else\n                if <((SCROLL Y) mod (1)) = [0.5]> then\n                    if <((mouse y) - (([floor v] of ((mouse y) / (25)) ) * (25))) < [0]> then\n                        set y to (((([floor v] of (((mouse y) + ()) / (25)) ) * (25)) + (0)) - ())\n                    else\n                        set y to (((([floor v] of (((mouse y) + ()) / (25)) ) * (25)) + (25)) - (12.5))\n                    end\n                else\n                    if <((SCROLL Y) mod (1)) = [0.75]> then\n                        if <((mouse y) - (([floor v] of ((mouse y) / (25)) ) * (25))) < [18.75]> then\n                            set y to (((([floor v] of (((mouse y) + ()) / (25)) ) * (25)) + (6.25)) - ())\n                        else\n                            set y to (((([floor v] of (((mouse y) + ()) / (25)) ) * (25)) + (25)) - (-6.25))\n                        end\n                    end\n                end\n            end\n        end\n        if <((SCROLL X) mod (1)) = [0]> then\n            if <((mouse x) - (([floor v] of ((mouse x) / (25)) ) * (25))) < [12]> then\n                set x to (((([floor v] of ((mouse x) / (25)) ) * (25)) + (0)) - ())\n            else\n                set x to (((([floor v] of ((mouse x) / (25)) ) * (25)) + (25)) - ())\n            end\n        else\n            if <((SCROLL X) mod (1)) = [0.25]> then\n                if <((mouse x) - (([floor v] of ((mouse x) / (25)) ) * (25))) < [6.25]> then\n                    set x to (((([floor v] of (((mouse x) + ()) / (25)) ) * (25)) + (-6.25)) - ())\n                else\n                    set x to (((([floor v] of (((mouse x) + ()) / (25)) ) * (25)) + (25)) - (6.25))\n                end\n            else\n                if <((SCROLL X) mod (1)) = [0.5]> then\n                    if <((mouse x) - (([floor v] of ((mouse x) / (25)) ) * (25))) < [0]> then\n                        set x to (((([floor v] of (((mouse x) + ()) / (25)) ) * (25)) + (-12.5)) - ())\n                    else\n                        set x to (((([floor v] of (((mouse x) + ()) / (25)) ) * (25)) + (25)) - (12.5))\n                    end\n                else\n                    if <((SCROLL X) mod (1)) = [0.75]> then\n                        if <((mouse x) - (([floor v] of ((mouse x) / (25)) ) * (25))) < [0]> then\n                            set x to (((([floor v] of (((mouse x) + ()) / (25)) ) * (25)) + (-18.75)) - ())\n                        else\n                            set x to (((([floor v] of (((mouse x) + ()) / (25)) ) * (25)) + (25)) - (18.75))\n                        end\n                    end\n                end\n            end\n        end\n        show\n        if <not <<touching (sprite1 v)?> or <touching (sprite2 v)?>>> then\n            if <not <<(blockselected) = [10]> and <[mode v] contains [10]?>>> then\n                set [a v] to [1]\n                repeat until <<<(item (a) of [x v]) = ((SCROLL X) + (x position))> and <(item (a) of [y v]) = ((y position) + (SCROLL Y))>> or <(a) > (length of [mode v])>>\n                    change [a v] by (1)\n                end\n                show\n                clear graphic effects\n                set [ghost v] effect to (70)\n                switch costume to (blockselected)\n                if <not <<(item (a) of [x v]) = ((SCROLL X) + (x position))> and <(item (a) of [y v]) = ((y position) + (SCROLL Y))>>> then\n                    if <not <<((SCROLL X) + (x position)) = [0]> and <<((y position) + (SCROLL Y)) = [-75]> or <<((y position) + (SCROLL Y)) = [-50]> or <<((y position) + (SCROLL Y)) = [-25]> or <((y position) + (SCROLL Y)) = [0]>>>>>> then\n                        point in direction (90)\n                        if <(blockselected) = [5]> then\n                            point in direction (direction of the saw)\n                        end\n                        if <mouse down?> then\n                            add platfom ((SCROLL X) + (x position)) ((y position) + (SCROLL Y)) (blockselected)\n                        end\n                        stamp\n                    else\n                        set [ghost v] effect to (100)\n                    end\n                else\n                    hide\n                end\n            else\n                set [blockselected v] to [1]\n            end\n        end\n    else\n        go to (mouse-pointer v)\n        switch costume to (1000 v)\n        if <mouse down?> then\n            set [ghost v] effect to (20)\n            set [rtr v] to [0]\n            repeat (length of [mode v])\n                change [rtr v] by (1)\n                if <<[-10] < ((mouse x) - (((SCROLL X) * (-1)) + (item (rtr) of [x v])))> and <((mouse x) - (((SCROLL X) * (-1)) + (item (rtr) of [x v]))) < [10]>> then\n                    if <<[-10] < ((mouse y) - (((SCROLL Y) * (-1)) + (item (rtr) of [y v])))> and <((mouse y) - (((SCROLL Y) * (-1)) + (item (rtr) of [y v]))) < [10]>> then\n                        remove platform (item (rtr) of [x v]) (item (rtr) of [y v])\n                    end\n                end\n            end\n        else\n            set [ghost v] effect to (60)\n        end\n        show\n        stamp\n    end\nend\nhide\n\nwhen I receive [update v]\nerase all\nStamp (theme)\n\nwhen flag clicked\nforever\n    change [bb v] by ((bb) / (-3))\nend\n\ndefine Cc (theme)\nif <(item (i) of [cs v]) = [1]> then\n    if <(item (i) of [mode v]) = [1]> then\n        switch costume to (1w v)\n    end\n    if <(item (i) of [mode v]) = [2]> then\n        switch costume to (1w2 v)\n    end\n    if <(item (i) of [mode v]) = [3]> then\n        switch costume to (1w3 v)\n    end\nend\n\ndefine add platfom (xpos) (ypos) (id)\nset [o v] to [1]\nrepeat until <<<(item (o) of [x v]) = (xpos)> and <(item (o) of [y v]) = (ypos)>> or <(o) > (length of [mode v])>>\n    change [o v] by (1)\nend\nadd (xpos) to [x v]\nadd (ypos) to [y v]\nadd (id) to [mode v]\n@CSCHECK\n\ndefine remove platform (x) (y)\nset [o v] to [2]\nrepeat until <<<(item (o) of [x v]) = (x)> and <(item (o) of [y v]) = (y)>> or <(o) > (length of [mode v])>>\n    change [o v] by (1)\nend\nif <(o) = (length of [mode v])> then\n    if <<(item (o) of [x v]) = (x)> and <(item (o) of [y v]) = (y)>> then\n        delete (o) of [x v]\n        delete (o) of [y v]\n        delete (o) of [mode v]\n    end\nelse\n    if <<(item (o) of [x v]) = (x)> and <(item (o) of [y v]) = (y)>> then\n        delete (o) of [x v]\n        delete (o) of [y v]\n        delete (o) of [mode v]\n    end\nend\n@CSCHECK\n\ndefine @CSCHECK\ndelete all of [cs v]\nset [i v] to [0]\nrepeat (length of [mode v])\n    change [i v] by (1)\n    add [0] to [cs v]\n    set [e v] to [0]\n    repeat (length of [mode v])\n        change [e v] by (1)\n        if <(item (e) of [y v]) = ((item (i) of [y v]) + (25))> then\n            if <(item (e) of [x v]) = (item (i) of [x v])> then\n                if <(item (e) of [mode v]) = (item (i) of [mode v])> then\n                    replace item (length of [cs v]) of [cs v] with [1]\n                end\n            end\n        end\n    end\nend\n\n@Sprite3\n\nwhen flag clicked\nhide\nforever\n    wait until <(mode) = [editor]>\n    wait (1) seconds\n    set [clone-id v] to [1]\n    create clone of (_myself_ v)\n    set [clone-id v] to [2]\n    create clone of (_myself_ v)\n    set [clone-id v] to [3]\n    create clone of (_myself_ v)\n    set [clone-id v] to [4]\n    create clone of (_myself_ v)\n    set [clone-id v] to [5]\n    create clone of (_myself_ v)\n    wait until <(mode) = [playing]>\n    wait (1) seconds\n    set [clone-id v] to [1]\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset size to (100) %\nif <(mode) = [editor]> then\n    set [ghost v] effect to (100)\n    show\n    if <(clone-id) = [1]> then\n        go to x: (196) y: (157)\n        switch costume to (costume3 v)\n        set [color v] effect to (180)\n    end\n    if <(clone-id) = [2]> then\n        go to x: (100) y: (157)\n        switch costume to (costume2 v)\n        set [color v] effect to (150)\n        show\n        if <(length of [mode v]) = [1]> then\n            hide\n        end\n    end\n    if <(clone-id) = [3]> then\n        go to x: (25) y: (157)\n        switch costume to (costume1 v)\n        set [color v] effect to (70)\n    end\n    if <(clone-id) = [5]> then\n        go to x: (-160) y: (157)\n        switch costume to (costume13 v)\n        set [color v] effect to (150)\n    end\n    if <(clone-id) = [4]> then\n        go to x: (-80) y: (-165)\n        switch costume to (costume9 v)\n        set [color v] effect to (150)\n    end\n    repeat (10)\n        change [ghost v] effect by (-8)\n    end\n    repeat until <not <(mode) = [editor]>>\n        if <(clone-id) = [2]> then\n            show\n            if <(length of [mode v]) = [1]> then\n                hide\n            end\n        end\n        change size by (((size) - ((100) + (<touching (mouse-pointer v)?> * (10)))) / (-5))\n        set [brightness v] effect to (<touching (mouse-pointer v)?> * (20))\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            if <(clone-id) = [1]> then\n                set [mode v] to [playing]\n                hide\n                set [scroll y v] to [0]\n                set [scroll x v] to [1]\n                set [paused v] to [0]\n            end\n            if <(clone-id) = [2]> then\n                if <not <(length of [mode v]) = [1]>> then\n                    if <(load) = [0]> then\n                        Decode\n                    end\n                end\n            end\n            if <(clone-id) = [3]> then\n                set [load v] to [1]\n                Encode\n                set [load v] to [0]\n            end\n            if <(clone-id) = [4]> then\n                set [blockselected v] to [1000]\n            end\n            if <(clone-id) = [5]> then\n                hide\n                ask [are you sure you want to delete ALL blocks? \(y/n\)] and wait\n                if <(answer) = [y]> then\n                    broadcast (reset v)\n                end\n                show\n            end\n        end\n    end\n    delete this clone\nend\nif <(mode) = [playing]> then\n    set [ghost v] effect to (100)\n    show\n    if <(clone-id) = [1]> then\n        go to x: (160) y: (158)\n        switch costume to (costume4 v)\n    end\nend\nrepeat (10)\n    change [ghost v] effect by (-8)\nend\nrepeat until <not <(mode) = [playing]>>\n    change size by (((size) - ((100) + (<touching (mouse-pointer v)?> * (10)))) / (-5))\n    set [brightness v] effect to (<touching (mouse-pointer v)?> * (20))\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        if <(clone-id) = [1]> then\n            set [mode v] to [editor]\n        end\n    end\nend\ndelete this clone\n\ndefine Decode\nListing\ndelete all of [save your level v]\nhide\nwait (0.5) seconds\nhide list [save your level v]\ndelete all of [save your level v]\nadd [Triple click on the code below and then copy \(Ctrl+C\) and past \(Ctrl+V\) it to] to [save your level v]\nadd [your computer to save the level you made:] to [save your level v]\nadd [] to [save your level v]\nadd (output) to [save your level v]\nask [Enter the code here to confirm that you have all of it] and wait\nwait (0.1) seconds\nrepeat until <(item (4) of [save your level v]) = (answer)>\n    ask [You didn't copy the whole code \(please try again\). Remember to TRIPLE click on the code] and wait\nend\nshow list [save your level v]\nshow\n\nwhen flag clicked\ndelete all of [characterst v]\nadd [1] to [characterst v]\nadd [2] to [characterst v]\nadd [3] to [characterst v]\nadd [4] to [characterst v]\nadd [5] to [characterst v]\nadd [6] to [characterst v]\nadd [7] to [characterst v]\nadd [8] to [characterst v]\nadd [9] to [characterst v]\nadd [0] to [characterst v]\nadd [y] to [characterst v]\nadd [e] to [characterst v]\nadd [s] to [characterst v]\nadd [n] to [characterst v]\nadd [o] to [characterst v]\nadd [-] to [characterst v]\nadd [ ] to [characterst v]\nadd [a] to [characterst v]\nadd [b] to [characterst v]\nadd [c] to [characterst v]\nadd [d] to [characterst v]\nadd [f] to [characterst v]\nadd [g] to [characterst v]\nadd [h] to [characterst v]\nadd [i] to [characterst v]\nadd [j] to [characterst v]\nadd [k] to [characterst v]\nadd [l] to [characterst v]\nadd [m] to [characterst v]\nadd [p] to [characterst v]\nadd [q] to [characterst v]\nadd [r] to [characterst v]\nadd [t] to [characterst v]\nadd [u] to [characterst v]\nadd [v] to [characterst v]\nadd [w] to [characterst v]\nadd [x] to [characterst v]\nadd [z] to [characterst v]\nadd [-] to [characterst v]\nadd [_] to [characterst v]\ninsert [.r.rlekoro] at (10) of [characterst v] \ninsert [.r.rlekoro] at (20) of [characterst v] \ninsert [.r.rlekoro] at (30) of [characterst v] \ninsert [.r.rlekoro] at (40) of [characterst v] \ninsert [.r.rlekoro] at (50) of [characterst v] \ninsert [.r.rlekoro] at (60) of [characterst v] \ninsert [.r.rlekoro] at (70) of [characterst v] \ninsert [.r.rlekoro] at (80) of [characterst v] \ninsert [.r.rlekoro] at (90) of [characterst v] \ninsert [4312414xds] at (100) of [characterst v] \ninsert [.r.rlekoro] at (110) of [characterst v] \ninsert [.r.rlekoro] at (120) of [characterst v] \nshow list [save your level v]\n\ndefine Listing\ndelete all of [in v]\nset [status v] to [1]\nrepeat ((length of [x v]) - (1))\n    change [status v] by (1)\n    add ((item (status) of [x v]) / (25)) to [in v]\nend\nset [status v] to [1]\nrepeat ((length of [y v]) - (1))\n    change [status v] by (1)\n    add ((item (status) of [y v]) / (25)) to [in v]\nend\nset [status v] to [1]\nrepeat ((length of [mode v]) - (1))\n    change [status v] by (1)\n    add (item (status) of [mode v]) to [in v]\nend\nif <(walljump) = [1]> then\n    add [yes] to [in v]\nelse\n    add [no] to [in v]\nend\nadd (theme) to [in v]\nset [status v] to [0]\nset [output v] to []\nrepeat (length of [in v])\n    change [status v] by (1)\n    set [instatus v] to [0]\n    repeat (length of (item (status) of [in v]))\n        change [instatus v] by (1)\n        set [output v] to (join (output) (item # of (letter (instatus) of (item (status) of [in v])) in [characterst v]))\n        set [output v] to (join (output) [0])\n    end\n    set [output v] to (join (output) [0])\nend\n\ndefine Encode\nhide\nask [Enter your level code] and wait\nif <not <(answer) = []>> then\n    set [input v] to (answer)\n    broadcast (loadcode v)\nend\nshow\n\nwhen I start as a clone\nforever\n    wait until <touching (mouse-pointer v)?>\n    start sound [Tap Conga v]\n    wait until <not <touching (mouse-pointer v)?>>\nend\n\n@counter4\n\nwhen I receive [run game v]\ndelete this clone\n\nwait (1) seconds\n\ndefine new counter @ (x) (y)\nset [x v] to (x)\nset [y v] to (y)\nset [counter4: mode v] to [6]\ncreate clone of (_myself_ v)\nrepeat (14)\n    change [counter4: mode v] by (1)\n    set [x v] to ((x) + (((counter4: mode) - (6)) * (9)))\n    set [y v] to (y)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(counter4: mode) > [5]> then\n    switch costume to (0 v)\n    forever\n        if <(mode) = [editor]> then\n            show\n            set [brightness v] effect to (-100)\n            set [ghost v] effect to (30)\n            show\n            switch costume to (0 v)\n            switch costume to (letter ((counter4: mode) - ((15) + ((0) - (length of (join [x ] (round (SCROLL X))))))) of (join [x ] (round (SCROLL X))))\n            go to x: ((x) - (((0) - (length of (join [x ] (round (SCROLL X))))) * (0))) y: (y)\n            set size to (30) %\n            go to [front v] layer\n        else\n            hide\n        end\n    end\nend\n\nwhen flag clicked\nhide\nnew counter @ [140] [-105]\n\n@counter2\n\nwhen I receive [run game v]\ndelete this clone\n\nwait (1) seconds\n\ndefine new counter @ (x) (y)\nset [x v] to (x)\nset [y v] to (y)\nset [yc v] to [6]\ncreate clone of (_myself_ v)\nrepeat (14)\n    change [yc v] by (1)\n    set [x v] to ((x) + (((yc) - (6)) * (9)))\n    set [y v] to (y)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(yc) > [5]> then\n    switch costume to (0 v)\n    forever\n        if <(mode) = [editor]> then\n            show\n            set [brightness v] effect to (-100)\n            set [ghost v] effect to (30)\n            show\n            switch costume to (0 v)\n            switch costume to (letter ((yc) - ((15) + ((0) - (length of (join [y ] (round (SCROLL Y))))))) of (join [y ] (round (SCROLL Y))))\n            go to x: ((x) - (((0) - (length of (join [y ] (round (SCROLL Y))))) * (0))) y: (y)\n            set size to (30) %\n            go to [front v] layer\n        else\n            hide\n        end\n    end\nend\n\nwhen flag clicked\nhide\nnew counter @ [140] [-130]\n\n@inf\n\nwhen flag clicked\nClone\n\ndefine Clone\nset size to (90) %\nshow\nset [this var. is dedicated to griffpatch v] to [11]\ngo to x: (245) y: (-165)\nrepeat (2)\n    change x by (-30)\n    change [this var. is dedicated to griffpatch v] by (-1)\n    create clone of (_myself_ v)\nend\nchange [this var. is dedicated to griffpatch v] by (-3)\nrepeat (5)\n    change x by (-30)\n    change [this var. is dedicated to griffpatch v] by (-1)\n    create clone of (_myself_ v)\nend\nhide\n\nwhen I start as a clone\nforever\n    hide\n    wait until <(mode) = [editor]>\n    wait (1) seconds\n    repeat until <not <(mode) = [editor]>>\n        show\n        point in direction (90)\n        switch costume to (This var. is dedicated to griffpatch)\n        set [ghost v] effect to (70)\n        if <(This var. is dedicated to griffpatch) = (blockselected)> then\n            set [ghost v] effect to (10)\n        end\n        if <(This var. is dedicated to griffpatch) = [5]> then\n            point in direction (direction of the saw)\n        end\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            set [blockselected v] to (This var. is dedicated to griffpatch)\n        end\n        if <(This var. is dedicated to griffpatch) = [10]> then\n            if <[mode v] contains [10]?> then\n                hide\n            end\n        end\n    end\nend\n\n@Figur1\n\nwhen flag clicked\nhide\n\nwhen I receive [win v]\nshow\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-8)\nend\nwait until <not <(mode) = [playing]>>\nhide\n\n@Thumbnail\n\nwhen flag clicked\nswitch costume to (costume1 v)\nrepeat (10)\n    change [ghost v] effect by (10)\n    show\n    go to [front v] layer\nend\nswitch costume to (costume2 v)\nforever\n    set [ghost v] effect to (100)\n    show\n    go to [front v] layer\nend\n\n@REMOVE THIS SPRITE4\n\nwhen flag clicked\nset size to (80) %\ngo to x: (0) y: (-30000)\nhide\nforever\n    wait until <(die) = [1]>\n    go to (hitbox v)\n    change y by (-20)\n    if <touching (_edge_ v)?> then\n        set [y v] to [30]\n    else\n        set [y v] to [10]\n    end\n    switch costume to (costume2 v)\n    go to (hitbox v)\n    repeat (10)\n        create clone of (_myself_ v)\n    end\n    wait until <(die) = [0]>\nend\n\nwhen I start as a clone\nshow\neff (pick random (-10) to (10))\n\ndefine eff (x)\nset [-1 v] to [1]\nset [color v] effect to (0)\nset [ghost v] effect to (20)\nforever\n    go to [front v] layer\n    change x by ((x) * (-1))\n    change y by (y)\n    change [y v] by (-2)\n    if <touching (_edge_ v)?> then\n        if <(-1) = [1]> then\n            set [-1 v] to [-1]\n        else\n            set [-1 v] to [1]\n        end\n    end\n    if <(y position) < [-170]> then\n        delete this clone\n    end\nend\n\nwhen I receive [win v]\nset [y v] to [30]\nswitch costume to (costume1 v)\ngo to x: (pick random (-200) to (200)) y: (-3000)\nrepeat (10)\n    create clone of (_myself_ v)\nend\nwait (0.2) seconds\ngo to x: (pick random (-200) to (200)) y: (-3000)\nrepeat (10)\n    create clone of (_myself_ v)\nend\n\n@counter3\n\nwhen I receive [run game v]\ndelete this clone\n\nwait (1) seconds\n\ndefine new counter @ (x) (y)\nset [x v] to (x)\nset [y v] to (y)\nset [yc v] to [6]\ncreate clone of (_myself_ v)\nrepeat (30)\n    change [yc v] by (1)\n    set [x v] to ((x) + (((yc) - (6)) * (7)))\n    set [y v] to (y)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nhide\nwait (1) seconds\nif <(yc) > [5]> then\n    switch costume to (0 v)\n    forever\n        if <(mode) = [editor]> then\n            show\n            set [brightness v] effect to (-100)\n            set [ghost v] effect to (30)\n            show\n            switch costume to (0 v)\n            set size to (20) %\n            go to [front v] layer\n            if <(blockselected) = [1]> then\n                switch costume to (letter ((yc) - ((27) + ((0) - (length of (join [selected block: ] [ground]))))) of (join [selected block: ] [ground]))\n                go to x: ((x) + ()) y: (y)\n            end\n            if <(blockselected) = [2]> then\n                switch costume to (letter ((yc) - ((25) + ((0) - (length of (join [selected block: ] [lava]))))) of (join [selected block: ] [lava]))\n                go to x: (x) y: (y)\n            end\n            if <(blockselected) = [3]> then\n                switch costume to (letter ((yc) - ((27) + ((0) - (length of (join [selected block: ] [spring]))))) of (join [selected block: ] [spring]))\n                go to x: ((x) + ()) y: (y)\n            end\n            if <(blockselected) = [4]> then\n                switch costume to (letter ((yc) - ((26) + ((0) - (length of (join [selected block: ] [water]))))) of (join [selected block: ] [water]))\n                go to x: ((x) + ()) y: (y)\n            end\n            if <(blockselected) = [5]> then\n                switch costume to (letter ((yc) - ((24) + ((0) - (length of (join [selected block: ] [saw]))))) of (join [selected block: ] [saw]))\n                go to x: ((x) + ()) y: (y)\n            end\n            if <(blockselected) = [9]> then\n                switch costume to (letter ((yc) - ((31) + ((0) - (length of (join [selected block: ] [checkpoint]))))) of (join [selected block: ] [checkpoint]))\n                go to x: ((x) + ()) y: (y)\n            end\n            if <(blockselected) = [10]> then\n                switch costume to (letter ((yc) - ((24) + ((0) - (length of (join [selected block: ] [end]))))) of (join [selected block: ] [end]))\n                go to x: ((x) + ()) y: (y)\n            end\n            if <(blockselected) = [1000]> then\n                hide\n            end\n        else\n            hide\n        end\n    end\nend\n\nwhen flag clicked\nhide\nnew counter @ [-230] [-136]\n\n@//📊 Scratch Analytics by @TimMcCool2\n\ndefine Send Data (payload)\nset [☁ to_host v] to (payload)\n\ndefine Encode (input)\nset [//output v] to []\nset [i v] to [0]\nrepeat (length of (input))\n    change [i v] by (1)\n    switch costume to (join [=] (letter (i) of (input)))\n    set [//output v] to (join (//output) (costume [number v]))\nend\n\nwhen flag clicked\nwait (0.6) seconds\nEncode (join (username) (join [,] (join (current [hour v]) (join [,] []))))\nSend Data (//output)\n\n