The Floor Is Lava (Scrolling Platformer)


@Stage\n\nwhen flag clicked\nforever\n    play sound [Sunshine v] until done\nend\n\n@Sprite15\n\n@Lava\n\nwhen flag clicked\nhide\n\nwhen I receive [lava v]\n\nwhen flag clicked\n\nbroadcast (Lava v)\n\nwhen flag clicked\n\nwhen I receive [play game v]\nhide\nswitch costume to (costume1 v)\nwait (pick random (10) to (14)) seconds\nbroadcast (Lava incoming v)\n\nrepeat (140)\n\nforever\n\nwhen I receive [lava v]\ngo to x: (0) y: (0)\nshow\ngo to [front v] layer\ngo [forward v] (5) layers\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (1) seconds\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (1) seconds\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nwait (1) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (1) seconds\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (1) seconds\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nwait (.8) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (2)\nwait (0) seconds\nchange y by (pick random (1) to (2))\nwait (0) seconds\nchange y by (pick random (1) to (2))\nwait (0) seconds\nchange y by (pick random (1) to (2))\nwait (0) seconds\nchange y by (pick random (1) to (3))\nwait (0) seconds\nchange y by (pick random (1) to (2))\nwait (0) seconds\nchange y by (pick random (1) to (3))\nwait (0) seconds\nchange y by (pick random (1) to (2))\nwait (0) seconds\nchange y by (pick random (1) to (2))\nwait (pick random (2) to (4.5)) seconds\nglide (2) secs to x: (0) y: (0)\nwait (pick random (2) to (4)) seconds\nhide\nwait (pick random (14) to (18)) seconds\nbroadcast (Lava incoming v)\nrepeat (140)\nwait (1) seconds\n\nwhen I receive [menu show v]\nhide\n\nwhen I receive [menu show v]\nhide\ngo to [back v] layer\ngo [backward v] (5) layers\n\nwait (1) seconds\n\nwhen I receive [menu show v]\nswitch costume to (costume2 v)\n\nwhen I receive [game complete v]\nswitch costume to (costume2 v)\n\nwhen I receive [sketch game v]\nhide\nswitch costume to (costume1 v)\nwait (pick random (10) to (14)) seconds\nbroadcast (Lava incoming v)\n\n@Bouncepads\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setip 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    switch backdrop to (backdrop1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] 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\nwhen I receive [menu show v]\nhide\n\n@Player\n\nwhen flag clicked\nforever\n    if <touching (bouncepads v)?> then\n        set [speed y v] to [30]\n        switch costume to (up v)\n    end\nend\n\nwhen flag clicked\nset [left v] to [left arrow]\nset [right v] to [right arrow]\nset [up v] to [up arrow]\n\nwhen I receive [front v]\nswitch costume to (front v)\n\nwhen I receive [impo v]\nswitch costume to (impostor v)\n\nwhen I receive [ninja v]\nswitch costume to (ninja v)\n\nwhen I receive [ns v]\nswitch costume to (ninja santa v)\n\ndefine Win?\nset rotation style [all around v]\nrepeat (20)\n    point towards (checkpoint v)\n    turn right (65) degrees\n    move ((distance to [checkpoint v]) / (2)) steps\n    change size by (-2)\n    change [ghost v] effect by (5)\nend\nbroadcast (Game complete v)\n\nwhen flag clicked\nforever\n    if <touching (lava v)?> then\n        Game - Die\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\nwhen I receive [play game v]\nset [level v] to [1]\nforever\n    broadcast (Reset v)\n    broadcast (Setip v)\n    Game on\n    repeat until <(EXIT) > []>\n        Tick\n        broadcast (Tick v)\n    end\n    if <(EXIT) = [Win]> then\n        Game - Win\n    else\n        Game - Die\n    end\nend\n\ndefine Game on\ngo to [front v] layer\ngo [forward v] (5) layers\nswitch costume to (Costumes)\nif <(Checkpoint) = [0]> then\n    set [x v] to [0]\n    set [y v] to [0]\n    switch backdrop to (backdrop2 v)\nelse\n    if <(Checkpoint) = [1]> then\n        set [x v] to [1047]\n        set [y v] to [0]\n    else\n        if <(Checkpoint) = [2]> then\n            set [x v] to [2233]\n            set [y v] to [144]\n        else\n            if <(Checkpoint) = [3]> then\n                set [x v] to [3090]\n                set [y v] to [0]\n            else\n                if <(Checkpoint) = [4]> then\n                    set [x v] to [4307]\n                    set [y v] to [-80]\n                else\n                    set [x v] to [5347]\n                    set [y v] to [226]\n                end\n            end\n        end\n    end\nend\nset [speed y v] to [0]\nset [speed x v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset size to (10) %\nclear graphic effects\nshow\n\ndefine Tick\nset rotation style [left-right v]\nif <<key ((join (Left) []) v) pressed?> or > then\n    change [speed x v] by (-2)\n    point in direction (-90)\nend\nif <<key ((join (Right) []) v) pressed?> or > then\n    change [speed x v] by (2)\n    point in direction (90)\nend\nset [speed x v] to ((Speed x) * (0.8))\nif <([abs v] of (Speed x) ) > [0.9]> then\n    Change player x by (round (Speed x))\nend\nif <<key ((join (Up) []) v) pressed?> or > then\n    if <(in air) < [4]> then\n        set [speed y v] to [16]\n    end\nend\nif <(Speed y) > [-20]> then\n    change [speed y v] by (-2)\nend\nChange player y by (Speed y)\nTest - Die\nset [scroll x v] to (x)\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nif <(SCROLL X) > [5761]> then\n    set [scroll x v] to [5761]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [-178]> then\n    set [exit v] to [Die]\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 [speed y 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    if <<key ((join (Up) []) v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n        if <(sx) > [0]> then\n            set [speed x v] to [-16]\n        else\n            set [speed x v] to [16]\n        end\n        set [in air v] to [0]\n    else\n        set [speed x v] to [0]\n    end\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 []\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 (-0.25)\n    change [ghost v] effect by (2)\nend\nclear graphic effects\nwait (1) seconds\nbroadcast (END v)\nhide\n\ndefine Test - Die\n\nwhen flag clicked\nswitch costume to (front v)\nforever\n    if <touching (spikes v)?> then\n        start sound [Crunch v]\n        set [coins v] to [0]\n        broadcast (Play Game v)\n    end\nend\n\nwhen flag clicked\nset [coins v] to [0]\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <touching (lava v)?> then\n        set [coins v] to [0]\n        start sound [Crunch v]\n        broadcast (Play Game v)\n    end\n    if <(y position) = [-181]> then\n        set [coins v] to [0]\n        start sound [Crunch v]\n        broadcast (Lava v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (checkpoint v)?> and <(Coins) = [5]>> then\n        Win?\n    end\n    if <<touching (checkpoint v)?> and <not <(Coins) = [5]>>> then\n        broadcast (Play Game v)\n    end\nend\n\nwhen flag clicked\nset [coins v] to [0]\nforever\n    if <touching (coins v)?> then\n        broadcast (Coins v)\n        start sound [Coin v]\n        change [coins v] by (1)\n        wait until <not <touching (coins v)?>>\n    end\n    if <touching (coins2 v)?> then\n        broadcast (Coins 2 v)\n        start sound [Coin v]\n        change [coins v] by (1)\n        wait until <not <touching (coins2 v)?>>\n    end\n    if <touching (coins3 v)?> then\n        broadcast (Coins 3 v)\n        start sound [Coin v]\n        change [coins v] by (1)\n        wait until <not <touching (coins3 v)?>>\n    end\n    if <touching (coins4 v)?> then\n        broadcast (Coins 4 v)\n        start sound [Coin v]\n        change [coins v] by (1)\n        wait until <not <touching (coins4 v)?>>\n    end\n    if <touching (coins5 v)?> then\n        broadcast (Coins 5 v)\n        start sound [Coin v]\n        change [coins v] by (1)\n        wait until <not <touching (coins5 v)?>>\n    end\nend\n\nwhen I receive [menu show v]\nhide\ngo [backward v] (10) layers\ngo to [back v] layer\nforever\n    Game - Die\nend\n\nwhen I receive [game complete v]\nhide\ngo [backward v] (10) layers\ngo to [back v] layer\nforever\n    Game - Die\nend\n\nwhen I receive [play game v]\npoint in direction (90)\n\nwhen flag clicked\n\nset [~cloneid v] to [sprite]\n\nwhen flag clicked\n\nwhen I receive [game complete v]\nwait (1) seconds\n\n@Background\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setip 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    switch backdrop to (backdrop1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\ngo [backward v] (3) layers\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 I receive [menu show v]\nhide\n\n@Checkpoint\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setip 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    switch backdrop to (backdrop1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\n\ndefine Position (x) (y)\ngo to [front v] layer\ngo [forward v] (3) layers\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 I receive [menu show v]\nhide\n\nwhen I receive [game complete v]\ndelete this clone\n\n@Sprite2\n\nwhen flag clicked\nhide\ngo to x: (0) y: (-100)\n\nwhen I receive [lava incoming v]\nrepeat (1)\n    show\n    wait (.3) seconds\n    hide\n    wait (.3) seconds\n    show\n    wait (.3) seconds\n    hide\n    wait (.3) seconds\n    show\n    wait (.3) seconds\n    hide\n    wait (.3) seconds\n    show\n    wait (.3) seconds\n    hide\n    wait (.3) seconds\n    show\n    wait (.3) seconds\n    hide\nend\nbroadcast (Lava v)\n\nwhen I receive [menu show v]\nhide\n\nwhen I receive [game complete v]\nhide\nstop [other scripts in sprite v]\n\n@Coins\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setip 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    switch backdrop to (backdrop1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\n\ndefine Position (x) (y)\ngo [backward v] (3) layers\ngo to [back v] layer\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 I receive [coins v]\n\nwhen I receive [coins v]\ndelete this clone\n\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [menu show v]\nhide\n\n@Main Menu\n\nwhen flag clicked\nshow\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [play game v]\nhide\n\nwhen I receive [menu show v]\nshow\n\nwhen I receive [sketch game v]\nhide\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\n@Sprite3\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((120) - (size)) / (5))\n    else\n        change size by (((100) - (size)) / (5))\n    end\nend\n\nwhen this sprite clicked\nstart sound [Connect v]\nbroadcast (level select v)\n\nwhen flag clicked\nshow\n\nwhen I receive [level select v]\nhide\n\nwhen I receive [play game v]\nhide\n\nwhen I receive [settings v]\nhide\n\nwhen I receive [menu show v]\nshow\n\nwhen flag clicked\nbroadcast (Menu show v)\n\nwhen I receive [shop v]\nhide\n\n@Sprite4\n\nwhen flag clicked\ngo to x: (0) y: (-65)\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((120) - (size)) / (5))\n    else\n        change size by (((100) - (size)) / (5))\n    end\nend\n\nwhen flag clicked\nshow\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [play game v]\nhide\n\nwhen I receive [settings v]\nhide\n\nwhen I receive [menu show v]\nshow\n\nwhen this sprite clicked\nstart sound [Connect v]\nbroadcast (Shop v)\n\nwhen I receive [shop v]\nhide\n\nwhen I receive [level select v]\nhide\n\n@Sprite5\n\nwhen flag clicked\ngo to x: (0) y: (-130)\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((120) - (size)) / (5))\n    else\n        change size by (((100) - (size)) / (5))\n    end\nend\n\nwhen flag clicked\nshow\n\nwhen I receive [play game v]\nhide\n\nwhen I receive [green flag v]\nhide\n\nwhen this sprite clicked\nstart sound [Connect v]\nbroadcast (Settings v)\n\nwhen I receive [settings v]\nhide\n\nwhen I receive [menu show v]\nshow\n\nwhen I receive [shop v]\nhide\n\nwhen I receive [level select v]\nhide\n\n@Sprite6\n\nwhen flag clicked\ngo to x: (0) y: (-110)\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((120) - (size)) / (5))\n    else\n        change size by (((100) - (size)) / (5))\n    end\nend\n\nwhen I receive [play game v]\nhide\n\nwhen I receive [green flag v]\nhide\n\nwhen this sprite clicked\nask [Press a key to chose your Jump] and wait\nset [up v] to (answer)\n\nwhen I receive [settings v]\nshow variable [up v]\nshow\n\nwhen flag clicked\nhide\n\nwhen I receive [menu show v]\nhide variable [up v]\n\nwhen I receive [play game v]\nhide variable [up v]\n\nwhen I receive [shop v]\nhide variable [up v]\nhide\n\nwhen I receive [level select v]\nhide\n\n@Sprite7\n\nwhen flag clicked\ngo to x: (0) y: (-55)\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((120) - (size)) / (5))\n    else\n        change size by (((100) - (size)) / (5))\n    end\nend\n\nwhen I receive [play game v]\nhide variable [left v]\nhide\n\nwhen I receive [green flag v]\nhide\n\nwhen this sprite clicked\nask [Press a key to chose left] and wait\nset [left v] to (answer)\n\nwhen I receive [settings v]\nshow variable [left v]\nshow\n\nwhen flag clicked\nhide\n\nwhen I receive [menu show v]\nhide variable [left v]\nhide\n\nwhen flag clicked\nhide variable [left v]\nhide variable [right v]\nhide variable [up v]\n\n@Sprite8\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((120) - (size)) / (5))\n    else\n        change size by (((100) - (size)) / (5))\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\nhide variable [right v]\nhide\n\nwhen I receive [green flag v]\nhide\n\nwhen this sprite clicked\nask [Press a key to choose right] and wait\nset [right v] to (answer)\n\nwhen I receive [settings v]\nshow variable [right v]\nshow\n\nwhen I receive [settings v]\nforever\n    if <key (m v) pressed?> then\n        broadcast (Menu show v) and wait\n    end\nend\n\nwhen I receive [menu show v]\nhide variable [right v]\nhide\n\nwhen I receive [game complete v]\nforever\n    if <key (m v) pressed?> then\n        broadcast (Menu show v) and wait\n    end\nend\n\nwhen I receive [play game v]\nforever\n    if <key (m v) pressed?> then\n        broadcast (Menu show v) and wait\n    end\nend\n\nwhen I receive [game complete v]\nforever\n    if <key (m v) pressed?> then\n        broadcast (Menu show v) and wait\n    end\nend\n\nwhen I receive [shop v]\nforever\n    if <key (m v) pressed?> then\n        broadcast (Menu show v) and wait\n    end\nend\n\nwhen I receive [level select v]\nhide\n\n@Coins2\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setip 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    switch backdrop to (backdrop1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\ngo [backward v] (3) layers\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 I receive [coins v]\n\nwhen I receive [coins 2 v]\ndelete this clone\n\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\n@Skins\n\nwhen flag clicked\nhide\n\nwhen I receive [shop v]\ngo to x: (0) y: (0)\nshow\n\nwhen I receive [menu show v]\nhide variable [coins v]\nhide\n\nwhen I receive [settings v]\nhide variable [coins v]\nhide\n\nwhen flag clicked\nswitch costume to (front v)\nset [costumes v] to [Front]\n\nwhen I receive [left v]\nswitch costume to ((costume [number v]) - (1))\n\nwhen I receive [right v]\nnext costume\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [3]> then\n        set size to (30) %\n    else\n        set size to (100) %\n    end\n    if <(costume [number v]) = [4]> then\n        set size to (30) %\n    end\n    if <<(costume [number v]) = [1]> and <<touching (mouse-pointer v)?> and <mouse down?>>> then\n        set [costumes v] to [Front]\n        broadcast (Front v)\n    end\n    if <<<(costume [number v]) = [2]> and <<touching (mouse-pointer v)?> and <mouse down?>>> and <<(Coins) = [5]> or <(Coins) > [5]>>> then\n        broadcast (Impo v)\n        set [costumes v] to [Impostor]\n        wait (0) seconds\n        change [coins v] by (-5)\n    end\n    if <<<(costume [number v]) = [2]> and <<touching (mouse-pointer v)?> and <mouse down?>>> and <not <<(Coins) = [5]> or <(Coins) > [5]>>>> then\n        say [You need more coins] for (2) seconds\n    end\n    if <<<(costume [number v]) = [3]> and <<touching (mouse-pointer v)?> and <mouse down?>>> and <<(Coins) = [10]> or <(Coins) > [10]>>> then\n        broadcast (Ninja v)\n        set [costumes v] to [Ninja]\n        wait (0.1) seconds\n        change [coins v] by (-10)\n    end\n    if <<<(costume [number v]) = [3]> and <<touching (mouse-pointer v)?> and <mouse down?>>> and <not <<(Coins) = [10]> or <(Coins) > [10]>>>> then\n        say [You need more coins] for (2) seconds\n    end\nend\n\nwhen I receive [shop v]\nshow variable [coins v]\n\nset [coins v] to [10]\n\n@Coins3\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setip 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    switch backdrop to (backdrop1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\ngo [backward v] (3) layers\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 I receive [coins v]\n\nwhen I receive [coins 3 v]\ndelete this clone\n\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\n@Coins4\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setip 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    switch backdrop to (backdrop1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\ngo [backward v] (3) layers\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 I receive [coins v]\n\nwhen I receive [coins 4 v]\ndelete this clone\n\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\n@Coins5\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setip 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    switch backdrop to (backdrop1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\ngo [backward v] (3) layers\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 I receive [coins v]\n\nwhen I receive [coins 5 v]\ndelete this clone\n\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\n@Sprite10\n\nwhen this sprite clicked\nstop [all v]\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [play game v]\nhide\n\nwhen I receive [shop v]\nhide\n\nwhen I receive [game complete v]\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((120) - (size)) / (5))\n    else\n        change size by (((100) - (size)) / (5))\n    end\nend\n\nwhen I receive [menu show v]\nhide\n\n@Sprite11\n\nwhen flag clicked\nhide\n\nwhen I receive [shop v]\ngo to x: (-50) y: (0)\nshow\n\nwhen I receive [menu show v]\nhide\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((120) - (size)) / (5))\n    else\n        change size by (((100) - (size)) / (5))\n    end\nend\n\nwhen this sprite clicked\nbroadcast (Left v)\n\n@Sprite12\n\nwhen flag clicked\nhide\n\nwhen I receive [shop v]\nset rotation style [left-right v]\npoint in direction (-90)\ngo to x: (50) y: (0)\nshow\n\nwhen I receive [menu show v]\nhide\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((120) - (size)) / (5))\n    else\n        change size by (((100) - (size)) / (5))\n    end\nend\n\nwhen this sprite clicked\nbroadcast (Right v)\n\n@Sprite13\n\nwhen flag clicked\nswitch costume to (front v)\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [menu show v]\nhide\n\nwhen I receive [shop v]\nshow\n\nwhen I receive [play game v]\nhide\n\nwhen I receive [right v]\nnext costume\n\nwhen I receive [left v]\nswitch costume to ((costume [number v]) - (1))\n\nwhen I receive [coins v]\n\nwhen I receive [bought v]\nhide\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    show\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    go [forward v] (5) layers\nend\n\n@Platforms\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setip 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    switch backdrop to (backdrop1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\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 I receive [menu show v]\nhide\n\nwhen I receive [sketch game v]\nhide\ndelete this clone\n\n@False Report Detector\n\ndefine Go To (x) (y)\nset size to (400) %\ngo to x: (x) y: (y)\nset size to (100) %\n\nwhen flag clicked\nset voice to (tenor v)::tts\ncreate clone of (_myself_ v)\nswitch costume to (report button v)\ngo to [front v] layer\nset [animation v] to [0]\nforever\n    Go To [485] [-210]\n    if <touching (mouse-pointer v)?> then\n        wait (0.3) seconds\n        if <touching (mouse-pointer v)?> then\n            set [report button v] to [1]\n        end\n    else\n        set [report button v] to [0]\n    end\nend\n\nwhen I start as a clone\nset [ghost v] effect to (100)\nswitch costume to (report detect v)\nforever\n    if <(REPORT BUTTON) = [1]> then\n        set [ghost v] effect to (100)\n        go to x: (0) y: (0)\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n        start sound [Dun Dun Dunnn v]\n        repeat (10)\n            change [ghost v] effect by (0)\n        end\n        set [report button v] to [0]\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset size to (30) %\nhide\n\nwhen I receive [settings v]\nshow\ngo to x: (-180) y: (0)\nset rotation style [left-right v]\nset size to (0) %\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((40) - (size)) / (5))\n    else\n        change size by (((30) - (size)) / (5))\n    end\nend\n\nwhen this sprite clicked\nstart sound [Disconnect v]\nbroadcast (Menu show v)\n\nwhen this sprite clicked\nhide\n\nwhen I receive [shop v]\nshow\ngo to x: (-180) y: (0)\nset rotation style [left-right v]\nset size to (0) %\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((40) - (size)) / (5))\n    else\n        change size by (((30) - (size)) / (5))\n    end\nend\n\nwhen I receive [menu show v]\nhide\n\nwhen I receive [level select v]\nshow\ngo to x: (-180) y: (0)\nset rotation style [left-right v]\nset size to (0) %\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((40) - (size)) / (5))\n    else\n        change size by (((30) - (size)) / (5))\n    end\nend\n\nwhen I receive [play game v]\nhide\n\nwhen I receive [sketch game v]\nhide\n\n@Time\n\nwhen flag clicked\nset [time v] to [0]\nshow variable [☁ wr v]\nhide variable [time v]\nhide variable [final time v]\n\nwhen I receive [play game v]\nset [final time v] to [0]\nhide variable [☁ wr v]\nshow variable [time v]\n\nwhen I receive [play game v]\nset [time v] to [0]\nforever\n    wait (1) seconds\n    change [time v] by (1)\nend\n\nwhen I receive [game complete v]\nhide variable [time v]\nset [final time v] to (Time)\nshow variable [final time v]\nforever\n    if <(Final Time) < (☁ WR)> then\n        set [☁ wr v] to (Final Time)\n    end\nend\n\nwhen I receive [menu show v]\nhide variable [final time v]\nhide variable [time v]\nshow variable [☁ wr v]\n\nbroadcast (Game complete v)\n\nwhen flag clicked\nforever\n    if <(Final Time) < (☁ WR)> then\n        set [☁ wr v] to (Final Time)\n    end\nend\n\nwhen I receive [play game v]\nhide\n\nwhen flag clicked\nset [☁ wr v] to [10000000000000000]\n\nwhen I receive [sketch game v]\nset [final time v] to [0]\nhide variable [☁ wr v]\nshow variable [time v]\n\nwhen I receive [sketch game v]\nset [time v] to [0]\nforever\n    wait (1) seconds\n    change [time v] by (1)\nend\n\n@First level\n\nwhen I receive [level select v]\nshow\ngo to x: (-50) y: (0)\nset rotation style [left-right v]\nset size to (0) %\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((120) - (size)) / (5))\n    else\n        change size by (((100) - (size)) / (5))\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [menu show v]\nhide\n\nwhen this sprite clicked\nhide\n\nwhen this sprite clicked\nstart sound [Connect v]\nbroadcast (Play Game v)\nbroadcast (first level v)\n\nwhen I receive [sketch game v]\nhide\n\n@First level2\n\nwhen I receive [level select v]\nshow\ngo to x: (100) y: (0)\nset rotation style [left-right v]\nset size to (0) %\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((120) - (size)) / (5))\n    else\n        change size by (((100) - (size)) / (5))\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [menu show v]\nhide\n\nwhen I receive [play game v]\nhide\n\nwhen this sprite clicked\nstart sound [Connect v]\nbroadcast (Sketch Game v)\n\nwhen I receive [sketch game v]\nhide\n\n@Spikes\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setip 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    switch backdrop to (backdrop1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\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 I receive [menu show v]\nhide\n\n@Player2\n\ndefine Win?\nset rotation style [all around v]\nrepeat (20)\n    point towards (checkpoint sketch v)\n    turn right (65) degrees\n    move ((distance to [checkpoint sketch v]) / (2)) steps\n    change size by (-2)\n    change [ghost v] effect by (5)\nend\nbroadcast (Game complete v)\n\nwhen flag clicked\nforever\n    if <touching (lava v)?> then\n        Game - Die\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\nwhen I receive [sketch game v]\nset [level v] to [1]\nforever\n    broadcast (reset 2 v)\n    broadcast (Setip 2 v)\n    Game on\n    repeat until <(EXIT) > []>\n        Tick\n        broadcast (tick 2 v)\n    end\n    if <(EXIT) = [Win]> then\n        Game - Win\n    else\n        Game - Die\n    end\nend\n\ndefine Game on\ngo to [front v] layer\ngo [forward v] (5) layers\nswitch costume to (Costumes)\nif <(Checkpoint) = [0]> then\n    set [x v] to [0]\n    set [y v] to [0]\n    switch backdrop to (backdrop2 v)\nelse\n    if <(Checkpoint) = [1]> then\n        set [x v] to [1047]\n        set [y v] to [0]\n    else\n        if <(Checkpoint) = [2]> then\n            set [x v] to [2233]\n            set [y v] to [144]\n        else\n            if <(Checkpoint) = [3]> then\n                set [x v] to [3090]\n                set [y v] to [0]\n            else\n                if <(Checkpoint) = [4]> then\n                    set [x v] to [4307]\n                    set [y v] to [-80]\n                else\n                    set [x v] to [5347]\n                    set [y v] to [226]\n                end\n            end\n        end\n    end\nend\nset [speed y v] to [0]\nset [speed x v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset size to (10) %\nclear graphic effects\nshow\n\ndefine Tick\nset rotation style [left-right v]\nif <<key ((join (Left) []) v) pressed?> or > then\n    change [speed x v] by (-2)\n    point in direction (-90)\nend\nif <<key ((join (Right) []) v) pressed?> or > then\n    change [speed x v] by (2)\n    point in direction (90)\nend\nset [speed x v] to ((Speed x) * (0.8))\nif <([abs v] of (Speed x) ) > [0.9]> then\n    Change player x by (round (Speed x))\nend\nif <<key ((join (Up) []) v) pressed?> or > then\n    if <(in air) < [4]> then\n        set [speed y v] to [16]\n    end\nend\nif <(Speed y) > [-20]> then\n    change [speed y v] by (-2)\nend\nChange player y by (Speed y)\nTest - Die\nset [scroll x v] to (x)\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nif <(SCROLL X) > [5761]> then\n    set [scroll x v] to [5761]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [-178]> then\n    set [exit v] to [Die]\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 sketched 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 [speed y 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 sketched v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (platforms sketched v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <<key ((join (Up) []) v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n        if <(sx) > [0]> then\n            set [speed x v] to [-16]\n        else\n            set [speed x v] to [16]\n        end\n        set [in air v] to [0]\n    else\n        set [speed x v] to [0]\n    end\n    repeat until <not <touching (platforms sketched 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 []\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 (-0.25)\n    change [ghost v] effect by (2)\nend\nclear graphic effects\nwait (1) seconds\nbroadcast (END v)\nhide\n\ndefine Test - Die\n\nwhen flag clicked\nswitch costume to (front v)\nforever\n    if <touching (spikes2 v)?> then\n        start sound [Crunch v]\n        set [coins v] to [0]\n        broadcast (Sketch Game v)\n    end\nend\n\nwhen flag clicked\nset [coins v] to [0]\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <touching (lava v)?> then\n        set [coins v] to [0]\n        start sound [Crunch v]\n        broadcast (Sketch Game v)\n    end\n    if <(y position) = [-181]> then\n        set [coins v] to [0]\n        start sound [Crunch v]\n        broadcast (Play Game v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (checkpoint sketch v)?> and <(Coins) = [5]>> then\n        Win?\n    end\n    if <<touching (checkpoint sketch v)?> and <not <(Coins) = [5]>>> then\n        broadcast (Game complete v)\n    end\nend\n\nwhen flag clicked\nset [coins v] to [0]\nforever\n    if <touching (sketch coins v)?> then\n        broadcast (Coins v)\n        start sound [Coin v]\n        change [coins v] by (1)\n        wait until <not <touching (sketch coins v)?>>\n    end\n    if <touching (sketch coins 2 v)?> then\n        broadcast (Coins 2 v)\n        start sound [Coin v]\n        change [coins v] by (1)\n        wait until <not <touching (sketch coins 2 v)?>>\n    end\n    if <touching (sketch coins 3 v)?> then\n        broadcast (Coins 3 v)\n        start sound [Coin v]\n        change [coins v] by (1)\n        wait until <not <touching (sketch coins 3 v)?>>\n    end\n    if <touching (sketch coins 4 v)?> then\n        broadcast (Coins 4 v)\n        start sound [Coin v]\n        change [coins v] by (1)\n        wait until <not <touching (sketch coins 4 v)?>>\n    end\n    if <touching (sketch coines 5 v)?> then\n        broadcast (Coins 5 v)\n        start sound [Coin v]\n        change [coins v] by (1)\n        wait until <not <touching (sketch coines 5 v)?>>\n    end\nend\n\nwhen I receive [menu show v]\nhide\ngo [backward v] (10) layers\ngo to [back v] layer\nforever\n    Game - Die\nend\n\nwhen I receive [game complete v]\nhide\ngo [backward v] (10) layers\ngo to [back v] layer\nforever\n    Game - Die\nend\n\nwhen I receive [sketch game v]\npoint in direction (90)\n\nwhen flag clicked\n\nset [~cloneid v] to [sprite]\n\nwhen flag clicked\n\nwhen I receive [game complete v]\nwait (1) seconds\n\n@Checkpoint Sketch\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick 2 v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setip 2 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    switch backdrop to (backdrop1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\n\ndefine Position (x) (y)\ngo to [front v] layer\ngo [forward v] (3) layers\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 2 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 I receive [menu show v]\nhide\n\nwhen I receive [game complete v]\ndelete this clone\n\n@Sketch Coins\n\nwhen I receive [tick 2 v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setip 2 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    switch backdrop to (backdrop1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\n\ndefine Position (x) (y)\ngo [backward v] (3) layers\ngo to [back v] layer\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 2 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 I receive [coins v]\n\nwhen I receive [coins v]\ndelete this clone\n\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [menu show v]\nhide\n\n@Sketch Coins 2\n\nwhen I receive [tick 2 v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setip 2 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    switch backdrop to (backdrop1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\ngo [backward v] (3) layers\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 2 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 I receive [coins v]\n\nwhen I receive [coins 2 v]\ndelete this clone\n\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\n@Sketch Coins 3\n\nwhen I receive [tick 2 v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setip 2 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    switch backdrop to (backdrop1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\ngo [backward v] (3) layers\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 2 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 I receive [coins v]\n\nwhen I receive [coins 3 v]\ndelete this clone\n\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\n@Sketch coins 4\n\nwhen I receive [tick 2 v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setip 2 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    switch backdrop to (backdrop1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\ngo [backward v] (3) layers\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 2 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 I receive [coins v]\n\nwhen I receive [coins 4 v]\ndelete this clone\n\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\n@Sketch Coines 5\n\nwhen I receive [tick 2 v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setip 2 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    switch backdrop to (backdrop1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\ngo [backward v] (3) layers\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 2 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 I receive [coins v]\n\nwhen I receive [coins 5 v]\ndelete this clone\n\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\n@Platforms Sketched\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick 2 v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setip 2 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    switch backdrop to (backdrop1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\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 2 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 I receive [menu show v]\nhide\n\n@Spikes2\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick 2 v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setip 2 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    switch backdrop to (backdrop1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\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 2 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 I receive [menu show v]\nhide\n\n@Sprite9\n\nwhen flag clicked\nshow\ngo to [back v] layer\nforever\n    set [ghost v] effect to (70)\n    turn right (.3) degrees\nend\n\nwhen I receive [level select v]\nhide\n\nwhen I receive [menu show v]\nshow\n\n@Sprite14\n\nwhen flag clicked\ngo to [front v] layer\n\nwhen I receive [level select v]\nhide\n\nwhen I receive [menu show v]\nshow\n\n