Ice - A Mobile Friendly Platformer

Instructions: Welcome to Ice, a 15 level trek through the cold plains. \nAvoid spikes and freezing water, and make it home alive.\nControls: WASD or Arrow Keys or Mobile\n\nCan we get this on Trending?

@Stage\n\nwhen flag clicked\nswitch backdrop to (thumbnail v)\n\nwhen I receive [next level v]\nnext backdrop\n\nwhen I receive [start v]\nswitch backdrop to (level 1 v)\nforever\n    switch backdrop to ((Level) + (1))\nend\n\nwhen I receive [intro is done v]\nforever\n    play sound [Music v] until done\nend\n\n@Button\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    hide\n    broadcast (Start v)\n    switch backdrop to (level 1 v)\nend\n\nif <(costume [number v]) = [2]> then\n    go to x: (0) y: (64)\n    switch backdrop to (backdrop1 v)\n    hide\n    hide list [time v]\n    hide list [player v]\nend\n\nwhen I receive [intro is done v]\ngo to x: (168) y: (-39)\nswitch costume to (play v)\nshow\n\n@Platform\n\nwhen flag clicked\nswitch costume to (level 1 v)\nhide\n\nwhen I receive [start v]\nforever\n    show\n    switch costume to (Level)\n    go to x: (0) y: (0)\n    if <(Level) = [15]> then\n        hide\n    end\nend\n\n@Player\n\nwhen flag clicked\nswitch costume to (right v)\n\nwhen flag clicked\nset [level v] to [1]\nhide\nset size to (70) %\nReset player variables\nreset\n\ndefine Reset player variables\nset [x v v] to [0]\nset [y v v] to [0]\n\ndefine reset\nclear graphic effects\nset size to (70) %\npoint in direction (90)\ngo to x: (-220) y: (-35)\nReset player variables\n\nwhen flag clicked\nswitch costume to (right v)\nforever\n    set [direction v] to (direction)\nend\n\nwhen flag clicked\nforever\n    if <(x position) > [230]> then\n        broadcast (next level v)\n        reset\n        change [level v] by (1)\n    end\nend\n\nwhen I receive [next level v]\nreset\nReset player variables\n\nwhen [s v] key pressed\nbroadcast (next level v)\nchange [level v] by (1)\n\nwhen flag clicked\nforever\n    if <(y position) < [-180]> then\n        reset\n        go to x: (-200) y: (-35)\n    end\n    if <touching color (#00b6ff)?> then\n        reset\n        go to x: (-200) y: (-35)\n    end\n    if <touching (spikes v)?> then\n        reset\n        go to x: (-200) y: (-35)\n    end\n    if <touching (boosts v)?> then\n        if <<(Level) = [12]> or <(Level) = [13]>> then\n            set [y v v] to [20]\n        else\n            set [x v v] to [20]\n        end\n    end\nend\n\nwhen I receive [start v]\ngo to x: (-200) y: (-40)\nshow\nforever\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x v v] by (.9)\n    end\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [x v v] by (-.9)\n    end\n    set [x v v] to ((X v) * (0.9))\n    change x by (X v)\n    if <<touching (platform v)?> or <touching (moving platform v)?>> then\n        change y by (1)\n        if <<touching (platform v)?> or <touching (moving platform v)?>> then\n            change y by (1)\n            if <<touching (platform v)?> or <touching (moving platform v)?>> then\n                change y by (1)\n                if <<touching (platform v)?> or <touching (moving platform v)?>> then\n                    change y by (1)\n                    if <<touching (platform v)?> or <touching (moving platform v)?>> then\n                        change y by (1)\n                        if <<touching (platform v)?> or <touching (moving platform v)?>> then\n                            change x by ((X v) * (-1))\n                            change y by (-5)\n                        end\n                        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (20))>>>> then\n                            if <(X v) > [0]> then\n                                set [x v v] to [-5]\n                            else\n                                set [x v v] to [5]\n                            end\n                            set [y v v] to [15]\n                        else\n                            set [x v v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y v v] by (-1)\n    change y by (Y v)\n    if <<touching (platform v)?> or <touching (moving platform v)?>> then\n        change y by ((Y v) * (-1))\n        set [y v v] to [0]\n    end\n    change y by (-1)\n    if <<touching (platform v)?> or <touching (moving platform v)?>> then\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (20))>>>> then\n            set [y v v] to [12]\n        end\n    end\n    change y by (1)\n    if <(Level) = [2]> then\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        switch costume to (right v)\n    else\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n            switch costume to (left v)\n        else\n            switch costume to (center v)\n        end\n    end\nend\n\nwhen I receive [next level v]\ngo to x: (-200) y: (-111)\nshow\nforever\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x v v] by (.9)\n    end\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [x v v] by (-.9)\n    end\n    set [x v v] to ((X v) * (0.9))\n    change x by (X v)\n    if <<touching (platform v)?> or <touching (moving platform v)?>> then\n        change y by (1)\n        if <<touching (platform v)?> or <touching (moving platform v)?>> then\n            change y by (1)\n            if <<touching (platform v)?> or <touching (moving platform v)?>> then\n                change y by (1)\n                if <<touching (platform v)?> or <touching (moving platform v)?>> then\n                    change y by (1)\n                    if <<touching (platform v)?> or <touching (moving platform v)?>> then\n                        change y by (1)\n                        if <<touching (platform v)?> or <touching (moving platform v)?>> then\n                            change x by ((X v) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (20))>>>> then\n                                if <(X v) > [0]> then\n                                    set [x v v] to [-5]\n                                else\n                                    set [x v v] to [5]\n                                end\n                                set [y v v] to [15]\n                            else\n                                set [x v v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y v v] by (-1)\n    change y by (Y v)\n    if <<touching (platform v)?> or <touching (moving platform v)?>> then\n        change y by ((Y v) * (-1))\n        set [y v v] to [0]\n    end\n    change y by (-1)\n    if <<touching (platform v)?> or <touching (moving platform v)?>> then\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (20))>>>> then\n            set [y v v] to [12]\n        end\n    end\n    change y by (1)\n    if <(Level) = [15]> then\n        hide\n        stop [this script v]\n    end\nend\n\n@Snow\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nrepeat until <(y position) < [-100]>\n    if <(pick random (1) to (2)) = [1]> then\n        repeat (pick random (8) to (12))\n            change x by (pick random (-3) to (-1))\n            change y by (pick random (-3) to (-1))\n            turn right (pick random (1) to (3)) degrees\n            wait (pick random (0.02) to (0.05)) seconds\n        end\n        change x by (pick random (3) to (5))\n        wait (pick random (0.02) to (0.05)) seconds\n    else\n        repeat (pick random (8) to (12))\n            change x by (pick random (1) to (3))\n            change y by (pick random (-3) to (-1))\n            turn left (pick random (1) to (3)) degrees\n            wait (pick random (0.05) to (0.1)) seconds\n        end\n        change x by (pick random (-5) to (-3))\n        wait (pick random (0.02) to (0.05)) seconds\n    end\nend\ndelete this clone\n\nwhen I start as a clone\nset [ghost v] effect to (45)\nshow\nforever\n    if <touching (player v)?> then\n        hide\n        delete this clone\n    end\n    if <touching (_edge_ v)?> then\n        wait (1) seconds\n        if <touching (_edge_ v)?> then\n            delete this clone\n        end\n    end\nend\n\nwhen I receive [start v]\nset size to (50) %\nhide\nforever\n    go to x: (pick random (-250) to (250)) y: (185)\n    if <(x position) > [230]> then\n        set y to (150)\n    end\n    create clone of (_myself_ v)\n    wait (pick random (0.2) to (0.4)) seconds\nend\n\n@Spikes\n\nwhen I receive [start v]\nshow\n\nwhen flag clicked\nswitch costume to (level 1 v)\nhide\n\nwhen I receive [start v]\nhide\nforever\n    show\n    switch costume to (Level)\n    go to x: (0) y: (0)\n    go to [front v] layer\nend\n\n@Cloud\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [start v]\nforever\n    wait (pick random (.3) to (1.3)) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to [back v] layer\nset [ghost v] effect to (pick random (25) to (45))\nshow\nset rotation style [don't rotate v]\nif <(pick random (1) to (2)) = [1]> then\n    point in direction (-90)\n    change x by (300)\n    change y by (pick random (50) to (125))\n    repeat (300)\n        move (2) steps\n        change [ghost v] effect by (.3)\n    end\nelse\n    point in direction (90)\n    change x by (-300)\n    change y by (pick random (90) to (120))\n    repeat (300)\n        move (2) steps\n        change [ghost v] effect by (.3)\n    end\nend\n\n@Background\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (background v)\nhide\n\nwhen I receive [start v]\nshow\nforever\n    go to [back v] layer\n    if <(Level) = [15]> then\n        hide\n    end\nend\n\n@Sprite1\n\nwhen I receive [intro is done v]\nrepeat (10)\n    change [ghost v] effect by (10)\n    change [whirl v] effect by (2)\nend\nhide\n\ngo to [back v] layer\n\nwhen flag clicked\nclear graphic effects\ngo to [back v] layer\nshow\n\n@Boosts\n\nwhen I receive [start v]\nforever\n    show\n    switch costume to (Level)\n    go to x: (0) y: (0)\n    go to [front v] layer\n    if <<(Level) = [12]> or <(Level) = [13]>> then\n        point in direction (0)\n    else\n        point in direction (90)\n    end\nend\n\nwhen flag clicked\nset [color v] effect to (0)\nswitch costume to (level 1 v)\nhide\n\n@Intro\n\nwhen I start as a clone\ngo to [front v] layer\ngo to x: (0) y: (0)\nshow\nset [clonecostume v] to (costume [number v])\nset [size v] to [70]\nif <(costume [number v]) = [3]> then\n    repeat until <(size) > [1200]>\n        switch costume to (costume3 v)\n        change [size v] by (((1201) - (Size)) / (5))\n        set size to (Size) %\n        switch costume to (CloneCostume)\n    end\nelse\n    if <(costume [number v]) = [4]> then\n        go to [front v] layer\n        repeat until <(size) > [1050]>\n            switch costume to (costume3 v)\n            change [size v] by (((1051) - (Size)) / (5))\n            set size to (Size) %\n            switch costume to (CloneCostume)\n        end\n    else\n        if <(costume [number v]) = [5]> then\n            repeat until <(size) > [825]>\n                switch costume to (costume3 v)\n                change [size v] by (((826) - (Size)) / (5))\n                set size to (Size) %\n                switch costume to (CloneCostume)\n            end\n        else\n            if <(costume [number v]) = [6]> then\n                go to x: (0) y: (20)\n                start sound [Water Drop v]\n                go to [back v] layer\n                set [cloney v] to [8]\n                set size to (10) %\n                repeat (20)\n                    change size by ((CloneY) / (2.5))\n                    change y by (CloneY)\n                    change [cloney v] by (-0.7)\n                end\n                set [colorchange? v] to [1]\n                delete this clone\n            else\n                if <<(costume [number v]) = [8]> or <(costume [number v]) = [9]>> then\n                    hide\n                    set [s v] to (pick random (0.1) to (1))\n                    point in direction (pick random (0) to (360))\n                    go to (random position v)\n                    wait until <(timer) > [2]>\n                    go to [back v] layer\n                    show\n                    set size to (pick random (1) to (15)) %\n                    set [ghost v] effect to (pick random (20) to (50))\n                    repeat until <(timer) > [6.1 ]>\n                        go to [front v] layer\n                        turn right (0.25) degrees\n                        move ((s) / (3)) steps\n                    end\n                    delete this clone\n                end\n            end\n        end\n    end\nend\nrepeat until <(timer) > [5]>\n    switch costume to (costume3 v)\n    change [size v] by (0.2)\n    set size to (Size) %\n    switch costume to (CloneCostume)\nend\nset [cloney v] to [10]\nrepeat until <[200] > (size)>\n    switch costume to (costume3 v)\n    change [size v] by (CloneY)\n    set size to (Size) %\n    change [cloney v] by (-2)\n    switch costume to (CloneCostume)\nend\nswitch costume to (CloneCostume)\nrepeat until <[20] > (size)>\n    change [size v] by (CloneY)\n    set size to (Size) %\n    change [cloney v] by (-1)\nend\ndelete this clone\n\ndefine Clone\nrepeat (25)\n    switch costume to (pick random (8) to (9))\n    create clone of (_myself_ v)\nend\n\nwhen I receive [message1 v]\nwait (1) seconds\nbroadcast (intro is done v)\n\nwhen I receive [intro v]\nset [clonecostume v] to [0]\nerase all\nreset timer\ngo to [front v] layer\nset [colorchange? v] to [0]\nswitch costume to (red v)\nset size to (1) %\ngo to x: (0) y: (180)\npoint in direction (90)\nshow\nstart sound [High Whoosh v]\nrepeat until <[20] > (y position)>\n    change size by (((75) - (size)) / (5))\n    change y by (((19) - (y position)) / (5))\nend\ngo to x: (0) y: (20)\nClone\nswitch costume to (red4 v)\ncreate clone of (_myself_ v)\nswitch costume to (red v)\nwait until <(ColorChange?) = [1]>\nstart sound [Suction Cup v]\nswitch costume to (costume2 v)\nrepeat until <[1] > (y position)>\n    change y by (((0) - (y position)) / (5))\nend\nstamp\nhide\nswitch costume to (red v)\nrepeat (3)\n    wait (0.05) seconds\n    create clone of (_myself_ v)\n    next costume\nend\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\npoint in direction (0)\nset size to (1) %\nshow\nrepeat until <(size) > [199.9]>\n    change size by (((200) - (size)) / (5))\n    turn right (((85) - (direction)) / (7)) degrees\n    go to [front v] layer\nend\nerase all\nrepeat until <(timer) > [5]>\n    change size by (0.2)\n    turn right (0.2) degrees\nend\nset [spin v] to [10]\nrepeat until <[10] > (size)>\n    change size by (Spin)\n    change [spin v] by (-1)\nend\nswitch costume to (costume2 v)\nset size to (50) %\nwait until <(timer) > [6.5]>\nchange y by (-1)\nbroadcast (message1 v)\nrepeat until <[-179] > (y position)>\n    change y by ((y position) / (5))\n    change size by (-1)\nend\nhide\n\nwhen I receive [intro v]\nset volume to (100) %\nwait (.5) seconds\nstart sound [FR Time Lapse v]\n\nrepeat (100)\n    change volume by (10)\nend\n\nwhen flag clicked\nbroadcast (intro v)\n\n