MetroCity | a Platformer #games

Instructions:       Metro City\n=============================================\nIn this platformer you enter HQ to cure a friend from covid!\nCan you drop a heart? It makes the difference.\nNew Game! https://scratch.mit.edu/projects/513489345/\n--13/4/21 this is too easy lol.\n\n

@Stage\n\nwhen flag clicked\nforever\n    play sound [SunFlower \(Trap Remix\) FT3 v] until done\nend\n\n@Player\n\nwhen [r v] key pressed\nbroadcast (Restart v)\n\nwhen I receive [restart v]\nif <([costume # v] of [ground v]) = [3]> then\n    go to x: (-213) y: (125)\nelse\n    if <([costume # v] of [ground v]) = [4]> then\n        go to x: (-185) y: (151)\n    else\n        if <([costume # v] of [ground v]) = [9]> then\n            go to x: (-210) y: (-92)\n        else\n            go to x: (-220) y: (-66)\n        end\n    end\nend\npoint in direction (90)\nset [y v] to [0]\nset [x v] to [0]\n\nwhen flag clicked\nshow\nforever\n    if <<(x position) > [230]> and <touching (_edge_ v)?>> then\n        broadcast (Next level v)\n    end\n    if <<touching (spikes v)?> or <<touching (lava v)?> or <<(y position) < [-170]> and <touching (_edge_ v)?>>>> then\n        broadcast (Restart v)\n    end\n    if <touching (bounce v)?> then\n        set [y v] to [20]\n    end\nend\n\nchange [y v] by (-1)\n\ndefine Move\n\ngo to [front v] layer\n\ngo to x: (300) y: (167)\n\nwhen I receive [next level v]\nbroadcast (Restart v)\n\nwhen flag clicked\nforever\n    Move\nend\n\nwhen flag clicked\nbroadcast (Restart v)\nswitch costume to (costume1 v)\nshow\nset [x v] to [0]\nset [y v] to [0]\nforever\n    go to [front v] layer\n    if <touching (ladders v)?> then\n        set [y v] to [0]\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            set [y v] to [8]\n        end\n        if <<key (down arrow v) pressed?> or <<mouse down?> and <(y position) > (mouse y)>>> then\n            set [y v] to [-8]\n        end\n    else\n        change [y v] by (-1)\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [x v] by (-1)\n        point in direction (-90)\n    end\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(x position) < (mouse x)>>> then\n        change [x v] by (1)\n        point in direction (90)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((x) * (-1))\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            set [y v] to [15]\n            if <([abs v] of (x) ) = (x)> then\n                set [x v] to [-10]\n            else\n                set [x v] to [10]\n            end\n        else\n            set [x v] to [0]\n        end\n    end\n    change y by (y)\n    if <touching (ground v)?> then\n        change y by ((y) - ((y) * (2)))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> and <touching (ground v)?>> then\n        set [y v] to [15]\n    end\n    change y by (1)\nend\n\nwhen flag clicked\nswitch costume to (player2 v)\nset [ghost v] effect to (0)\nshow\nforever\n    create clone of (_myself_ v)\n    go to (player v)\nend\n\nwhen I start as a clone\nswitch costume to (player3 v)\ngo to [back v] layer\nshow\nset [ghost v] effect to (0)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\n@Ground\n\nwhen I receive [next level v]\nnext costume\ndelete this clone\n\nwhen I start as a clone\nswitch costume to (costume11 v)\nif <([costume # v] of [ground v]) = [5]> then\n    forever\n        go to x: (133) y: (-80)\n        repeat (56)\n            change x by (-5)\n        end\n        repeat (56)\n            change x by (5)\n        end\n    end\nend\nif <([costume # v] of [ground v]) = [6]> then\n    forever\n        go to x: (70) y: (15)\n        repeat (53)\n            change x by (-5)\n            change y by (-1.5)\n        end\n        repeat (53)\n            change x by (5)\n            change y by (1.5)\n        end\n    end\nend\nif <([costume # v] of [ground v]) = [7]> then\n    forever\n        go to x: (140) y: (13)\n        repeat (68)\n            change x by (-5)\n        end\n        repeat (68)\n            change x by (5)\n        end\n    end\nend\nif <([costume # v] of [ground v]) = [9]> then\n    forever\n        go to x: (120) y: (50)\n        repeat (47)\n            change x by (-5)\n        end\n        repeat (47)\n            change x by (5)\n        end\n    end\nend\n\nwhen [space v] key pressed\nset [my variable v] to (join (mouse x) (mouse y))\n\nwhen flag clicked\nswitch costume to (costume1 v)\nswitch backdrop to (metrocity v)\nforever\n    if <(costume [number v]) = [1]> then\n        switch backdrop to (metrocity v)\n    end\n    if <(costume [number v]) = [5]> then\n        switch backdrop to (1st station v)\n    end\n    if <(costume [number v]) = [6]> then\n        switch backdrop to (track v)\n    end\n    if <(costume [number v]) = [7]> then\n        switch backdrop to (2nd station v)\n    end\n    if <(costume [number v]) = [8]> then\n        switch backdrop to (metrocity v)\n    end\nend\n\nwhen [s v] key pressed\nif <not <([costume # v] of [ground v]) = [10]>> then\n    broadcast (Next level v)\nend\n\nwhen flag clicked\nshow\n\n@Art & Texts\n\nwhen flag clicked\nset [ghost v] effect to (20)\ngo to [front v] layer\nforever\n    go to x: (0) y: (0)\n    switch costume to ([costume name v] of [ground v])\n    go to [front v] layer\nend\n\n@Mad Person\n\nwhen I receive [restart v]\ndelete this clone\n\ndefine Clone (x) (y)\ngo to x: (x) y: (y)\nset rotation style [all around v]\nswitch costume to (costume1 v)\nset [ghost v] effect to (100)\nshow\npoint in direction (90)\nrepeat (10)\n    change [ghost v] effect by (-10)\n    turn right (5) degrees\nend\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\nswitch costume to (costume1 v)\nrepeat (10)\n    change [ghost v] effect by (10)\n    turn right (5) degrees\nend\nhide\n\nwhen I receive [restart v]\nhide\nif  then\n    delete this clone\nend\nif <([costume # v] of [ground v]) = [1]> then\nif <([costume # v] of [ground v]) = [2]> then\nif <([costume # v] of [ground v]) = [3]> then\nif <([costume # v] of [ground v]) = [4]> then\nif <([costume # v] of [ground v]) = [5]> then\nif <([costume # v] of [ground v]) = [6]> then\nif <([costume # v] of [ground v]) = [7]> then\nif <([costume # v] of [ground v]) = [8]> then\nend\nif <([costume # v] of [ground v]) = [9]> then\n    Clone [200] [-57]\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [2]> then\n    set rotation style [left-right v]\n    clear graphic effects\n    set size to (9) %\n    show\n    set [enemyx v] to [0]\n    set [enemyy v] to [0]\n    go to [front v] layer\n    forever\n        change [enemyy v] by (-1)\n        if <([x position v] of [player v]) < ((x position) - (10))> then\n            change [enemyx v] by (-0.4)\n            point in direction (-90)\n        end\n        if <((x position) - (-10)) < ([x position v] of [player v])> then\n            change [enemyx v] by (0.4)\n            point in direction (90)\n        end\n        set [enemyx v] to ((Enemyx) * (0.9))\n        change x by (Enemyx)\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (-4)\n            change x by ((Enemyx) * (-1))\n            if <(y position) < ([y position v] of [player v])> then\n                set [enemyy v] to [10]\n                if <([abs v] of (x) ) = (x)> then\n                    set [enemyx v] to [-10]\n                else\n                    set [enemyx v] to [10]\n                end\n            else\n                set [enemyx v] to [0]\n            end\n        end\n        change y by (Enemyy)\n        if <touching (ground v)?> then\n            change y by ((Enemyy) - ((Enemyy) * (2)))\n            set [enemyy v] to [0]\n        end\n        change y by (-1)\n        if <<((y position) - (-120)) < ([y position v] of [player v])> and <touching (ground v)?>> then\n            set [enemyy v] to [14]\n        end\n        if <<touching (ground v)?> and <<touching (player v)?> and <(([y position v] of [player v]) - (10)) > (y position)>>> then\n            set [y v] to [15]\n            repeat (10)\n                change [ghost v] effect by (10)\n                change [enemyy v] by (1)\n            end\n            delete this clone\n        end\n        change y by (1)\n        switch costume to (costume3 v)\n        create clone of (_myself_ v)\n        switch costume to (costume2 v)\n        if <touching (player v)?> then\n            broadcast (Restart v)\n        end\n        if <touching (ladders v)?> then\n            if <([y position v] of [player v]) > (y position)> then\n                set [enemyy v] to [6]\n            else\n                set [enemyy v] to [-6]\n            end\n        end\n        if <touching (bounce v)?> then\n            set [enemyy v] to [20]\n        end\n    end\nelse\n    show\n    clear graphic effects\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\nwhen flag clicked\nset [amount v] to [1]\nset [speed v] to [1]\n\nwait (1) seconds\n\ngo to [back v] layer\ngo [forward v] (1) layers\n\nwhen flag clicked\nhide\n\n@Spikes\n\nwhen flag clicked\nforever\n    go to [back v] layer\n    switch costume to ([costume # v] of [ground v])\nend\n\n@Train Guy\n\nwhen I receive [restart v]\ndelete this clone\n\ndefine Clone (x) (y)\ngo to x: (x) y: (y)\nset rotation style [all around v]\nswitch costume to (costume1 v)\nset [ghost v] effect to (100)\nshow\npoint in direction (90)\nrepeat (10)\n    change [ghost v] effect by (-10)\n    turn right (5) degrees\nend\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\nswitch costume to (costume1 v)\nrepeat (10)\n    change [ghost v] effect by (10)\n    turn right (5) degrees\nend\nhide\n\nwhen I receive [restart v]\nhide\nif  then\n    delete this clone\nend\nif <([costume # v] of [ground v]) = [1]> then\nif <([costume # v] of [ground v]) = [2]> then\nif <([costume # v] of [ground v]) = [3]> then\nif <([costume # v] of [ground v]) = [4]> then\nif <([costume # v] of [ground v]) = [5]> then\nif <([costume # v] of [ground v]) = [6]> then\n    Clone [194] [-110]\nend\nif <([costume # v] of [ground v]) = [7]> then\nend\nif <([costume # v] of [ground v]) = [8]> then\nif <([costume # v] of [ground v]) = [9]> then\n\nwhen I start as a clone\nif <(costume [number v]) = [2]> then\n    set rotation style [left-right v]\n    clear graphic effects\n    set size to (9) %\n    show\n    set [enemyx v] to [0]\n    set [enemyy v] to [0]\n    go to [front v] layer\n    forever\n        change [enemyy v] by (-1)\n        if <([x position v] of [player v]) < ((x position) - (10))> then\n            change [enemyx v] by (-0.4)\n            point in direction (-90)\n        end\n        if <((x position) - (-10)) < ([x position v] of [player v])> then\n            change [enemyx v] by (0.4)\n            point in direction (90)\n        end\n        set [enemyx v] to ((Enemyx) * (0.9))\n        change x by (Enemyx)\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (-4)\n            change x by ((Enemyx) * (-1))\n            if <(y position) < ([y position v] of [player v])> then\n                set [enemyy v] to [10]\n                if <([abs v] of (x) ) = (x)> then\n                    set [enemyx v] to [-10]\n                else\n                    set [enemyx v] to [10]\n                end\n            else\n                set [enemyx v] to [0]\n            end\n        end\n        change y by (Enemyy)\n        if <touching (ground v)?> then\n            change y by ((Enemyy) - ((Enemyy) * (2)))\n            set [enemyy v] to [0]\n        end\n        change y by (-1)\n        if <<((y position) - (-120)) < ([y position v] of [player v])> and <touching (ground v)?>> then\n            set [enemyy v] to [14]\n        end\n        if <<touching (ground v)?> and <<touching (player v)?> and <(([y position v] of [player v]) - (10)) > (y position)>>> then\n            set [y v] to [15]\n            repeat (10)\n                change [ghost v] effect by (10)\n                change [enemyy v] by (1)\n            end\n            delete this clone\n        end\n        change y by (1)\n        switch costume to (costume3 v)\n        create clone of (_myself_ v)\n        switch costume to (costume2 v)\n        if <touching (player v)?> then\n            broadcast (Restart v)\n        end\n        if <touching (ladders v)?> then\n            if <([y position v] of [player v]) > (y position)> then\n                set [enemyy v] to [6]\n            else\n                set [enemyy v] to [-6]\n            end\n        end\n        if <touching (bounce v)?> then\n            set [enemyy v] to [20]\n        end\n    end\nelse\n    show\n    clear graphic effects\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\nwhen flag clicked\nset [amount v] to [1]\nset [speed v] to [1]\n\nwait (1) seconds\n\ngo to [back v] layer\ngo [forward v] (1) layers\n\nwhen flag clicked\nhide\n\n@Sprite1\n\n@Virus\n\nwhen I receive [restart v]\ndelete this clone\n\ndefine Clone (x) (y)\ngo to x: (x) y: (y)\nset rotation style [all around v]\nswitch costume to (costume1 v)\nset [ghost v] effect to (100)\nshow\npoint in direction (90)\nrepeat (10)\n    change [ghost v] effect by (-10)\n    turn right (5) degrees\nend\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\nswitch costume to (costume1 v)\nrepeat (10)\n    change [ghost v] effect by (10)\n    turn right (5) degrees\nend\nhide\n\nwhen I receive [restart v]\nhide\nif  then\n    delete this clone\nend\nif <([costume # v] of [ground v]) = [1]> then\nif <([costume # v] of [ground v]) = [2]> then\nif <([costume # v] of [ground v]) = [3]> then\nif <([costume # v] of [ground v]) = [4]> then\nif <([costume # v] of [ground v]) = [5]> then\nif <([costume # v] of [ground v]) = [6]> then\nif <([costume # v] of [ground v]) = [7]> then\nif <([costume # v] of [ground v]) = [8]> then\nif <([costume # v] of [ground v]) = [9]> then\nif <([costume # v] of [ground v]) = [10]> then\nif <([costume # v] of [ground v]) = [11]> then\n    Clone [200] [-57]\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [2]> then\n    set rotation style [left-right v]\n    clear graphic effects\n    set size to (9) %\n    show\n    set [enemyx v] to [0]\n    set [enemyy v] to [0]\n    go to [front v] layer\n    forever\n        change [enemyy v] by (-1)\n        if <([x position v] of [player v]) < ((x position) - (10))> then\n            change [enemyx v] by (-0.4)\n            point in direction (-90)\n        end\n        if <((x position) - (-10)) < ([x position v] of [player v])> then\n            change [enemyx v] by (0.4)\n            point in direction (90)\n        end\n        set [enemyx v] to ((Enemyx) * (0.9))\n        change x by (Enemyx)\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (-4)\n            change x by ((Enemyx) * (-1))\n            if <(y position) < ([y position v] of [player v])> then\n                set [enemyy v] to [10]\n                if <([abs v] of (x) ) = (x)> then\n                    set [enemyx v] to [-10]\n                else\n                    set [enemyx v] to [10]\n                end\n            else\n                set [enemyx v] to [0]\n            end\n        end\n        change y by (Enemyy)\n        if <touching (ground v)?> then\n            change y by ((Enemyy) - ((Enemyy) * (2)))\n            set [enemyy v] to [0]\n        end\n        change y by (-1)\n        if <<((y position) - (-120)) < ([y position v] of [player v])> and <touching (ground v)?>> then\n            set [enemyy v] to [14]\n        end\n        if <<touching (ground v)?> and <<touching (player v)?> and <(([y position v] of [player v]) - (10)) > (y position)>>> then\n            set [y v] to [15]\n            repeat (10)\n                change [ghost v] effect by (10)\n                change [enemyy v] by (1)\n            end\n            delete this clone\n        end\n        change y by (1)\n        switch costume to (costume3 v)\n        create clone of (_myself_ v)\n        switch costume to (costume2 v)\n        if <touching (player v)?> then\n            broadcast (Restart v)\n        end\n        if <touching (ladders v)?> then\n            if <([y position v] of [player v]) > (y position)> then\n                set [enemyy v] to [6]\n            else\n                set [enemyy v] to [-6]\n            end\n        end\n        if <touching (bounce v)?> then\n            set [enemyy v] to [20]\n        end\n    end\nelse\n    show\n    clear graphic effects\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\nwhen flag clicked\nset [amount v] to [1]\nset [speed v] to [1]\n\nwait (1) seconds\n\ngo to [back v] layer\ngo [forward v] (1) layers\n\nwhen flag clicked\nhide\n\n@Viruses\n\nwhen I receive [restart v]\ndelete this clone\n\ndefine Clone (x) (y)\ngo to x: (x) y: (y)\nset rotation style [all around v]\nswitch costume to (costume1 v)\nset [ghost v] effect to (100)\nshow\npoint in direction (90)\nrepeat (10)\n    change [ghost v] effect by (-10)\n    turn right (5) degrees\nend\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\nswitch costume to (costume1 v)\nrepeat (10)\n    change [ghost v] effect by (10)\n    turn right (5) degrees\nend\nhide\n\nwhen I receive [restart v]\nhide\nif  then\n    delete this clone\nend\nif <([costume # v] of [ground v]) = [1]> then\nif <([costume # v] of [ground v]) = [2]> then\nif <([costume # v] of [ground v]) = [3]> then\nif <([costume # v] of [ground v]) = [4]> then\nif <([costume # v] of [ground v]) = [5]> then\nif <([costume # v] of [ground v]) = [6]> then\nif <([costume # v] of [ground v]) = [7]> then\nif <([costume # v] of [ground v]) = [8]> then\nif <([costume # v] of [ground v]) = [9]> then\nif <([costume # v] of [ground v]) = [10]> then\nif <([costume # v] of [ground v]) = [11]> then\n    wait (0.1) seconds\n    Clone [100] [-57]\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [2]> then\n    set rotation style [left-right v]\n    clear graphic effects\n    set size to (9) %\n    show\n    set [enemyx v] to [0]\n    set [enemyy v] to [0]\n    go to [front v] layer\n    forever\n        change [enemyy v] by (-1)\n        if <([x position v] of [player v]) < ((x position) - (10))> then\n            change [enemyx v] by (-0.4)\n            point in direction (-90)\n        end\n        if <((x position) - (-10)) < ([x position v] of [player v])> then\n            change [enemyx v] by (0.4)\n            point in direction (90)\n        end\n        set [enemyx v] to ((Enemyx) * (0.9))\n        change x by (Enemyx)\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (-4)\n            change x by ((Enemyx) * (-1))\n            if <(y position) < ([y position v] of [player v])> then\n                set [enemyy v] to [10]\n                if <([abs v] of (x) ) = (x)> then\n                    set [enemyx v] to [-10]\n                else\n                    set [enemyx v] to [10]\n                end\n            else\n                set [enemyx v] to [0]\n            end\n        end\n        change y by (Enemyy)\n        if <touching (ground v)?> then\n            change y by ((Enemyy) - ((Enemyy) * (2)))\n            set [enemyy v] to [0]\n        end\n        change y by (-1)\n        if <<((y position) - (-120)) < ([y position v] of [player v])> and <touching (ground v)?>> then\n            set [enemyy v] to [14]\n        end\n        if <<touching (ground v)?> and <<touching (player v)?> and <(([y position v] of [player v]) - (10)) > (y position)>>> then\n            set [y v] to [15]\n            repeat (10)\n                change [ghost v] effect by (10)\n                change [enemyy v] by (1)\n            end\n            delete this clone\n        end\n        change y by (1)\n        switch costume to (costume3 v)\n        create clone of (_myself_ v)\n        switch costume to (costume2 v)\n        if <touching (player v)?> then\n            broadcast (Restart v)\n        end\n        if <touching (ladders v)?> then\n            if <([y position v] of [player v]) > (y position)> then\n                set [enemyy v] to [6]\n            else\n                set [enemyy v] to [-6]\n            end\n        end\n        if <touching (bounce v)?> then\n            set [enemyy v] to [20]\n        end\n    end\nelse\n    show\n    clear graphic effects\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\nwhen flag clicked\nset [amount v] to [1]\nset [speed v] to [1]\n\nwait (1) seconds\n\ngo to [back v] layer\ngo [forward v] (1) layers\n\nwhen flag clicked\nhide\n\n@Viruses2\n\nwhen I receive [restart v]\ndelete this clone\n\ndefine Clone (x) (y)\ngo to x: (x) y: (y)\nset rotation style [all around v]\nswitch costume to (costume1 v)\nset [ghost v] effect to (100)\nshow\npoint in direction (90)\nrepeat (10)\n    change [ghost v] effect by (-10)\n    turn right (5) degrees\nend\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\nswitch costume to (costume1 v)\nrepeat (10)\n    change [ghost v] effect by (10)\n    turn right (5) degrees\nend\nhide\n\nwhen I receive [restart v]\nhide\nif  then\n    delete this clone\nend\nif <([costume # v] of [ground v]) = [1]> then\nif <([costume # v] of [ground v]) = [2]> then\nif <([costume # v] of [ground v]) = [3]> then\nif <([costume # v] of [ground v]) = [4]> then\nif <([costume # v] of [ground v]) = [5]> then\nif <([costume # v] of [ground v]) = [6]> then\nif <([costume # v] of [ground v]) = [7]> then\nif <([costume # v] of [ground v]) = [8]> then\nif <([costume # v] of [ground v]) = [9]> then\nif <([costume # v] of [ground v]) = [10]> then\nif <([costume # v] of [ground v]) = [11]> then\n    wait (0.1) seconds\n    Clone [150] [-57]\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [2]> then\n    set rotation style [left-right v]\n    clear graphic effects\n    set size to (9) %\n    show\n    set [enemyx v] to [0]\n    set [enemyy v] to [0]\n    go to [front v] layer\n    forever\n        change [enemyy v] by (-1)\n        if <([x position v] of [player v]) < ((x position) - (10))> then\n            change [enemyx v] by (-0.4)\n            point in direction (-90)\n        end\n        if <((x position) - (-10)) < ([x position v] of [player v])> then\n            change [enemyx v] by (0.4)\n            point in direction (90)\n        end\n        set [enemyx v] to ((Enemyx) * (0.9))\n        change x by (Enemyx)\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (-4)\n            change x by ((Enemyx) * (-1))\n            if <(y position) < ([y position v] of [player v])> then\n                set [enemyy v] to [10]\n                if <([abs v] of (x) ) = (x)> then\n                    set [enemyx v] to [-10]\n                else\n                    set [enemyx v] to [10]\n                end\n            else\n                set [enemyx v] to [0]\n            end\n        end\n        change y by (Enemyy)\n        if <touching (ground v)?> then\n            change y by ((Enemyy) - ((Enemyy) * (2)))\n            set [enemyy v] to [0]\n        end\n        change y by (-1)\n        if <<((y position) - (-120)) < ([y position v] of [player v])> and <touching (ground v)?>> then\n            set [enemyy v] to [14]\n        end\n        if <<touching (ground v)?> and <<touching (player v)?> and <(([y position v] of [player v]) - (10)) > (y position)>>> then\n            set [y v] to [15]\n            repeat (10)\n                change [ghost v] effect by (10)\n                change [enemyy v] by (1)\n            end\n            delete this clone\n        end\n        change y by (1)\n        switch costume to (costume3 v)\n        create clone of (_myself_ v)\n        switch costume to (costume2 v)\n        if <touching (player v)?> then\n            broadcast (Restart v)\n        end\n        if <touching (ladders v)?> then\n            if <([y position v] of [player v]) > (y position)> then\n                set [enemyy v] to [6]\n            else\n                set [enemyy v] to [-6]\n            end\n        end\n        if <touching (bounce v)?> then\n            set [enemyy v] to [20]\n        end\n    end\nelse\n    show\n    clear graphic effects\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\nwhen flag clicked\nset [amount v] to [1]\nset [speed v] to [1]\n\nwait (1) seconds\n\ngo to [back v] layer\ngo [forward v] (1) layers\n\nwhen flag clicked\nhide\n\n@Sprite2\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (100)\n\n@Who\n\nwhen flag clicked\nRead In Visited Lists\nAdd Me To Visited List (username)\nDisplay and Store Visited List\n\ndefine Read In Visited Lists\ndelete (all) of [who list v]\ndelete (all) of [when list v]\ndelete (all) of [count list v]\nInit Reader (☁ Who Visited)\nrepeat until <(parseIdx) > (length of (parseStr))>\n    Read String\n    add (?Val) to [who list v]\n    Read Number\n    add (?Val) to [when list v]\n    Read Number\n    add (?Val) to [count list v]\nend\n\ndefine Init Reader []\nset [parsestr v] to (text)\nset [parseidx v] to [1]\n\nwhen flag clicked\nset [_chars v] to [ !"#$%&'\(\)*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~]\n\ndefine Read Number\nset [?val v] to []\nrepeat (letter (parseIdx) of (parseStr))\n    change [parseidx v] by (1)\n    set [?val v] to (join (?Val) (letter (parseIdx) of (parseStr)))\nend\nif <(?Val) > [8388608]> then\n    set [?val v] to ((?Val) - (16777215))\nend\nchange [parseidx v] by (1)\n\ndefine None\nif <(val) < [0]> then\n    set [?val v] to (round ((val) + (16777215)))\nelse\n    set [?val v] to (round (val))\nend\nset [parsestr v] to (join (parseStr) (join (length of (?Val)) (?Val)))\n\ndefine Write String []\nWrite Number (length of (txt))\nset [?val v] to []\nset [ti v] to [1]\nrepeat (length of (txt))\n    set [tc v] to (letter (ti) of (txt))\n    set [ti2 v] to [1]\n    repeat until <<(tc) = (letter (ti2) of (_Chars))> or <(ti2) > (length of (_Chars))>>\n        change [ti2 v] by (1)\n    end\n    if <(ti2) < [10]> then\n        set [?val v] to (join (?Val) [0])\n    end\n    set [?val v] to (join (?Val) (ti2))\n    change [ti v] by (1)\nend\nset [parsestr v] to (join (parseStr) (?Val))\n\ndefine Read String\nRead Number\nset [parselen v] to (?Val)\nset [?val v] to []\nrepeat (parseLen)\n    set [ti2 v] to (((letter (parseIdx) of (parseStr)) * (10)) + (letter ((parseIdx) + (1)) of (parseStr)))\n    set [?val v] to (join (?Val) (letter (ti2) of (_Chars)))\n    change [parseidx v] by (2)\nend\n\ndefine Add Me To Visited List []\nset [whoidx v] to [1]\nset [found? v] to [0]\nrepeat (length of [who list v])\n    set [who v] to (item (whoIdx) of [who list v])\n    if <(who) = (who)> then\n        set [when v] to (item (whoIdx) of [when list v])\n        if <(when) = ([floor v] of (days since 2000) )> then\n            set [found? v] to [1]\n            set [count v] to ((item (whoIdx) of [count list v]) + (1))\n            replace item (whoIdx) of [count list v] with (count)\n        end\n    end\n    change [whoidx v] by (1)\nend\nif <(found?) = [0]> then\n    insert (who) at (1) of [who list v] \n    insert ([floor v] of (days since 2000) ) at (1) of [when list v] \n    insert [1] at (1) of [count list v] \nend\n\ndefine Display and Store Visited List\ndelete (all) of [visited list v]\nset [whoidx v] to [1]\nInit Reader []\nset [last when v] to [0]\nrepeat (length of [who list v])\n    set [who v] to (item (whoIdx) of [who list v])\n    set [when v] to (item (whoIdx) of [when list v])\n    set [count v] to (item (whoIdx) of [count list v])\n    Write String (who)\n    Write Number (when)\n    Write Number (count)\n    if <not <(last when) = (when)>> then\n        set [last when v] to (when)\n        set [when v] to (([floor v] of (days since 2000) ) - (when))\n        if <(when) = [0]> then\n            set [when v] to [Today]\n        else\n            if <(when) = [1]> then\n                set [when v] to [Yesterday]\n            else\n                set [when v] to (join (when) [ days ago])\n            end\n        end\n        add [] to [visited list v]\n        add (join [>>>>>     ] (join (when) [     <<<<<])) to [visited list v]\n        add [] to [visited list v]\n    end\n    add (join (who) (join [     x] (count))) to [visited list v]\n    change [whoidx v] by (1)\nend\ndelete (1) of [visited list v]\nset [☁ who visited v] to (parseStr)\n\nset [☁ who visited v] to []\n\n