☁ Trap Tower: a scrolling platformer
@Stage\n\n@player\n\ndefine Chat\nif <(is the chat open) = [1]> then\n    if <key (1 v) pressed?> then\n        set [chat v] to [1]\n        say (item (Chat) of [chat v])\n        wait (2) seconds\n        say []\n        set [chat v] to [0]\n    else\n        if <key (2 v) pressed?> then\n            set [chat v] to [2]\n            say (item (Chat) of [chat v])\n            wait (2) seconds\n            say []\n            set [chat v] to [0]\n        else\n            if <key (3 v) pressed?> then\n                set [chat v] to [3]\n                say (item (Chat) of [chat v])\n                wait (2) seconds\n                say []\n                set [chat v] to [0]\n            else\n                if <key (4 v) pressed?> then\n                    set [chat v] to [4]\n                    say (item (Chat) of [chat v])\n                    wait (2) seconds\n                    say []\n                    set [chat v] to [0]\n                else\n                    if <key (5 v) pressed?> then\n                        set [chat v] to [5]\n                        say (item (Chat) of [chat v])\n                        wait (2) seconds\n                        say []\n                        set [chat v] to [0]\n                    else\n                        if <key (6 v) pressed?> then\n                            set [chat v] to [6]\n                            say (item (Chat) of [chat v])\n                            wait (2) seconds\n                            say []\n                            set [chat v] to [0]\n                        else\n                            if <key (7 v) pressed?> then\n                                set [chat v] to [7]\n                                say (item (Chat) of [chat v])\n                                wait (2) seconds\n                                say []\n                                set [chat v] to [0]\n                            else\n                                if <key (8 v) pressed?> then\n                                    set [chat v] to [8]\n                                    say (item (Chat) of [chat v])\n                                    wait (2) seconds\n                                    say []\n                                    set [chat v] to [0]\n                                else\n                                    if <key (9 v) pressed?> then\n                                        set [chat v] to [9]\n                                        say (item (Chat) of [chat v])\n                                        wait (2) seconds\n                                        say []\n                                        set [chat v] to [0]\n                                    else\n                                        set [chat v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Position\ngo to x: ((x) - ()) y: ((y) - (SCROLL Y))\n\nwhen flag clicked\nset [scroll y v] to [0]\nset [x v] to [-145]\nset [y v] to [-89]\nshow list [chat v]\nbroadcast (GREEN FLAG v) and wait\nbroadcast (PLAY GAME v) and wait\n\ndefine CHANGE PLAYER Y BY (sy)\nchange [y v] by (sy)\nchange [inair v] by (1)\nPosition\nrepeat until <not <<touching (level v)?> or <touching (moving platforms v)?>>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [inair v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine GAME ON\nset [x v] to [-145]\nset [y v] to [-89]\nset [sy v] to [0]\nset [sx v] to [0]\nset [scroll y v] to [0]\nset [inair v] to [0]\nset [exit v] to []\nset size to (100) %\nset [ghost v] effect to (0)\nshow\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\ndefine Game-Win\nrepeat (50)\n    point towards (exit v)\n    turn right (65) degrees\n    move ((distance to [exit v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nhide\nchange [level v] by (1)\nwait (1) seconds\n\ndefine TICK\nset rotation style [left-right v]\nif <<<(mouse x) < (x position)> and <mouse down?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n    point in direction (-90)\n    change [sx v] by (-2)\nend\nif <<<(x position) < (mouse x)> and <mouse down?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n    point in direction (90)\n    change [sx v] by (2)\nend\nset [sx v] to ((SX) * (0.8))\nif <[0.9] < ([abs v] of (SX) )> then\n    CHANGE PLAYER X By (round (SX))\nend\nif <<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n    if <(inair) < [4]> then\n        set [sy v] to [16]\n    end\nend\nif <(sy) > [-20]> then\n    change [sy v] by (-2)\nend\nCHANGE PLAYER Y BY (sy)\nTEST-DIE\nif <[] < [0]> then\nif <[2649] < [0]> then\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (8)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [-175]> then\n    set [exit v] to [die]\nend\n\nwhen I receive [begin v]\nset [is the chat open v] to [0]\nshow list [chat v]\nforever\n    Chat\n    if <<key (t v) pressed?> or <<touching (mouse-pointer v)?> and <mouse down?>>> then\n        if <(is the chat open) = [1]> then\n            show list [chat v]\n            set [is the chat open v] to [0]\n        else\n            set [is the chat open v] to [1]\n            hide list [chat v]\n        end\n        wait until <<not <<touching (mouse-pointer v)?> and <mouse down?>>> and <not <key (t v) pressed?>>>\n    end\nend\n\ndefine GAME - DIE\nset [exit v] to []\nhide\n\ndefine TEST-DIE\nif <touching (obstacle v)?> then\n    set [exit v] to [die]\nend\n\ndefine CHANGE PLAYER X By (sx)\nchange [x v] by (sx)\nPosition\nif <<touching (level v)?> or <touching (moving platforms v)?>> then\n    repeat (18)\n        change [y v] by (1)\n        Position\n        if <not <<touching (level v)?> or <touching (moving platforms v)?>>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-18)\n    if <<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        if <(sx) > [0]> then\n            set [sx v] to [-16]\n        else\n            set [sx v] to [16]\n        end\n        set [inair v] to [0]\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <<touching (level v)?> or <touching (moving 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\nwhen flag clicked\nset [max players v] to [8]\nset [my player # v] to [0]\nbroadcast (setups v) and wait\nbroadcast (joining v)\nbroadcast (join game v) and wait\nif <(My Player #) > [0]> then\n    start sound [Connect v]\n    broadcast (joined v)\nelse\n    start sound [Disconnect v]\n    broadcast (full v)\nend\nbroadcast (begin v)\n\ndefine write (val) to encoded\nset [letter # v] to [1]\nrepeat (length of (val))\n    set [encodied v] to (join (encodied) (item # of (letter (letter #) of (val)) in [code v]))\n    change [letter # v] by (1)\nend\nset [encodied v] to (join (encodied) [00])\n\nwhen I receive [begin v]\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)\n        if <(My Player #) > [0]> then\n            send cloud data\n        end\n    end\n    if <(EXIT) = [win]> then\n        Game-Win\n    else\n        GAME - DIE\n    end\nend\n\ndefine set cloud # (player) to (value)\nif <(player) = [1]> then\n    set [☁ p1 v] to (value)\nelse\n    if <(player) = [2]> then\n        set [☁ p2 v] to (value)\n    else\n        if <(player) = [3]> then\n            set [☁ p3 v] to (value)\n        else\n            if <(player) = [4]> then\n                set [☁ p4 v] to (value)\n            else\n                if <(player) = [5]> then\n                    set [☁ p5 v] to (value)\n                else\n                    if <(player) = [6]> then\n                        set [☁ p6 v] to (value)\n                    else\n                        if <(player) = [7]> then\n                            set [☁ p7 v] to (value)\n                        else\n                            if <(player) = [8]> then\n                                set [☁ p8 v] to (value)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine send cloud data\nset [encodied v] to []\nwrite (username) to encoded\nwrite (round ((timer) * (10))) to encoded\nwrite (x) to encoded\nwrite (y) to encoded\nwrite (Chat) to encoded\nset cloud # (My Player #) to (encodied)\n\nwhen I receive [begin v]\nwait (5) seconds\nswitch backdrop to (blank v)\n\nadd [HI] to [chat v]\n\nadd [4] to [chat v]\n\nhide\n\ndelete all of [chat v]\n\nwhen I receive [reset v]\n\nforever\n\nwhen flag clicked\nforever\n    if <<touching (arrow v)?> or <touching color (#ffb0b0)?>> then\n        set [exit v] to [die]\n    end\nend\n\n@Level\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPOSTION ((x) - (my variable)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    CLONE AT X [0] Y [180]\n    CLONE AT X [0] Y [180]\n    CLONE AT X [0] Y [180]\n    CLONE AT X [0] Y [180]\n    CLONE AT X [0] Y [180]\n    CLONE AT X [0] Y [180]\n    CLONE AT X [0] Y [180]\nend\n\ndefine POSTION (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)\nnext costume\n\nwhen flag clicked\n\nif <(LEVEL) = [2]> then\n    switch costume to (level 2 1 v)\n    CLONE AT X [0] Y [360]\n    CLONE AT X [400] Y [320]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 3 1 v)\n    end\nend\n\n@Visual\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPOSTION ((x) - ()) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    CLONE AT Y [180]\n    CLONE AT Y [180]\n    CLONE AT Y [180]\n    CLONE AT Y [180]\n    CLONE AT Y [180]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2 1 v)\n    else\n        if <(LEVEL) = [2]> then\n            switch costume to (level 3 1 v)\n        end\n    end\nend\n\nCLONE AT Y [0]\nCLONE AT Y [0]\nCLONE AT Y [0]\nCLONE AT Y [0]\nCLONE AT Y [0]\nCLONE AT Y [0]\n\ndefine POSTION (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 Y (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\ngo to [front v] layer\n\n@No lag\n\n@Thumbnail\n\nwhen flag clicked\nforever\n    show\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    go to x: (-2) y: (4)\nend\n\n@Other players\n\ndefine Decode chat (chat)\nif <(chat) = [0]> then\n\ndefine begin decode of (encode)\nset [encodied v] to (encode)\nset [letter # v] to [1]\n\ndefine value=read from encode\nset [value v] to []\nforever\n    set [idx v] to (join (letter (letter #) of (encodied)) (letter ((letter #) + (1)) of (encodied)))\n    change [letter # v] by (2)\n    if <(idx) < [1]> then\n        stop [this script v]\n    end\n    set [value v] to (join (value) (item (idx) of [code v]))\nend\n\ndefine setup players\nset [color v] effect to (0)\nset [offline v] to [100]\nhide\nset [player # v] to [1]\nrepeat ((MAX PLAYERS) - (1))\n    create clone of (_myself_ v)\n    change [player # v] by (1)\nend\n\nwhen I receive [begin v]\nforever\n    if <(My Player #) = (player #)> then\n        hide\n        set [offline v] to [100]\n    else\n        tick\n    end\n    go to [back v] layer\nend\n\ndefine value=Cloud # (player)\nif <(player) = [1]> then\n    set [value v] to (☁ P1)\nelse\n    if <(player) = [2]> then\n        set [value v] to (☁ P2)\n    else\n        if <(player) = [3]> then\n            set [value v] to (☁ P3)\n        else\n            if <(player) = [4]> then\n                set [value v] to (☁ P4)\n            else\n                if <(player) = [5]> then\n                    set [value v] to (☁ P5)\n                else\n                    if <(player) = [6]> then\n                        set [value v] to (☁ P6)\n                    else\n                        if <(player) = [7]> then\n                            set [value v] to (☁ P7)\n                        else\n                            if <(player) = [8]> then\n                                set [value v] to (☁ P8)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [setups v]\nsetup players\n\ndefine tick\nvalue=Cloud # (player #)\nif <(join [A] (value)) = (last value)> then\n    change [offline v] by (1)\n    if <(offline) = [100]> then\n        hide\n    end\nelse\n    set [last value v] to (join [A] (value))\n    if <(offline) > [99]> then\n        show\n    end\n    set [offline v] to [0]\nend\nbegin decode of (value)\nvalue=read from encode\nif <(names) = [1]> then\n    say (join (player #) (join [:] (value)))\nelse\n    say []\nend\nvalue=read from encode\nvalue=read from encode\nset x to ((value) - (my variable))\nvalue=read from encode\nset y to ((value) - (SCROLL Y))\nvalue=read from encode\nbroadcast (Decode chat v)\n\nwhen I receive [join game v]\nvalue=Cloud # (player #)\nset [last value v] to (join [A] (value))\nwait (3) seconds\nvalue=Cloud # (player #)\nif <(join [A] (value)) = (last value)> then\n    set [my player # v] to (player #)\nend\n\nwhen I receive [decode chat v]\nDecode chat (value)\n\nDecode chat (value)\n\nwhen I receive [begin v]\nset [names v] to [1]\nforever\n    if <key (n v) pressed?> then\n        if <(names) = [1]> then\n            wait until <not <key (n v) pressed?>>\n            set [names v] to [0]\n        else\n            wait until <not <key (n v) pressed?>>\n            set [names v] to [1]\n        end\n    end\nend\n\n@obstacle\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\ngo to [back v] layer\nPOSTION ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2 1 v)\n        CLONE AT X [0] Y [360]\n        CLONE AT X [400] Y [360]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 3 1 v)\n        end\n    end\nend\n\nCLONE AT X [360] Y [0]\nCLONE AT X [360] Y [0]\nCLONE AT X [360] Y [0]\nCLONE AT X [360] Y [0]\nCLONE AT X [360] Y [0]\nCLONE AT X [360] Y [-10]\nCLONE AT X [360] Y [0]\n\ndefine POSTION (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)\nnext costume\n\n@Join \n\nwhen flag clicked\nhide\n\nwhen I receive [begin v]\nhide\n\nwhen I receive [joining v]\nswitch costume to (joining v)\nshow\n\nwhen I receive [joined v]\nswitch costume to (joined v)\nshow\n\nwhen I receive [full v]\nswitch costume to (joined2 v)\nshow\n\n@Danger2\n\n@Enemy\n\ndefine Switch to (contain)\nnext costume\nif <not < (costume [name v]) contains (contain)?>> then\n    repeat until < (costume [name v]) contains (contain)?>\n        next costume\n    end\nend\n\nwait (.01) seconds\n\nSwitch to [walk]\n\ndefine Create enemy (x) (y)\nset [y v] to (y)\nset [x v] to (x)\ncreate clone of (_myself_ v)\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 [tick v]\n\nwhen I receive [reset v]\nbroadcast (Del Clo v)\nCreate enemy [143] [-89]\n\nwhen I start as a clone\nforever\n    if <(Slow elves) = [1]> then\n        set rotation style [left-right v]\n        point in direction (-90)\n        repeat (150)\n            change [x v] by (1)\n        end\n        point in direction (90)\n        repeat (150)\n            change [x v] by (-1)\n        end\n    else\n        set rotation style [left-right v]\n        point in direction (-90)\n        repeat (75)\n            change [x v] by (2)\n        end\n        point in direction (90)\n        repeat (75)\n            change [x v] by (-2)\n        end\n    end\nend\n\nwhen I receive [del clo v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    Position (X) ((Y) - (SCROLL Y))\nend\n\nwhen I start as a clone\nset [ghost v] effect to (0)\nforever\n    if <touching (player v)?> then\n        if <((y position) - (join [-] [23])) < ([y position v] of [player v])> then\n            set [sy v] to [15]\n            repeat (4)\n                change [ghost v] effect by (25)\n            end\n            delete this clone\n        else\n            set [exit v] to [die]\n        end\n    end\nend\n\nbroadcast (reset v)\n\nwhen I receive [finish v]\nhide\nstop [other scripts in sprite v]\n\nCreate enemy [-200] [-45]\nCreate enemy [929] [700]\n\n@Sprite1\n\n@Arrow\n\ndefine Switch to (contain)\nnext costume\nif <not < (costume [name v]) contains (contain)?>> then\n    repeat until < (costume [name v]) contains (contain)?>\n        next costume\n    end\nend\n\nwait (.01) seconds\n\nSwitch to [walk]\n\ndefine Create enemy (x) (y)\nset [y v] to (y)\nset [x v] to (x)\ncreate clone of (_myself_ v)\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 [tick v]\n\nwhen I receive [reset v]\nbroadcast (Del Clo v)\nCreate enemy [0] [140]\n\nwhen I start as a clone\nshow\nforever\n    set rotation style [left-right v]\n    point in direction (-90)\n    set rotation style [left-right v]\n    point in direction (-90)\n    repeat until <[219] < (X)>\n        change [x v] by (5)\n    end\n    point in direction (90)\n    repeat until <(X) < [-219]>\n        change [x v] by (-5)\n    end\nend\n\nwhen I receive [del clo v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    Position (X) ((Y) - (SCROLL Y))\nend\n\nbroadcast (reset v)\n\nwhen I receive [finish v]\nhide\nstop [other scripts in sprite v]\n\nif <[] = [1]> then\n\nCreate enemy [929] [700]\n\nrepeat (150)\n\nrepeat (150)\n\nwhen flag clicked\n\nwhen I receive [del clo v]\nCreate enemy [0] [140]\nCreate enemy [0] [727]\nwait (.1) seconds\nCreate enemy [0] [814]\nwait (.1) seconds\nCreate enemy [0] [901]\nwait (.1) seconds\nCreate enemy [0] [988]\n\n@Moving Platforms\n\ndefine Switch to (contain)\nnext costume\nif <not < (costume [name v]) contains (contain)?>> then\n    repeat until < (costume [name v]) contains (contain)?>\n        next costume\n    end\nend\n\nwait (.01) seconds\n\nSwitch to [walk]\n\ndefine Create enemy (x) (y)\nset [y v] to (y)\nset [x v] to (x)\ncreate clone of (_myself_ v)\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 [tick v]\n\nwhen I receive [del clo v]\nswitch costume to (left right v)\nCreate enemy [0] [300]\nswitch costume to (up down v)\nCreate enemy [150] [300]\nswitch costume to (up down2 v)\nCreate enemy [-193] [676]\n\nwhen I receive [del clo v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    Position (X) ((Y) - (SCROLL Y))\nend\n\nbroadcast (reset v)\n\nwhen I receive [finish v]\nhide\nstop [other scripts in sprite v]\n\nCreate enemy [-200] [-45]\nCreate enemy [929] [700]\n\nwhen I start as a clone\nshow\nif <(costume [number v]) = [1]> then\n    set size to (50) %\n    set rotation style [left-right v]\n    point in direction (-90)\n    set rotation style [left-right v]\n    forever\n        point in direction (-90)\n        repeat until <[100] < (X)>\n            change [x v] by (5)\n        end\n        point in direction (90)\n        repeat until <(X) < [-219]>\n            change [x v] by (-5)\n        end\n    end\nelse\n    if <(costume [number v]) = [2]> then\n        set size to (50) %\n        set rotation style [left-right v]\n        point in direction (-90)\n        set rotation style [left-right v]\n        forever\n            repeat until <(Y) < [270]>\n                change [y v] by (-5)\n            end\n            point in direction (-90)\n            repeat until <[500] < (Y)>\n                change [y v] by (5)\n            end\n            point in direction (90)\n        end\n    else\n        if <(costume [number v]) = [3]> then\n            set size to (50) %\n            set rotation style [left-right v]\n            point in direction (-90)\n            set rotation style [left-right v]\n            forever\n                repeat until <(Y) < [580]>\n                    change [y v] by (-5)\n                end\n                point in direction (-90)\n                repeat until <[972] < (Y)>\n                    change [y v] by (5)\n                end\n                point in direction (90)\n            end\n        end\n    end\nend\n\n\n\n\n\nforever\n\n\n\nwhen [1 v] key pressed\nset [mouse v] to (join [X: ] (join (mouse x) (join [Y: ] ((mouse y) + (SCROLL Y)))))\n\nwhen I start as a clone\nforever\n    if <(costume [name v]) = [flimsy]> then\nend\n\nif <touching (player v)?> then\n    point in direction (90)\n    set rotation style [all around v]\n    set [flimsy v] to [0]\n    repeat (13)\n        change [flimsy v] by (1)\n        turn left (flimsy) degrees\n    end\n    wait (2) seconds\n    set rotation style [all around v]\n    set [flimsy v] to [0]\n    repeat (13)\n        change [flimsy v] by (-1)\n        turn left (flimsy) degrees\n    end\nend\n\n@Arrow2\n\ndefine Switch to (contain)\nnext costume\nif <not < (costume [name v]) contains (contain)?>> then\n    repeat until < (costume [name v]) contains (contain)?>\n        next costume\n    end\nend\n\nwait (.01) seconds\n\nSwitch to [walk]\n\ndefine Create enemy (x) (y)\nset [y v] to (y)\nset [x v] to (x)\ncreate clone of (_myself_ v)\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 [tick v]\n\nwhen I receive [del clo v]\nCreate enemy [-13] [590]\n\nbroadcast (Del Clo v)\n\nwhen I start as a clone\nshow\nforever\n    if <<touching (player v)?> or <touching (other players v)?>> then\n        set [sy v] to [30]\n        repeat (12)\n            next costume\n        end\n    end\nend\n\nwhen I receive [del clo v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    Position (X) ((Y) - (SCROLL Y))\nend\n\nbroadcast (reset v)\n\nwhen I receive [finish v]\nhide\nstop [other scripts in sprite v]\n\nif <[] = [1]> then\n\nCreate enemy [929] [700]\n\nrepeat (150)\n\nwhen flag clicked\n\nwhen I receive [del clo v]\n\nCreate enemy [0] [140]\n\n
The last person to remix by september 15th gets a follow from me!!! Welcome to Trap Tower!  Avoid Picos, arrows, and spikes. Ride on the moving platforms, and jump on the jump pads! You can race your friends to the top! Have fun! If you cannot get past the trap door click the green flag again\n\nFollow @bhehmann1 for more1\n\nhttps://forkphorus.github.io/?cloud=ws#421154182 for no lag!\n\n0014049 loved\nAwesomebricks1 loved\nStratfordJames loved\nHopefully you loved\n