Coin Grab- A Mobile Platformer

Instructions: Coin Grab- A Mobile Platformer\nUse Arrow Keys or mobile to move.\nAvoid spikes, they hurt.\nGet the coin and then go to the well to progress.\nThere are many levels, so keep going! 

@Stage\n\nwhen flag clicked\nforever\n    play sound [GYVUS - To Wherever \[Chillhop Records\] v] until done\nend\n\n@Ground\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    switch costume to (level)\nend\n\n@Spike /\\n\nwhen flag clicked\nshow\nset [level v] to [1]\nforever\n    switch costume to (level)\nend\n\n@Sprite2\n\nset [coin? v] to [Yes]\n\nwhen flag clicked\nset [coin? v] to [Yes]\n\nwhen flag clicked\ngo to [front v] layer\n\nset [y v] to [10]\n\nforever\n\ngo to x: (0) y: (0)\n\nwhen flag clicked\nset [fails v] to [0]\n\nwhen flag clicked\n\nset [y v] to [20]\n\nchange [fails v] by (1)\n\nchange y by (y)\n\nforever\n    show\n    go to [front v] layer\n    forever\n        if <touching (water v)?> then\n            repeat (100)\n                change y by (1)\n            end\n        end\n    end\nend\n\nrepeat (10)\n    change y by (-1)\nend\nrepeat (10)\n    change y by (1)\nend\n\nchange y by (-5)\n\nwhen flag clicked\nforever\n\nwhen flag clicked\nshow\nswitch backdrop to (backdrop2 v)\nswitch costume to (costume1 v)\nshow\ngo to x: (0) y: (-58)\nswitch costume to (costume3 v)\nset [level v] to [0]\nhide variable [y v]\nhide variable [x v]\nset [y v] to [0]\nset [x v] to [0]\nforever\n    if <touching (water v)?> then\n        change [y v] by (-0.1)\n    else\n        change [y v] by (-1)\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [x v] by (-1)\n    end\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x v] by (1)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((x) * (-1))\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            set [y v] to [17]\n            if <(x) > [0]> then\n                set [x v] to [-10]\n            else\n                set [x v] to [10]\n            end\n        else\n            set [x v] to [0]\n        end\n    end\n    change y by (y)\n    if <touching (ground v)?> then\n        change y by ((y) - ((y) * (2)))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<<<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> or <key (w v) pressed?>> and <touching (ground v)?>> then\n        set [y v] to [15]\n    end\n    change y by (1)\n    if <<touching (spike /\ v)?> or <touching (lava2 v)?>> then\n        go to x: (-192) y: (-76)\n        broadcast (Again v)\n        set [coin? v] to [No]\n    end\n    if <touching (well v)?> then\n        if <(Coin?) = [Yes]> then\n            change [level v] by (1)\n            set [coin? v] to [No]\n            go to x: (-192) y: (-76)\n        end\n    end\n    if <(y position) < [-180]> then\n        go to x: (-177) y: (12)\n    end\n    if <touching (water v)?> then\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            change [y v] by (1)\n            set [y v] to ((y) * (0.9))\n        end\n    end\n    if <touching (bouncy v)?> then\n        set [y v] to [20]\n    end\nend\n\ngo to [back v] layer\n\nwhen flag clicked\nforever\n    if <<touching (coin v)?> and <(level) = [2]>> then\n        set [coin? v] to [Yes]\n    end\n    if <<touching (coin v)?> and <(level) = [3]>> then\n        set [coin? v] to [Yes]\n    end\n    if <<touching (coin v)?> and <(level) = [4]>> then\n        set [coin? v] to [Yes]\n    end\n    if <<touching (coin v)?> and <(level) = [5]>> then\n        set [coin? v] to [Yes]\n    end\n    if <<touching (coin v)?> and <(level) = [6]>> then\n        set [coin? v] to [Yes]\n    end\n    if <<touching (coin v)?> and <(level) = [7]>> then\n        set [coin? v] to [Yes]\n    end\n    if <<touching (coin v)?> and <(level) = [8]>> then\n        set [coin? v] to [Yes]\n    end\n    if <<touching (coin v)?> and <(level) = [9]>> then\n        set [coin? v] to [Yes]\n    end\n    if <<touching (coin v)?> and <(level) = [10]>> then\n        set [coin? v] to [Yes]\n    end\n    if <<touching (coin v)?> and <(level) = [11]>> then\n        set [coin? v] to [Yes]\n    end\n    if <<touching (coin v)?> and <(level) = [12]>> then\n        set [coin? v] to [Yes]\n    end\n    if <<touching (coin v)?> and <(level) = [13]>> then\n        set [coin? v] to [Yes]\n    end\nend\n\n@Lava\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\nshow\ngo to [back v] layer\ngo [backward v] (1) layers\nforever\n    repeat (10)\n        change y by (1)\n    end\n    repeat (10)\n        change y by (-1)\n    end\nend\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    switch costume to (level)\nend\n\n@Coin\n\nwhen I start as a clone\nshow\nif <(level) = [1]> then\nif <(level) = [2]> then\n    go to x: (-67) y: (4)\n    forever\n        if <touching (sprite2 v)?> then\n            delete this clone\n        end\n    end\nend\nif <(level) = [3]> then\n    go to x: (27) y: (61)\n    forever\n        if <touching (sprite2 v)?> then\n            delete this clone\n        end\n    end\nend\nif <(level) = [4]> then\n    go to x: (-166) y: (51)\n    forever\n        if <touching (sprite2 v)?> then\n            delete this clone\n        end\n    end\nend\nif <(level) = [5]> then\n    go to x: (26) y: (104)\n    forever\n        if <touching (sprite2 v)?> then\n            delete this clone\n        end\n    end\nend\nif <(level) = [6]> then\n    go to x: (-30) y: (112)\n    forever\n        if <touching (sprite2 v)?> then\n            delete this clone\n        end\n    end\nend\nif <(level) = [7]> then\n    go to x: (208) y: (-63)\n    forever\n        if <touching (sprite2 v)?> then\n            delete this clone\n        end\n    end\nend\nif <(level) = [8]> then\n    go to x: (113) y: (125)\n    forever\n        if <touching (sprite2 v)?> then\n            delete this clone\n        end\n    end\nend\nif <(level) = [9]> then\n    go to x: (230) y: (85)\n    forever\n        if <touching (sprite2 v)?> then\n            delete this clone\n        end\n    end\nend\nif <(level) = [10]> then\n    go to x: (26) y: (-17)\n    forever\n        if <touching (sprite2 v)?> then\n            delete this clone\n        end\n    end\nend\nif <(level) = [11]> then\n    go to x: (-42) y: (49)\n    forever\n        if <touching (sprite2 v)?> then\n            delete this clone\n        end\n    end\nend\nif <(level) = [12]> then\n    go to x: (-42) y: (49)\n    forever\n        if <touching (sprite2 v)?> then\n            delete this clone\n        end\n    end\nend\n\ncreate clone of (_myself_ v)\n\nswitch costume to (level)\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    if <(level) = [2]> then\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [again v]\nforever\n    if <(level) = [2]> then\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [again v]\nforever\n    if <(level) = [3]> then\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nhide\nset [level v] to [1]\nforever\n    if <(level) = [3]> then\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [again v]\nforever\n    if <(level) = [4]> then\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [again v]\nforever\n    if <(level) = [5]> then\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nhide\nset [level v] to [1]\nforever\n    if <(level) = [4]> then\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nhide\nset [level v] to [1]\nforever\n    if <(level) = [5]> then\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [again v]\nforever\n    if <(level) = [6]> then\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nhide\nset [level v] to [1]\nforever\n    if <(level) = [6]> then\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nhide\nset [level v] to [1]\nforever\n    if <(level) = [7]> then\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [again v]\nforever\n    if <(level) = [7]> then\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [again v]\nforever\n    if <(level) = [8]> then\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nhide\nset [level v] to [1]\nforever\n    if <(level) = [8]> then\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [again v]\nforever\n    if <(level) = [9]> then\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nhide\nset [level v] to [1]\nforever\n    if <(level) = [9]> then\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [again v]\nforever\n    if <(level) = [10]> then\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nhide\nset [level v] to [1]\nforever\n    if <(level) = [10]> then\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [again v]\nforever\n    if <(level) = [11]> then\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nhide\nset [level v] to [1]\nforever\n    if <(level) = [11]> then\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\nwait (20) seconds\n\nwhen I receive [again v]\nforever\n    if <(level) = [12]> then\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nhide\nset [level v] to [1]\nforever\n    if <(level) = [12]> then\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\n@Deco\n\ngo to [back v] layer\n\nwhen flag clicked\nshow\nset [level v] to [1]\nforever\n    switch costume to (level)\nend\n\n@Bouncy\n\nwhen flag clicked\nforever\n    if <touching (sprite2 v)?> then\n        repeat (5)\n            change y by (-2)\n        end\n        repeat (5)\n            change y by (2)\n        end\n    end\nend\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    switch costume to (level)\nend\n\n@Lava2\n\nwhen flag clicked\nwait (0.1) seconds\ngo to [back v] layer\nshow\nforever\n    repeat (20)\n        change y by (1)\n    end\n    repeat (20)\n        change y by (-1)\n    end\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [level v] to [1]\nforever\n    switch costume to (level)\nend\n\n@Well\n\nwhen flag clicked\nshow\nforever\n    if <(level) = [1]> then\n        go to x: (185) y: (-59)\n    end\n    if <(level) = [2]> then\n        go to x: (185) y: (-59)\n    end\n    if <(level) = [3]> then\n        go to x: (185) y: (-59)\n    end\n    if <(level) = [4]> then\n        go to x: (185) y: (92)\n    end\n    if <(level) = [5]> then\n        go to x: (157) y: (-60)\n    end\n    if <(level) = [6]> then\n        go to x: (165) y: (-59)\n    end\n    if <(level) = [7]> then\n        go to x: (190) y: (120)\n    end\n    if <(level) = [8]> then\n        go to x: (-27) y: (102)\n    end\n    if <(level) = [9]> then\n        go to x: (101) y: (37)\n    end\n    if <(level) = [10]> then\n        go to x: (194) y: (-59)\n    end\n    if <(level) = [11]> then\n        go to x: (194) y: (-59)\n    end\n    if <(level) = [12]> then\n        go to x: (194) y: (-59)\n    end\n    if <(level) = [13]> then\n        hide\n    end\nend\n\ngo to x: (-27) y: (102)\n\nwhen flag clicked\n\ngo to [back v] layer\n\ngo [forward v] (1) layers\n\n@Sprite1\n\nwhen flag clicked\ngo to [back v] layer\ngo [forward v] (1) layers\nset [ghost v] effect to (100)\n\n@Sprite3\n\ngo to [back v] layer\n\nwhen flag clicked\ngo to [back v] layer\ngo [forward v] (1) layers\nset [ghost v] effect to (100)\n\n