Minecraft Scrolling Platformer 2 || The Nether #games
@Stage\n\nwhen [m v] key pressed\nset [mouse v] to (join ((mouse x) + (SCROLL X)) (join [, ] ((mouse y) + (SCROLL Y))))\nshow variable [mouse v]\n\nwhen I receive [end intro v]\nforever\n    repeat until <(EXIT GAME FINISH) = [1]>\n        play sound [classic nether song v] until done\n    end\nend\n\nwhen flag clicked\nswitch backdrop to (pick random (1) to (pick random (1) to (pick random (1) to (2))))\n\nwhen I receive [end game! v]\nwait (0.5) seconds\nforever\n\nwhen I receive [end game! v]\nif <(EXIT GAME FINISH) = [1]> then\n    stop all sounds\n    clear sound effects\nend\n\n@Borders\n\nwhen flag clicked\nhide\ngo to [front v] layer\nwait (1) seconds\n\nwhen I receive [end intro v]\nshow\n\nwhen I receive [clock v]\ngo to [front v] layer\nshow\n\nwhen I receive [end game! v]\nstop [other scripts in sprite v]\n\n@CheckPoint\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [clock v]\nif <(Checkpoint) = [0]> then\n    switch costume to (flag pole v)\nend\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <(costume [number v]) = [1]> then\n    if <touching (player v)?> then\n        start sound [Collect v]\n        change [checkpoint v] by (1)\n        switch costume to (flag  v)\n    end\nend\nif <(Checkpoint) > [0]> then\n    switch costume to (flag  v)\nend\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(Level) = [1]> then\n    Clone At x: [780] y: [118]\nend\nset [x v] to [-99999]\n\nClone At x: [2132] y: [38]\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone At x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\nchange [collected max v] by (1)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [checkpoint v] to [0]\nswitch costume to (flag pole v)\n\nwhen I start as a clone\nset size to (25) %\n\n@Player\n\nwhen flag clicked\nswitch costume to (steve 1 v)\npoint in direction (90)\nhide\nset size to (50) %\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\nwhen I receive [game on v]\nset [level v] to [1]\nforever\n    broadcast (Reset v) and wait\n    set [tick v] to [0]\n    broadcast (Setup v) and wait\n    GameOn\n    repeat until <(EXIT) > []>\n        change [tick v] by (1)\n        Clock\n        broadcast (Clock v) and wait\n    end\n    if <(EXIT) = [win]> then\n        Game-Win\n    else\n        Game-die\n    end\nend\n\ndefine GameOn\nset [in air v] to [0]\nset [sy v] to [0]\nset [sx v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nset [exit v] to []\nset size to (60) %\nset [ghost v] effect to (0)\nshow\nif <(Checkpoint) = [0]> then\n    set [x v] to [0]\n    set [y v] to [50]\nelse\n    if <(Checkpoint) = [1]> then\n        set [x v] to [775]\n        set [y v] to [150]\n    else\n        if <(Checkpoint) = [2]> then\n            set [x v] to [1955]\n            set [y v] to [50]\n        else\n            if <(Checkpoint) = [3]> then\n                set [x v] to [3558]\n                set [y v] to [50]\n            else\n                if <(Checkpoint) = [4]> then\n                    set [x v] to [4513]\n                    set [y v] to [29]\n                end\n            end\n        end\n    end\nend\n\ndefine Clock\nif <not <key (any v) pressed?>> then\n    switch costume to (regular2 v)\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    switch costume to (steve 2 v)\n    change [sx v] by (-1.5)\nend\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    switch costume to (steve 1 v)\n    change [sx v] by (1.5)\nend\nset [sx v] to ((sx) * (0.8))\nif <([abs v] of (sx) ) > [0.9]> then\n    Change Player X By: (round (sx))\nend\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > [0]>>> then\n    if <(in air) < [5]> then\n        switch costume to (up v)\n        set [sy v] to [12]\n    end\nend\nchange [sy v] by (-2)\nChange Player Y by: (sy)\nTest-die\nset [scroll x v] to (x)\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (5)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [-180]> then\n    set [exit v] to [die]\nend\nif <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > [0]>>> and <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n    switch costume to (up right v)\nend\nif <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > [0]>>> and <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>>> then\n    switch costume to (up left v)\nend\nif <touching (platforms v)?> then\n    point in direction (90)\nend\nif <touching (water v)?> then\n    set [sy v] to [-1.5]\n    change [sy v] by (1)\n    set [brightness v] effect to (10)\nend\nif <<touching (water v)?> and <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > [0]>>>> then\n    change [sy v] by (5)\nend\nif <touching (checkpoint4 v)?> then\n    change [exit game finish v] by (1)\n    broadcast (End Game! v) and wait\nend\n\ndefine Change Player Y by: (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (platforms v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine Change Player X By: (sx)\nchange [x v] by (sx)\nPosition\nif <touching (platforms v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (platforms v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    repeat until <not <touching (platforms v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Game-die\nset [exit v] to []\nrepeat (10)\n    change size by (0.5)\n    change [ghost v] effect by (10)\nend\nswitch costume to (steve 1 v)\nhide\nwait (.01) seconds\n\ngo to x: (0) y: (78)\n\ndefine Test-die\nif <touching (lava v)?> then\n    start sound [oof v]\n    switch costume to (hurt steve v)\n    set [exit v] to [die]\nend\n\ndefine Game-Win\npoint in direction (90)\nhide\n\nwhen flag clicked\nset [exit game finish v] to [0]\n\nbroadcast (end intro v) and wait\n\nwhen I receive [end intro v]\nbroadcast (Green Flag v) and wait\nshow\nbroadcast (Game On v) and wait\n\nChange Player X By: (sx)\n\ngo to x: (0) y: (33)\n\nwait (1) seconds\n\nif <(Checkpoint) = [0]> then\n    set [x v] to [0]\n    set [y v] to [0]\nelse\n    if <(Checkpoint) = [1]> then\n        set [x v] to [1022]\n        set [y v] to [85]\n    end\nend\n\nif <<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 [in air v] to [0]\nelse\n    set [sx v] to [0]\nend\nhide\nwait (0.1) seconds\nshow\nwait (0.1) seconds\n\nwhen flag clicked\nset [checkpoint v] to [0]\n\nwhen I receive [clock v]\nif <(EXIT) = [die]> then\n    switch costume to (hurt steve v)\nend\n\n@Thumbnail\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset size to (100) %\nswitch costume to (costume2 v)\nhide\nforever\n    set [timer2 v] to (timer)\nend\n\nwhen [timer v] > (Timer2)\ngo to [front v] layer\nshow\n\n@Platforms\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [clock v]\nPosition ((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)\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone At x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\n@Lava\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [clock v]\nPosition ((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 (1.1 v)\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone At x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\ncreate clone of (_myself_ v)\nchange [x v] by (360)\nnext costume\ncreate clone of (_myself_ v)\nchange [x v] by (360)\nnext costume\ncreate clone of (_myself_ v)\nchange [x v] by (360)\nnext costume\n\nwhen flag clicked\ngo to [front v] layer\nhide\n\n@BG\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [clock v]\nPosition (((x) - (SCROLL X)) / (3)) (((y) - (SCROLL Y)) / (3))\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 (costume2 v)\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ngo to [back v] layer\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@BG2\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [clock v]\nset [ghost v] effect to (20)\nPosition (((x) - (SCROLL X)) / (5)) (((y) - (SCROLL Y)) / (5))\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 (costume6 v)\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\nset [ghost v] effect to (25)\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@BG cool\n\nwhen I receive [green flag v]\nset [brightness v] effect to (9)\nshow\n\nwhen I receive [clock v]\nPosition ((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 (costume5 v)\n    Clone At x: [400] y: [0]\n    Clone At x: [400] y: [0]\n    Clone At x: [400] y: [0]\n    Clone At x: [400] y: [0]\n    Clone At x: [400] y: [0]\n    Clone At x: [400] y: [0]\n    Clone At x: [400] y: [0]\n    Clone At x: [400] y: [0]\n    Clone At x: [400] y: [0]\n    Clone At x: [400] y: [0]\n    Clone At x: [400] y: [0]\n    Clone At x: [400] y: [0]\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone At x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nClone At x: [400] y: [0]\n\n@Achievements \n\nwhen flag clicked\nhide\n\nwhen flag clicked\ngo to x: (25) y: (-150)\nset [ghost v] effect to (0)\nshow\nswitch costume to (costume1 v)\nrepeat (10)\n    go to [front v] layer\nend\n\nwhen I receive [clock v]\nif <(Checkpoint) = [0]> then\n    switch costume to (costume2 v)\nend\nif <(Checkpoint) = [1]> then\n    switch costume to (1- check point 1 v)\nend\nif <(Checkpoint) = [2]> then\n    switch costume to (2- check point 2 v)\nend\nif <(Checkpoint) = [3]> then\n    switch costume to (3- check point 3 v)\nend\n\n@CheckPoint4\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [clock v]\nif <(Checkpoint) = [3]> then\n    switch costume to (flag pole v)\nend\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <(costume [number v]) = [1]> then\n    if <touching (player v)?> then\n        start sound [Coin v]\n        change [checkpoint v] by (1)\n        switch costume to (flag  v)\n    end\nend\nif <(Checkpoint) > [3]> then\n    switch costume to (flag  v)\nend\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(Level) = [1]> then\n    Clone At x: [5000] y: [75]\nend\nset [x v] to [-99999]\n\nClone At x: [2132] y: [38]\n\ndefine Position (x) (y)\nset size to (100) %\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone At x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\nchange [collected max v] by (1)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [checkpoint v] to [0]\nswitch costume to (flag pole v)\n\n@Ending!\n\nwhen flag clicked\npoint in direction (90)\nhide\n\nwhen I receive [end game! v]\ngo to [front v] layer\nshow\nwait (30) seconds\nstop [all v]\n\n@SETUP\n\nwhen flag clicked\nbroadcast (end intro v) and wait\n\n@BG cool2\n\nwhen I receive [green flag v]\nset [brightness v] effect to (9)\nshow\n\nwhen I receive [clock v]\nPosition ((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 (costume5 v)\n    Clone At x: [400] y: [0]\n    Clone At x: [400] y: [0]\n    Clone At x: [400] y: [0]\n    Clone At x: [400] y: [0]\n    Clone At x: [400] y: [0]\n    Clone At x: [400] y: [0]\n    Clone At x: [400] y: [0]\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone At x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\n@CheckPoint2\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [clock v]\nif <(Checkpoint) = [1]> then\n    switch costume to (flag pole v)\nend\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <(costume [number v]) = [1]> then\n    if <touching (player v)?> then\n        start sound [Collect v]\n        change [checkpoint v] by (1)\n        switch costume to (flag  v)\n    end\nend\nif <(Checkpoint) > [1]> then\n    switch costume to (flag  v)\nend\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(Level) = [1]> then\n    Clone At x: [1966] y: [10]\nend\nset [x v] to [-99999]\n\nClone At x: [2132] y: [38]\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone At x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\nchange [collected max v] by (1)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [checkpoint v] to [0]\nswitch costume to (flag pole v)\n\nwhen I start as a clone\nset size to (25) %\n\n@sign\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [clock v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <touching (mouse-pointer v)?> then\n    switch costume to (level 1.2 v)\nend\nif <not <touching (mouse-pointer v)?>> then\n    switch costume to (level 1.1 v)\nend\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: [360] y: [0]\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone At x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\n@CheckPoint3\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [clock v]\nif <(Checkpoint) = [2]> then\n    switch costume to (flag pole v)\nend\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <(costume [number v]) = [1]> then\n    if <touching (player v)?> then\n        start sound [Collect v]\n        change [checkpoint v] by (1)\n        switch costume to (flag  v)\n    end\nend\nif <(Checkpoint) > [2]> then\n    switch costume to (flag  v)\nend\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(Level) = [1]> then\n    Clone At x: [3558] y: [9]\nend\nset [x v] to [-99999]\n\nClone At x: [2132] y: [38]\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone At x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\nchange [collected max v] by (1)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [checkpoint v] to [0]\nswitch costume to (flag pole v)\n\nwhen I start as a clone\nset size to (25) %\n\n@End Message\n\nwhen flag clicked\nhide\n\nwhen I receive [end game! v]\nshow\nrepeat (10)\n    go to [front v] layer\nend\n\n