Frozen - A platformer #games

Instructions: You can use arrow keys or mobile to play!

@Stage\n\nwhen flag clicked\nforever\n    play sound [Goodbye v] until done\n    wait (1) seconds\nend\n\n@platform\n\nwhen flag clicked\nforever\n    switch costume to (join [costume] (level))\nend\n\n@player\n\nwhen flag clicked\ngo to [back v] layer\nset size to (70) %\nReset player\nset [level v] to [1]\nbroadcast (game loop v)\nforever\n    create clone of (_myself_ v)\n    change [xvel v] by ((<<<key (right arrow v) pressed?> or <<(mouse x) > ((x position) + (15))> and <mouse down?>>> or <key (d v) pressed?>> - <<<<(mouse x) < ((x position) + (-15))> and <mouse down?>> or <key (left arrow v) pressed?>> or <key (a v) pressed?>>) * (2))\n    if <<<<key (right arrow v) pressed?> or <<(mouse x) > ((x position) + (15))> and <mouse down?>>> or <key (d v) pressed?>> or <<<<(mouse x) < ((x position) + (-15))> and <mouse down?>> or <key (left arrow v) pressed?>> or <key (a v) pressed?>>> then\n        point in direction ((<<<key (right arrow v) pressed?> or <<(mouse x) > ((x position) + (15))> and <mouse down?>>> or <key (d v) pressed?>> - <<<<(mouse x) < ((x position) + (-15))> and <mouse down?>> or <key (left arrow v) pressed?>> or <key (a v) pressed?>>) * (90))\n    end\n    set [xvel v] to ((Xvel) * (0.8))\n    change x by (Xvel)\n    if <<touching (platform v)?> or <touching (wall v)?>> then\n        change y by (1)\n        if <<touching (platform v)?> or <touching (wall v)?>> then\n            change y by (1)\n            if <<touching (platform v)?> or <touching (wall v)?>> then\n                change y by (1)\n                if <<touching (platform v)?> or <touching (wall v)?>> then\n                    change y by (1)\n                    if <<touching (platform v)?> or <touching (wall v)?>> then\n                        change y by (1)\n                        if <<touching (platform v)?> or <touching (wall v)?>> then\n                            change x by ((Xvel) * (-1))\n                            change y by (-5)\n                            if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<(mouse y) > ((y position) + (20))> and <mouse down?>>> then\n                                start sound [Zoop v]\n                                if <(Xvel) > [0]> then\n                                    set [xvel v] to [-13]\n                                else\n                                    set [xvel v] to [13]\n                                end\n                                set [yvel v] to [10]\n                            else\n                                set [xvel v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yvel v] by (-1)\n    change y by (Yvel)\n    if <<touching (platform v)?> or <touching (wall v)?>> then\n        change y by ((Yvel) * (-1))\n        set [yvel v] to [0]\n    end\n    change y by (-1)\n    if <<touching (platform v)?> or <touching (wall v)?>> then\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<(mouse y) > ((y position) + (20))> and <mouse down?>>> then\n            set [yvel v] to [13]\n        end\n    end\n    if <(y position) < [-175]> then\n        Reset player\n        start sound [Crunch v]\n    end\n    if <(x position) > [235]> then\n        broadcast (next level v)\n        change [level v] by (1)\n        change x by (-470)\n    end\n    if <<touching (spikes v)?> or <<touching (boss v)?> or <touching (enemy v)?>>> then\n        Reset player\n        start sound [Crunch v]\n    end\n    if <touching (treasure v)?> then\n        repeat (2)\n            set [treasure v] to [1]\n        end\n        stop [all v]\n    end\n    change y by (1)\nend\n\ndefine Reset player\ngo to x: (-180) y: (0)\npoint in direction (90)\nset rotation style [left-right v]\nset [xvel v] to [0]\nset [yvel v] to [0]\n\nwhen I start as a clone\nrepeat (4)\n    change [ghost v] effect by (20)\n    change size by (-4)\nend\ndelete this clone\n\n@text\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    switch costume to ( v)\n    switch costume to (join [Level] (level))\nend\n\n@Thumbnail\n\nwhen flag clicked\nforever\n    set [e v] to ((timer) + (.1))\n    go to [front v] layer\nend\n\nwhen [timer v] > (e)\nshow\n\nwhen flag clicked\nhide\n\n@Spikes\n\nwhen flag clicked\nforever\n    switch costume to ( v)\n    switch costume to (join [Level] (level))\nend\n\n@Snow\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nforever\n    go to (random position v)\n    set y to (200)\n    create clone of (_myself_ v)\n    wait (0.10) seconds\nend\n\nwhen I start as a clone\ngo to [back v] layer\nclear graphic effects\nforever\n    change x by (pick random (-1) to (1))\n    change y by (-5)\n    if <(y position) < [-170]> then\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nrepeat (5)\n    change [ghost v] effect by (-10)\nend\nrepeat (5)\n    change [ghost v] effect by (10)\nend\n\n