Winter Platformer

Instructions: see HOW TO PLAY\n

@Stage\n\nwhen flag clicked\nforever\n    play sound [Winter Reflections v] until done\nend\n\n@player\n\nif <(x) > [0]> then\n    set [x v] to [5]\nelse\n    set [x v] to [-5]\nend\nset [y v] to [10]\n\nchange [player x v] by \n\nchange [player x v] by \n\nwhen I receive [flag v]\nclear graphic effects\nset [player x v] to (checkpoint)\nset [x v] to [0]\npoint in direction (90)\nset size to (100) %\nshow\ngo to x: (0) y: (180)\nset [y v] to [0]\nset y to (180)\nforever\n    if <<key (right arrow v) pressed?> or > then\n        change [x v] by (1.2)\n    end\n    if <<key (left arrow v) pressed?> or > then\n        change [x v] by (-1.2)\n    end\n    set [x v] to ((x) * (0.9))\n    change [player x v] by (x)\n    if <touching (ground v)?> then\n        change y by (1)\n        if <touching (ground v)?> then\n            change y by (1)\n            if <touching (ground v)?> then\n                change y by (1)\n                if <touching (ground v)?> then\n                    change y by (1)\n                    if <touching (ground v)?> then\n                        change y by (1)\n                        if <touching (ground v)?> then\n                            change y by (-4)\n                            change [player x v] by ((x) * (-2))\n                            if <<key (up arrow v) pressed?> or > then\n                                if <(x) < [0]> then\n                                    set [x v] to [5]\n                                else\n                                    set [x v] to [-5]\n                                end\n                                set [y v] to [10]\n                            else\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y v] by (-1)\n    change y by (y)\n    if <touching (ground v)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <touching (ground v)?> then\n        if <<key (up arrow v) pressed?> or <(u) = [1]>> then\n            set [y v] to [12]\n        end\n    end\n    if <<(y position) < [-179]> or <touching (bad v)?>> then\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        repeat until <(round (player x)) = (checkpoint)>\n            change [player x v] by (((checkpoint) - (player x)) / (7))\n        end\n        set [player x v] to (checkpoint)\n        point in direction (90)\n        set size to (100) %\n        show\n        go to x: (0) y: (180)\n        set [x v] to [0]\n        set [y v] to [0]\n        set y to (180)\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n    end\n    if <[7134] < (player x)> then\n        broadcast (end v)\n    end\nend\n\nwhen flag clicked\nset [first? v] to [0]\nset [checkpoint v] to [0]\nhide\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\ndelete this clone\n\n@ground\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\ndelete this clone\n\nwhen I receive [flag v]\nclear graphic effects\nswitch costume to (costume2 v)\nrepeat (16)\n    next costume\n    create clone of (_myself_ v)\nend\n\nwhen I receive [menu v]\nhide\ndelete this clone\n\nwhen flag clicked\nhide\n\ndefine set x to (number1) (number2)\nforever\n    if <<(player x) > ((number1) - (960))> or <((number1) + (960)) > (player x)>> then\n        switch costume to (costume2 v)\n        go to x: ((0) - ((player x) + ((0) - (number1)))) y: (0)\n        switch costume to (number2)\n        show\n    else\n        hide\n    end\nend\n\nwhen I start as a clone\nshow\nset x to (((costume [number v]) - (2)) * (480)) (costume [number v])\n\n@snow\n\nwhen flag clicked\ngo to [back v] layer\nhide\nrepeat (15)\n    go to (random position v)\n    create clone of (_myself_ v)\nend\nforever\n    repeat (10)\n        go to (random position v)\n        set y to (180)\n        create clone of (_myself_ v)\n    end\n    wait (1) seconds\nend\n\nwhen I start as a clone\nshow\nrepeat until <(y position) < [-179]>\n    change y by (-1)\nend\ndelete this clone\n\n@bad\n\nwhen I receive [end v]\nhide\ndelete this clone\n\nwhen I receive [flag v]\nswitch costume to (costume1 v)\nset [bad x v] to [-165]\nset [bad y v] to ((-31) - (11))\ncreate clone of (_myself_ v)\nwait (0.00001) seconds\nset [bad x v] to [144]\nset [bad y v] to ((-26) - (11))\ncreate clone of (_myself_ v)\nwait (0.00000001) seconds\nset [bad x v] to [705]\nset [bad y v] to ((-115) - (11))\ncreate clone of (_myself_ v)\nwait (0.0000001) seconds\nset [bad x v] to [1450]\nset [bad y v] to ((-120) - (11))\ncreate clone of (_myself_ v)\nwait (0.00001) seconds\nset [bad x v] to [1450]\nset [bad y v] to ((-33) - (11))\ncreate clone of (_myself_ v)\nwait (0.00001) seconds\nset [bad x v] to [2800]\nset [bad y v] to ((-118) - (11))\ncreate clone of (_myself_ v)\nwait (0.00001) seconds\nset [bad x v] to [3065]\nset [bad y v] to ((-118) - (11))\ncreate clone of (_myself_ v)\n\nwhen I receive [menu v]\nhide\ndelete this clone\n\nwhen flag clicked\nhide\n\ndefine set x to (number1) (number2) set y to (number3)\ngo to [front v] layer\nforever\n    set [ghost v] effect to (0)\n    if <<(player x) > ((number1) - (960))> or <((number1) + (960)) > (player x)>> then\n        switch costume to (costume2 v)\n        go to x: ((0) - ((player x) + ((0) - (number1)))) y: (number3)\n        turn right (1) degrees\n        switch costume to (number2)\n        show\n    else\n        hide\n    end\nend\n\nwhen I start as a clone\nset [bx v] to (bad x)\nset [by v] to (bad y)\nshow\nset x to (bx) (costume [number v]) set y to (by)\n\n@untitled\n\nwhen I receive [how to play v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [menu v]\nclear graphic effects\nshow\n\nwhen I receive [credit v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [menu v]\nclear graphic effects\nshow\n\nwhen I receive [flag v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@checkpoint\n\nwhen I start as a clone\nif <not <(first?) = [0]>> then\n    set [ghost v] effect to (100)\n    hide\nend\nforever\n    set y to (by)\n    if <touching (player v)?> then\n        change [first? v] by (1)\n        set [checkpoint v] to (bx)\n        repeat (10)\n            change [ghost v] effect by (10)\n            change y by (-1)\n        end\n        delete this clone\n    end\nend\n\nwhen I receive [flag v]\nswitch costume to (costume1 v)\nset [c x v] to [3551]\nset [c y v] to [148]\ncreate clone of (_myself_ v)\n\nwhen I receive [end v]\nset [checkpoint v] to [0]\nset [first? v] to [0]\nhide\ndelete this clone\n\nwhen I receive [menu v]\nhide\ndelete this clone\n\nwhen flag clicked\nset [ghost v] effect to (0)\nhide\n\ndefine set x to (number1) (number2) set y to (number3)\ngo to [front v] layer\nforever\n    turn left (1) degrees\n    if <<(player x) > ((number1) - (960))> or <((number1) + (960)) > (player x)>> then\n        switch costume to (costume2 v)\n        set x to ((0) - ((player x) + ((0) - (number1))))\n        switch costume to (number2)\n        show\n    else\n        hide\n    end\nend\n\nwhen I start as a clone\nset [bx v] to (c x)\nset [by v] to (c y)\nshow\nset x to (bx) (costume [number v]) set y to (by)\n\n@Sprite1\n\nwhen I receive [how to play v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [flag v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [menu v]\nclear graphic effects\ngo to x: (0) y: (-40)\nshow\nrepeat until <<mouse down?> and <touching (mouse-pointer v)?>>\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (20)\n    else\n        set [brightness v] effect to (0)\n    end\nend\nbroadcast (flag v)\n\nwhen I receive [credit v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Sprite2\n\nwhen I receive [how to play v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [menu v]\nclear graphic effects\nshow\ngo to x: (-150) y: (-40)\nrepeat until <<mouse down?> and <touching (mouse-pointer v)?>>\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (20)\n    else\n        set [brightness v] effect to (0)\n    end\nend\nbroadcast (credit v)\n\nwhen I receive [flag v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [credit v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [credit v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Sprite3\n\nwhen I receive [menu v]\nclear graphic effects\nshow\ngo to x: (150) y: (-40)\nrepeat until <<mouse down?> and <touching (mouse-pointer v)?>>\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (20)\n    else\n        set [brightness v] effect to (0)\n    end\nend\nbroadcast (how to play v)\n\nwhen flag clicked\nbroadcast (menu v)\n\nwhen I receive [flag v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [how to play v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [credit v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Sprite4\n\nwhen I receive [menu v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [flag v]\nclear graphic effects\ngo to x: (181) y: (143)\nshow\nrepeat until <<mouse down?> and <touching (mouse-pointer v)?>>\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (20)\n    else\n        set [brightness v] effect to (0)\n    end\nend\nbroadcast (menu v)\n\nwhen I receive [credit v]\nclear graphic effects\ngo to x: (181) y: (143)\nshow\nrepeat until <<mouse down?> and <touching (mouse-pointer v)?>>\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (20)\n    else\n        set [brightness v] effect to (0)\n    end\nend\nbroadcast (menu v)\n\nwhen I receive [how to play v]\nclear graphic effects\ngo to x: (181) y: (143)\nshow\nrepeat until <<mouse down?> and <touching (mouse-pointer v)?>>\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (20)\n    else\n        set [brightness v] effect to (0)\n    end\nend\nbroadcast (menu v)\n\nwhen I receive [no menu v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Sprite5\n\nwhen I receive [credit v]\nclear graphic effects\nshow\n\nwhen I receive [menu v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Sprite6\n\nwhen I receive [how to play v]\nclear graphic effects\nshow\n\nwhen I receive [menu v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Sprite7\n\nwhen I receive [menu v]\nhide\n\nwhen I receive [end v]\nshow\nswitch costume to (costume2 v)\ngo to x: (0) y: (480)\nrepeat until <(y position) < [-480]>\n    switch costume to (costume2 v)\n    change y by (-1)\n    switch costume to (costume1 v)\nend\nswitch costume to (costume1 v)\nbroadcast (menu v)\n\n@untitled2\n\nwhen flag clicked\nhide\nif <(username) = [corn-soup]> then\n    wait until <key (t v) pressed?>\n    show\n    broadcast (no menu v)\nend\n\n