Walldash - Scrolling platformer                                                               games
@Stage\n\nwhen I receive [green flag v]\nhide variable [mouse v]\n\nwhen I receive [green flag v]\nrepeat until <(WORLD) = [2]>\n    play sound [World 1 v] until done\nend\nrepeat until <(WORLD) = [3]>\n    play sound [World 2 v] until done\nend\n\n    play sound [World 3 v] until done\nend\n\nforever\n    play sound [World 3 v] until done\nend\n\nwhen I receive [next world v]\nstop all sounds\n\nwhen I receive [tick v]\nswitch backdrop to (WORLD)\n\n@Player\n\nwhen flag clicked\nset [frames v] to [0]\nbroadcast (Green Flag v)\nbroadcast (Play Game v)\n\nwhen I receive [green flag v]\nset [fps shown? v] to [0]\nhide variable [fps v]\nhide\ngo to [front v] layer\n\nwhen I receive [play game v]\nshow\nset [level v] to [1]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Game On\n    repeat until <(EXIT) > []>\n        Tick\n        broadcast (Tick v) and wait\n    end\n    if <(EXIT) = [win]> then\n        Game - Win\n    else\n        Game - Die\n    end\nend\n\ndefine Game On\nhide variable [energy time left v]\nset [sx v] to [0]\nset [sy v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [in air v] to [0]\nset [wallrun? v] to [0]\nset [exit v] to []\nset size to (100) %\nset rotation style [left-right v]\n\ndefine Tick\nswitch costume to (hitbox v)\nif <(wallrun?) = [0]> then\n    if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n        point in direction (-90)\n        change [sx v] by (-2)\n        change [frame v] by (0.5)\n    else\n        if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n            point in direction (90)\n            change [sx v] by (2)\n            change [frame v] by (0.5)\n        else\n            set [frame v] to [0]\n        end\n    end\nelse\n    if <(sx) > [0]> then\n        set [sx v] to [10]\n    else\n        set [sx v] to [-10]\n    end\n    change [frame v] by (0.5)\nend\nset [sx v] to ((sx) * (0.8))\nif <([abs v] of (sx) ) > [0.9]> then\n    Change Player x by (round (sx))\nend\nif <<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <not <(wallrun?) = [1]>>> then\n    if <(in air) < [4]> then\n        set [sy v] to [16]\n    end\nend\nif <(CLIMBING) = [1]> then\n    set [sx v] to [0]\n    set [sy v] to [0]\nend\nif <<touching (walls v)?> and <key (space v) pressed?>> then\n    set [wallrun? v] to [1]\nelse\n    set [wallrun? v] to [0]\nend\nif <<<key (s v) pressed?> or <key (down arrow v) pressed?>> and <<(wallrun?) = [1]> and <(Has energy?) = [0]>>> then\n    Change player y by [-5]\nend\nif <(wallrun?) = [0]> then\n    change [sy v] by (-2)\nelse\n    if <(Has energy?) = [0]> then\n        set [sy v] to [-3]\n    else\n        set [sy v] to [5]\n    end\nend\nChange player y by (sy)\nTest - Die\nchange [scroll x v] by (round (((x) - (SCROLL X)) / (10)))\nif <(SCROLL X) < [-400]> then\n    set [scroll x v] to [-400]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [-180]> then\n    set [exit v] to [die]\nend\nSet costume\n\ndefine Change player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (platforms v)?>>\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    Position\n    set [sy v] to [0]\nend\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine Change Player x by (sx)\nchange [x v] by (sx)\nPosition\nif <touching (platforms v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (platforms v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    repeat until <not <touching (platforms v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Game - Die\nset [exit v] to []\nstart sound (pick random (3) to (5))\nshow\n\ndefine Test - Die\nif <<touching (danger v)?> or <touching (toxic stuff v)?>> then\n    set [exit v] to [die]\nend\n\ndefine Game - Win\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nchange [level v] by (1)\nwait (1) seconds\nshow\nclear graphic effects\n\nwhen I receive [green flag v]\nforever\n    if <<<<key (a v) pressed?> or <key (d v) pressed?>> or <<key (left arrow v) pressed?> or <key (right arrow v) pressed?>>> and <(in air) = [0]>> then\n        start sound [Foot step 2 v]\n        wait (0.3) seconds\n    end\nend\n\ndefine Set costume\nif <(wallrun?) = [0]> then\n    if <(in air) = [0]> then\n        if <(frame) = [0]> then\n            switch costume to (idle v)\n        else\n            switch costume to ([floor v] of ((4) + ((frame) mod (5))) )\n        end\n    else\n        if <(sy) > [0]> then\n            switch costume to (jump v)\n        else\n            switch costume to (fall v)\n        end\n    end\nelse\n    switch costume to ([floor v] of ((12) + ((frame) mod (4))) )\nend\n\nwhen [0 v] key pressed\nwait until <not <key (0 v) pressed?>>\nif <(LEVEL) = [4]> then\n    set [world v] to [2]\n    broadcast (Next world v)\nend\nif <(LEVEL) = [7]> then\n    set [world v] to [3]\n    broadcast (Next world v)\nend\nchange [level v] by (1)\nset [x v] to [0]\nset [y v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nbroadcast (Reset v) and wait\nbroadcast (Setup v) and wait\n\nwhen flag clicked\nset [level v] to [1]\n\nwhen [m v] key pressed\n\nshow variable [mouse v]\nset [mouse v] to (join ((mouse x) + (SCROLL X)) (join [, ] ((mouse y) + (SCROLL Y))))\n\nwhen I receive [tick v]\nchange [frames v] by (1)\n\nwhen I receive [green flag v]\nforever\n    wait (1) seconds\n    set [fps v] to (frames)\n    set [frames v] to [0]\nend\n\nwhen I receive [green flag v]\nforever\n    if <key (f v) pressed?> then\n        if <(fps shown?) = [0]> then\n            set [fps shown? v] to [1]\n            show variable [fps v]\n        else\n            set [fps shown? v] to [0]\n            hide variable [fps v]\n        end\n        wait until <not <key (f v) pressed?>>\n    end\nend\n\nwhen I receive [green flag v]\nforever\n    if <(Has energy?) = [1]> then\n        show variable [energy time left v]\n        set [energy time left v] to [3]\n        repeat (3)\n            wait (1) seconds\n            change [energy time left v] by (-1)\n        end\n        hide variable [energy time left v]\n        set [has energy? v] to [0]\n    end\nend\n\n@Platforms\n\nwhen I receive [green flag v]\nset [world v] to [1]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\npoint in direction (90)\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (1-1-1 v)\n    Clone at x [0] y [0]\n    Clone at x [480] y [0]\n    switch costume to (1-1-2 v)\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (1-2-1 v)\n        Clone at x [0] y [0]\n        Clone at x [300] y [0]\n        switch costume to (1-2-2 v)\n        Clone at x [490] y [0]\n        switch costume to (1-2-3 v)\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (1-3-1 v)\n            Clone at x [0] y [0]\n            Clone at x [0] y [100]\n            switch costume to (1-3-2 v)\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (1-4-1 v)\n                Clone at x [0] y [0]\n                Clone at x [0] y [725]\n                switch costume to (1-4-2 v)\n            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (2-1-1 v)\n                    Clone at x [0] y [0]\n                    Clone at x [420] y [0]\n                    switch costume to (2-1-2 v)\n                else\n                    if <(LEVEL) = [6]> then\n                        switch costume to (2-2-1 v)\n                        Clone at x [0] y [0]\n                        Clone at x [750] y [0]\n                        switch costume to (2-2-3 v)\n                    else\n                        if <(LEVEL) = [7]> then\n                            switch costume to (2-3-1 v)\n                            Clone at x [0] y [0]\n                        else\n                            if <(LEVEL) = [8]> then\n                                switch costume to (3-1-1 v)\n                                Clone at x [0] y [0]\n                            else\n                                if <(LEVEL) = [9]> then\n                                    switch costume to (3-2-1 v)\n                                    Clone at x [0] y [0]\n                                else\n                                    if <(LEVEL) = [10]> then\n                                        switch costume to (3-3-1 v)\n                                        Clone at x [0] y [0]\n                                    else\n                                        if <(LEVEL) = [11]> then\n                                            switch costume to (3-4-1 v)\n                                            Clone at x [0] y [0]\n                                        else\n                                            if <(LEVEL) = [12]> then\n                                                stop [all v]\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\n    if <(LEVEL) = [10]> then\n        turn right (1) degrees\n    end\n    if <(LEVEL) = [11]> then\n        turn right (1) degrees\n    end\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x (x) y (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nhide\n\n@Sign\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <touching (player v)?> then\n    if <(costume [number v]) = [1]> then\n        switch costume to (sign2 v)\n    end\n    if <(costume [number v]) = [3]> then\n        switch costume to (sign4 v)\n    end\n    if <(costume [number v]) = [5]> then\n        switch costume to (sign6 v)\n    end\n    if <(costume [number v]) = [7]> then\n        switch costume to (sign8 v)\n    end\n    if <(costume [number v]) = [9]> then\n        switch costume to (sign10 v)\n    end\n    if <(costume [number v]) = [11]> then\n        switch costume to (sign12 v)\n    end\n    if <(costume [number v]) = [13]> then\n        switch costume to (sign14 v)\n    end\n    if <(costume [number v]) = [15]> then\n        switch costume to (sign16 v)\n    end\n    if <(costume [number v]) = [17]> then\n        switch costume to (sign18 v)\n    end\n    if <(costume [number v]) = [19]> then\n        switch costume to (sign20 v)\n    end\n    if <(costume [number v]) = [21]> then\n        switch costume to (sign22 v)\n    end\nelse\n    if <(costume [number v]) = [2]> then\n        switch costume to (sign1 v)\n    end\n    if <(costume [number v]) = [4]> then\n        switch costume to (sign3 v)\n    end\n    if <(costume [number v]) = [6]> then\n        switch costume to (sign5 v)\n    end\n    if <(costume [number v]) = [8]> then\n        switch costume to (sign7 v)\n    end\n    if <(costume [number v]) = [10]> then\n        switch costume to (sign9 v)\n    end\n    if <(costume [number v]) = [12]> then\n        switch costume to (sign11 v)\n    end\n    if <(costume [number v]) = [14]> then\n        switch costume to (sign13 v)\n    end\n    if <(costume [number v]) = [16]> then\n        switch costume to (sign15 v)\n    end\n    if <(costume [number v]) = [18]> then\n        switch costume to (sign17 v)\n    end\n    if <(costume [number v]) = [20]> then\n        switch costume to (sign19 v)\n    end\n    if <(costume [number v]) = [22]> then\n        switch costume to (sign21 v)\n    end\nend\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    set [x v] to [9999999999]\n    switch costume to (sign1 v)\n    Clone at x [-39] y [-10]\n    switch costume to (sign3 v)\n    Clone at x [545] y [-72]\n    switch costume to (sign5 v)\n    Clone at x [252] y [91]\n    switch costume to (sign7 v)\n    Clone at x [676] y [88]\nelse\n    if <(LEVEL) = [2]> then\n        set [x v] to [9999999999]\n        switch costume to (sign9 v)\n        Clone at x [-139] y [-5]\n    else\n        if <(LEVEL) = [3]> then\n            set [x v] to [9999999999]\n            switch costume to (sign11 v)\n            Clone at x [-50] y [-61]\n        else\n            if <(LEVEL) = [4]> then\n                set [x v] to [9999999999]\n                switch costume to (sign13 v)\n                Clone at x [-131] y [-111]\n            else\n                if <(LEVEL) = [5]> then\n                    set [x v] to [9999999999]\n                    switch costume to (sign15 v)\n                    Clone at x [-199] y [-26]\n                    switch costume to (sign17 v)\n                    Clone at x [167] y [89]\n                else\n                    if <(LEVEL) = [6]> then\n                        set [x v] to [9999999999]\n                        switch costume to (sign19 v)\n                        Clone at x [153] y [150]\n                    else\n                        if <(LEVEL) = [7]> then\n                            set [x v] to [9999999999]\n                            switch costume to (sign21 v)\n                            Clone at x [65] y [-64]\n                        else\n                            set [x v] to [9999999999999]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x (x) y (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\n@Exit\n\nwhen I receive [green flag v]\nhide\npoint in direction (90)\nreset timer\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <touching (player v)?> then\n    set [exit v] to [win]\n    if <(LEVEL) = [4]> then\n        set [world v] to [2]\n        broadcast (Next world v)\n    end\n    if <(LEVEL) = [7]> then\n        set [world v] to [3]\n        broadcast (Next world v)\n    end\nend\n\nwhen I receive [setup v]\nswitch costume to (open v)\nset [collected v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    Clone at x [765] y [127]\nelse\n    if <(LEVEL) = [2]> then\n        Clone at x [1016] y [-126]\n    else\n        if <(LEVEL) = [3]> then\n            Clone at x [-68] y [264]\n        else\n            if <(LEVEL) = [4]> then\n                Clone at x [198] y [607]\n            else\n                if <(LEVEL) = [5]> then\n                    Clone at x [424] y [127]\n                else\n                    if <(LEVEL) = [6]> then\n                        Clone at x [733] y [90]\n                    else\n                        if <(LEVEL) = [7]> then\n                            Clone at x [183] y [-17]\n                        else\n                            if <(LEVEL) = [8]> then\n                                switch costume to (opencorrupt v)\n                                Clone at x [206] y [259]\n                            else\n                                if <(LEVEL) = [9]> then\n                                    switch costume to (opencorrupt v)\n                                    Clone at x [480] y [443]\n                                else\n                                    if <(LEVEL) = [10]> then\n                                        switch costume to (opencorrupt v)\n                                        Clone at x [-19] y [250]\n                                    else\n                                        if <(LEVEL) = [11]> then\n                                            switch costume to (opencorrupt v)\n                                            Clone at x [90] y [414]\n                                        else\n                                            set [x v] to [-99999]\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x (x) y (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [tick v]\npoint in direction ((([cos v] of ((timer) * (100)) ) * (20)) + (90))\n\n@Walls\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\ngo to [back v] layer\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (1-1-1 v)\n    Clone at x [0] y [0]\n    Clone at x [480] y [0]\n    switch costume to (1-1-2 v)\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (1-2-1 v)\n        Clone at x [0] y [0]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (1-3-1 v)\n            Clone at x [0] y [0]\n            Clone at x [0] y [100]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (1-4-1 v)\n                Clone at x [0] y [0]\n            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (2-1-1 v)\n                    Clone at x [0] y [0]\n                else\n                    if <(LEVEL) = [6]> then\n                        switch costume to (2-2-1 v)\n                        Clone at x [0] y [0]\n                        Clone at x [500] y [0]\n                        switch costume to (2-2-2 v)\n                    else\n                        if <(LEVEL) = [8]> then\n                            switch costume to (3-1-1 v)\n                            Clone at x [0] y [0]\n                        else\n                            if <(LEVEL) = [9]> then\n                                switch costume to (3-2-1 v)\n                                Clone at x [0] y [0]\n                            else\n                                set [x v] to [99999999]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x (x) y (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nhide\n\n@Danger\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) (((y) - (SCROLL Y)) + (Bounce))\n\nwhen I receive [setup v]\nswitch costume to (1 v)\nclear graphic effects\nhide\nif <(LEVEL) = [1]> then\n    set [x v] to [99999999999]\n    Clone at x [432] y [16]\n    Clone at x [342] y [16]\n    Clone at x [517] y [16]\nelse\n    if <(LEVEL) = [2]> then\n        set [x v] to [99999999999]\n        Clone at x [201] y [11]\n        Clone at x [254] y [-49]\n        Clone at x [250] y [140]\n        Clone at x [303] y [85]\n    else\n        if <(LEVEL) = [4]> then\n            set [x v] to [99999999999]\n            Clone at x [-105] y [337]\n        else\n            if <(LEVEL) = [5]> then\n                set [x v] to [99999999999]\n                Clone at x [-177] y [133]\n                Clone at x [46] y [154]\n                Clone at x [234] y [47]\n                Clone at x [310] y [47]\n            else\n                if <(LEVEL) = [6]> then\n                    set [x v] to [99999999999]\n                    Clone at x [221] y [48]\n                    Clone at x [510] y [-19]\n                    Clone at x [382] y [-88]\n                    Clone at x [333] y [40]\n                else\n                    if <(LEVEL) = [8]> then\n                        switch costume to (2 v)\n                        set [x v] to [99999999999]\n                        Clone at x [-21] y [102]\n                        Clone at x [-231] y [250]\n                        Clone at x [-6] y [250]\n                    else\n                        if <(LEVEL) = [9]> then\n                            switch costume to (2 v)\n                            set [x v] to [99999999999]\n                            Clone at x [-159] y [138]\n                        else\n                            if <(LEVEL) = [10]> then\n                                switch costume to (2 v)\n                                set [x v] to [99999999999]\n                                Clone at x [-260] y [168]\n                                Clone at x [80] y [-30]\n                                Clone at x [22] y [64]\n                                Clone at x [123] y [175]\n                            else\n                                if <(LEVEL) = [11]> then\n                                    switch costume to (2 v)\n                                    set [x v] to [99999999999]\n                                    Clone at x [-17] y [327]\n                                    Clone at x [117] y [260]\n                                    Clone at x [-3] y [196]\n                                    Clone at x [-113] y [186]\n                                else\n                                    set [x v] to [999999]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x (x) y (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [green flag v]\nforever\n    set [bounce v] to [0]\n    wait (0.5) seconds\n    set [bounce v] to [5]\n    wait (0.5) seconds\nend\n\n@Energy coins\n\nwhen I receive [green flag v]\nset [has energy? v] to [0]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) (((y) - (SCROLL Y)) + (Bounce))\nif <touching (player v)?> then\n    set [has energy? v] to [1]\n    start sound [Energy gain v]\n    hide\nend\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [3]> then\n    set [x v] to [9999999999]\n    switch costume to (energycoin v)\n    Clone at x [-168] y [22]\n    Clone at x [301] y [126]\n    Clone at x [99999999999] y [-10]\nelse\n    if <(LEVEL) = [4]> then\n        set [x v] to [9999999999]\n        switch costume to (energycoin v)\n        Clone at x [133] y [-82]\n        Clone at x [219] y [128]\n        Clone at x [-168] y [326]\n        Clone at x [99999999999] y [-10]\n    else\n        if <(LEVEL) = [5]> then\n            set [x v] to [9999999999]\n            switch costume to (energycoin v)\n            Clone at x [-284] y [100]\n            Clone at x [99999999999] y [-10]\n        else\n            if <(LEVEL) = [6]> then\n                set [x v] to [9999999999]\n                switch costume to (energycoin v)\n                Clone at x [434] y [0]\n                Clone at x [99999999999] y [-10]\n            else\n                if <(LEVEL) = [8]> then\n                    set [x v] to [9999999999]\n                    switch costume to (energycoincorrupt v)\n                    Clone at x [-288] y [200]\n                    Clone at x [99999999999] y [-10]\n                else\n                    if <(LEVEL) = [9]> then\n                        set [x v] to [9999999999]\n                        switch costume to (energycoincorrupt v)\n                        Clone at x [-179] y [21]\n                        Clone at x [99999999999] y [-10]\n                    else\n                        set [x v] to [9999999999999]\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<<(x) = (x position)> and <(y) = (y position)>> and <(Has energy?) = [0]>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x (x) y (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\ndelete this clone\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\n