Super Mario A Platformer #games
@Stage\n\nwhen flag clicked\nswitch backdrop to (out side v)\n\nwhen I receive [cutscene  v]\nswitch backdrop to (cave v)\n\n@player\n\nwhen flag clicked\nhide\n\nwhen I receive [go v]\nset size to (150) %\nswitch costume to (overworld v)\nshow\ngo to x: (-225) y: (-40)\nset [x move v] to [0]\nset [y move v] to [0]\nforever\n    go to [front v] layer\n    if <<(y position) < [-175]> or <<touching color (#ff8200)?> or <touching color (#ff0000)?>>> then\n        go to x: (-225) y: (-40)\n        start sound [Drum Boing v]\n        set [x move v] to [0]\n        set [y move v] to [0]\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 move v] by (-1)\n        point in direction (-90)\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x move v] by (1)\n        point in direction (90)\n    end\nend\n\nwhen I receive [go v]\nshow\n\nwhen I receive [go v]\nforever\n    if <<(x position) = [235]> or <(x position) > [235]>> then\n        go to x: (-225) y: (-40)\n        broadcast (next level v)\n    end\nend\n\nwhen I receive [the end :\) v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [go v]\nforever\n    set [x move v] to ((x move) * (0.85))\n    change x by (x move)\n    if <touching (real platformer  v)?> then\n        change y by (-2)\n        if <touching (real platformer  v)?> then\n            change y by (1)\n            if <touching (real platformer  v)?> then\n                change y by (1)\n                if <touching (real platformer  v)?> then\n                    change y by (1)\n                    if <touching (real platformer  v)?> then\n                        change y by (1)\n                        if <touching (real platformer  v)?> then\n                            change y by (1)\n                            if <touching (real platformer  v)?> then\n                                change y by (-5)\n                                change x by ((-1) * (x move))\n                                if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<<mouse down?> and <(mouse x) < (x position)>> or <<mouse down?> and <(mouse x) > (x position)>>>> and <not <(x move) = [0]>>> then\n                                    set [y move v] to [8]\n                                    set [x move v] to (((x move) / ([abs v] of (x move) )) * (-10))\n                                else\n                                    set [x move v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change y by (2)\n    end\nend\n\nwhen I receive [go v]\nforever\n    change y by (-3)\n    if <touching (real platformer  v)?> then\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            set [y move v] to [9]\n        end\n    end\n    change y by (3)\n    if <(y move) > [-15]> then\n        change [y move v] by (-0.5)\n    end\n    change y by (-2)\n    if <not <touching (real platformer  v)?>> then\n        change y by (-1)\n        if <not <touching (real platformer  v)?>> then\n            change y by (-1)\n            if <not <touching (real platformer  v)?>> then\n                change y by (-1)\n                if <not <touching (real platformer  v)?>> then\n                    change y by (-1)\n                    if <not <touching (real platformer  v)?>> then\n                        change y by (-1)\n                        if <not <touching (real platformer  v)?>> then\n                            change y by (5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (2)\n    change y by (y move)\n    if <touching (real platformer  v)?> then\n        change y by (-2)\n        if <touching (real platformer  v)?> then\n            change y by ((-1) * (y move))\n            set [y move v] to [-3]\n        end\n        change y by (2)\n    end\nend\n\n@real platformer \n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nswitch costume to (costume2 v)\n\nwhen I receive [go v]\nset [ghost v] effect to (100)\nshow\n\nwhen I receive [next level v]\nnext costume\n\nwhen I receive [go v]\nforever\n    if <(costume [number v]) = [19]> then\n        wait (2) seconds\n        broadcast (THE END :\) v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [go v]\nforever\n    if <(costume [number v]) = [6]> then\n        broadcast (cutscene  v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [go v]\nforever\n    if <(costume [number v]) = [7]> then\n        broadcast (hide crush v)\n        stop [this script v]\n    end\nend\n\n@deco\n\nwhen flag clicked\nset [level v] to [1]\nhide\ngo to x: (0) y: (0)\nswitch costume to (costume2 v)\n\nwhen I receive [go v]\nshow\n\nwhen I receive [next level v]\nchange [level v] by (1)\nnext costume\n\n@cutscene \n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [cutscene  v]\ngo to x: (-267) y: (319)\nshow\ngo to [front v] layer\nrepeat (58)\n    change y by (-5)\nend\n\nwhen I receive [hide crush v]\nhide\n\n@thumbnail \n\nwhen flag clicked\nhide\nset [ghost v] effect to (100)\n\nwhen I receive [go v]\nshow\nset size to (100) %\npoint in direction (90)\nswitch costume to (costume1 v)\nclear graphic effects\nforever\n    go to [front v] layer\n    repeat (25)\n        change size by (-5)\n        turn left (4) degrees\n    end\n    set [ghost v] effect to (100)\n    set size to (100) %\n    point in direction (90)\n    stop [this script v]\nend\n\nwhen I receive [go v]\nforever\n    if <(level) = [19]> then\n        stop [other scripts in sprite v]\n        play sound [Undertale OST  v] until done\n    end\nend\n\nwhen I receive [go v]\nstart sound [Undertale OST  v]\nwait until <(level) = [6]>\nstop all sounds\nforever\n    play sound [undertale-ost-031-waterfall v] until done\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\ngo to [front v] layer\nswitch costume to (pick random (2) to (3))\nset size to (0) %\ngo to (random position v)\npoint in direction (pick random (-180) to (180))\nset [ghost v] effect to (50)\nrepeat (20)\n    change size by (2)\nend\nwait (2) seconds\nrepeat (15)\n    change size by (-2)\nend\ndelete this clone\n\nwhen I receive [the end :\) v]\nhide\nforever\n    wait (.3) seconds\n    create clone of (_myself_ v)\nend\n\n@introduction \n\nwhen flag clicked\ngo to x: (0) y: (0)\npoint in direction (90)\nset size to (100) %\nintro\n\nwhen I receive [go v]\nswitch costume to (costume2 v)\ngo to [front v] layer\nhide\n\ndefine intro\ngo to [front v] layer\ngo to [front v] layer\nshow\nstart sound [intro song v]\nshow\nswitch costume to (costume1 v)\nrepeat (16)\n    next costume\nend\nswitch costume to (costume17 v)\nrepeat (16)\n    wait (.0003) seconds\n    next costume\nend\nswitch costume to (costume33 v)\nrepeat (6)\n    wait (.0003) seconds\n    next costume\nend\nwait (6) seconds\nbroadcast (go v)\nhide\nstop [other scripts in sprite v]\n\nwhen flag clicked\nwait (3) seconds\nforever\n    repeat (15)\n        change size by (3)\n    end\n    repeat (5)\n        change size by (-3)\n    end\nend\n\nwhen I receive [the end :\) v]\ngo to x: (0) y: (100)\nswitch costume to (costume40 v)\npoint in direction (90)\nset size to (4) %\ngo to [front v] layer\nshow\nrepeat (25)\n    change size by (4)\n    turn right (14.4) degrees\nend\n\n@Cave Sprites\n\n@Effect\n\nwhen I start as a clone\nshow\ngo to [back v] layer\nset [ghost v] effect to (pick random (45) to (90))\nset size to (pick random (40) to (70)) %\ngo to x: (240) y: (pick random (180) to (-180))\nglide (pick random (1.0) to (3.0)) secs to x: (-240) y: (pick random (180) to (-180))\ndelete this clone\n\nwhen I receive [cutscene  v]\nhide\nforever\n    create clone of (_myself_ v)\n    wait (.9) seconds\nend\n\nwhen I receive [go v]\nshow variable [time v]\nset [time v] to [0]\nforever\n    repeat until <(level) = [19]>\n        change [time v] by (1)\n        wait (1) seconds\n    end\n    stop [this script v]\nend\n\nwhen flag clicked\nhide variable [time v]\nhide variable [☁ world record v]\n\nwhen I receive [the end :\) v]\nforever\n    if <(time) < (☁ World record)> then\n        set [☁ world record v] to (time)\n    end\nend\n\nwhen I receive [the end :\) v]\nshow variable [☁ world record v]\n\nwhen I receive [timer higher v]\nchange [time v] by (20)\n\n@boss\n\nwhen flag clicked\nforever\n    reset timer\n    repeat (10)\n        switch costume to (costume1 v)\n    end\n    if <(timer) > [0.1]> then\n        set [turbo mode on? v] to [0]\n    else\n        set [turbo mode on? v] to [1]\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(turbo mode on?) = [1]> then\n        set [time v] to [120]\n    end\nend\n\n