Desert A Scrolling Platformer

Instructions: Arrow keys or WASD or mobile tap to move\nP or skip button to skip\n

@Stage\n\nwhen flag clicked\nforever\n    play sound [Hans Zimmer - He's a Pirate v] until done\nend\n\n@Guy\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) = [4]>>> then\n        set [exit v] to [A win win]\n        set [usedskip? v] to [1]\n    end\n    if <<(mobileskip) = [1]> and <not <(LEVEL) = [4]>>> 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\nif <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> then\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)>>> then\n    set rotation style [left-right v]\n    point in direction (-90)\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 <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>> 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)) / (8)))\nPosition\nif <touching (trampoline v)?> then\n    set [speedy v] to [30]\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)?>>\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)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (levels v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    repeat until <not <touching (levels 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 [y v v] to [15]\nrepeat until <(y position) < [-90]>\n    set rotation style [all around v]\n    change [ghost v] effect by (3)\n    switch costume to (1 v)\n    go to [front v] layer\n    turn right (10) degrees\n    change y by (Y v)\n    change [y v v] by (-1)\nend\nrepeat until <(y position) < [-178]>\n    set rotation style [all around v]\n    change [ghost v] effect by (5)\n    go to [front v] layer\n    turn right (10) degrees\n    change y by (Y v)\n    change [y v v] by (-1)\nend\nset [dead? v] to [0]\nbroadcast (ded boiz v)\nhide\n\ndefine Die? I think so\nif <<<touching (obstacles v)?> or <touching (lava v)?>> or <touching (saws v)?>> then\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    hide\n    set [ghost v] effect to (0)\n    set size to (100) %\nend\n\nwhen I receive [play game v]\nforever\n    switch costume to (1 v)\n    wait (pick random (3) to (5)) seconds\n    repeat (9)\n        next costume\n        next costume\n    end\n    next costume\n    wait (0.2) seconds\n    repeat (9)\n        switch costume to ((costume [number v]) - (1))\n        switch costume to ((costume [number v]) - (1))\n    end\n    switch costume to ((costume [number v]) - (1))\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]\nif  then\n    delete this clone\nend\nset [y v] to [0]\nset [x v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (costume1 v)\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (costume4 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 (costume8 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            switch costume to (costume24 v)\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 [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 (costume1 v)\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (costume4 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 (costume7 v)\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n            Position x: [450] y: [0]\n        else\n            switch costume to (costume24 v)\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 flag clicked\nhide\ngo to [back v] layer\n\nwhen I receive [reset v]\ndelete this clone\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\n@Collectibles\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <touching (guy v)?> then\n    start sound [Coin v]\n    change [collect v] by (1)\n    if <(Collect) = (Max Collect)> then\n        broadcast (OPEN PORtAL v)\n    end\n    delete this clone\nend\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) = [1]> then\n    set [coins v] to [5]\n    wait (0) seconds\n    Clone x: [90] y: [150]\n    Clone x: [400] y: [300]\n    Clone x: [700] y: [500]\n    Clone x: [810] y: [500]\n    Clone x: [1078] y: [300]\nelse\n    if <(LEVEL) = [2]> then\n        set [coins v] to [6]\n        wait (0) seconds\n        Clone x: [238] y: [20]\n        Clone x: [63] y: [300]\n        Clone x: [300] y: [130]\n        Clone x: [890] y: [100]\n        Clone x: [1060] y: [270]\n        Clone x: [1300] y: [100]\n    else\n        if <(LEVEL) = [3]> then\n            set [coins v] to [7]\n            wait (0) seconds\n            Clone x: [-100] y: [50]\n            Clone x: [240] y: [50]\n            Clone x: [650] y: [200]\n            Clone x: [1015] y: [200]\n            Clone x: [1450] y: [150]\n            Clone x: [1550] y: [200]\n            Clone x: [1650] y: [150]\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\n@Goal\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <<(costume [name v]) = [1]> and <touching (guy 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    Clone x: [1200] y: [300]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (2 v)\n        Clone x: [1600] y: [0]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (2 v)\n            Clone x: [2000] y: [100]\n        else\n            Clone x: [500000000] y: [0]\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 Clone 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@Lava\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]\nif <not <(LEVEL) = [4]>> then\n    repeat (20)\n        Position x: [450] y: [0]\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 flag clicked\nhide\ngo to [back v] layer\n\nwhen I receive [reset v]\ndelete this clone\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 (costume1 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 (costume4 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) = [3]> then\n            switch costume to (costume7 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            switch costume to (costume25 v)\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 (costume1 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 (costume4 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) = [3]> then\n            switch costume to (costume8 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            switch costume to (costume24 v)\n            Position x: [450] y: [0]\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 (50)\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\n\n@Trampoline\n\nwhen I start as a clone\nshow\nswitch costume to (1 v)\nforever\n    if <<touching (guy 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) = [1]> then\n    Clone x: [405] y: [120]\nelse\n    if <(LEVEL) = [2]> then\n        Clone x: [890] y: [-58]\n        Clone x: [220] y: [-40]\n    else\n        if <(LEVEL) = [3]> then\n            Clone x: [1400] y: [-58]\n        else\n        end\n    end\nend\nset [y v] to [-99999999999]\n\nwhen flag clicked\nhide\ngo to [back v] layer\n\n@Saws\n\nwhen I start as a clone\ngo to [back v] layer\nshow\nforever\n    point in direction ((90) + (([sin v] of ((line) * (2)) ) * (300)))\nend\n\nwhen flag clicked\nhide\ngo to [back v] layer\nforever\n    change [line v] by (1)\nend\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\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\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\nwhen I receive [setup v]\nhide\nset [y v] to [0]\nset [x v] to [0]\nwait (0) seconds\nif <(LEVEL) = [1]> then\n    Clone x: [10] y: [-20]\n    Clone x: [600] y: [320]\n    Clone x: [800] y: [320]\n    Clone x: [1018] y: [100]\nelse\n    if <(LEVEL) = [2]> then\n        Clone x: [446] y: [80]\n        Clone x: [446] y: [-50]\n    else\n        if <(LEVEL) = [3]> then\n            Clone x: [1200] y: [50]\n            Clone x: [1485] y: [-100]\n            Clone x: [1615] y: [-100]\n            Clone x: [1845] y: [-100]\n        end\n    end\nend\nset [y v] to [-99999999999]\n\n@Mountains F\n\nwhen I receive [play game v]\nshow\n\nwhen I start as a clone\nset [ghost v] effect to (0)\nforever\n    go to x: ((((costume [number v]) - (1)) * (480)) + ((SCROLL X) / (-2))) y: ((SCROLL Y) / (-2))\n    set [brightness v] effect to (0)\nend\n\ndefine heyo\nset [ghost v] effect to (100)\nrepeat (10)\n    create clone of (_myself_ v)\n    next costume\nend\n\nwhen flag clicked\nhide\nswitch costume to (1 v)\nheyo\nforever\n    go to [back v] layer\nend\n\nwhen I start as a clone\nclear graphic effects\nshow\nforever\n    go to [back v] layer\nend\n\n@Mountains M\n\nwhen I receive [play game v]\nshow\n\nwhen I start as a clone\nset [ghost v] effect to (0)\nforever\n    go to x: ((((costume [number v]) - (1)) * (480)) + ((SCROLL X) / (-5))) y: ((SCROLL Y) / (-5))\n    set [brightness v] effect to (0)\nend\n\ndefine heyo\nset [ghost v] effect to (100)\nrepeat (10)\n    create clone of (_myself_ v)\n    next costume\nend\n\nwhen flag clicked\nhide\nswitch costume to (1 v)\nheyo\nforever\n    go to [back v] layer\nend\n\nwhen I start as a clone\nclear graphic effects\nshow\nforever\n    go to [back v] layer\nend\n\n@Mountains B\n\nwhen I receive [play game v]\nshow\n\nwhen I start as a clone\nset [ghost v] effect to (0)\nforever\n    go to x: ((((costume [number v]) - (1)) * (480)) + ((SCROLL X) / (-8))) y: ((SCROLL Y) / (-8))\n    set [brightness v] effect to (0)\nend\n\ndefine heyo\nset [ghost v] effect to (100)\nrepeat (10)\n    create clone of (_myself_ v)\n    next costume\nend\n\nwhen flag clicked\nhide\nswitch costume to (1 v)\nheyo\nforever\n    go to [back v] layer\nend\n\nwhen I start as a clone\nclear graphic effects\nshow\nforever\n    go to [back v] layer\nend\n\n@Rando Bando clouds\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nset size to (pick random (50) to (80)) %\nshow\ngo to [back v] layer\nset [ghost v] effect to (10)\nswitch costume to (pick random (1) to (4))\nif <(side) = [1]> then\n    go to x: (300) y: (pick random (150) to (100))\n    repeat until <(x position) < [-250]>\n        change x by (-1)\n    end\n    delete this clone\nend\nif <(side) = [2]> then\n    go to x: (-300) y: (pick random (150) to (100))\n    repeat until <(x position) > [250]>\n        change x by (1)\n    end\n    delete this clone\nend\n\nwhen I receive [play game v]\nforever\n    set [side v] to (pick random (1) to (2))\n    create clone of (_myself_ v)\n    wait (pick random (5) to (10)) seconds\nend\n\nwhen I start as a clone\nforever\n    go [backward v] (1) layers\n    go to [back v] layer\nend\n\n@skip\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\nshow\nset size to (100) %\nset [zine v] to [0]\ngo to x: (-180) y: (-150)\nforever\n    change [zine v] by (1)\n    point in direction ((90) + (([sin v] of ((zine) * (8)) ) * (3)))\n    if <touching (mouse-pointer v)?> then\n        change size by (((110) - (size)) / (2))\n    else\n        change size by (((100) - (size)) / (4))\n    end\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        repeat until <<not <touching (mouse-pointer v)?>> or <not <mouse down?>>>\n            change [zine v] by (1)\n            point in direction ((90) + (([sin v] of ((zine) * (5)) ) * (3)))\n            change size by (((90) - (size)) / (2))\n        end\n        set size to (100) %\n        wait (0) seconds\n        if <touching (mouse-pointer v)?> then\n            set [mobileskip v] to [1]\n        end\n    end\n    if <(LEVEL) = [4]> then\n        go to x: (4598234759234) y: (32453245234)\n        hide\n        stop [this script v]\n    else\n        go to x: (-180) y: (-140)\n        show\n    end\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    show\n    wait (0.8) seconds\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    hide\n    clear graphic effects\n    delete this clone\nelse\n    if <(SITUATION) = [2]> then\n        show\n        wait (0.7) seconds\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                start sound [Buzz Whir v]\n                wait (0.7) seconds\n                show\n                wait (0.8) seconds\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                wait (0.8) seconds\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@coin amount\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\ngo to x: (200) y: (150)\nswitch costume to (coins)\n\nwhen I receive [setup v]\ngo to x: (150) y: (150)\nif <not <(LEVEL) = [4]>> then\n    show\n    create clone of (_myself_ v)\nend\n\nwhen I receive [play game v]\nforever\n    switch costume to ((Collect) + (1))\nend\n\nwhen I receive [reset v]\ndelete this clone\n\n@play button\n\nwhen flag clicked\nforever\n    point in direction ((([sin v] of ((timer) * (300)) ) * (5)) + (90))\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\nshow\nset size to (100) %\ngo to x: (0) y: (0)\ngo to [front v] layer\npoint in direction (90)\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        if <mouse down?> then\n            broadcast (Play game v)\n            hide\n            switch costume to (costume2 v)\n            stop [other scripts in sprite v]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set [ghost v] effect to (20)\n        repeat until <(size) = [130]>\n            change size by (5)\n        end\n    else\n        set [ghost v] effect to (0)\n        repeat until <(size) = [100]>\n            change size by (-10)\n        end\n    end\nend\n\n@Thumbnail\n\nwhen I receive [play game v]\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\nforever\n    go to [front v] layer\nend\n\n