Christmas (Platformer) #games#all#christmas

Instructions: *Use the W,A,S,D or Arrow Keys To Move The Player.\n

@Stage\n\nwhen flag clicked\nset [music v] to [Yes]\nset [snow v] to [Yes]\nset [sound v] to [Yes]\nset [level v] to [1]\nbroadcast (Menu v)\n\nwhen I receive [start v]\nset [time v] to [0]\nforever\n    change [time v] by (1)\nend\n\nwhen flag clicked\nforever\n    play sound [music v] until done\nend\n\nwhen flag clicked\nset volume to (50) %\nforever\n    if <(Music) = [Yes]> then\n        set volume to (50) %\n    else\n        set volume to (0) %\n    end\nend\n\n@Blank\n\n@Player\n\ndefine Game On\nset [sx v] to [0]\nset [x v] to [-222]\nset [y v] to [-98]\nset [sy v] to [0]\nset [in air v] to [0]\nset [finish v] to []\npoint in direction (90)\nshow\n\ndefine Movement\nswitch costume to (hitbox v)\nif <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    point in direction (-90)\n    change [sx v] by (-1.5)\nend\nif <<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>> then\n    point in direction (90)\n    change [sx v] by (1.5)\nend\nset [sx v] to ((sx) * (0.8))\nif <([abs v] of (sx) ) > [0.9]> then\n    Change Player x by (round (sx))\nend\nif <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n    if <(in air) < [4]> then\n        set [sy v] to [12]\n    end\nend\nif <(sy) > [-20]> then\n    change [sy v] by (-1.5)\nend\nChange Player y by (sy)\nDie\nPosition\nswitch costume to (santa claus  v)\n\nwhen I receive [start v]\ncreate clone of (_myself_ v)\ngo to [front v] layer\nwait until <not <mouse down?>>\nforever\n    broadcast (Reset v)\n    broadcast (Setup v)\n    Game On\n    repeat until <(Finish) > []>\n        Movement\n    end\n    if <(Finish) = [Yes]> then\n        Game Con\n    else\n        Game End\n    end\nend\n\ndefine Change Player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (platform v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine Position\ngo to x: (x) y: (y)\n\ndefine Change Player x by (sx)\nchange [x v] by (sx)\nPosition\nif <touching (platform v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (platform v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n        if <(sx) > [0]> then\n            if <(Sound) = [Yes]> then\n                start sound [Wall Jump v]\n            end\n            set [sx v] to [-15]\n        else\n            if <(Sound) = [Yes]> then\n                start sound [Wall Jump v]\n            end\n            set [sx v] to [15]\n        end\n        set [in air v] to [0]\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <touching (platform v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Game End\nif <(Sound) = [Yes]> then\n    start sound [Hurt v]\nend\nbroadcast (Transition v)\nset [finish v] to []\n\ndefine Die\nif <<touching (danger v)?> or <<touching (spikes v)?> or <touching (saw v)?>>> then\n    set [finish v] to [No]\nend\n\ndefine Game Con\nbroadcast (Transition v)\nchange [level v] by (1)\n\nwhen I receive [bounce v]\nset [sy v] to [10]\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nforever\n    switch costume to (home v)\n    go to x: (-215) y: (160)\n    go to [front v] layer\n    if <touching (mouse-pointer v)?> then\n        change size by: [90]\n        if <mouse down?> then\n            broadcast (Menu v)\n        end\n        wait until <not <mouse down?>>\n    else\n        change size by: [80]\n    end\nend\n\ndefine change size by: (size)\nchange size by (((size) - (size)) / (4))\n\nwhen I receive [menu v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [start v]\nforever\n    if <(x) < [-240]> then\n        set [x v] to [-240]\n    end\n    if <(x) > [230]> then\n        if <not <(Level) = [31]>> then\n            set [finish v] to [Yes]\n        else\n            set [x v] to [230]\n        end\n    end\nend\n\n@Platform\n\nwhen I receive [start v]\nshow\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [menu v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@Text\n\nwhen I receive [start v]\ncreate clone of (_myself_ v)\nshow\ngo to [back v] layer\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [menu v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I start as a clone\nshow\ngo to [front v] layer\nforever\n    if <not <(Level) = [31]>> then\n        go to x: (200) y: (-160)\n        switch costume to (button v)\n        if <touching (mouse-pointer v)?> then\n            change size by: [110]\n            if <mouse down?> then\n                if <(Sound) = [Yes]> then\n                    start sound [click2 v]\n                end\n                set [finish v] to [Yes]\n                wait until <not <mouse down?>>\n            end\n        else\n            change size by: [90]\n        end\n    else\n        delete this clone\n    end\nend\n\ndefine change size by: (size)\nchange size by (((size) - (size)) / (4))\n\n@Danger\n\nwhen I receive [start v]\nshow\nforever\n    switch costume to (Level)\n    go to [back v] layer\n    go to x: (0) y: (0)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [menu v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@Saw\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Create A Clone At x: (x) y: (y) Speed: (speed) Distance: (distance)\nset [x v] to (x)\nset [y v] to (y)\nset [speed v] to (speed)\nset [distance v] to (distance)\ngo to [back v] layer\ncreate clone of (_myself_ v)\n\nwhen I receive [setup v]\nhide\nswitch costume to (saw v)\nset [type v] to [1]\nif <(Level) = [20]> then\n    Create A Clone At x: [-20] y: [-110] Speed: [3] Distance: [60]\n    Create A Clone At x: [-20] y: [-110] Speed: [3] Distance: [-60]\nend\nif <(Level) = [21]> then\n    Create A Clone At x: [85] y: [26] Speed: [5] Distance: [60]\n    Create A Clone At x: [85] y: [26] Speed: [5] Distance: [-60]\nend\nif <(Level) = [23]> then\n    Create A Clone At x: [4] y: [-18] Speed: [5] Distance: [100]\nend\nif <(Level) = [24]> then\n    Create A Clone At x: [45] y: [-36] Speed: [5] Distance: [120]\n    Create A Clone At x: [45] y: [-36] Speed: [5] Distance: [-120]\nend\nset [type v] to [2]\nif <(Level) = [26]> then\n    Create A Clone At x: [17] y: [-33] Speed: [5] Distance: [40]\nend\nif <(Level) = [27]> then\n    Create A Clone At x: [-96] y: [-30] Speed: [6] Distance: [40]\n    Create A Clone At x: [76] y: [-30] Speed: [6] Distance: [-40]\nend\nif <(Level) = [28]> then\n    set [type v] to [2]\n    Create A Clone At x: [-42] y: [-25] Speed: [6] Distance: [45]\n    Create A Clone At x: [36] y: [-25] Speed: [6] Distance: [-45]\n    set [type v] to [1]\n    Create A Clone At x: [139] y: [-108] Speed: [5] Distance: [40]\nend\nset [type v] to [2]\nif <(Level) = [30]> then\n    Create A Clone At x: [128] y: [-53] Speed: [6] Distance: [45]\nend\n\nwhen I start as a clone\nshow\nforever\n    turn right (8) degrees\n    if <(type) = [1]> then\n        go to x: ((x) + (([cos v] of ((Time) * (speed)) ) * (distance))) y: (y)\n    else\n        go to x: (x) y: ((y) + (([cos v] of ((Time) * (speed)) ) * (distance)))\n    end\nend\n\nwhen I receive [menu v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@Enemy\n\nwhen I start as a clone\nset [die v] to [No]\nset [x v] to [0]\nset [y v] to [0]\ngo to [front v] layer\ngo [backward v] (2) layers\nset size to (45) %\nshow\nforever\n    switch costume to (2 v)\n    if <(die) = [No]> then\n        change [y v] by (-1)\n        if <([x position v] of [player v]) < ((x position) - (10))> then\n            change [x v] by ((sx) * (-1))\n            point in direction (-90)\n        end\n        if <((x position) - (-10)) < ([x position v] of [player v])> then\n            change [x v] by (sx)\n            point in direction (90)\n        end\n        set [x v] to ((x) * (0.9))\n        change x by (x)\n        if <touching (platform v)?> then\n            change y by (1)\n            if <touching (platform v)?> then\n                change y by (1)\n                if <touching (platform v)?> then\n                    change y by (1)\n                    if <touching (platform v)?> then\n                        change y by (1)\n                        if <touching (platform v)?> then\n                            change y by (-3)\n                            change x by ((x) * (-1))\n                            if <<(y position) < ([y position v] of [player v])> or <(y position) < ([x position v] of [player v])>> 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 [12]\n                            else\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change y by (y)\n        if <touching (platform v)?> then\n            change y by ((y) - ((y) * (2)))\n            set [y v] to [0]\n        end\n        change y by (-1)\n    end\n    switch costume to (1 v)\nend\n\nwhen flag clicked\nhide\n\ndefine Create A Clone at x: (x) y: (y) speed: (sx)\ngo to x: (x) y: (y)\nset [sx v] to (sx)\ncreate clone of (_myself_ v)\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [setup v]\nhide\nif <(Level) = [10]> then\n    Create A Clone at x: [215] y: [-98] speed: [.5]\nend\nif <(Level) = [12]> then\n    Create A Clone at x: [221] y: [40] speed: [.5]\n    Create A Clone at x: [221] y: [40] speed: [.6]\nend\nif <(Level) = [13]> then\n    Create A Clone at x: [215] y: [-98] speed: [.5]\nend\nif <(Level) = [15]> then\n    Create A Clone at x: [215] y: [-98] speed: [.5]\n    Create A Clone at x: [215] y: [57] speed: [.4]\nend\nif <(Level) = [16]> then\n    Create A Clone at x: [215] y: [-15] speed: [.5]\nend\nif <(Level) = [22]> then\n    Create A Clone at x: [87] y: [-98] speed: [.5]\nend\n\nwhen I start as a clone\nforever\n    if <<touching (danger v)?> or <touching (saw v)?>> then\n        wait (0.05) seconds\n        delete this clone\n    end\n    if <<touching (player v)?> and <(Finish) = []>> then\n        if <<([y position v] of [player v]) > (y position)> and <([sy v] of [player v]) < [-1]>> then\n            set [die v] to [Yes]\n            broadcast (Bounce v)\n            if <(Sound) = [Yes]> then\n                start sound [Die v]\n            end\n            stop [other scripts in sprite v]\n            repeat (5)\n                change [ghost v] effect by (20)\n            end\n            delete this clone\n        else\n            set [finish v] to [No]\n        end\n    end\nend\n\nwhen I receive [menu v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@Snow\n\nwhen I receive [start v]\nhide\nif <(Snow) = [Yes]> then\n    forever\n        repeat (5)\n            create clone of (_myself_ v)\n        end\n        wait (pick random (0.2) to (0.5)) seconds\n    end\nend\n\nwhen I start as a clone\ngo to [front v] layer\ngo [backward v] (1) layers\ngo to x: (pick random (-240) to (240)) y: (180)\nset size to (pick random (50) to (70)) %\nshow\nrepeat until <<touching (platform v)?> or <<(y position) < [-179]> or <<touching (danger v)?> or <touching (saw v)?>>>>\n    change y by (-4)\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <touching (snow v)?> then\n        delete this clone\n    end\nend\n\nwhen I receive [menu v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@Transition\n\nwhen I receive [transition v]\ngo to [front v] layer\ngo to x: (0) y: (0)\nshow\nglide (1) secs to x: (479) y: (0)\nhide\n\nwhen I receive [start v]\nforever\n    go to [front v] layer\nend\n\nwhen I receive [menu v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@Menu\n\nwhen I receive [menu v]\nhide\nset size to (100) %\nset [clone# v] to [0]\nCreate a clone at x: [0] y: [80]\nCreate a clone at x: [6] y: [-69]\nset size to (90) %\nCreate a clone at x: [0] y: [-131]\nCreate a clone at x: [-131] y: [-131]\nCreate a clone at x: [127] y: [-131]\nset size to (100) %\nshow\nforever\n    go to x: (0) y: (0)\n    switch costume to (bg v)\n    go to [back v] layer\nend\n\ndefine Create a clone at x: (x) y: (y)\ngo to x: (x) y: (y)\nchange [clone# v] by (1)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nforever\n    if <(clone#) = [1]> then\n        switch costume to (text v)\n    end\n    if <(clone#) = [2]> then\n        switch costume to (button v)\n    end\n    if <(clone#) = [3]> then\n        if <(Music) = [Yes]> then\n            switch costume to (musicon v)\n        else\n            switch costume to (musicoff v)\n        end\n    end\n    if <(clone#) = [4]> then\n        if <(Sound) = [Yes]> then\n            switch costume to (soundon v)\n        else\n            switch costume to (soundoff v)\n        end\n    end\n    if <(clone#) = [5]> then\n        if <(Snow) = [Yes]> then\n            switch costume to (snowon v)\n        else\n            switch costume to (snowoff v)\n        end\n    end\nend\n\nwhen I start as a clone\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        if <(clone#) = [2]> then\n            Change Size By [110]\n        end\n        if <mouse down?> then\n            if <not <(clone#) = [1]>> then\n                if <(clone#) = [2]> then\n                    if <(Sound) = [Yes]> then\n                        start sound [click v]\n                    end\n                else\n                    if <(Sound) = [Yes]> then\n                        start sound [click2 v]\n                    end\n                end\n            end\n            if <(clone#) = [2]> then\n                broadcast (Start v)\n                delete this clone\n            end\n            if <(clone#) = [3]> then\n                if <(Music) = [Yes]> then\n                    set [music v] to [No]\n                else\n                    set [music v] to [Yes]\n                end\n            end\n            if <(clone#) = [4]> then\n                if <(Sound) = [Yes]> then\n                    set [sound v] to [No]\n                else\n                    set [sound v] to [Yes]\n                end\n            end\n            if <(clone#) = [5]> then\n                if <(Snow) = [Yes]> then\n                    set [snow v] to [No]\n                else\n                    set [snow v] to [Yes]\n                end\n            end\n            wait until <not <mouse down?>>\n        end\n    else\n        if <not <(clone#) > [2]>> then\n            Change Size By [95]\n        else\n            Change Size By [90]\n        end\n    end\nend\n\nwhen I receive [start v]\nhide\ndelete this clone\n\ndefine Change Size By (size)\nchange size by (((size) - (size)) / (4))\n\nwhen I start as a clone\nforever\n    if <(clone#) = [1]> then\n        set size to (100) %\n        wait (0.5) seconds\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    go to x: (0) y: (0)\n    show\nend\n\n