Jungle - A Scrolling Platformer
@Stage\n\nwhen flag clicked\nforever\n    play sound [Universe v] until done\nend\n\nwhen flag clicked\nforever\n    if <<key (space v) pressed?> and <(username) = [HawkwingX]>> then\n        change [coins v] by (10)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<not <([costume # v] of [the-green-dragon v]) = [3]>> and <<not <([costume # v] of [popuiar v]) = [3]>> and <<not <([costume # v] of [stratford james v]) = [3]>> and <<not <([costume # v] of [will_wam v]) = [3]>> and <<not <([costume # v] of [griffpatch v]) = [3]>> and <<not <([costume # v] of [thechaotic v]) = [3]>> and <not <([costume # v] of [timmccool v]) = [3]>>>>>>>> then\n        delete all of [equip list v]\n    end\nend\n\n@Player\n\ndefine Change Player Y By (sy)\nchange [player: y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <<touching (platforms v)?> or <touching (disapear platform v)?>>>\n    if <(sy) > [0]> then\n        change [player: y v] by (-1)\n    else\n        change [player: y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine Change Player X By (sx)\nchange [player: x v] by (sx)\nPosition\nif <<touching (platforms v)?> or <touching (disapear platform v)?>> then\n    repeat (12)\n        change [player: y v] by (1)\n        Position\n        if <not <<touching (platforms v)?> or <touching (disapear platform v)?>>> then\n            stop [this script v]\n        end\n    end\n    change [player: y v] by (-12)\n    if <<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]\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <<touching (platforms v)?> or <touching (disapear platform v)?>>>\n        if <(sx) > [0]> then\n            change [player: x v] by (-1)\n        else\n            change [player: x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Tick\ncreate clone of (_myself_ v)\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    point in direction (-90)\n    change [sx v] by (-2.2)\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    point in direction (90)\n    change [sx v] by (2.2)\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?>> then\n    if <(in air) < [4]> then\n        set [sy v] to [16]\n    end\nend\nif <(sy) > [-15]> then\n    change [sy v] by (-2)\nend\nChange Player Y By (sy)\nTest - Die\nchange [scroll x v] by (round (((Player: x) - (SCROLL X)) / (10)))\nset [add v] to (join (Coins) (join [ ] (join [/] (join [ ] (COLLECTED MAX)))))\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nchange [scroll y v] by (round (((Player: y) - (SCROLL Y)) / (10)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(Player: y) < [-180]> then\n    set [exit v] to [Die]\nend\nif <touching (trampolines v)?> then\n    set [sy v] to [35]\nend\n\ndefine Game On\nset [player: x v] to (Spawn X)\nset [player: y v] to (Spawn Y)\nset [scroll x v] to (Spawn X)\nset [scroll y v] to (Spawn Y)\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset [sx v] to [0]\npoint in direction (90)\nset size to (100) %\nset [ghost v] effect to (0)\nshow\n\ndefine Test - Die\nset [cando v] to [1]\nif <<<touching (obstacles v)?> or <touching (red v)?>> or <touching (sudden wave v)?>> then\n    set [exit v] to [Die]\n    set [have key v] to [0]\nend\n\ndefine Game - Win\nrepeat (50)\n    point towards (exit portal v)\n    turn right (65) degrees\n    move ((distance to [exit portal v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nhide\nbroadcast (New Start v)\nchange [level v] by (1)\nwait (1) seconds\n\ndefine Game - Die\nstart sound [explode_11 v]\nbroadcast (die v)\nset [exit v] to []\nrepeat (20)\n    change size by (-1)\n    change [ghost v] effect by (5)\nend\nclear graphic effects\nhide\n\ndefine Position\ngo to x: ((Player: x) - (SCROLL X)) y: ((Player: y) - (SCROLL Y))\n\nwhen I receive [play game v]\nset [level v] to [1]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Game On\n    repeat until <(EXIT) > []>\n        Tick\n        broadcast (Tick v)\n    end\n    if <(EXIT) = [Win]> then\n        Game - Win\n    else\n        Game - Die\n    end\nend\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\ngo [backward v] (1) layers\n\nwhen flag clicked\nset [spawn y v] to [0]\nset [spawn x v] to [0]\nset [score v] to [0]\nset [level v] to [1]\nbroadcast (Green Flag v) and wait\nbroadcast (Play Game v) and wait\n\nwhen I start as a clone\nif <(length of [equip list v]) = [0]> then\n    switch costume to (cloned v)\nend\nrepeat (10)\n    Position\n    change [color v] effect by (5)\n    change [ghost v] effect by (10)\n    change size by (-5)\nend\ndelete this clone\n\nwhen flag clicked\nswitch costume to (player v)\nset rotation style [left-right v]\n\nwhen flag clicked\nforever\n    if <[equip list v] contains [The-Green-Dragon]?> then\n        switch costume to (the-green-dragon v)\n        set size to (100) %\n    end\n    if <(length of [equip list v]) = [0]> then\n        set size to (100) %\n        switch costume to (player v)\n    end\n    if <[equip list v] contains [PopuIar]?> then\n        switch costume to (popuiar v)\n        set size to (100) %\n    end\n    if <[equip list v] contains [StratfordJames]?> then\n        switch costume to (stratfordjames v)\n        set size to (100) %\n    end\n    if <[equip list v] contains [Will_wam]?> then\n        switch costume to (will_wam v)\n        set size to (100) %\n    end\n    if <[equip list v] contains [Griffpatch]?> then\n        switch costume to (griffpatch v)\n        set size to (100) %\n    end\n    if <[equip list v] contains [TheChaotic]?> then\n        switch costume to (thechaotic v)\n        set size to (100) %\n    end\n    if <[equip list v] contains [TimMcCool]?> then\n        switch costume to (timmccool v)\n        set size to (100) %\n    end\nend\n\n@Check Point\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\ngo to [front v] layer\nPosition ((Exit Portal: x) - (SCROLL X)) ((Exit Portal: y) - (SCROLL Y))\nif <<touching (player v)?> and <(costume [number v]) = [2]>> then\n    set [spawn x v] to (Exit Portal: x)\n    set [spawn y v] to (Exit Portal: y)\n    set [check if checkpoint v] to [1]\nend\nif <(check if checkpoint) = [0]> then\n    switch costume to (nope v)\nelse\n    switch costume to (yup v)\nend\n\nwhen I receive [setup v]\nhide\nswitch costume to (nope v)\nset [exit portal: x v] to [800]\nset [exit portal: y v] to [40]\nClone At x: [800] y: [40]\nClone At x: [2300] y: [250]\nClone At x: [4100] y: [925]\nClone At x: [4736] y: [1300]\nClone At x: [6050] y: [850]\n\ndefine Position (x) (y)\ngo [backward v] (99) layers\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    go to [front v] layer\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)\nset [exit portal: x v] to (x)\nset [exit portal: y v] to (y)\n\nwhen I receive [new start v]\nset [check if checkpoint v] to [0]\n\n@Collectables\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nif <(already gotten) = [0]> then\n    Position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nend\nif <(type) = [clone]> then\n    if <touching (player v)?> then\n        set [already gotten v] to [1]\n        change [coins v] by (1)\n        start sound [Collect v]\n        delete this clone\n    end\nend\n\nwhen I receive [setup v]\nif <(cando) = [0]> then\n    set [type v] to [OG]\n    hide\n    switch costume to (coin v)\n    set [collected max v] to [0]\n    set [coins v] to [0]\n    set [x v] to [0]\n    set [y v] to [0]\n    Clone at x: [60] y: [50]\n    Clone at x: [110] y: [50]\n    Clone at x: [160] y: [50]\n    Clone at x: [210] y: [50]\n    Clone at x: [270] y: [-25]\n    Clone at x: [320] y: [15]\n    Clone at x: [370] y: [35]\n    Clone at x: [420] y: [15]\n    Clone at x: [470] y: [-25]\n    Clone at x: [1000] y: [130]\n    Clone at x: [1050] y: [130]\n    Clone at x: [1100] y: [130]\n    Clone at x: [1150] y: [130]\n    Clone at x: [1000] y: [170]\n    Clone at x: [1050] y: [170]\n    Clone at x: [1100] y: [170]\n    Clone at x: [1150] y: [170]\n    Clone at x: [1287] y: [100]\n    Clone at x: [1435] y: [0]\n    Clone at x: [1583] y: [45]\n    Clone at x: [1731] y: [90]\n    Clone at x: [1950] y: [170]\n    Clone at x: [2000] y: [170]\n    Clone at x: [2050] y: [170]\n    Clone at x: [2300] y: [170]\n    Clone at x: [2350] y: [170]\n    Clone at x: [2400] y: [170]\n    Clone at x: [2450] y: [170]\n    Clone at x: [2654] y: [380]\n    Clone at x: [2654] y: [430]\n    Clone at x: [2654] y: [480]\n    Clone at x: [3100] y: [870]\n    Clone at x: [3150] y: [870]\n    Clone at x: [3200] y: [870]\n    Clone at x: [3250] y: [870]\n    Clone at x: [3300] y: [870]\n    Clone at x: [3350] y: [870]\n    Clone at x: [3400] y: [870]\n    Clone at x: [3450] y: [870]\n    Clone at x: [3500] y: [870]\n    Clone at x: [3550] y: [870]\n    Clone at x: [3600] y: [870]\n    Clone at x: [5500] y: [1150]\n    Clone at x: [5550] y: [1150]\n    Clone at x: [5600] y: [1150]\n    Clone at x: [5650] y: [1150]\nend\n\ndefine Position (x) (y)\nif <(type) = [clone]> then\n    go to x: (x) y: (y)\n    if <<<(x) = (x position)> and <(y) = (y position)>> and <(already gotten) = [0]>> then\n        show\n    else\n        hide\n    end\nend\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 I start as a clone\nset [type v] to [clone]\n\nwhen flag clicked\nset [already gotten v] to [0]\n\nwhen flag clicked\nset [cando v] to [0]\n\n@Obstacles\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nif <not <<(costume [name v]) = [Spike]> or <(costume [name v]) = [Spike2]>>> then\n    Position ((Danger: x) - (SCROLL X)) ((Danger: y) - (SCROLL Y))\nend\n\nwhen I receive [setup v]\nhide\nset [danger: x v] to [0]\nset [danger: y v] to [0]\npoint in direction (90)\nif <(LEVEL) = [1]> then\n    switch costume to (lava v)\n    Clone At x: [500] y: [0] [Lava]\n    Clone At x: [910] y: [0] [Spike]\n    Clone At x: [2500] y: [250] [Spike]\n    Clone At x: [3311] y: [1000] [Chain]\n    Clone At x: [3600] y: [1000] [Chain]\n    Clone At x: [4369] y: [850] [Spike2]\n    Clone At x: [4369] y: [1050] [Spike2]\n    Clone At x: [4369] y: [950] [Chain]\n    Clone At x: [6107] y: [1000] [Chain]\n    Clone At x: [6600] y: [800] [Spike2]\n    Clone At x: [6800] y: [800] [Spike2]\n    Clone At x: [6800] y: [800] [Point]\nelse\n    hide\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\n    if <(costume [name v]) = [Spike]> then\n        set [spike sound v] to [1]\n    end\nelse\n    go to [back v] layer\n    hide\n    if <(costume [name v]) = [Spike]> then\n        set [spike sound v] to [0]\n    end\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone At x: (x) y: (y) (costume)\ncreate clone of (_myself_ v)\nset [danger: x v] to (x)\nset [danger: y v] to (y)\ngo to [back v] layer\nswitch costume to (costume)\n\nwhen flag clicked\npoint in direction (90)\nset [a v] to [-100]\n\nwhen flag clicked\nforever\n    if <<(costume [name v]) = [Lava]> or <(costume [name v]) = [Point]>> then\n        point in direction (90)\n    end\nend\n\nwhen I start as a clone\nforever\n    if <<(costume [name v]) = [Spike]> and <(spike sound) = [1]>> then\n        set volume to ((100) - ((distance to [player v]) / (3.5))) %\n    else\n        set volume to (0) %\n    end\nend\n\nwhen I start as a clone\npoint in direction (90)\nforever\n    if <(costume [name v]) = [Spike]> then\n        turn right (50) degrees\n        Position (((Danger: x) + (50)) - (SCROLL X)) (((a) + (Danger: y)) - (SCROLL Y))\n    end\n    if <(costume [name v]) = [Spike]> then\n        set [a v] to [-100]\n        repeat (10)\n            turn right (50) degrees\n            Position (((Danger: x) + (50)) - (SCROLL X)) (((a) + (Danger: y)) - (SCROLL Y))\n            change [a v] by (7)\n        end\n        repeat (10)\n            turn right (50) degrees\n            Position (((Danger: x) + (50)) - (SCROLL X)) (((a) + (Danger: y)) - (SCROLL Y))\n            change [a v] by (-7)\n        end\n    end\nend\n\nwhen flag clicked\npoint in direction (135)\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [Chain]> then\n        turn right (-8) degrees\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(costume [name v]) = [Chain]> then\n        turn right (-8) degrees\n    end\nend\n\nwhen I start as a clone\npoint in direction (90)\nforever\n    if <(costume [name v]) = [Spike2]> then\n        turn right (50) degrees\n        Position (((Danger: x) + (b)) - (SCROLL X)) ((Danger: y) - (SCROLL Y))\n    end\nend\n\nwhen flag clicked\nset [b v] to [0]\nforever\n    repeat (90)\n        change [b v] by (-5)\n    end\n    repeat (90)\n        change [b v] by (5)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [Spike2]> then\n        turn right (50) degrees\n        Position (((Danger: x) + (b)) - (SCROLL X)) ((Danger: y) - (SCROLL Y))\n    end\nend\n\n@Platforms\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((Platforms: x) - (SCROLL X)) ((Platforms: y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [platforms: x v] to [0]\nset [platforms: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (platform v)\n    Clone At x: [730] y: [0]\n    Clone At x: [210] y: [0]\n    Clone At x: [1100] y: [200]\n    Clone At x: [500] y: [0]\n    Clone At x: [800] y: [700]\n    Clone At x: [800] y: [0]\n    Clone At x: [0] y: [200]\n    Clone At x: [500] y: [200]\n    Clone At x: [500] y: [0]\n    Clone At x: [0] y: [-200]\n    Clone At x: [400] y: [0]\n    Clone At x: [400] y: [0]\n    Clone At x: [500] y: [0]\n    Clone At x: [-250] y: [-200]\n    Clone At x: [400] y: [0]\n    Clone At x: [400] y: [0]\n    Clone At x: [200] y: [0]\n    Clone At x: [0] y: [-400]\n    Clone At x: [0] y: [0]\n    Clone At x: [0] y: [-300]\n    Clone At x: [0] y: [890]\n    Clone At x: [-400] y: [0]\n    Clone At x: [0] y: [110]\n    Clone At x: [0] y: [110]\n    Clone At x: [400] y: [-220]\n    Clone At x: [0] y: [110]\n    Clone At x: [0] y: [110]\n    Clone At x: [-50] y: [0]\n    Clone At x: [-50] y: [-50]\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    if <not <<(costume [name v]) = [Break]> and <(touched) = [1]>>> then\n        show\n    end\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 [platforms: x v] by (x)\nchange [platforms: y v] by (y)\nnext costume\n\nwhen flag clicked\nset [level v] to [1]\nbroadcast (new start v)\n\nwhen flag clicked\nset [touched v] to [0]\nforever\n    if <<<(costume [name v]) = [Break]> and <touching (detect v)?>> and <(have key) = [1]>> then\n        set [touched v] to [1]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(costume [name v]) = [Break]> and <(touched) = [1]>> then\n        hide\n    end\nend\n\n@Particles\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((particle x) - (SCROLL X)) ((particle y) - (SCROLL Y))\n\nwhen I receive [setup v]\nset [ghost v] effect to (100)\nhide\nset [particle x v] to (pick random (300) to (470))\nset [particle y v] to [-100]\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    go to [back v] layer\n    show\nelse\n    go to [back v] layer\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)\nset [particle x v] to (x)\nset [particle y v] to (y)\ngo to [back v] layer\nnext costume\n\nwhen flag clicked\nforever\n    set [random position for x v] to (pick random (270) to (470))\n    switch costume to (lava v)\n    if <(show) = [1]> then\n        Clone At x: (random position for x) y: [-100]\n    end\nend\n\nwhen I start as a clone\nclear graphic effects\nchange [amount of clones v] by (1)\nset [color v] effect to (pick random (1) to (15))\nrepeat (50)\n    change [ghost v] effect by (3)\n    change [particle y v] by (5)\n    Position ((particle x) - (SCROLL X)) ((particle y) - (SCROLL Y))\nend\nchange [amount of clones v] by (-1)\ndelete this clone\n\nwhen flag clicked\nset [amount of clones v] to [0]\n\nwhen flag clicked\nset [show v] to [1]\n\n@Disapear platform\n\nwhen flag clicked\nset [test v] to [0]\nset [hi v] to [0]\nset [do not show v] to [0]\nset [ghost v] effect to (0)\n\nwhen I start as a clone\nforever\n    if <<(costume [name v]) = [Disapear]> and <touching (detect v)?>> then\n        set [ghost v] effect to (0)\n        set [do not show v] to [0]\n        if <(test) = [0]> then\n            change [test v] by (1)\n        end\n        set [timer1 v] to (timer)\n        set [hi v] to [0]\n        if <(test) = [1]> then\n            repeat until <((timer) - (timer1)) > [0.25]>\n                set [hi v] to [1]\n                change [ghost v] effect by (10)\n                wait (0.05) seconds\n            end\n            set [timer1 v] to (timer)\n            repeat until <((timer) - (timer1)) > [5]>\n                hide\n                set [do not show v] to [1]\n            end\n            set [do not show v] to [0]\n            set [test v] to [0]\n            repeat (13)\n                change [ghost v] effect by (-4)\n                wait (0.05) seconds\n            end\n            set [ghost v] effect to (0)\n        end\n    end\nend\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((disapear x) - (SCROLL X)) ((disapear y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [disapear x v] to [1300]\nset [disapear y v] to [0]\nClone At x: [1450] y: [-100] [Disapear]\nClone At x: [1600] y: [-50] [Disapear]\nClone At x: [1750] y: [0] [Disapear]\nClone At x: [1900] y: [50] [Disapear]\nClone At x: [2900] y: [370] [Disapear]\nClone At x: [3050] y: [500] [Disapear]\nClone At x: [2900] y: [600] [Disapear]\nClone At x: [3050] y: [650] [Disapear]\nClone At x: [2900] y: [700] [Disapear]\nClone At x: [2700] y: [0] [Disapear]\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    if <not <<(costume [name v]) = [Disapear]> and <(Do Not Show) = [1]>>> then\n        show\n    end\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone At x: (x) y: (y) (costume)\ncreate clone of (_myself_ v)\nset [disapear x v] to (x)\nset [disapear y v] to (y)\nset [costume v] to (costume)\nswitch costume to (costume)\n\nwhen flag clicked\nset [level v] to [1]\nbroadcast (new start v)\n\n@detect\n\nwhen flag clicked\nset size to (120) %\nforever\n    go to (player v)\n    set [ghost v] effect to (100)\nend\n\nset [ghost v] effect to (0)\n\n@red\n\nwhen I receive [green flag v]\nset size to (150) %\nhide\n\nwhen I receive [tick v]\nPosition ((red x) - (SCROLL X)) ((red y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [red x v] to [2100]\nset [red y v] to [200]\npoint in direction (90)\nif <(LEVEL) = [1]> then\n    switch costume to (lava v)\nelse\n    hide\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    go to [back v] layer\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)\nset [red x v] to (x)\nset [red y v] to (y)\ngo to [back v] layer\n\nwhen flag clicked\nset [costume num v] to [0]\n\nwhen flag clicked\nforever\n    repeat (19)\n        switch costume to (join [Lava] (costume num))\n        change [costume num v] by (1)\n    end\n    repeat (19)\n        switch costume to (join [Lava] (costume num))\n        change [costume num v] by (-1)\n    end\nend\n\nwhen I start as a clone\nforever\n    repeat (19)\n        switch costume to (join [Lava] (costume num))\n        change [costume num v] by (1)\n    end\n    repeat (19)\n        switch costume to (join [Lava] (costume num))\n        change [costume num v] by (-1)\n    end\nend\n\n@Art\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((artt x) - (SCROLL X)) ((artt y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [artt x v] to [0]\nset [artt y v] to [0]\npoint in direction (90)\nif <(LEVEL) = [1]> then\n    switch costume to (jungle v)\n    Clone At x: [625] y: [0]\n    Clone At x: [500] y: [100]\n    Clone At x: [800] y: [100]\n    Clone At x: [400] y: [0]\n    Clone At x: [350] y: [200]\n    Clone At x: [575] y: [450]\n    Clone At x: [200] y: [0]\n    Clone At x: [600] y: [-50]\n    Clone At x: [200] y: [0]\n    Clone At x: [-200] y: [300]\n    Clone At x: [200] y: [0]\n    Clone At x: [300] y: [200]\n    Clone At x: [200] y: [0]\n    Clone At x: [350] y: [-140]\n    Clone At x: [400] y: [0]\n    Clone At x: [400] y: [0]\n    Clone At x: [500] y: [0]\nelse\n    hide\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\n    go to [back v] layer\nelse\n    hide\n    go to [back v] layer\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone At x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [artt x v] by (x)\nchange [artt y v] by (y)\nnext costume\n\nClone At x: [550] y: [500]\n\n@Key\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((key x) - (SCROLL X)) ((key y) - (SCROLL Y))\nif <touching (player v)?> then\n    set [spawn x v] to (key x)\n    set [spawn y v] to (key y)\n    set [have key v] to [1]\n    set [already gotten v] to [1]\n    start sound [Collect v]\nend\n\nwhen I receive [setup v]\nif <(cando) = [0]> then\n    set [type v] to [OG]\n    hide\n    switch costume to (coin v)\n    set [key x v] to [0]\n    set [key y v] to [0]\n    Clone at x: [7288] y: [171]\nend\n\ndefine Position (x) (y)\nif <(type) = [clone]> then\n    go to x: (x) y: (y)\n    if <<<(x) = (x position)> and <(y) = (y position)>> and <(have key) = [0]>> then\n        show\n    else\n        hide\n    end\nend\n\ndefine Clone at x: (x) y: (y)\nset [key x v] to (x)\nset [key y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [type v] to [clone]\n\nwhen flag clicked\nset [already gotten v] to [0]\n\nwhen flag clicked\nset [have key v] to [0]\n\nwhen flag clicked\nforever\n    if <(have key) = [1]> then\n        hide\n    end\nend\n\n@Sudden Wave\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\n\nwhen I receive [setup v]\nhide\nset [wave x v] to [0]\nset [wave y v] to [0]\npoint in direction (90)\nif <(LEVEL) = [1]> then\n    switch costume to (lava v)\n    Clone At x: [7381] y: [172]\nelse\n    hide\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    go to [back v] layer\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)\nset [wave x v] to (x)\nset [wave y v] to (y)\ngo to [back v] layer\n\nwhen I start as a clone\nforever\n    Position ((wave x) - (SCROLL X)) ((wave y) - (SCROLL Y))\nend\n\nwhen flag clicked\nforever\n    if <(have key) = [1]> then\n        broadcast (wave v) and wait\n    end\nend\n\nwhen I receive [wave v]\nwait (2.5) seconds\nif <(SCROLL X) > [7186]> then\n    set [wave y v] to [172]\nend\nrepeat (80)\n    if <(wave y) < [800]> then\n        change [wave y v] by (4)\n        if <(have key) = [0]> then\n            set [wave y v] to [172]\n            stop [this script v]\n        end\n    end\nend\n\n@Diamond\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((diamond x) - (SCROLL X)) ((diamond y) - (SCROLL Y))\nif <touching (player v)?> then\n    set [have diamond v] to [1]\n    start sound [Collect v]\nend\n\nwhen I receive [setup v]\nif <(cando) = [0]> then\n    set [type v] to [OG]\n    hide\n    switch costume to (coin v)\n    set [diamond x v] to [0]\n    set [diamond y v] to [0]\n    Clone at x: [6996] y: [1059]\nend\n\ndefine Position (x) (y)\nif <(type) = [clone]> then\n    go to x: (x) y: (y)\n    if <<<(x) = (x position)> and <(y) = (y position)>> and <(have diamond) = [0]>> then\n        show\n    else\n        hide\n    end\nend\n\ndefine Clone at x: (x) y: (y)\nset [diamond x v] to (x)\nset [diamond y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [type v] to [clone]\n\nwhen flag clicked\nset [have diamond v] to [0]\n\nwhen flag clicked\nforever\n    if <(have diamond) = [1]> then\n        hide\n    end\nend\n\n@Win ScreenSprite1\n\nwhen flag clicked\nhide\nforever\n    go [forward v] (10000000000000) layers\n    if <(have diamond) = [1]> then\n        show\n        set [ghost v] effect to (100)\n        repeat (20)\n            go [forward v] (10000000000000) layers\n            change [ghost v] effect by (-5)\n        end\n        forever\n            set [ghost v] effect to (0)\n        end\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (100)\n    go [forward v] (999999999999999999999999) layers\nend\n\nsay [Hello!] for (2) seconds\n\n@Button GUI\n\nwhen flag clicked\ngo to x: (-1) y: (-2)\nset [open shop v] to [0]\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        set [open shop v] to [1]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (20)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\n@Shop GUI\n\nwhen flag clicked\nforever\n    if <(open shop) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\n@X GUI\n\nwhen flag clicked\nset size to (25) %\n\nwhen flag clicked\nforever\n    if <(open shop) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (20)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        set [open shop v] to [0]\n    end\nend\n\n@The-Green-Dragon\n\nwhen flag clicked\nswitch costume to (the-green-dragon v)\ngo to x: (-212) y: (143)\nset size to (15) %\n\nwhen flag clicked\nforever\n    if <(open shop) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (20)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\nset [costume v] to [100000]\nforever\n    if <<<touching (mouse-pointer v)?> and <mouse down?>> and <(costume [number v]) > [1]>> then\n        change [costume v] by (1)\n        wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n    end\n    if <<<<touching (mouse-pointer v)?> and <mouse down?>> and <(Coins) > [9]>> and <(costume [number v]) = [1]>> then\n        change [coins v] by (-10)\n        add [The-Green-Dragon] to [what bought? v]\n        switch costume to (equip? v)\n    end\n    if <(costume) = [2]> then\n        set [costume v] to [0]\n    end\nend\n\nwhen flag clicked\ndelete all of [equip list v]\nforever\n    if <(costume) = [1]> then\n        delete all of [equip list v]\n        add [The-Green-Dragon] to [equip list v]\n        switch costume to (equipped v)\n        wait until <(costume) = [0]>\n    end\n    if <(costume) = [0]> then\n        switch costume to (equip? v)\n        wait until <(costume) = [1]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <<not <[equip list v] contains [The-Green-Dragon]?>> and <[what bought? v] contains [The-Green-Dragon]?>> then\n        set [costume v] to [0]\n        wait until <[equip list v] contains [The-Green-Dragon]?>\n    end\nend\n\n@PopuIar\n\nwhen flag clicked\ngo to x: (-143) y: (143)\nset size to (60) %\nswitch costume to (popuiar v)\nforever\n    if <(open shop) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (20)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\nset [costume v] to [100000]\nforever\n    if <(costume) = [2]> then\n        set [costume v] to [0]\n    end\n    if <<<touching (mouse-pointer v)?> and <mouse down?>> and <(costume [number v]) > [1]>> then\n        change [costume v] by (1)\n        wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n    end\n    if <<<<touching (mouse-pointer v)?> and <mouse down?>> and <(Coins) > [9]>> and <(costume [number v]) = [1]>> then\n        change [coins v] by (-10)\n        add [PopuIar] to [what bought? v]\n        switch costume to (equip? v)\n    end\nend\n\nwhen flag clicked\ndelete all of [what bought? v]\ndelete all of [equip list v]\nforever\n    if <(costume) = [1]> then\n        delete all of [equip list v]\n        add [PopuIar] to [equip list v]\n        switch costume to (equipped v)\n        wait until <(costume) = [0]>\n    end\n    if <(costume) = [0]> then\n        switch costume to (equip? v)\n        wait until <(costume) = [1]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <<not <[equip list v] contains [PopuIar]?>> and <[what bought? v] contains [PopuIar]?>> then\n        set [costume v] to [0]\n        wait until <[equip list v] contains [PopuIar]?>\n    end\nend\n\n@Stratford James\n\nwhen flag clicked\nswitch costume to (costume4 v)\ngo to x: (-75) y: (143)\nset size to (11) %\n\nwhen flag clicked\nforever\n    if <(open shop) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (20)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\ndelete all of [what bought? v]\ndelete all of [equip list v]\nforever\n    if <(costume) = [1]> then\n        delete all of [equip list v]\n        add [StratfordJames] to [equip list v]\n        switch costume to (equiped v)\n        wait until <(costume) = [0]>\n    end\n    if <(costume) = [0]> then\n        switch costume to (equip? v)\n        wait until <(costume) = [1]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <<not <[equip list v] contains [StratfordJames]?>> and <[what bought? v] contains [StratfordJames]?>> then\n        set [costume v] to [0]\n        wait until <[equip list v] contains [StratfordJames]?>\n    end\nend\n\nwhen flag clicked\nset [costume v] to [100000]\nforever\n    if <(costume) = [2]> then\n        set [costume v] to [0]\n    end\n    if <<<touching (mouse-pointer v)?> and <mouse down?>> and <(costume [number v]) > [1]>> then\n        change [costume v] by (1)\n        wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n    end\n    if <<<<touching (mouse-pointer v)?> and <mouse down?>> and <(Coins) > [9]>> and <(costume [number v]) = [1]>> then\n        change [coins v] by (-10)\n        add [StratfordJames] to [what bought? v]\n        switch costume to (equip? v)\n    end\nend\n\n@Will_Wam\n\nwhen flag clicked\nforever\n    if <(open shop) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (20)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\ndelete all of [what bought? v]\ndelete all of [equip list v]\nforever\n    if <(costume) = [1]> then\n        delete all of [equip list v]\n        add [Will_wam] to [equip list v]\n        switch costume to (equiped v)\n        wait until <(costume) = [0]>\n    end\n    if <(costume) = [0]> then\n        switch costume to (equip? v)\n        wait until <(costume) = [1]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <<not <[equip list v] contains [Will_wam]?>> and <[what bought? v] contains [Will_wam]?>> then\n        set [costume v] to [0]\n        wait until <[equip list v] contains [Will_wam]?>\n    end\nend\n\nwhen flag clicked\nset [costume v] to [100000]\nforever\n    if <(costume) = [2]> then\n        set [costume v] to [0]\n    end\n    if <<<touching (mouse-pointer v)?> and <mouse down?>> and <(costume [number v]) > [1]>> then\n        change [costume v] by (1)\n        wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n    end\n    if <<<<touching (mouse-pointer v)?> and <mouse down?>> and <(Coins) > [9]>> and <(costume [number v]) = [1]>> then\n        change [coins v] by (-10)\n        add [Will_wam] to [what bought? v]\n        switch costume to (equip? v)\n    end\nend\n\nwhen flag clicked\nswitch costume to (will_wam v)\ngo to x: (-6) y: (143)\nset size to (50) %\n\n@Griffpatch\n\nwhen flag clicked\nswitch costume to (griffpatch v)\ngo to x: (58) y: (143)\nset size to (50) %\n\nwhen flag clicked\nforever\n    if <(open shop) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (20)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\ndelete all of [what bought? v]\ndelete all of [equip list v]\nforever\n    if <(costume) = [1]> then\n        delete all of [equip list v]\n        add [Griffpatch] to [equip list v]\n        switch costume to (equiped v)\n        wait until <(costume) = [0]>\n    end\n    if <(costume) = [0]> then\n        switch costume to (equip? v)\n        wait until <(costume) = [1]>\n    end\nend\n\nwhen flag clicked\nset [costume v] to [100000]\nforever\n    if <(costume) = [2]> then\n        set [costume v] to [0]\n    end\n    if <<<touching (mouse-pointer v)?> and <mouse down?>> and <(costume [number v]) > [1]>> then\n        change [costume v] by (1)\n        wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n    end\n    if <<<<touching (mouse-pointer v)?> and <mouse down?>> and <(Coins) > [19]>> and <(costume [number v]) = [1]>> then\n        change [coins v] by (-20)\n        add [Griffpatch] to [what bought? v]\n        switch costume to (equip? v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<not <[equip list v] contains [Griffpatch]?>> and <[what bought? v] contains [Griffpatch]?>> then\n        set [costume v] to [0]\n        wait until <[equip list v] contains [Griffpatch]?>\n    end\nend\n\n@TheChaotic\n\nwhen flag clicked\nswitch costume to (thechaotic v)\ngo to x: (137) y: (143)\nset size to (45) %\n\nwhen flag clicked\nforever\n    if <(open shop) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (20)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\ndelete all of [what bought? v]\ndelete all of [equip list v]\nforever\n    if <(costume) = [1]> then\n        delete all of [equip list v]\n        add [TheChaotic] to [equip list v]\n        switch costume to (equiped v)\n        wait until <(costume) = [0]>\n    end\n    if <(costume) = [0]> then\n        switch costume to (equip? v)\n        wait until <(costume) = [1]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <<not <[equip list v] contains [TheChaotic]?>> and <[what bought? v] contains [TheChaotic]?>> then\n        set [costume v] to [0]\n        wait until <[equip list v] contains [TheChaotic]?>\n    end\nend\n\nwhen flag clicked\nset [costume v] to [100000]\nforever\n    if <(costume) = [2]> then\n        set [costume v] to [0]\n    end\n    if <<<touching (mouse-pointer v)?> and <mouse down?>> and <(costume [number v]) > [1]>> then\n        change [costume v] by (1)\n        wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n    end\n    if <<<<touching (mouse-pointer v)?> and <mouse down?>> and <(Coins) > [9]>> and <(costume [number v]) = [1]>> then\n        change [coins v] by (-10)\n        add [TheChaotic] to [what bought? v]\n        switch costume to (equip? v)\n    end\nend\n\n@TimMcCool\n\nwhen flag clicked\nswitch costume to (timmccool v)\ngo to x: (210) y: (143)\nset size to (15) %\n\nwhen flag clicked\nforever\n    if <(open shop) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (20)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\ndelete all of [equip list v]\nforever\n    if <(costume) = [1]> then\n        delete all of [equip list v]\n        add [TimMcCool] to [equip list v]\n        switch costume to (equiped v)\n        wait until <(costume) = [0]>\n    end\n    if <(costume) = [0]> then\n        switch costume to (equip? v)\n        wait until <(costume) = [1]>\n    end\nend\n\nwhen flag clicked\nset [costume v] to [100000]\nforever\n    if <<<touching (mouse-pointer v)?> and <mouse down?>> and <(costume [number v]) > [1]>> then\n        change [costume v] by (1)\n        wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n    end\n    if <<<<touching (mouse-pointer v)?> and <mouse down?>> and <(Coins) > [9]>> and <(costume [number v]) = [1]>> then\n        change [coins v] by (-10)\n        add [TimMcCool] to [what bought? v]\n        switch costume to (equip? v)\n    end\n    if <(costume) = [2]> then\n        set [costume v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<not <[equip list v] contains [TimMcCool]?>> and <[what bought? v] contains [TimMcCool]?>> then\n        set [costume v] to [0]\n        wait until <[equip list v] contains [TimMcCool]?>\n    end\nend\n\n
I have been working on this game for quite a while. I even put in a shop with some famous scratchers on it!\nPlay HERE for less lag and smoother gameplay: https://turbowarp.org/487484756\n================INSTRUCTIONS=============\n  W A S D or Arrow Keys\n  \n  You need the key to open up the Diamond place.\n\n  Follow me: @HawkwingX\n\n  Subscribe to cubeow on youtube\n\n=================CREDITS=================\nThanks to @griffpatch for the scrolling engine!\nThanks to @The-Green-Dragon, @PopuIar, @StratfordJames, @Griffpatch, @The_Chaotic, and @TimMcCool for their profile pictures\nThanks to MonsterCat for the Universe Music\nThanks to Geometry Dash for the Death sound effect \nThe rest of the code is by me.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nIf you can't beat it, just see this: https://www.youtube.com/watch?v=r4xTLzJTeiQ