The Wild West || A Scrolling Platformer Collab

Instructions: [Arrow Keys] or [WASD] - Move\n[Space] - Attack

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [play game v]\nclear graphic effects\nswitch backdrop to (costume4 v)\nstop all sounds\nforever\n    play sound [The Good the Bad and the Ugly Main Theme Ennio Morricone v] until done\nend\n\nwhen I receive [before start v]\nswitch backdrop to (backdrop2 v)\nset [ghost v] effect to (50)\nplay sound [the-way-forward-x-soho v] until done\n\n@Blank\n\n@Player\n\nwhen I receive [play game v]\nset [usedskip v] to [0]\nset [mobileskip v] to [0]\nset [level v] to [1]\nshow\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Game on\n    repeat until <<<(EXIT) > []> or <key (p v) pressed?>> or <(mobileskip) = [1]>>\n        Tick\n        broadcast (Tick v)\n    end\n    if <<key (p v) pressed?> and <not <(level) = [6]>>> then\n        set [exit v] to [A win win]\n        set [usedskip v] to [1]\n    end\n    if <<(mobileskip) = [1]> and <not <(level) = [6]>>> then\n        set [exit v] to [A win win]\n        set [usedskip v] to [1]\n    end\n    if <(EXIT) = [A win win]> then\n        broadcast (win YOO XD v)\n        GameWinYOO\n        set [mobileskip v] to [0]\n    else\n        Game - die boi boi I’m fed\n    end\nend\n\ndefine Game on\nswitch costume to (1 v)\nset rotation style [left-right v]\npoint in direction (-90)\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [x v] to [-180]\nset [y v] to [78]\nset [speedy v] to [0]\nset [sx v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset size to (100) %\nset [ghost v] effect to (0)\nshow\n\ndefine Tick\nswitch costume to (hitbox v)\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<<mouse down?> and <(mouse x) > (x position)>> and <<(touchingattack?) = [0]> and <(moveable) = [1]>>>> then\n    set [lastkeypressed v] to [right]\n    change [sx v] by (2)\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<<mouse down?> and <(mouse x) < (x position)>> and <(moveable) = [1]>>> then\n    set [lastkeypressed v] to [left]\n    change [sx v] by (-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 <(x) < [-220]> then\n    set [x v] to [-220]\nend\nif <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n    if <(In air) < [4]> then\n        set [speedy v] to [16]\n    end\nend\nif <<<mouse down?> and <(y position) < (mouse y)>> and <(moveable) = [1]>> then\n    if <(In air) < [4]> then\n        set [speedy v] to [16]\n    end\nend\nif <(Speedy) > [-20]> then\n    change [speedy v] by (-1.5)\nend\nChange player y by (Speedy)\nDie? I think so\nchange [scroll x v] by (round (((x) - (SCROLL X)) / (8)))\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (6)))\nPosition\nif <touching (trampoline v)?> then\n    set [speedy v] to [30]\nend\npoint in direction (90)\nif <(Equipped) = [none]> then\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<<mouse down?> and <(mouse x) > (x position)>> and <(moveable) = [1]>>>> then\n        if <<(lastkeypressed) = [left]> and <<mouse down?> and <(mouse x) > (x position)>>> then\n            switch costume to (normalleft v)\n        else\n            switch costume to (normalright v)\n        end\n    else\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<<mouse down?> and <(mouse x) < (x position)>> and <(moveable) = [1]>>> then\n            switch costume to (normalleft v)\n        else\n            switch costume to (normalfront v)\n        end\n    end\nend\nif <(Equipped) = [mask]> then\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<<mouse down?> and <(mouse x) > (x position)>> and <(moveable) = [1]>>>> then\n        switch costume to (maskright v)\n    else\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<<mouse down?> and <(mouse x) < (x position)>> and <(moveable) = [1]>>> then\n            switch costume to (maskleft v)\n        else\n            switch costume to (maskfront v)\n        end\n    end\nend\nif <(Equipped) = [sheriff]> then\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<<mouse down?> and <(mouse x) > (x position)>> and <(moveable) = [1]>>>> then\n        switch costume to (sheriffright v)\n    else\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<<mouse down?> and <(mouse x) < (x position)>> and <(moveable) = [1]>>> then\n            switch costume to (sheriffleft v)\n        else\n            switch costume to (sherifffront v)\n        end\n    end\nend\nif <(Equipped) = [cat]> then\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<<mouse down?> and <(mouse x) > (x position)>> and <(moveable) = [1]>>>> then\n        switch costume to (catright v)\n    else\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<<mouse down?> and <(mouse x) < (x position)>> and <(moveable) = [1]>>> then\n            switch costume to (catleft v)\n        else\n            switch costume to (catfront v)\n        end\n    end\nend\nif <(Equipped) = [demon]> then\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<<mouse down?> and <(mouse x) > (x position)>> and <(moveable) = [1]>>>> then\n        switch costume to (demonright v)\n    else\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<<mouse down?> and <(mouse x) < (x position)>> and <(moveable) = [1]>>> then\n            switch costume to (demonleft v)\n        else\n            switch costume to (demonfront v)\n        end\n    end\nend\n\ndefine Change player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <<touching (levels v)?> or <touching (moving platforms v)?>>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [speedy 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 (levels v)?> or <touching (moving platforms v)?>> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <<touching (levels v)?> or <touching (moving platforms v)?>>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    repeat until <not <<touching (levels v)?> or <touching (moving platforms v)?>>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Game - die boi boi I’m fed\nset [dead v] to [1]\nset [ghost v] effect to (0)\nstart sound [Bonk v]\nset [yvel v] to [15]\nif <(Equipped) = [none]> then\n    switch costume to (normalfront v)\nend\nif <(Equipped) = [mask]> then\n    switch costume to (maskfront v)\nend\nif <(Equipped) = [sheriff]> then\n    switch costume to (sherifffront v)\nend\nif <(Equipped) = [cat]> then\n    switch costume to (catfront v)\nend\nif <(Equipped) = [demon]> then\n    switch costume to (demonfront v)\nend\nrepeat until <(y position) < [-90]>\n    set rotation style [all around v]\n    change [ghost v] effect by (3)\n    turn right (10) degrees\n    change y by (yVel)\n    change [yvel v] by (-1)\nend\nrepeat until <(y position) < [-178]>\n    set rotation style [all around v]\n    change [ghost v] effect by (5)\n    turn right (10) degrees\n    change y by (yVel)\n    change [yvel v] by (-1)\nend\nset [dead v] to [0]\nbroadcast (ded boiz v)\nhide\nchange [mytotalcoins v] by ((Collect) * (-1))\n\ndefine Die? I think so\nif <<touching (obstacles v)?> or <<touching (poison v)?> or <<touching (bad guys v)?> and <(invincible) = [0]>>>> then\n    broadcast (HIDEWHIP v)\n    set [exit v] to [Die \(other way\)]\nend\n\ndefine GameWinYOO\nif <<<key (p v) pressed?> or <(mobileskip) = [1]>> and <not <(level) = [6]>>> then\n    change [level v] by (1)\nelse\n    set rotation style [all around v]\n    repeat (20)\n        point towards (goal v)\n        turn right (65) degrees\n        move ((distance to [goal v]) / (2)) steps\n        change size by (-2)\n        change [ghost v] effect by (5)\n    end\n    change [level v] by (1)\n    set [guyskilledthislevel v] to [0]\n    hide\n    set [ghost v] effect to (0)\n    set size to (100) %\nend\n\nwhen flag clicked\nset [dead v] to [0]\nhide\n\n@Levels\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nset [y v] to [0]\nset [x v] to [0]\nif <(level) = [1]> then\n    switch costume to (1 1 v)\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\nelse\n    if <(level) = [2]> then\n        switch costume to (2 1 v)\n        Position x: [450] y: [0]\n        Position x: [450] y: [0]\n    else\n        if <(level) = [3]> then\n            switch costume to (3 1 v)\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n        else\n            if <(level) = [4]> then\n                switch costume to (4 1 v)\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n            else\n                if <(level) = [5]> then\n                    switch costume to (5 1 v)\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                else\n                    if <(level) = [6]> then\n                        switch costume to (6 v)\n                        Position x: [450] y: [0]\n                    end\n                end\n            end\n        end\n    end\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 Position x: (x) y: (y)\nhide\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\nhide\n\n@Obstacles\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nhide\ngo to [back v] layer\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\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 [setup v]\nset [y v] to [0]\nset [x v] to [0]\nif <(level) = [1]> then\n    switch costume to (1 1 v)\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\nelse\n    if <(level) = [2]> then\n        switch costume to (2 1 v)\n        Position x: [450] y: [0]\n        Position x: [450] y: [0]\n        Position x: [450] y: [0]\n    else\n        if <(level) = [3]> then\n            switch costume to (3 1 v)\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n        else\n            if <(level) = [4]> then\n                switch costume to (4 1 v)\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n            else\n                if <(level) = [5]> then\n                    switch costume to (5 1 v)\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                else\n                    if <(level) = [6]> then\n                        switch costume to (6 v)\n                        Position x: [450] y: [0]\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Position x: (x) y: (y)\nhide\nset [brightness v] effect to (-10)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\n@Coins\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <touching (player v)?> then\n    start sound [Coin v]\n    change [collect v] by (1)\n    change [mytotalcoins v] by (1)\n    if <<(Collect) = (Max Collect)> and <(badguysded) = (badGuyMax)>> then\n        broadcast (OPEN PORtAL v)\n    end\n    delete this clone\nend\n\nwhen I receive [setup v]\nhide\nset [ghost v] effect to (0)\nset size to (100) %\nset [y v] to [0]\nset [x v] to [0]\nset [collect v] to [0]\nset [max collect v] to [0]\nif <(level) = [1]> then\n    wait (0) seconds\n    Clone x: [0] y: [30]\n    Clone x: [450] y: [0]\n    Clone x: [650] y: [100]\n    Clone x: [970] y: [60]\nelse\n    if <(level) = [2]> then\n        wait (0) seconds\n        Clone x: [180] y: [130]\n        Clone x: [600] y: [60]\n        Clone x: [630] y: [200]\n        Clone x: [500] y: [400]\n    else\n        if <(level) = [3]> then\n            wait (0) seconds\n            Clone x: [300] y: [50]\n            Clone x: [600] y: [170]\n            Clone x: [930] y: [50]\n            Clone x: [950] y: [400]\n            Clone x: [1400] y: [400]\n            change [max collect v] by (-2)\n        else\n            if <(level) = [4]> then\n                wait (0) seconds\n                Clone x: [100] y: [150]\n                Clone x: [250] y: [250]\n                Clone x: [500] y: [200]\n                Clone x: [1030] y: [-30]\n                change [max collect v] by (-2)\n            else\n                if <(level) = [5]> then\n                    wait (0) seconds\n                    Clone x: [0] y: [400]\n                    Clone x: [270] y: [200]\n                    Clone x: [350] y: [300]\n                    Clone x: [900] y: [400]\n                    Clone x: [1400] y: [30]\n                    change [max collect v] by (-4)\n                else\n                    if <(level) = [6]> then\n                    end\n                end\n            end\n        end\n    end\nend\nset [y v] to [-99999999999]\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 x: (x) y: (y)\nset [ghost v] effect to (0)\nset size to (100) %\nset [x v] to (x)\nset [y v] to (y)\nchange [max collect v] by (1)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [mytotalcoins v] to [0]\nhide\n\n@Goal\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <<(costume [name v]) = [1]> and <touching (player v)?>> then\n    set [exit v] to [A win win]\nend\n\nwhen I receive [setup v]\nhide\nset [y v] to [0]\nset [x v] to [0]\nwait (0) seconds\nif <(level) = [1]> then\n    switch costume to (2 v)\n    Portal x: [1200] y: [30]\nelse\n    if <(level) = [2]> then\n        switch costume to (2 v)\n        Portal x: [1070] y: [250]\n    else\n        if <(level) = [3]> then\n            switch costume to (2 v)\n            Portal x: [1600] y: [300]\n        else\n            if <(level) = [4]> then\n                switch costume to (2 v)\n                Portal x: [1485] y: [200]\n            else\n                if <(level) = [5]> then\n                    switch costume to (2 v)\n                    Portal x: [1750] y: [170]\n                else\n                    switch costume to (2 v)\n                    Portal x: [5634563456456345] y: [57345634563]\n                end\n            end\n        end\n    end\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\ndefine Portal x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [open portal v]\nswitch costume to (1 v)\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\ngo to [back v] layer\nshow\n\n@Deco\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nhide\nset [ghost v] effect to (100)\ngo [backward v] (50) layers\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\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 [setup v]\nset [y v] to [0]\nset [x v] to [0]\nif <(level) = [1]> then\n    switch costume to (1 1 v)\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\nelse\n    if <(level) = [2]> then\n        switch costume to (2 1 v)\n        Position x: [450] y: [0]\n        Position x: [450] y: [0]\n        Position x: [450] y: [0]\n    else\n        if <(level) = [3]> then\n            switch costume to (3 1 v)\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n        else\n            if <(level) = [4]> then\n                switch costume to (4 1 v)\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n            else\n                if <(level) = [5]> then\n                    switch costume to (5 1 v)\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                else\n                    if <(level) = [6]> then\n                        switch costume to (6 v)\n                        Position x: [450] y: [0]\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Position x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I start as a clone\nset [ghost v] effect to (0)\ngo to [back v] layer\n\n@Level Shading\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nhide\ngo to [back v] layer\nset [ghost v] effect to (100)\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\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 [setup v]\nset [y v] to [0]\nset [x v] to [0]\nif <(level) = [1]> then\n    switch costume to (1 1 v)\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\nelse\n    if <(level) = [2]> then\n        switch costume to (2 1 v)\n        Position x: [450] y: [0]\n        Position x: [450] y: [0]\n        Position x: [450] y: [0]\n    else\n        if <(level) = [3]> then\n            switch costume to (3 1 v)\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n        else\n            if <(level) = [4]> then\n                switch costume to (4 1 v)\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n                Position x: [450] y: [0]\n            else\n                if <(level) = [5]> then\n                    switch costume to (5 1 v)\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                    Position x: [450] y: [0]\n                else\n                    if <(level) = [6]> then\n                        switch costume to (6 v)\n                        Position x: [450] y: [0]\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Position x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\nhide\n\nwhen I start as a clone\nset [ghost v] effect to (70)\n\n@poison\n\nwhen I start as a clone\ngo [backward v] (1) layers\nforever\n    set [y v] to (([sin v] of ((timer) * (100)) ) * (10))\nend\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\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 [setup v]\nset [y v] to [0]\nset [x v] to [0]\nrepeat (20)\n    Position x: [450] y: [0]\nend\n\ndefine Position x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\nhide\ngo to [back v] layer\n\nwhen I receive [reset v]\ndelete this clone\n\n@Trampoline\n\nwhen I start as a clone\nshow\nswitch costume to (1 v)\nforever\n    if <<touching (player v)?> and <(dead) = [0]>> then\n        start sound [Big Boing v]\n        repeat (5)\n            next costume\n        end\n        repeat (5)\n            switch costume to ((costume [number v]) - (1))\n        end\n    end\nend\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [reset v]\ndelete this clone\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\ndefine Clone 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 receive [setup v]\nhide\nset [y v] to [0]\nset [x v] to [0]\nwait (0) seconds\nif <(level) = [2]> then\n    Clone x: [720] y: [-42]\nelse\n    if <(level) = [3]> then\n        Clone x: [1140] y: [62]\n        Clone x: [1410] y: [62]\n    else\n        if <(level) = [4]> then\n            Clone x: [390] y: [-58]\n            Clone x: [1420] y: [-58]\n        else\n            if <(level) = [5]> then\n                Clone x: [260] y: [43]\n                Clone x: [1280] y: [19]\n            end\n        end\n    end\nend\nset [y v] to [-99999999999]\n\nwhen flag clicked\nhide\ngo to [back v] layer\n\n@Bad Guys\n\nwhen I receive [setup v]\nhide\nset [y v] to [0]\nset [x v] to [0]\nset [badguysded v] to [0]\nset [badguymax v] to [0]\nwait (0) seconds\nif <(level) = [3]> then\n    Clone x: [25] y: [-59]\n    Clone x: [1020] y: [295]\nelse\n    if <(level) = [4]> then\n        Clone x: [780] y: [110]\n        Clone x: [1290] y: [148]\n    else\n        if <(level) = [5]> then\n            Clone x: [-215] y: [413]\n            Clone x: [1585] y: [105]\n        end\n    end\nend\nset [y v] to [-99999999999]\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [reset v]\nchange [mytotalcoins v] by ((guyskilledthislevel) * (-1))\nset [guyskilledthislevel v] to [0]\ndelete this clone\n\nwhen flag clicked\nhide\ngo to [back v] layer\nset [invincible v] to [0]\n\ndefine Clone x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\nchange [badguymax v] by (1)\nset [badguycos v] to [0]\ncreate clone of (_myself_ v)\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I start as a clone\nif <(size) = [100]> then\n    show\n    set rotation style [left-right v]\n    forever\n        point in direction (90)\n        set [badguycos v] to [1]\n        wait (1) seconds\n        set [badguycos v] to [2]\n        repeat (10)\n            if <not <touching (whip v)?>> then\n                change [x v] by (4)\n            end\n        end\n        set [badguycos v] to [1]\n        wait (1) seconds\n        set [badguycos v] to [3]\n        repeat (10)\n            if <not <touching (whip v)?>> then\n                change [x v] by (-4)\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(size) = [100]> then\n    forever\n        switch costume to (hitbox v)\n        if <touching (whip v)?> then\n            set [invincible v] to [1]\n            change [badguysded v] by (1)\n            if <<(Collect) = (Max Collect)> and <(badguysded) = (badGuyMax)>> then\n                broadcast (OPEN PORtAL v)\n            end\n            switch costume to (badGuyCos)\n            start sound [Bonk v]\n            set size to (50) %\n            create clone of (_myself_ v)\n            set size to (100) %\n            change [guyskilledthislevel v] by (1)\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            set [invincible v] to [0]\n            delete this clone\n        end\n        switch costume to (badGuyCos)\n    end\nend\n\nwhen I start as a clone\nif <(size) = [50]> then\n    change [mytotalcoins v] by (1)\n    switch costume to (coin v)\n    set size to (100) %\n    repeat (10)\n        change [y v] by (10)\n        change [ghost v] effect by (10)\n        change size by (((140) - (size)) / (2))\n    end\n    change [y v] by (-100)\n    delete this clone\nend\n\n@Whip\n\nwhen I receive [tick v]\ngo to (player v)\n\nwhen flag clicked\nset [lastkeypressed v] to [right]\nset [latestdir v] to [45]\nforever\n    if <<([costume # v] of [player v]) = [2]> or <<([costume # v] of [player v]) = [5]> or <<([costume # v] of [player v]) = [8]> or <<([costume # v] of [player v]) = [11]> or <([costume # v] of [player v]) = [14]>>>>> then\n        set [whipdirection v] to (latestdir)\n    else\n        if <(lastkeypressed) = [right]> then\n            set [whipdirection v] to [45]\n        else\n            if <(lastkeypressed) = [left]> then\n                set [whipdirection v] to [-45]\n            end\n        end\n    end\n    set [latestdir v] to (whipDirection)\nend\n\nwhen I receive [play game v]\ngo to [back v] layer\nswitch costume to (costume1 v)\ngo [forward v] (10) layers\nhide\nforever\n    go to x: (0) y: (0)\n    if <<key (space v) pressed?> and <(dead) = [0]>> then\n        set [ghost v] effect to (100)\n        show\n        if <(whipDirection) = [45]> then\n            point in direction (45)\n        else\n            point in direction (-45)\n        end\n        switch costume to (costume1 v)\n        repeat (5)\n            change [ghost v] effect by (-20)\n        end\n        if <(whipDirection) = [45]> then\n            repeat until <(direction) > [120]>\n                turn right (((130) - (direction)) / (4)) degrees\n                switch costume to (costume2 v)\n            end\n        else\n            repeat until <(direction) < [-120]>\n                turn right (((-130) - (direction)) / (4)) degrees\n                switch costume to (costume3 v)\n            end\n        end\n        switch costume to (costume2 v)\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        hide\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen I receive [hidewhip v]\nhide\n\nwhen I receive [attack v]\nset [ghost v] effect to (100)\nshow\nif <(whipDirection) = [45]> then\n    point in direction (45)\nelse\n    point in direction (-45)\nend\nswitch costume to (costume1 v)\nrepeat (5)\n    change [ghost v] effect by (-20)\nend\nif <(whipDirection) = [45]> then\n    repeat until <(direction) > [120]>\n        turn right (((130) - (direction)) / (4)) degrees\n        switch costume to (costume2 v)\n    end\nelse\n    repeat until <(direction) < [-120]>\n        turn right (((-130) - (direction)) / (4)) degrees\n        switch costume to (costume3 v)\n    end\nend\nswitch costume to (costume2 v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nset [ghost v] effect to (0)\n\nwhen I receive [reset v]\nset [lastkeypressed v] to [right]\n\n@Background\n\ndefine heyo\nrepeat (3)\n    create clone of (_myself_ v)\n    next costume\nend\n\nwhen flag clicked\nset [ghost v] effect to (0)\nhide\n\nwhen I start as a clone\nshow\nforever\n    go to [back v] layer\n    go to x: ((((costume [number v]) - (1)) * (480)) + ((SCROLL X) / (-5))) y: ((SCROLL Y) / (-5))\n    Position ((((costume [number v]) - (1)) * (480)) + ((SCROLL X) / (-5))) ((SCROLL Y) / (-5))\nend\n\nwhen I receive [play game v]\nswitch costume to (1 v)\nheyo\nforever\n    go to [back v] layer\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\n@Transition Screen\n\nwhen I receive [play game v]\nset [situation v] to [1]\ncreate clone of (_myself_ v)\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nforever\n    broadcast (go to the front boiz v)\nend\n\nwhen I receive [ded boiz v]\nset [situation v] to [2]\ncreate clone of (_myself_ v)\n\nwhen I receive [win yoo xd v]\nset [situation v] to [3]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(SITUATION) = [1]> then\n    set [clickpossible v] to [0]\n    show\n    wait (0.8) seconds\n    set [clickpossible v] to [1]\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    hide\n    clear graphic effects\n    broadcast (coin reveal v)\n    delete this clone\nelse\n    if <(SITUATION) = [2]> then\n        set [clickpossible v] to [0]\n        show\n        wait (0.7) seconds\n        set [clickpossible v] to [1]\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        hide\n        clear graphic effects\n        delete this clone\n    else\n        if <(SITUATION) = [3]> then\n            if <(usedSkip) = [0]> then\n                set [clickpossible v] to [0]\n                wait (0.7) seconds\n                show\n                wait (0.8) seconds\n                set [clickpossible v] to [0]\n                repeat (10)\n                    change [ghost v] effect by (10)\n                end\n                hide\n                clear graphic effects\n                set [usedskip v] to [0]\n                delete this clone\n            else\n                show\n                set [clickpossible v] to [0]\n                wait (0.8) seconds\n                set [clickpossible v] to [1]\n                repeat (10)\n                    change [ghost v] effect by (10)\n                end\n                hide\n                clear graphic effects\n                set [usedskip v] to [0]\n                delete this clone\n            end\n        end\n    end\nend\n\nwhen I receive [go to the front boiz v]\ngo to [front v] layer\n\n@Play button\n\nwhen flag clicked\nhide\n\nwhen I receive [instructions v]\ngo to x: (564536456) y: (24562546245)\nhide\n\nwhen I receive [back v]\ngo to x: (-70) y: (-50)\nshow\n\nwhen I receive [before start v]\nforever\n    if <touching (mouse-pointer v)?> then\n        start sound [Wood Tap v]\n        wait until <not <touching (mouse-pointer v)?>>\n    end\nend\n\nwhen I receive [before start v]\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((120) - (size)) / (4))\n    else\n        change size by (((100) - (size)) / (4))\n    end\nend\n\nwhen I receive [before start v]\nreset timer\nshow\ngo to [front v] layer\ngo to x: (-70) y: (-50)\nforever\n    point in direction ((([sin v] of ((timer) * (200)) ) * (5)) + (90))\nend\n\nwhen I receive [before start v]\nset size to (100) %\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        repeat until <not <mouse down?>>\n            change size by (((70) - (size)) / (4))\n        end\n        if <touching (mouse-pointer v)?> then\n            broadcast (Play game v)\n            stop [other scripts in sprite v]\n            repeat until <(size) < [6]>\n                change size by (((0) - (size)) / (4))\n                change [ghost v] effect by (((0) - (size)) / (8))\n            end\n            hide\n            go to x: (6746574657) y: (7456745674567)\n            stop [this script v]\n        end\n    end\nend\n\n@instructions button\n\nwhen I receive [back v]\ngo to x: (70) y: (-50)\nshow\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\nstop [other scripts in sprite v]\nrepeat until <(size) < [6]>\n    change size by (((0) - (size)) / (4))\n    change [ghost v] effect by (((0) - (size)) / (8))\nend\nhide\nstop [this script v]\n\nwhen I receive [before start v]\nshow\ngo to x: (70) y: (-50)\nset size to (100) %\nforever\n    point in direction ((([sin v] of ((timer) * (200)) ) * (5)) + (90))\nend\n\nwhen I receive [before start v]\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((120) - (size)) / (4))\n    else\n        change size by (((100) - (size)) / (4))\n    end\nend\n\nwhen I receive [before start v]\nforever\n    if <touching (mouse-pointer v)?> then\n        start sound [Wood Tap v]\n        wait until <not <touching (mouse-pointer v)?>>\n    end\nend\n\nwhen I receive [before start v]\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        repeat until <not <mouse down?>>\n            change size by (((70) - (size)) / (4))\n        end\n        if <touching (mouse-pointer v)?> then\n            broadcast (instructions v)\n            hide\n            go to x: (564536345) y: (63456435654)\n        end\n    end\nend\n\n@Instructions\n\nwhen flag clicked\nhide\n\nwhen I receive [instructions v]\ngo to x: (0) y: (0)\nset size to (200) %\nset [ghost v] effect to (0)\nshow\nrepeat until <<mouse down?> and <touching (mouse-pointer v)?>>\n    if <touching (mouse-pointer v)?> then\n        change size by (((105) - (size)) / (4))\n    else\n        change size by (((100) - (size)) / (4))\n    end\nend\nrepeat until <not <mouse down?>>\n    if <touching (mouse-pointer v)?> then\n        change size by (((90) - (size)) / (4))\n    else\n        change size by (((100) - (size)) / (4))\n    end\nend\nif <touching (mouse-pointer v)?> then\n    broadcast (back v)\n    repeat until <[200] < (size)>\n        change size by (((200) - (size)) / (4))\n        change [ghost v] effect by (((200) - (size)) / (4))\n    end\n    hide\nelse\n    broadcast (instructions v)\nend\n\nwhen I receive [play game v]\nhide\n\n@title\n\nwhen flag clicked\nhide\n\nwhen I receive [back v]\nshow\n\nwhen I receive [instructions v]\nhide\n\nwhen I receive [play game v]\nstop [other scripts in sprite v]\nrepeat until <(y position) > [320]>\n    change y by (((400) - (y position)) / (4))\n    change [ghost v] effect by (((0) - (size)) / (8))\nend\nhide\nstop [this script v]\n\nwhen I receive [before start v]\nshow\nset size to (100) %\ngo to x: (0) y: (0)\n\n@Shop\n\nwhen flag clicked\nset [shopshown? v] to [0]\nforever\n    if <<touching (mouse-pointer v)?> and <(costume [number v]) = [2]>> then\n        change size by (((90) - (size)) / (4))\n    else\n        change size by (((80) - (size)) / (4))\n    end\nend\n\nwhen I start as a clone\nif <(shopID) = [1]> then\n    set [suceededgetout v] to [0]\n    set [shopshown? v] to [1]\n    go [forward v] (1) layers\n    set size to (100) %\n    point in direction (90)\n    go to x: (0) y: (-300)\n    switch costume to (shop v)\n    repeat until <(y position) > [-1]>\n        change y by (((0) - (y position)) / (3))\n    end\n    go to x: (0) y: (0)\n    repeat until <<not <touching (mouse-pointer v)?>> and <mouse down?>>\n        set [moveable v] to [0]\n    end\n    wait until <not <mouse down?>>\n    if <not <touching (mouse-pointer v)?>> then\n        set [moveable v] to [1]\n        broadcast (shopclear v)\n        repeat until <(y position) < [-280]>\n            change y by (((-300) - (y position)) / (6))\n        end\n        set [shopshown? v] to [0]\n        broadcast (shopbacktogame v)\n        set [suceededgetout v] to [1]\n        delete this clone\n    else\n        repeat until <(suceededgetout) = [1]>\n            wait until <mouse down?>\n            wait until <not <mouse down?>>\n            if <touching (mouse-pointer v)?> then\n                set [suceededgetout v] to [0]\n                wait until <not <mouse down?>>\n            else\n                if <not <touching (mouse-pointer v)?>> then\n                    set [moveable v] to [1]\n                    broadcast (shopclear v)\n                    repeat until <(y position) < [-280]>\n                        change y by (((-300) - (y position)) / (6))\n                    end\n                    set [shopshown? v] to [0]\n                    broadcast (shopbacktogame v)\n                    set [suceededgetout v] to [1]\n                    delete this clone\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [shopbacktogame v]\nswitch costume to (shopbutton v)\ngo to x: (-300) y: (140)\nreset timer\npoint in direction (90)\nshow\nrepeat until <(x position) > [-200]>\n    change x by (((-195) - (x position)) / (4))\nend\ngo to x: (-200) y: (140)\n\nwhen I receive [play game v]\nset size to (100) %\ngo to x: (-200) y: (140)\nshow\nswitch costume to (shopbutton v)\nforever\n    point in direction ((([sin v] of ((timer) * (200)) ) * (5)) + (90))\nend\n\nwhen flag clicked\nset [moveable v] to [1]\ndelete all of [skins you have v]\nhide\ngo to [front v] layer\n\nwhen I receive [play game v]\nforever\n    if <<touching (mouse-pointer v)?> and <(clickpossible) = [1]>> then\n        start sound [Wood Tap v]\n        wait until <not <touching (mouse-pointer v)?>>\n    end\nend\n\nwhen I start as a clone\nif <(shopID) = [2]> then\n    go to [front v] layer\n    set size to (100) %\n    point in direction (90)\n    switch costume to (mask v)\n    forever\n        go to x: (-130) y: (0)\n        if <not <[skins you have v] contains [mask]?>> then\n            if <touching (mouse-pointer v)?> then\n                set [brightness v] effect to (10)\n            else\n                set [brightness v] effect to (0)\n            end\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                set [brightness v] effect to (0)\n                wait until <not <mouse down?>>\n                if <touching (mouse-pointer v)?> then\n                    if <(myTotalCoins) > [3]> then\n                        start sound [REGISTER v]\n                        add [mask] to [skins you have v]\n                        change [mytotalcoins v] by (-4)\n                        switch costume to (equippedmask v)\n                        set [equipped v] to [mask]\n                    else\n                        start sound [Clang v]\n                    end\n                end\n            end\n        else\n            if <(Equipped) = [mask]> then\n                switch costume to (equippedmask v)\n                set [brightness v] effect to (15)\n            else\n                switch costume to (boughtmask v)\n                if <touching (mouse-pointer v)?> then\n                    set [brightness v] effect to (10)\n                else\n                    set [brightness v] effect to (0)\n                end\n                if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                    set [brightness v] effect to (0)\n                    wait until <not <mouse down?>>\n                    if <touching (mouse-pointer v)?> then\n                        set [equipped v] to [mask]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(shopID) = [3]> then\n    go to [front v] layer\n    set size to (100) %\n    point in direction (90)\n    switch costume to (sheriff v)\n    forever\n        go to x: (40) y: (0)\n        if <not <[skins you have v] contains [sheriff]?>> then\n            if <touching (mouse-pointer v)?> then\n                set [brightness v] effect to (10)\n            else\n                set [brightness v] effect to (0)\n            end\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                set [brightness v] effect to (0)\n                wait until <not <mouse down?>>\n                if <touching (mouse-pointer v)?> then\n                    if <(myTotalCoins) > [7]> then\n                        start sound [REGISTER v]\n                        add [sheriff] to [skins you have v]\n                        change [mytotalcoins v] by (-8)\n                        switch costume to (equippedsheriff v)\n                        set [equipped v] to [sheriff]\n                    else\n                        start sound [Clang v]\n                    end\n                end\n            end\n        else\n            if <(Equipped) = [sheriff]> then\n                switch costume to (equippedsheriff v)\n                set [brightness v] effect to (15)\n            else\n                switch costume to (boughtsheriff v)\n                if <touching (mouse-pointer v)?> then\n                    set [brightness v] effect to (10)\n                else\n                    set [brightness v] effect to (0)\n                end\n                if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                    set [brightness v] effect to (0)\n                    wait until <not <mouse down?>>\n                    if <touching (mouse-pointer v)?> then\n                        set [equipped v] to [sheriff]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(shopID) = [4]> then\n    go to [front v] layer\n    set size to (100) %\n    point in direction (90)\n    switch costume to (cat v)\n    forever\n        go to x: (-130) y: (-100)\n        if <not <[skins you have v] contains [cat]?>> then\n            if <touching (mouse-pointer v)?> then\n                set [brightness v] effect to (10)\n            else\n                set [brightness v] effect to (0)\n            end\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                set [brightness v] effect to (0)\n                wait until <not <mouse down?>>\n                if <touching (mouse-pointer v)?> then\n                    if <(myTotalCoins) > [14]> then\n                        start sound [REGISTER v]\n                        add [cat] to [skins you have v]\n                        change [mytotalcoins v] by (-15)\n                        switch costume to (equippedsheriff v)\n                        set [equipped v] to [cat]\n                    else\n                        start sound [Clang v]\n                    end\n                end\n            end\n        else\n            if <(Equipped) = [cat]> then\n                switch costume to (equippedcat v)\n                set [brightness v] effect to (15)\n            else\n                switch costume to (boughtcat v)\n                if <touching (mouse-pointer v)?> then\n                    set [brightness v] effect to (10)\n                else\n                    set [brightness v] effect to (0)\n                end\n                if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                    set [brightness v] effect to (0)\n                    wait until <not <mouse down?>>\n                    if <touching (mouse-pointer v)?> then\n                        set [equipped v] to [cat]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(shopID) = [5]> then\n    go to [front v] layer\n    set size to (100) %\n    point in direction (90)\n    switch costume to (demon guy v)\n    forever\n        go to x: (40) y: (-100)\n        if <not <[skins you have v] contains [demon]?>> then\n            if <touching (mouse-pointer v)?> then\n                set [brightness v] effect to (10)\n            else\n                set [brightness v] effect to (0)\n            end\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                set [brightness v] effect to (0)\n                wait until <not <mouse down?>>\n                if <touching (mouse-pointer v)?> then\n                    if <(myTotalCoins) > [19]> then\n                        start sound [REGISTER v]\n                        add [demon] to [skins you have v]\n                        change [mytotalcoins v] by (-20)\n                        switch costume to (equippedsheriff v)\n                        set [equipped v] to [demon]\n                    else\n                        start sound [Clang v]\n                    end\n                end\n            end\n        else\n            if <(Equipped) = [demon]> then\n                switch costume to (equippeddemon v)\n                set [brightness v] effect to (15)\n            else\n                switch costume to (boughtdemon v)\n                if <touching (mouse-pointer v)?> then\n                    set [brightness v] effect to (10)\n                else\n                    set [brightness v] effect to (0)\n                end\n                if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                    set [brightness v] effect to (0)\n                    wait until <not <mouse down?>>\n                    if <touching (mouse-pointer v)?> then\n                        set [equipped v] to [demon]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [shopclear v]\nif <not <<(costume [number v]) = [1]> or <(costume [number v]) = [2]>>> then\n    delete this clone\nend\n\nwhen I receive [reset v]\nbroadcast (shopbacktogame v)\ndelete this clone\n\ndefine shopfast\nset [shopid v] to [1]\nrepeat (4)\n    change [shopid v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nset [shopbeingtouched v] to [0]\nforever\n    if <touching (mouse-pointer v)?> then\n        set [shopbeingtouched v] to [1]\n        set [moveable v] to [0]\n    else\n        set [shopbeingtouched v] to [0]\n        if <<(shopshown?) = [0]> and <(skipbeingtouched) = [0]>> then\n            set [moveable v] to [1]\n        end\n    end\nend\n\nwhen I receive [play game v]\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        repeat until <not <mouse down?>>\n            change size by (((70) - (size)) / (4))\n        end\n        if <touching (mouse-pointer v)?> then\n            set [shopid v] to [1]\n            create clone of (_myself_ v)\n            broadcast (shop boiz v)\n            repeat until <(x position) < [-240]>\n                change x by (((-260) - (x position)) / (2))\n            end\n            shopfast\n            hide\n            go to x: (-24352345234) y: (-243524351)\n        end\n    end\nend\n\n@Skip\n\nwhen flag clicked\ngo to x: (6736435634) y: (6354645)\nhide\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((90) - (size)) / (4))\n    else\n        change size by (((80) - (size)) / (4))\n    end\nend\n\nwhen I receive [play game v]\nset size to (80) %\ngo to x: (-140) y: (140)\nshow\nswitch costume to (costume1 v)\nforever\n    point in direction ((([sin v] of ((timer) * (200)) ) * (5)) + (90))\nend\n\nwhen I receive [shop boiz v]\nrepeat until <(x position) < [-240]>\n    change x by (((-260) - (x position)) / (2))\nend\nhide\ngo to x: (-24352345234) y: (-243524351)\n\nwhen I receive [shopbacktogame v]\npoint in direction (90)\ngo to x: (-300) y: (140)\nshow\nrepeat until <(x position) > [-140]>\n    change x by (((-135) - (x position)) / (4))\nend\ngo to x: (-140) y: (140)\n\nwhen I receive [play game v]\nforever\n    if <<touching (mouse-pointer v)?> and <(clickpossible) = [1]>> then\n        start sound [Wood Tap v]\n        wait until <not <touching (mouse-pointer v)?>>\n    end\nend\n\nwhen flag clicked\nset [skipbeingtouched v] to [0]\nforever\n    if <touching (mouse-pointer v)?> then\n        set [moveable v] to [0]\n        set [skipbeingtouched v] to [0]\n    else\n        set [skipbeingtouched v] to [0]\n        if <<(shopshown?) = [0]> and <(shopbeingtouched) = [0]>> then\n            set [moveable v] to [1]\n        end\n    end\nend\n\nwhen I receive [play game v]\nwait (0) seconds\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        repeat until <not <mouse down?>>\n            change size by (((70) - (size)) / (4))\n        end\n        if <touching (mouse-pointer v)?> then\n            set [mobileskip v] to [1]\n        end\n    end\n    if <(level) = [6]> then\n        forever\n            hide\n            stop [other scripts in sprite v]\n        end\n    end\nend\n\nstop [this script v]\n\n@Coins Counter\n\nwhen flag clicked\nset [mytotalcoins v] to [0]\nset [equipped v] to [none]\nhide\n\nwhen I start as a clone\nif <(size) = [100]> then\n    forever\n        go to [front v] layer\n        go to x: (193) y: (156)\n        set size to (35) %\n        if <<((round ((myTotalCoins) * (100))) / (100)) = [10]> or <((round ((myTotalCoins) * (100))) / (100)) > [10]>> then\n            show\n            switch costume to (letter (1) of (myTotalCoins))\n        else\n            hide\n        end\n        set [brightness v] effect to (100)\n    end\nend\n\nwhen I start as a clone\nif <(size) = [99]> then\n    wait () seconds\n    go to [front v] layer\n    set size to (35) %\n    switch costume to (0 v)\n    set [brightness v] effect to (100)\n    go to x: (263) y: (156)\n    show\n    repeat (10)\n        change x by (((193) - (x position)) / (3))\n    end\n    forever\n        go to [front v] layer\n        set size to (35) %\n        show\n        if <(myTotalCoins) < [10]> then\n            go to x: (193) y: (156)\n            switch costume to (letter (1) of (myTotalCoins))\n        else\n            go to x: (207) y: (156)\n            switch costume to (letter (2) of (myTotalCoins))\n        end\n        set [brightness v] effect to (100)\n    end\nend\n\nwhen I receive [coin reveal v]\nset size to (100) %\ncreate clone of (_myself_ v)\nset size to (99) %\ncreate clone of (_myself_ v)\nset size to (98) %\ncreate clone of (_myself_ v)\nset size to (97) %\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(size) = [98]> then\n    wait () seconds\n    set size to (100) %\n    go to [front v] layer\n    switch costume to (money v)\n    go to x: (263) y: (157)\n    show\n    repeat (10)\n        change x by (((165) - (x position)) / (3))\n    end\n    forever\n        go to x: (165) y: (157)\n        set size to (100) %\n        show\n        switch costume to (money v)\n    end\nend\n\nwhen I start as a clone\nif <(size) = [97]> then\n    go to [front v] layer\n    go [backward v] (1) layers\n    wait () seconds\n    set size to (100) %\n    switch costume to (shading v)\n    go to x: (100) y: (0)\n    show\n    repeat (10)\n        change x by (((0) - (x position)) / (3))\n    end\n    forever\n        go to x: (0) y: (0)\n        set size to (100) %\n        show\n        switch costume to (shading v)\n        set [ghost v] effect to (0)\n    end\nend\n\n@Moving shading\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nset [max collect v] to [0]\nhide\nset [collect v] to [0]\nset [y v] to [0]\nset [x v] to [0]\nif <(level) = [3]> then\n    wait (0) seconds\n    Clone x: [580] y: [0]\nelse\n    if <(level) = [4]> then\n        wait (0) seconds\n        Clone x: [140] y: [-50]\n    else\n        if <(level) = [5]> then\n            wait (0) seconds\n            Clone x: [-50] y: [250]\n            Clone x: [1000] y: [250]\n        end\n    end\nend\nset [y v] to [-99999999999]\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 x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\nchange [max collect v] by (1)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\n\nwhen I receive [tick v]\ngo to [back v] layer\nPosition (((x) - (SCROLL X)) + (([cos v] of (MVPH) ) * (90))) ((y) - (SCROLL Y))\ngo [forward v] (4) layers\n\ndefine Clone x: (x) y: (y)\nset [ghost v] effect to (0)\nset size to (100) %\nset [x v] to (x)\nset [y v] to (y)\nchange [max collect v] by (1)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [ghost v] effect to (70)\n\n@moving platforms\n\nwhen I receive [tick v]\nchange [mvph v] by (1)\nPosition (((x) - (SCROLL X)) + (([cos v] of (MVPH) ) * (90))) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nset [max collect v] to [0]\nhide\nset [collect v] to [0]\nset [y v] to [0]\nset [x v] to [0]\nwait (0) seconds\nif <(level) = [3]> then\n    Clone x: [580] y: [0]\nelse\n    if <(level) = [4]> then\n        Clone x: [140] y: [-50]\n    else\n        if <(level) = [5]> then\n            Clone x: [-50] y: [250]\n            Clone x: [1000] y: [250]\n        end\n    end\nend\nset [y v] to [-99999999999]\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]\nset [mvph v] to [100000]\ndelete this clone\n\ndefine Clone x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\nchange [max collect v] by (1)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\n\ndefine Clone x: (x) y: (y)\nset [ghost v] effect to (0)\nset size to (100) %\nset [x v] to (x)\nset [y v] to (y)\nchange [max collect v] by (1)\ncreate clone of (_myself_ v)\n\n@Attack Button\n\nwhen flag clicked\nset [touchingattack? v] to [0]\nhide\n\nwhen I receive [play game v]\ngo to x: (200) y: (-158)\nset size to (100) %\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((110) - (size)) / (4))\n        set [touchingattack? v] to [1]\n    else\n        change size by (((100) - (size)) / (4))\n        set [touchingattack? v] to [0]\n    end\nend\n\nwhen I receive [play game v]\nforever\n    if <<touching (mouse-pointer v)?> and <(clickpossible) = [1]>> then\n        start sound [Wood Tap v]\n        wait until <not <touching (mouse-pointer v)?>>\n    end\nend\n\nwhen I receive [play game v]\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        broadcast (attack v)\n        repeat until <not <mouse down?>>\n            change size by (((70) - (size)) / (4))\n        end\n    end\nend\n\n@thumb\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    go to [front v] layer\n    show\n    set [ghost v] effect to (100)\nend\n\n@Intro\n\nwhen I start as a clone\nif <(size) = [70]> then\n    show\n    go to x: (0) y: (-110)\n    set [ghost v] effect to (100)\n    set size to (100) %\n    go to [front v] layer\n    switch costume to (corpcooga v)\n    repeat (5)\n        change [ghost v] effect by (-20)\n    end\n    wait (0.5) seconds\n    repeat (10)\n        wait (0.01) seconds\n        change [ghost v] effect by (10)\n    end\nend\n\nwhen flag clicked\nset volume to (100) %\nstart sound [Intro music v]\nshow\ngo to [front v] layer\ngo to x: (-240) y: (0)\npoint in direction (-150)\nswitch costume to (op v)\nset [ghost v] effect to (100)\nset [vel v] to [30]\nset size to (30) %\nrepeat until <(x position) = [0]>\n    change x by (vel)\n    turn right (vel) degrees\n    change [ghost v] effect by ((vel) * (-0.5))\n    change size by ((vel) / (6))\n    change [vel v] by (-2)\nend\nbroadcast (collabers v)\nset size to (71) %\ncreate clone of (_myself_ v)\nset size to (70) %\ncreate clone of (_myself_ v)\nrepeat (15)\n    set [bounce v] to (((bounce) * (0.4)) + ((80.5) - (size)))\n    change size by (bounce)\nend\nset size to (80) %\nwait (0.2) seconds\npoint in direction (90)\nset [sine v] to [0]\nrepeat (15)\n    point in direction ((90) + (([tan v] of ((sine) * (8)) ) * (10)))\nend\npoint in direction (90)\nset [size vel v] to [18]\nrepeat until <(size vel) < [2]>\n    change [size vel v] by (-2)\n    change size by (size vel)\n    turn left ((size vel) * (4)) degrees\nend\nset [sine v] to [0]\nrepeat until <(x position) < [0]>\n    set x to (([tan v] of ((sine) * (8)) ) * (20))\n    turn right (([tan v] of ((sine) * (8)) ) * (20)) degrees\nend\nrepeat until <(x position) > [0]>\n    set x to (([tan v] of ((sine) * (8)) ) * (20))\n    turn right (((90) - (direction)) / (3)) degrees\nend\nrepeat until <(size vel) < [-17]>\n    change [size vel v] by (-2)\n    change size by ((size vel) / (1.25))\n    turn left ((size vel) * (4)) degrees\nend\npoint in direction (90)\nset x to (0)\nwait (0.5) seconds\ncreate clone of (_myself_ v)\nwait (0.9) seconds\nhide\nwait (1) seconds\nstop [other scripts in sprite v]\nbroadcast (before start v)\n\nwhen I start as a clone\nif <(size) = [80]> then\n    set [sizevel v] to [30]\n    go to x: (0) y: (0)\n    switch costume to (costume1 v)\n    set size to (30) %\n    show\n    go to [front v] layer\n    repeat (30)\n        switch costume to (hax v)\n        change size by (sizevel)\n        change [sizevel v] by (-1)\n        switch costume to (costume1 v)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(size) = [71]> then\n    set size to (100) %\n    go to [front v] layer\n    switch costume to (poof-0 v)\n    repeat (13)\n        wait (0.005) seconds\n        next costume\n    end\n    delete this clone\nend\n\nwhen flag clicked\nforever\n    change [sine v] by (1)\nend\n\nwhen I receive [collabers v]\nset size to (10) %\ncreate clone of (_myself_ v)\nset size to (11) %\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(size) = [10]> then\n    set size to (40) %\n    switch costume to (plant2 v)\n    go to x: (0) y: (0)\n    go to [back v] layer\n    repeat (15)\n        change x by (((-160) - (x position)) / (4))\n    end\n    wait (0.5) seconds\n    repeat (15)\n        change y by (((-230) - (y position)) / (4))\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(size) = [11]> then\n    set size to (40) %\n    switch costume to (aidana21 v)\n    go to x: (0) y: (0)\n    go to [back v] layer\n    repeat (15)\n        change x by (((160) - (x position)) / (4))\n    end\n    wait (0.5) seconds\n    repeat (15)\n        change y by (((-230) - (y position)) / (4))\n    end\n    delete this clone\nend\n\n