Lego Platformer [Scrolling]. 5k Contest!  #Scrolling #Mobile #Games #Contest
@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [lvl set up v]\nif <(level) = [4]> then\n    switch backdrop to (backdrop3 v)\n    set [brightness v] effect to (-20)\nend\n\nwhen I receive [play v]\nswitch backdrop to (backdrop2 v)\nset [brightness v] effect to (0)\n\n@Ground\n\nwhen flag clicked\nset [brightness v] effect to (0)\n\nset [open v] to [1]\n\nset [open v] to [1]\n\nclone [27] [2] [0]\n\nwhen flag clicked\n\nwhen I start as a clone\nset [clone costume v] to (clone identity)\n\nwhen I start as a clone\nshow\n\ndefine clone (costume) (x) (y)\nswitch costume to (hackdot v)\nset x to ((x) * (460))\nset y to (y)\nset [clone identity v] to (costume)\ncreate clone of (_myself_ v)\nwait (0.1) seconds\n\nwhen I receive [lvl set up v]\nif <(level) = [1]> then\n    set [massacre v] to [0]\n    clone [1] [0] [0]\n    clone [2] [1] [0]\n    clone [4] [2] [0]\n    clone [5] [3] [0]\nend\nswitch costume to (hackdot v)\nif <(level) = [2]> then\n    set [massacre v] to [0]\n    clone [6] [0] [0]\n    clone [7] [1] [0]\n    clone [8] [2] [0]\n    clone [9] [3] [0]\n    clone [10] [4] [0]\n    clone [11] [5] [0]\n    clone [12] [6] [0]\nend\nset [massacre v] to [1]\nswitch costume to (hackdot v)\nif <(level) = [3]> then\n    set [massacre v] to [0]\n    clone [13] [0] [0]\n    clone [14] [1] [0]\n    clone [15] [2] [0]\n    clone [16] [3] [0]\n    clone [17] [4] [0]\n    clone [18] [5] [0]\n    clone [19] [6] [0]\nend\nset [massacre v] to [1]\nswitch costume to (hackdot v)\nif <(level) = [4]> then\n    set [massacre v] to [0]\n    clone [21] [0] [0]\n    clone [22] [-1] [0]\n    clone [23] [-2] [0]\n    clone [24] [-3] [0]\n    clone [25] [-4] [0]\n    clone [26] [1] [0]\nend\nset [massacre v] to [1]\nswitch costume to (hackdot v)\n\nwhen I receive [tick v]\nif <(massacre) = [1]> then\n    hide\nelse\n    change x by (scroll x)\n    if <<(x position) < [-455]> or <(x position) > [455]>> then\n        hide\n        switch costume to (hackdot v)\n    else\n        switch costume to (clone costume)\n        show\n    end\nend\n\nwhen I receive [play v]\nhide\nbroadcast (lvl set up v)\n\nwhen I receive [delete clones v]\ndelete this clone\n\n@lego guy\n\nwhen flag clicked\n\nnext costume\nwait (0.04) seconds\n\nwhen I receive [walk! v]\n\nset [stopping v] to [1]\nstop [this script v]\n\nwhen flag clicked\n\nwait (0.04) seconds\n\nwhen I receive [fall apart v]\nhide\n\nwhen I receive [show v]\ngo to (my friend v)\nshow\n\nwhen flag clicked\n\nwhen I receive [hide now v]\nhide\n\nwhen I receive [show now v]\nshow\n\nwhen I receive [supercalifragilisticexpialodocious v]\nhide\nstop [other scripts in sprite v]\n\nif <touching (checkpoint v)?> then\n    set [checkpoint v] to [0]\nend\n\nwhen I receive [effect v]\nrepeat (25)\n    change [pixelate v] effect by (4)\nend\nhide\nset [pixelate v] effect to (0)\nwait (1) seconds\nshow\n\nwhen flag clicked\nset [pixelate v] effect to (0)\n\nwhen flag clicked\n\nset [level v] to [4]\n\nwhen I receive [the end v]\nhide\nstop [this script v]\n\nset [checkpoint v] to [0]\n\nhide\nbroadcast (lvl set up v)\n\nwhen I receive [play v]\nshow\nset size to (75) %\nset rotation style [left-right v]\nforever\n    if <(level) = [16]> then\n        hide\n    end\n    if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (40))>>> then\n        repeat until <touching (lego ground v)?>\n            switch costume to (jumping v)\n        end\n    end\n    if <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n        switch costume to (costume1 v)\n        repeat until <<not <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>>> or <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (40))>>>>\n            next costume\n            if <(costume [number v]) > [12]> then\n                switch costume to (costume1 v)\n            end\n            wait (0.04) seconds\n        end\n    end\n    switch costume to (standing v)\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        switch costume to (costume1 v)\n        repeat until <<not <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>>> or <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (40))>>>>\n            next costume\n            if <(costume [number v]) > [12]> then\n                switch costume to (costume1 v)\n            end\n            wait (0.04) seconds\n        end\n    end\nend\n\nwhen I receive [play v]\nforever\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        point in direction (90)\n    end\n    if <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n        point in direction (-90)\n    end\n    set [x v] to (x position)\n    set [y guy v] to (y position)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [play v]\nset [stopping v] to [1]\nforever\n    go to (my friend v)\n    go to [front v] layer\nend\n\n@my friend\n\nwhen flag clicked\n\ndefine starting position\nset [fallspeed v] to [0]\ngo to x: (-220) y: (-70)\nwait (0.5) seconds\nshow\n\nwhen I receive [boing v]\nset [fallspeed v] to [18]\n\nif <(pause) = [1]> then\n    wait (0.1) seconds\nend\n\nset y to (-75)\n\ndefine restart/back/next\nif <key (b v) pressed?> then\n    if <not <(level) = [1]>> then\n        change [level v] by (-1)\n        starting position\n        wait (0.2) seconds\n    end\nend\nif <key (r v) pressed?> then\n    starting position\n    wait (0.2) seconds\n    up\nend\nif <key (n v) pressed?> then\n    if <not <(level) = [26]>> then\n        broadcast (bext v)\n        wait (0.2) seconds\n        change [level v] by (1)\n    end\nend\n\nwhen I receive [coolieu v]\nstarting position\n\nbroadcast (coolieu v)\n\nwhen I receive [end of end v]\n\nwhen flag clicked\n\nif <(good) = [1]> then\n\nset [runspeed v] to [-5]\n\nif <touching (water v)?> then\n    change x by ((runspeed) / (3))\nelse\n    change x by (runspeed)\nend\n\nchange x by (10)\n\nif <<<key (w v) pressed?> or <key (w v) pressed?>> or <<key (up arrow v) pressed?> or <key (up arrow v) pressed?>>> then\n    set [fallspeed v] to [12]\n    if <([abs v] of (runspeed) ) = (runspeed)> then\n        set [runspeed v] to [-4]\n    else\n        set [runspeed v] to [4]\n    end\nelse\n    set [runspeed v] to [0]\nend\n\nif <(x position) > [220]> then\n    hide\n    broadcast (hide now v)\n    set [good v] to [0]\n    broadcast (bext v)\n    wait (0.5) seconds\n    go to x: (0) y: (0)\n    change [level v] by (1)\nend\nif <(y position) < [-180]> then\n    starting position\nend\n\nrestart/back/next\nif <touching (trampoline v)?> then\n    set [fallspeed v] to [18]\nend\nif <touching (chainsaw v)?> then\n    broadcast (fall apart v)\n    dead start\nend\nif <touching (badguy v)?> then\n    broadcast (fall apart v)\n    dead start\nend\nif <touching (stompers v)?> then\n    broadcast (fall apart v)\n    dead start\nend\nif <touching (lavaly lava v)?> then\n    broadcast (fall apart v)\n    dead start\nend\nif <(level) = [16]> then\n    broadcast (hide now v)\n    broadcast (supercalifragilisticexpialodocious v)\n    stop [this script v]\nend\n\nwait (17) seconds\n\nset [runspeed v] to [0]\n\nwhen I receive [end intro v]\n\nstarting position\n\ndefine dead start\nhide\nwait (0.2) seconds\nset [fallspeed v] to [0]\nset [runspeed v] to [0]\ngo to x: (0) y: (0)\nshow\nbroadcast (show v)\nset [total x v] to (checkpoint)\nup\n\ndefine up\nrepeat until <not <touching (ground v)?>>\n    change y by (1)\nend\nset [good v] to [1]\nbroadcast (show now v)\n\nwhen I receive [up! v]\n\nwhen I receive [up! v]\nstarting position\nwait (0.1) seconds\nup\n\nwhen flag clicked\nset [scroll x v] to [0]\nforever\n    set [scroll x v] to ((runspeed) * (-1))\n    change [total x v] by (runspeed)\nend\n\nchange [scroll x v] by (1)\n\nchange [scroll x v] by ((runspeed) * (-1))\n\nif <(runspeed) > [0]> then\n\n\n\nwhen I receive [lvl set up v]\nset [checkpoint v] to [0]\nset [total x v] to [0]\n\ndead start\n\nwhen flag clicked\nset [pixelate v] effect to (0)\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    play sound [chill inspire v] until done\nend\n\nstart sound [Smashing-Yuri_Santana-1233262689 v]\n\nstart sound [Smashing-Yuri_Santana-1233262689 v]\n\nstart sound [Smashing-Yuri_Santana-1233262689 v]\n\nwhen I receive [play v]\ngo to x: (0) y: (0)\nset size to (75) %\nhide\nshow\nset [ghost v] effect to (100)\nset [good v] to [1]\nset [takeoffspeed v] to [12]\nset [runspeed v] to [0]\nset [fallspeed v] to [0]\ngo to x: (0) y: (0)\nforever\n    change [fallspeed v] by (-1)\n    if <<<mouse down?> and <(mouse x) < (x position)>> or <<key (a v) pressed?> or <key (left arrow v) pressed?>>> then\n        change [runspeed v] by (-1)\n    end\n    if <<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [runspeed v] by (1)\n    end\n    if <not <<<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>> or <mouse down?>>> then\n        set [runspeed v] to [0]\n    end\n    set [runspeed v] to ((runspeed) * (0.9))\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)?> or <touching (door v)?>> then\n        change y by (-4)\n        set [runspeed v] to ((runspeed) * (-1))\n        set [scroll x v] to ((runspeed) * (-1))\n        broadcast (tick v)\n    end\n    broadcast (tick v)\n    if <touching (water v)?> then\n        change y by ((fallspeed) / (3))\n    else\n        change y by (fallspeed)\n    end\n    set [y v] to (y position)\n    if <<touching (ground v)?> or <touching (door v)?>> then\n        change y by ((fallspeed) - ((fallspeed) * (2)))\n        set [fallspeed v] to [0]\n    end\n    change y by (-1)\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (40))>>> and <touching (ground v)?>> then\n        set [fallspeed v] to [12]\n    end\n    change y by (1)\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <touching (water v)?>> then\n        set [fallspeed v] to [5]\n    end\n    if <touching (chainsaw guard v)?> then\n        start sound [Smashing-Yuri_Santana-1233262689 v]\n        broadcast (fall apart v)\n        set [runspeed v] to [0]\n        wait (1) seconds\n        if <(checkpoint) < (total x)> then\n            repeat until <(total x) < (checkpoint)>\n                change [runspeed v] by (-1)\n                broadcast (tick v)\n            end\n        else\n            repeat until <(checkpoint) < (total x)>\n                change [runspeed v] by (1)\n                broadcast (tick v)\n            end\n        end\n        dead start\n    end\n    if <touching (spikes v)?> then\n        start sound [Smashing-Yuri_Santana-1233262689 v]\n        broadcast (fall apart v)\n        set [runspeed v] to [0]\n        wait (1) seconds\n        if <(checkpoint) < (total x)> then\n            repeat until <(total x) < (checkpoint)>\n                change [runspeed v] by (-1)\n                broadcast (tick v)\n            end\n        else\n            repeat until <(checkpoint) < (total x)>\n                change [runspeed v] by (1)\n                broadcast (tick v)\n            end\n        end\n        dead start\n    end\n    if <touching (stomper v)?> then\n        start sound [Smashing-Yuri_Santana-1233262689 v]\n        broadcast (fall apart v)\n        set [runspeed v] to [0]\n        wait (1) seconds\n        if <(checkpoint) < (total x)> then\n            repeat until <(total x) < (checkpoint)>\n                change [runspeed v] by (-1)\n                broadcast (tick v)\n            end\n        else\n            repeat until <(total x) > (checkpoint)>\n                change [runspeed v] by (1)\n                broadcast (tick v)\n            end\n        end\n        dead start\n    end\n    if <touching (checkpoint v)?> then\n        set [checkpoint v] to (total x)\n    end\n    if <touching (badguy v)?> then\n        start sound [Smashing-Yuri_Santana-1233262689 v]\n        broadcast (fall apart v)\n        set [runspeed v] to [0]\n        wait (1) seconds\n        if <(checkpoint) < (total x)> then\n            repeat until <(total x) < (checkpoint)>\n                change [runspeed v] by (-1)\n                broadcast (tick v)\n            end\n        else\n            repeat until <(total x) > (checkpoint)>\n                change [runspeed v] by (1)\n                broadcast (tick v)\n            end\n        end\n        dead start\n    end\n    if <touching (portal v)?> then\n        repeat (25)\n            change [ghost v] effect by (4)\n        end\n        wait (1) seconds\n        broadcast (delete clones v)\n        set [total x v] to [0]\n        set [runspeed v] to [0]\n        dead start\n        change [level v] by (1)\n        set [checkpoint v] to [0]\n        broadcast (lvl set up v)\n    end\n    if <(y position) < [-170]> then\n        broadcast (fall apart v)\n        set [runspeed v] to [0]\n        wait (1) seconds\n        if <(checkpoint) < (total x)> then\n            repeat until <(total x) < (checkpoint)>\n                change [runspeed v] by (-1)\n                broadcast (tick v)\n            end\n        else\n            repeat until <(total x) > (checkpoint)>\n                change [runspeed v] by (1)\n                broadcast (tick v)\n            end\n        end\n        dead start\n    end\n    if <touching (portal v)?> then\n        wait (1) seconds\n        broadcast (delete clones v)\n        broadcast (superdeduper v)\n        set [total x v] to [0]\n        set [runspeed v] to [0]\n        dead start\n        change [level v] by (1)\n        set [checkpoint v] to [0]\n        broadcast (lvl set up v)\n    end\n    if <touching (trampoline v)?> then\n        set [fallspeed v] to [18]\n    end\n    if <key (n v) pressed?> then\n        repeat (25)\n            change [ghost v] effect by (4)\n        end\n        wait (1) seconds\n        broadcast (delete clones v)\n        set [total x v] to [0]\n        set [runspeed v] to [0]\n        dead start\n        change [level v] by (1)\n        set [checkpoint v] to [0]\n        broadcast (lvl set up v)\n        wait until <not <key (n v) pressed?>>\n    end\nend\n\nwhen I receive [play v]\nset [level v] to [1]\nforever\n    if <(level) = [5]> then\n        broadcast (the end v)\n        stop [other scripts in sprite v]\n    end\nend\n\nwhen I receive [delete clones v]\ndelete this clone\n\n@reference\n\nwhen flag clicked\nhide\n\n@screen\n\nwhen flag clicked\nhide\n\nwhen I receive [play v]\nforever\n    go to [front v] layer\n    go [backward v] (1) layers\n    show\nend\n\n@lego ground\n\nwhen flag clicked\nhide\n\nif <not <(costume [name v]) = [hackdot]>> then\n\nswitch costume to (costume 2 v)\n\nswitch costume to (costume)\n\nclone [25] [-4] [0]\n\nset [open v] to [1]\n\nwhen I receive [message1 v]\n\nchange [level v] by (1)\n\nchange x by (10)\n\nforever\n    go to x: (-325) y: (0)\nend\n\nclone [27] [2] [0]\n\nwhen flag clicked\n\nwhen I start as a clone\nset [clone costume v] to (clone identity)\n\nwhen I start as a clone\nshow\n\ndefine clone (costume) (x) (y)\nswitch costume to (hackdot v)\nset x to ((x) * (460))\nset y to (y)\nset [clone identity v] to (costume)\ncreate clone of (_myself_ v)\nwait (0.1) seconds\nswitch costume to (hackdot v)\n\nwhen I receive [delete clones v]\ndelete this clone\n\nwhen I receive [lvl set up v]\nset [funkyface v] to [0]\nif <(level) = [1]> then\n    clone [1] [0] [0]\n    clone [2] [1] [0]\n    clone [4] [2] [0]\n    clone [5] [3] [0]\nend\nset [funkyface v] to [1]\nif <(level) = [2]> then\n    set [funkyface v] to [0]\n    clone [6] [0] [0]\n    clone [7] [1] [0]\n    clone [8] [2] [0]\n    clone [9] [3] [0]\n    clone [10] [4] [0]\n    clone [11] [5] [0]\n    clone [12] [6] [0]\nend\nset [funkyface v] to [1]\nif <(level) = [3]> then\n    set [funkyface v] to [0]\n    clone [13] [0] [0]\n    clone [14] [1] [0]\n    clone [15] [2] [0]\n    clone [16] [3] [0]\n    clone [17] [4] [0]\n    clone [18] [5] [0]\n    clone [19] [6] [0]\nend\nset [funkyface v] to [1]\nif <(level) = [4]> then\n    set [funkyface v] to [0]\n    set [brightness v] effect to (-10)\n    clone [21] [0] [0]\n    clone [22] [-1] [0]\n    clone [23] [-2] [0]\n    clone [24] [-3] [0]\n    clone [25] [-4] [0]\n    clone [26] [1] [0]\nend\nset [funkyface v] to [1]\n\nwhen I receive [tick v]\nif <(funkyface) = [1]> then\n    hide\nelse\n    change x by (scroll x)\n    if <<(x position) < [-455]> or <(x position) > [455]>> then\n        set [ground hidden v] to [1]\n        hide\n        switch costume to (hackdot v)\n    else\n        set [ground hidden v] to [0]\n        switch costume to (clone costume)\n        show\n    end\nend\n\nwhen I receive [play v]\nhide\nbroadcast (lvl set up v)\n\n@dead starts\n\nwhen flag clicked\nhide\n\nwhen I receive [fall apart v]\nrepeat (6)\n    create clone of (_myself_ v)\n    next costume\nend\n\nwhen I start as a clone\npoint in direction (pick random (0) to (180))\ngo to (my friend v)\nshow\nset [x vel v] to (pick random (-2) to (2))\nset [y vel v] to (pick random (2) to (5))\nrepeat until <touching (_edge_ v)?>\n    change x by (x vel)\n    turn right (x vel) degrees\n    change y by (y vel)\n    change [y vel v] by (-1)\nend\ndelete this clone\n\n@spikes\n\nwhen I start as a clone\n\nset [evil spikes destroyer 2 v] to [0]\nclone [5] [3] [0]\nset [evil spikes destroyer 2 v] to [1]\n\nwhen I receive [message1 v]\n\nchange [level v] by (1)\n\nchange x by (10)\n\nforever\n    go to x: (-325) y: (0)\nend\n\nset [open v] to [1]\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nset [clone costume v] to (clone identity)\n\nwhen I start as a clone\nshow\n\ndefine clone (costume) (x) (y)\nswitch costume to (hackdot v)\nset x to ((x) * (460))\nset y to (y)\ncreate clone of (_myself_ v)\nwait (0.1) seconds\n\nwhen I receive [delete clones v]\ndelete this clone\n\nwhen I receive [tick v]\nif <(evil spikes destroyer 2) = [1]> then\n    hide\nelse\n    change x by (scroll x)\n    if <<(x position) < [-455]> or <(x position) > [455]>> then\n        hide\n        switch costume to (hackdot v)\n    else\n        switch costume to (clone costume)\n        show\n    end\nend\n\nwhen I receive [lvl set up v]\nif <(level) = [1]> then\n    set [evil spikes destroyer 2 v] to [0]\n    clone [1] [0] [0]\n    clone [2] [1] [0]\n    clone [4] [2] [0]\nend\nset [evil spikes destroyer 2 v] to [1]\nif <(level) = [2]> then\n    if <(level) = [2]> then\n        set [evil spikes destroyer 2 v] to [0]\n        clone [6] [4] [0]\n    end\n    set [evil spikes destroyer 2 v] to [1]\nend\nif <(level) = [4]> then\n    set [evil spikes destroyer 2 v] to [0]\nend\nset [evil spikes destroyer 2 v] to [1]\n\nclone [7] [1] [0]\n\nrepeat (100)\nend\n\nset [scroll x v] to [-10]\n\nset [scroll x v] to [-2000]\nset [total x v] to [2000]\n\nwhen I receive [play v]\nhide\nbroadcast (lvl set up v)\n\n@Stomper\n\nwhen flag clicked\nhide\n\nwait (0.1) seconds\n\nwhen I receive [lvl set up v]\nset [hidden stomper 2 v] to [0]\n\nhide\n\ndefine backup\nrepeat until <not <touching (ground v)?>>\n    change y by (1)\nend\n\nwhen I start as a clone\nshow\nforever\n    go to [back v] layer\n    set [stomper v] to [0]\n    repeat until <touching (ground v)?>\n        change [stomper v] by (-1)\n        change y by (stomper)\n        if <(hidden stomper 2) = [1]> then\n            wait until <not <(hidden stomper 2) = [1]>>\n        end\n    end\n    backup\n    repeat until <(y position) > [170]>\n        change y by (4)\n        if <(hidden stomper 2) = [1]> then\n            wait until <not <(hidden stomper 2) = [1]>>\n        end\n    end\nend\n\ndefine specialclone (x) (y)\nswitch costume to (hackdot v)\nset x to (x)\nset y to (y)\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\nswitch costume to (hackdot v)\n\nset [open v] to [1]\n\nspecialclone [2250] [0]\n\nwhen I receive [lvl set up v]\nif <(level) = [1]> then\n    specialclone [700] [0]\nend\nif <(level) = [2]> then\n    specialclone [75] [0]\n    specialclone [450] [0]\nend\nif <(level) = [3]> then\n    specialclone [300] [0]\n    specialclone [550] [0]\nend\nif <(level) = [4]> then\n    specialclone [-925] [0]\n    specialclone [-1150] [0]\n    specialclone [200] [0]\n    specialclone [500] [0]\nend\n\nwhen I receive [delete clones v]\ndelete this clone\n\nwhen I receive [tick v]\nif <<(costume [number v]) = [1]> or <(costume [number v]) = [3]>> then\n    change x by (scroll x)\n    if <<(x position) < [-330]> or <(x position) > [330]>> then\n        hide\n        set [hidden stomper 2 v] to [1]\n        set [hidden stomper v] to [1]\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n        show\n        set [hidden stomper 2 v] to [0]\n    end\nend\n\n@checkpoint\n\nwhen I start as a clone\nshow\nforever\n    go to [front v] layer\n    go [backward v] (2) layers\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\n\ndefine checkpoint clone (x) (y)\nswitch costume to (hackdot v)\nset x to (x)\nset y to (y)\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\nswitch costume to (hackdot v)\n\nwhen I receive [tick v]\nif <<(costume [number v]) = [1]> or <(costume [number v]) = [3]>> then\n    change x by (scroll x)\n    if <<(x position) < [-330]> or <(x position) > [300]>> then\n        hide\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n        show\n    end\nend\n\nwhen I receive [delete clones v]\ndelete this clone\n\nwhen I receive [lvl set up v]\npoint in direction (90)\nif <(level) = [1]> then\n    checkpoint clone [902] [8]\nend\nif <(level) = [2]> then\n    checkpoint clone [1150] [-18]\nend\nif <(level) = [3]> then\n    checkpoint clone [2198] [-9]\nend\n\n@badguy\n\ndefine patrol\nrepeat (40)\n    if <(pause clone walking2) = [1]> then\n        wait until <not <(pause clone walking2) = [1]>>\n    end\n    point in direction (90)\n    change x by (2)\nend\nrepeat (40)\n    if <(pause clone walking2) = [1]> then\n        wait until <not <(pause clone walking2) = [1]>>\n    end\n    point in direction (-90)\n    change x by (-2)\nend\n\nwhen I start as a clone\nshow\nif <(clone type badguy) = [1]> then\n    change [ztext v] by (1)\n    forever\n        if <(clone type badguy) = [1]> then\n            set [ghost v] effect to (100)\n        end\n        patrol\n    end\nend\n\ndefine clone badguy (x) (y)\nswitch costume to (hackdot v)\nset x to (x)\nset y to (y)\nswitch costume to (costume22 v)\nset [clone type badguy v] to [1]\ncreate clone of (_myself_ v)\nswitch costume to (hackdot v)\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nif <(clone type badguy) = [2]> then\n    show\n    set [ghost v] effect to (0)\n    change x by (scroll x)\n    switch costume to (walkwalk costume #)\n    wait (0.0004) seconds\n    delete this clone\nend\n\nset [level v] to [1]\n\nwhen flag clicked\n\nwhen I receive [delete clones v]\ndelete this clone\n\nchange [open v] by (1)\n\nwhen I start as a clone\nif <(clone type badguy) = [1]> then\n    set [walkwalk costume # v] to [1]\n    forever\n        change [walkwalk costume # v] by (0.25)\n        if <(walkwalk costume #) = [11]> then\n            set [walkwalk costume # v] to [1]\n        end\n        if <(pause clone walking2) = [1]> then\n            wait until <not <(pause clone walking2) = [1]>>\n        end\n        set [clone type badguy v] to [2]\n        create clone of (_myself_ v)\n    end\nend\n\nset [open v] to [1]\n\nset size to (75) %\n\nset size to (75) %\n\nwhen I receive [tick v]\nif <not <(costume [name v]) = [hackdot]>> then\n    change x by (scroll x)\n    if <<(x position) < [-330]> or <(x position) > [330]>> then\n        hide\n        set [pause clone walking2 v] to [1]\n        switch costume to (costume22 v)\n    else\n        set [pause clone walking2 v] to [0]\n        switch costume to (walkwalk costume #)\n        show\n    end\nend\n\nwhen I receive [lvl set up v]\nswitch costume to (hackdot v)\nhide\nif <(level) = [1]> then\n    clone badguy [1500] [0]\nend\nhide\nif <(level) = [2]> then\n    clone badguy [1500] [-63]\nend\nhide\nif <(level) = [3]> then\n    clone badguy [2470] [92]\nend\nhide\nif <(level) = [4]> then\n    clone badguy [-100] [-35]\nend\nhide\n\nwhen I receive [play v]\nswitch costume to (standing v)\nset size to (75) %\nswitch costume to (hackdot v)\nshow\n\n@clouds\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nswitch costume to (pick random (1) to (2))\ngo to x: (216) y: (pick random (100) to (150))\nset [ghost v] effect to (pick random (25) to (75))\nset [cloud x v] to (pick random (-3) to (-5))\nrepeat until <(x position) < [-380]>\n    go to [back v] layer\n    change x by (cloud x)\n    if <(backdrop [number v]) = [2]> then\n        delete this clone\n    end\nend\ndelete this clone\n\n\n\nwhen I receive [delete clones v]\ndelete this clone\n\nwhen I receive [play v]\nhide\nforever\n    if <(backdrop [number v]) = [2]> then\n        wait (0.1) seconds\n    else\n        wait (pick random (1) to (3)) seconds\n        create clone of (_myself_ v)\n    end\nend\n\n@chainsaw guard\n\nwhen I start as a clone\nif <(clone type chainsaw) = [2]> then\n    show\n    set [ghost v] effect to (0)\n    switch costume to (costume # supreme)\n    if <(costume # supreme) > [8]> then\n        switch costume to (costume1 v)\n    end\n    go to [back v] layer\n    wait (0.004) seconds\n    delete this clone\nend\n\nwhen I start as a clone\nif <(clone type chainsaw) = [1]> then\n    forever\n        if <(clone type badguy) = [1]> then\n            set [ghost v] effect to (100)\n        end\n    end\nend\n\nwhen I start as a clone\nif <(clone type chainsaw) = [1]> then\n    set [costume # supreme v] to [1]\n    forever\n        change [costume # supreme v] by (1)\n        if <(costume # supreme) = [8]> then\n            set [costume # supreme v] to [1]\n        end\n        if <(pause clone walking2) = [1]> then\n            wait until <not <(pause clone walking2) = [1]>>\n        end\n        set [clone type chainsaw v] to [2]\n        create clone of (_myself_ v)\n    end\nend\n\ndefine clone more chainsaws NOW (x) (y)\nswitch costume to (hackdot v)\nset x to (x)\nset y to (y)\nswitch costume to (costume2 v)\nset [clone type chainsaw v] to [1]\ncreate clone of (_myself_ v)\nswitch costume to (hackdot v)\n\nwhen flag clicked\nhide\nswitch costume to (costume2 v)\n\nwait (0.004) seconds\n\nwhen flag clicked\nswitch costume to (hackdot v)\nhide\n\nwhen I receive [lvl set up v]\ndelete this clone\n\nwhen I start as a clone\nset [sensing v] to [0]\n\nwhen I receive [tick v]\nif <(sensing) = [0]> then\n    if <not <(costume [name v]) = [hackdot]>> then\n        change x by (scroll x)\n        if <<(x position) < [-300]> or <(x position) > [300]>> then\n            set [hide chainsaw v] to [1]\n            switch costume to (costume2 v)\n            hide\n        else\n            switch costume to (costume1 v)\n            show\n            set [hide chainsaw v] to [0]\n        end\n    end\nend\nhide\n\nwhen I receive [lvl set up v]\nset [sensing v] to [0]\nhide\nif <(level) = [1]> then\n    clone more chainsaws NOW [400] [-100]\nend\nhide\nif <(level) = [2]> then\n    clone more chainsaws NOW [1000] [-20]\nend\nset [sensing v] to [1]\nhide\nhide\nif <(level) = [3]> then\n    clone more chainsaws NOW [1025] [30]\nend\nset [sensing v] to [1]\nhide\nif <(level) = [4]> then\n    clone more chainsaws NOW [-1525] [-60]\nend\nset [sensing v] to [1]\nhide\n\nwhen I receive [delete clones v]\ndelete this clone\n\n@portal\n\nwhen I receive [tick v]\nif <<(costume [number v]) = [1]> or <(costume [number v]) = [3]>> then\n    change x by (scroll x)\n    if <<(x position) < [-300]> or <(x position) > [300]>> then\n        hide\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n        show\n    end\nend\n\nwhen I receive [lvl set up v]\nif <(level) = [1]> then\n    clone end portal [1500] [39]\nend\nif <(level) = [2]> then\n    clone end portal [2750] [125]\nend\nif <(level) = [3]> then\n    clone end portal [2700] [120]\nend\nif <(level) = [4]> then\n    clone end portal [650] [0]\nend\n\nwhen flag clicked\nhide\n\ndefine clone end portal (x) (y)\nswitch costume to (hackdot v)\nset x to (x)\nset y to (y)\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\nswitch costume to (hackdot v)\n\nwhen I start as a clone\nshow\ngo to [back v] layer\ngo [forward v] (2) layers\n\nset [open v] to [1]\n\nwhen I receive [delete clones v]\ndelete this clone\n\n@Thumbnail\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    show\nend\n\n@trampoline\n\nwhen I start as a clone\nshow\n\ndefine specialclone (x) (y)\nswitch costume to (hackdot v)\nset x to (x)\nset y to (y)\nswitch costume to (costume1 v)\ncreate clone of (_myself_ v)\nswitch costume to (hackdot v)\n\nwhen I receive [delete clones v]\ndelete this clone\n\nchange [ztext v] by (1)\n\nwhen I receive [tick v]\nif <<(costume [number v]) = [1]> or <(costume [number v]) = [3]>> then\n    change x by (scroll x)\n    if <<(x position) < [-330]> or <(x position) > [330]>> then\n        hide\n        set [hidden stomper v] to [1]\n        switch costume to (costume1 v)\n    else\n        switch costume to (costume2 v)\n        show\n        set [hidden stomper v] to [0]\n    end\nend\n\nwhen I receive [lvl set up v]\nif <(level) = [2]> then\n    specialclone [797] [-82]\n    specialclone [2000] [-82]\n    specialclone [2950] [-82]\nend\nif <(level) = [3]> then\n    specialclone [2258] [-74]\nend\n\n@button\n\nhide\n\ndefine backup\nrepeat until <not <touching (ground v)?>>\n    change y by (1)\nend\n\nwhen I start as a clone\ngo to [back v] layer\nset [open v] to [0]\nshow\nwait until <touching (lego guy v)?>\nrepeat (40)\n    go to [back v] layer\n    change y by (-0.5)\nend\nset [open v] to [1]\n\nwhen I receive [lvl set up v]\nif <(level) = [4]> then\n    specialclone [-2012] [-45]\nend\n\nwhen I receive [delete clones v]\ndelete this clone\n\ndefine specialclone (x) (y)\nswitch costume to (hackdot v)\nset x to (x)\nset y to (y)\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\nswitch costume to (hackdot v)\n\nwhen I receive [tick v]\nif <<(costume [number v]) = [1]> or <(costume [number v]) = [3]>> then\n    change x by (scroll x)\n    if <<(x position) < [-330]> or <(x position) > [330]>> then\n        hide\n        set [hidden stomper 2 v] to [1]\n        set [hidden stomper v] to [1]\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n        show\n        set [hidden stomper 2 v] to [0]\n    end\nend\n\n@door\n\nshow\n\nhide\n\ndefine backup\nrepeat until <not <touching (ground v)?>>\n    change y by (1)\nend\n\nwhen I start as a clone\nshow\nforever\n    go to [back v] layer\n    if <(open) = [0]> then\n        switch costume to (costume1 v)\n    else\n        switch costume to (costume3 v)\n    end\nend\n\ndefine specialclone (x) (y)\nswitch costume to (hackdot v)\nset x to (x)\nset y to (y)\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\nswitch costume to (hackdot v)\n\nwhen I receive [lvl set up v]\nif <(level) = [4]> then\n    specialclone [105] [15]\nend\n\nwhen I receive [tick v]\nif <<(costume [number v]) = [1]> or <(costume [number v]) = [3]>> then\n    change x by (scroll x)\n    if <<(x position) < [-330]> or <(x position) > [330]>> then\n        hide\n        set [hidden stomper 2 v] to [1]\n        set [hidden stomper v] to [1]\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n        show\n        set [hidden stomper 2 v] to [0]\n    end\nend\n\nwhen I receive [delete clones v]\ndelete this clone\n\n@chainsaw guard2\n\nwhen I start as a clone\nif <(clone type chainsaw 2.0) = [2]> then\n    show\n    set [ghost v] effect to (0)\n    switch costume to (costume # supreme 2.0)\n    if <(costume # supreme 2.0) > [8]> then\n        switch costume to (costume1 v)\n    end\n    go to [back v] layer\n    wait (0.004) seconds\n    delete this clone\nend\n\nwhen I start as a clone\nif <(clone type chainsaw) = [1]> then\n    set [ghost v] effect to (100)\nend\n\nwhen I start as a clone\nif <(clone type chainsaw 2.0) = [1]> then\n    set [costume # supreme 2.0 v] to [1]\n    forever\n        change [costume # supreme 2.0 v] by (1)\n        if <(costume # supreme 2.0) = [8]> then\n            set [costume # supreme 2.0 v] to [1]\n        end\n        set [clone type chainsaw 2.0 v] to [2]\n        create clone of (_myself_ v)\n    end\nend\n\ndefine clone more chainsaws NOW (x) (y)\n\nwhen flag clicked\nhide\nswitch costume to (costume2 v)\n\nwait (0.004) seconds\n\nwhen flag clicked\nswitch costume to (hackdot v)\nhide\n\nwhen I receive [lvl set up v]\ndelete this clone\n\nwhen I start as a clone\nset [sensind 3.0 v] to [0]\n\nhide\n\nset [open v] to [1]\n\ndefine clone chainsaw (x) (y)\nswitch costume to (hackdot v)\nset x to (x)\nset y to (y)\nswitch costume to (costume2 v)\nset [clone type chainsaw 2.0 v] to [1]\ncreate clone of (_myself_ v)\nswitch costume to (hackdot v)\n\nclone chainsaw [1100] [-100]\n\nwhen I receive [lvl set up v]\nset [sensind 3.0 v] to [0]\nif <(level) = [4]> then\n    clone chainsaw [325] [-70]\nend\nset [sensind 3.0 v] to [1]\nhide\n\nwhen I receive [delete clones v]\ndelete this clone\n\nwhen I receive [tick v]\nif <(sensind 3.0) = [0]> then\n    if <not <(costume [name v]) = [hackdot]>> then\n        change x by (scroll x)\n        if <<(x position) < [-300]> or <(x position) > [300]>> then\n            switch costume to (costume2 v)\n            hide\n        else\n            switch costume to (costume1 v)\n            show\n        end\n    end\nend\nhide\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen I receive [the end v]\nshow\n\nset [level v] to [4]\n\nbroadcast (lvl set up v)\n\nset [open v] to [1]\n\n@transition\n\nwhen I receive [lvl set up v]\nshow\nwait (1) seconds\nhide\n\ngo to x: (465) y: (0)\nrepeat (46)\n    go to [front v] layer\n    change x by (-20.005)\nend\n\nwhen flag clicked\nhide\n\nbroadcast (up! v)\n\nset [ghost v] effect to (0)\n\n@glitch tester\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nset [total x v] to [0]\nhide\nforever\n    set [glitch finder x v] to (x)\n    set [glitch finder y v] to (y)\nend\n\n@particles\n\nwhen flag clicked\nhide\n\nwhen I receive [celebrate v]\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nset [x clone v] to (pick random (-5) to (5))\nset [y clone v] to (pick random (5) to (10))\ngo to x: (pick random (-220) to (220)) y: (-180)\nset size to (pick random (50) to (100)) %\nset [color v] effect to (pick random (1) to (100))\nrepeat (10)\n    change y by (y clone)\n    change x by (x clone)\n    change [y clone v] by (-0.5)\n    set [x clone v] to ((x clone) * (0.95))\nend\nrepeat until <touching (_edge_ v)?>\n    change y by (y clone)\n    change x by (x clone)\n    change [y clone v] by (-0.5)\n    set [x clone v] to ((x clone) * (0.95))\nend\ndelete this clone\n\nwhen I receive [play v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [play v]\nhide\n\n@Sprite2\n\nchange y by (10)\n\nwhen flag clicked\nhide\n\nwhen I receive [5000 v]\ngo to [front v] layer\npoint in direction (90)\nswitch costume to (costume1 v)\nrepeat (4)\n    show\n    go to x: (0) y: (0)\n    set size to (5) %\n    set [up v] to [0]\n    go to x: (0) y: (0)\n    show\n    repeat until <(y position) > [220]>\n        change y by (up)\n        change size by (up)\n        change [up v] by (0.5)\n    end\n    hide\n    next costume\nend\nbroadcast (celebrate v)\npoint in direction (97)\nshow\nset size to (100) %\ngo to x: (0) y: (-200)\nrepeat until <(y position) > [200]>\n    turn right (([cos v] of ((timer) * (100)) ) * (0.5)) degrees\n    change y by (2)\nend\nhide\nnext costume\nshow\nset size to (100) %\ngo to x: (0) y: (-200)\nrepeat until <(y position) > [200]>\n    turn right (([cos v] of ((timer) * (100)) ) * (0.5)) degrees\n    change y by (2)\nend\nhide\nnext costume\nshow\nset size to (100) %\ngo to x: (0) y: (-200)\nrepeat until <(y position) > [200]>\n    turn right (([cos v] of ((timer) * (100)) ) * (0.5)) degrees\n    change y by (2)\nend\nhide\nnext costume\nshow\nset size to (100) %\ngo to x: (0) y: (-200)\nrepeat until <(y position) > [200]>\n    turn right (([cos v] of ((timer) * (100)) ) * (0.5)) degrees\n    change y by (2)\nend\nhide\nnext costume\nshow\nset size to (100) %\ngo to x: (0) y: (-200)\nrepeat until <(y position) > [200]>\n    turn right (([cos v] of ((timer) * (100)) ) * (0.5)) degrees\n    change y by (2)\nend\nhide\nhide\nnext costume\nshow\nset size to (100) %\ngo to x: (0) y: (-200)\nrepeat until <(y position) > [200]>\n    turn right (([cos v] of ((timer) * (100)) ) * (0.5)) degrees\n    change y by (2)\nend\nhide\nhide\nnext costume\nshow\nset size to (100) %\ngo to x: (0) y: (-200)\nrepeat until <(y position) > [200]>\n    turn right (([cos v] of ((timer) * (100)) ) * (0.5)) degrees\n    change y by (2)\nend\nhide\nwait (1) seconds\nbroadcast (play v)\n\nnext costume\nshow\nset size to (100) %\ngo to x: (0) y: (-200)\nrepeat until <(y position) > [200]>\n    turn right (([cos v] of ((timer) * (100)) ) * (0.5)) degrees\n    change y by (2)\nend\nhide\n\nstop [all v]\n\nwhen I receive [play v]\nhide\n\n@Sprite3\n\nwhen flag clicked\nhide\n\nwhen I receive [play v]\nhide\n\nwhen I receive [contest v]\nshow\nrepeat (5)\n    set [ghost v] effect to (100)\n    repeat (25)\n        change [ghost v] effect by (-4)\n    end\nend\nbroadcast (5000 v)\n\n@cj\n\nwhen flag clicked\nset [ghost v] effect to (100)\nshow\n\nwhen flag clicked\nrepeat (25)\n    change [ghost v] effect by (-4)\nend\nforever\n    if <key (l v) pressed?> then\n        broadcast (play v)\n        repeat (25)\n            change [ghost v] effect by (4)\n            hide\n            stop [this script v]\n        end\n    end\n    if <key (k v) pressed?> then\n        broadcast (contest v)\n        repeat (25)\n            change [ghost v] effect by (4)\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwait until <<key (l v) pressed?> or <key (c v) pressed?>>\n\n
          ❑❑❑❑❑❑❑ Lego Platformer ❑❑❑❑❑❑❑\n_________________________________________________\nCONTEST INFO IN CREDITS\n➩ This is my first scrolling platformer! And what theme could it be? Lego of course! After my previous Lego Platformer became my most popular game I thought it needed a sequal....\n❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑\n_________________________________________________\n➩ Controls: WASD, and Arrow keys!\n➩ N the skip levels\n➩ This is mobile friendly!\n❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑ \nfollow @Capt_Boanerges for more cool stuff.\n ❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑\n    ❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑\n        ❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑❑\n\n\n\n\n\nWhy are you still reading this! =P\n#Games #Scrolling #Lego #Capt_Boanerges #Fun #Audio #Cool #Whyamisearchingthis #Platformer #Mobile\n\n\n