Iced Out-Mobile Platformer

Instructions: Iced Out-A Mobile Platformer\n-----------------------------------------------------------\nInstructions.\nUse Arrow Keys, WASD or Mobile\nThe ground is ice, so it is slippery.\nGo to the right to progress.\nAvoid spikes.\nHave fun!

@Stage\n\nwhen flag clicked\nforever\n    play sound [Xenogenesis v] until done\nend\n\n@Sprite2\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\ngo to [front v] layer\ngo [backward v] (1) layers\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 [1]\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 <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        if <touching (sprite3 v)?> then\n            change [x v] by (-2)\n        else\n            change [x v] by (-1)\n        end\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        if <touching (sprite3 v)?> then\n            change [x v] by (2)\n        else\n            change [x v] by (1)\n        end\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching (sprite1 v)?> then\n        change y by (1)\n    end\n    if <touching (sprite1 v)?> then\n        change y by (1)\n    end\n    if <touching (sprite1 v)?> then\n        change y by (1)\n    end\n    if <touching (sprite1 v)?> then\n        change y by (1)\n    end\n    if <touching (sprite1 v)?> then\n        change y by (-4)\n        change x by ((x) * (-1))\n        if <<<key (up arrow v) pressed?> or <key (w 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 (sprite1 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 <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> or <key (w v) pressed?>> and <touching (sprite1 v)?>> then\n        set [y v] to [15]\n    end\n    change y by (1)\n    if <touching (sprite4 v)?> then\n        go to x: (-177) y: (12)\n    end\n    if <(x position) > [223]> then\n        go to x: (-177) y: (12)\n        broadcast (Trans v)\n        set [x v] to [0]\n        change [level v] by (1)\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  then\n        set [y v] to <touching (snow v)?>\n    end\nend\n\nchange [x v] by (1)\n\nwhen I receive [trans v]\nset [trans v] to [0]\nrepeat until <(trans) = [1]>\n    wait (0.001) seconds\nend\n\n@Sprite1\n\nwhen flag clicked\nshow\ngo to [front v] layer\nforever\n    if <(level) = [1]> then\n        switch costume to (costume1 v)\n    end\n    if <(level) = [2]> then\n        switch costume to (costume2 v)\n    end\n    if <(level) = [3]> then\n        switch costume to (costume3 v)\n    end\n    if <(level) = [4]> then\n        switch costume to (costume4 v)\n    end\n    if <(level) = [5]> then\n        switch costume to (costume5 v)\n    end\n    if <(level) = [6]> then\n        switch costume to (costume6 v)\n    end\n    if <(level) = [7]> then\n        switch costume to (costume7 v)\n    end\n    if <(level) = [8]> then\n        switch costume to (costume8 v)\n    end\n    if <(level) = [9]> then\n        switch costume to (costume9 v)\n    end\n    if <(level) = [10]> then\n        switch costume to (costume10 v)\n    end\nend\n\n@Sprite3\n\nwhen flag clicked\nshow\ngo to [front v] layer\ngo [backward v] (4) layers\nforever\n    if <(level) = [1]> then\n        switch costume to (costume1 v)\n    end\n    if <(level) = [2]> then\n        switch costume to (costume3 v)\n    end\n    if <(level) = [3]> then\n        switch costume to (costume2 v)\n    end\n    if <(level) = [4]> then\n        switch costume to (costume4 v)\n    end\n    if <(level) = [5]> then\n        switch costume to (costume5 v)\n    end\n    if <(level) = [6]> then\n        switch costume to (costume6 v)\n    end\n    if <(level) = [7]> then\n        switch costume to (costume7 v)\n    end\n    if <(level) = [8]> then\n        switch costume to (costume8 v)\n    end\n    if <(level) = [9]> then\n        switch costume to (costume9 v)\n    end\n    if <(level) = [10]> then\n        switch costume to (costume10 v)\n    end\nend\n\n@Sprite4\n\nwhen flag clicked\ngo to [back v] layer\nset [level v] to [1]\nswitch costume to (costume1 v)\nshow\ngo to x: (0) y: (0)\ngo to [back v] layer\ngo [forward v] (1) layers\nforever\n    if <(level) = [1]> then\n        switch costume to (costume1 v)\n    end\n    if <(level) = [2]> then\n        switch costume to (costume5 v)\n    end\n    if <(level) = [3]> then\n        switch costume to (costume15 v)\n    end\n    if <(level) = [4]> then\n        switch costume to (costume3 v)\n    end\n    if <(level) = [5]> then\n        switch costume to (costume16 v)\n    end\n    if <(level) = [6]> then\n        switch costume to (costume2 v)\n    end\n    if <(level) = [7]> then\n        switch costume to (costume4 v)\n    end\n    if <(level) = [8]> then\n        switch costume to (costume6 v)\n    end\n    if <(level) = [9]> then\n        switch costume to (costume7 v)\n    end\n    if <(level) = [10]> then\n        switch costume to (costume8 v)\n    end\nend\n\ngo to [back v] layer\n\ngo [forward v] (1) layers\n\n@snow\n\nwhen flag clicked\ngo to [back v] layer\nhide\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to [back v] layer\ngo [forward v] (pick random (0) to (10)) layers\ngo to x: (pick random (-130) to (341)) y: (153)\nshow\nglide (2) secs to x: (pick random (-130) to (341)) y: (-153)\ndelete this clone\n\ngo to x: (36) y: (28)\n\nrepeat until <(y position) = [-153]>\n    change y by (-1)\nend\n\nhide\n\nwait (0.2) seconds\n\n\n\nrepeat until <(snow) = [1]>\n\nwhen I start as a clone\nforever\n    if <(snow) = [1]> then\n        delete this clone\n    end\nend\n\ngo [forward v] (1) layers\n\ngo to [front v] layer\n\n@Shadows\n\nwhen flag clicked\ngo to [back v] layer\nset [ghost v] effect to (75)\ngo to x: (0) y: (0)\nshow\ngo to [back v] layer\nforever\n    switch costume to (level)\nend\n\n@Sprite5\n\nwhen flag clicked\nshow\nset [ghost v] effect to (75)\ngo to [back v] layer\nwait until <(level) = [2]>\nhide\n\nwhen I receive [trans v]\n\nwhen I receive [no v]\nhide\n\ngo to [back v] layer\ngo [backward v] (1) layers\ngo to x: (0) y: (0)\n\n@Sprite7\n\nwhen I receive [trans v]\ngo to [front v] layer\nset [trans v] to [0]\nset [ghost v] effect to (0)\nshow\ngo to x: (-450) y: (0)\nset [speed v] to [15]\nrepeat until <(x position) > [225]>\n    change x by (speed)\n    change [speed v] by (-0.1)\nend\nbroadcast (Show v)\nset [speed v] to [17]\nset [trans v] to [1]\nrepeat (25)\n    change y by (speed)\n    change [speed v] by (-0.07)\n    change [ghost v] effect by (5)\nend\nset [trans v] to [1]\nhide\n\nwhen flag clicked\nset [trans v] to [1]\nhide\n\nchange [speed v] by (-0.1)\n\nwait (0.003) seconds\n\nbroadcast (Yo wait up v)\n\n@Sprite8\n\nwhen I receive [trans v]\nshow\ngo to [front v] layer\ngo [backward v] (1) layers\n\nwhen I receive [show v]\nhide\n\nwhen flag clicked\nhide\n\nshow\n\n@Sprite6\n\nwhen flag clicked\nset [level v] to [0]\nhide\nforever\n    if <(level) = [11]> then\n        go to [front v] layer\n        show\n    end\nend\n\n@UT\n\nwhen flag clicked\nshow\ngo to [front v] layer\nset [ghost v] effect to (100)\n\n