Youtube || Platformer

Instructions:     [][]—[][]—[][]—[][]—[][] Fungi [][]—[][]—[][]—[][]—[][]\n_________________________________________________\nPlay as a mushroom who is unhappy just being a normal mushroom. Seek adventure by escaping hungry pigs, wierd roots, and of course spikes…\n___________\nControls:\n-W,A,S,D and arrow keys\n-N to skip\n-M to select Level\n-Z to progress text\n\nCredits:\nMusic by @CSpongeMusic please PLEASE sub to his youtube, he is an awesome music maker as well as an awesome friend. https://www.youtube.com/channel/UCVrgW-4dOv-gd9kWVr8c0lg\nCode & Art are by me and @Capt_Boanerges. \nThe text engine is by @Da_Emperor_Penguin go follow them now!\n_________________________________________________\n          ✅ Please follow @Capt_Boanerges for \n                             more cool games!\n                Also consider subbing to me on yt https://www.youtube.com/channel/UCNh18K3f8Xii1uf7rqFoOMQ\n\n\n

@Stage\n\nwhen flag clicked\nset [brightness v] effect to (100)\nwait (1) seconds\nclear graphic effects\n\n@Blank\n\nwhen flag clicked\nhide\nforever\n    forever\n        if <key (r v) pressed?> then\n            forever\n                if <key (a v) pressed?> then\n                    forever\n                        if <key (t v) pressed?> then\n                            forever\n                                if <key (s v) pressed?> then\n                                    forever\n                                        if <key (4 v) pressed?> then\n                                            forever\n                                                if <key (l v) pressed?> then\n                                                    forever\n                                                        if <key (i v) pressed?> then\n                                                            forever\n                                                                if <key (f v) pressed?> then\n                                                                    forever\n                                                                        if <key (e v) pressed?> then\n                                                                            stop all sounds\n                                                                            forever\n                                                                                start sound [MLG_Horns_Sound_Effect.mp3 v]\n                                                                                broadcast (Delete All v)\n                                                                                show\n                                                                                repeat (50)\n                                                                                    go to [front v] layer\n                                                                                    go to x: (pick random (-10) to (8)) y: (pick random (-10) to (8))\n                                                                                end\n                                                                            end\n                                                                        end\n                                                                    end\n                                                                end\n                                                            end\n                                                        end\n                                                    end\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen [timer v] > (Checktimer)\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@Player\n\nwhen flag clicked\nbroadcast (Green Flag v) and wait\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\nwhen I receive [play game v]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Game on\n    repeat until <(EXIT) > []>\n        Tick\n        broadcast (Tick v) and wait\n    end\n    if <(EXIT) = [Die]> then\n        Game - Die\n    end\nend\n\ndefine Game on\nset [x v] to [-200]\nset [y v] to [0]\nset [speed y v] to [0]\nset [speed x v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [speed v] to [1.5]\nset size to (40) %\nclear graphic effects\nshow\n\ndefine Tick\nchange [speed x v] by (2)\nset [speed x v] to ((Speed x) * (0.8))\nif <([abs v] of (Speed x) ) > [0.9]> then\n    Change player x by (round (Speed x))\nend\nif <<key (any v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n    if <(in air) < [4]> then\n        set [speed y v] to [16]\n    end\nend\nif <(Speed y) > [-20]> then\n    change [speed y v] by (-2)\nend\nChange player y by (Speed y)\nTest - Die\nset [scroll x v] to (x)\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <touching (spikes v)?> then\n    set [exit v] to [Die]\nend\n\ndefine Change player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (platforms 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 [speed y v] to [0]\nend\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine Change player x by (sx)\nchange [x v] by (sx)\nPosition\nif <touching (platforms v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (platforms v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\nend\nrepeat until <not <touching (platforms v)?>>\n    if <(sx) > [0]> then\n        change [x v] by (-1)\n    else\n        change [x v] by (1)\n    end\n    Position\nend\n\ndefine Game - Die\nset [exit v] to []\nrepeat (10)\n    change size by (3)\n    change [ghost v] effect by (10)\nend\nbroadcast (Dead v)\n\nwhen I receive [dead v]\nhide\nstop [other scripts in sprite v]\n\ndefine Test - Die\n\nwhen I receive [play game v]\nif <(username) = [-PickleAnimator-]> then\n    switch costume to (rat boi v)\nelse\n    if <(username) = [-Inkq]> then\n        switch costume to (rat boi v)\n    else\n        if <(username) = [Sk0nk]> then\n            switch costume to (rat boi v)\n        else\n            switch costume to (pumpkin v)\n        end\n    end\nend\n\nwhen I receive [delete all v]\nhide\nstop [other scripts in sprite v]\n\n@Platforms\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (ground v)\nrepeat (400)\n    Clone at x: [480] y: [0]\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [dead v]\nstop [other scripts in sprite v]\n\nwhen I receive [delete all v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@Spikes\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nrepeat (400)\n    Clone at x: [480] y: [0]\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nswitch costume to (pick random (1) to (3))\n\nwhen I receive [dead v]\nstop [other scripts in sprite v]\n\nwhen I receive [delete all v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@Intro\n\nwhen I start as a clone\nif <(costume [number v]) = [10]> then\n    show\n    set [xx v] to (pick random (-5) to (5))\n    set [yy v] to (pick random (-4) to (3))\n    set size to (0) %\n    set [ss v] to (pick random (5) to (11))\n    repeat (10)\n        change x by (Xx)\n        change y by (Yy)\n        change [yy v] by (0.05)\n        turn right (Yy) degrees\n        change size by (Ss)\n    end\n    repeat until <touching (_edge_ v)?>\n        change x by (Xx)\n        change y by (Yy)\n        change [yy v] by (0.05)\n        turn right (Yy) degrees\n    end\n    repeat (10)\n        change x by (Xx)\n        change y by (Yy)\n        change [yy v] by (0.05)\n        change [ghost v] effect by (10)\n        turn right (Yy) degrees\n    end\n    delete this clone\nend\n\nwhen flag clicked\nset volume to (100) %\nstart sound [Au5 - Follow You ft v]\nhide\nset [intro# v] to [0]\nrepeat (5)\n    set y to (250)\n    set x to (-200)\n    switch costume to (costume2 v)\n    set [brightness v] effect to (-20)\n    point in direction (45)\n    repeat (7)\n        set y to (250)\n        create clone of (_myself_ v)\n        change x by (75)\n    end\n    set y to (-250)\n    set x to (210)\n    set [brightness v] effect to (0)\n    switch costume to (costume2 v)\n    point in direction (90)\n    repeat (7)\n        set size to (0) %\n        create clone of (_myself_ v)\n        change x by (-75)\n    end\nend\nset y to (250)\nset x to (-200)\nswitch costume to (costume3 v)\nset [brightness v] effect to (0)\npoint in direction (45)\nrepeat (7)\n    create clone of (_myself_ v)\n    change x by (75)\nend\nset x to (0)\nset y to (0)\nswitch costume to (costume7 v)\nrepeat (3)\n    create clone of (_myself_ v)\n    next costume\n    wait (0.05) seconds\nend\nswitch costume to (buum v)\nrepeat (50)\n    create clone of (_myself_ v)\nend\nwait (0) seconds\nset y to (-100)\nswitch costume to (font v)\ncreate clone of (_myself_ v)\nwait (2) seconds\nset y to (250)\nset x to (-200)\nswitch costume to (costume1 v)\nset [brightness v] effect to (-20)\npoint in direction (45)\nrepeat (7)\n    set x to (-200)\n    create clone of (_myself_ v)\n    change y by (-75)\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [3]> then\n    show\n    set size to (0) %\n    point in direction (90)\n    repeat (30)\n        set [i v] to (((I) * (0.1)) + (((0) - (y position)) / (7)))\n        change y by (I)\n        change size by (((100) - (size)) / (5))\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [7]> then\n    show\n    go to [front v] layer\n    set size to (0) %\n    point in direction (90)\n    repeat (30)\n        set [i v] to (((I) * (0.1)) + (((0) - (y position)) / (5)))\n        change y by (I)\n        change size by (((100) - (size)) / (5))\n    end\n    wait (1) seconds\n    broadcast (Up v)\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [8]> then\n    go to [front v] layer\n    show\n    set size to (0) %\n    point in direction (90)\n    repeat (30)\n        set [i v] to (((I) * (0.1)) + (((0) - (y position)) / (5)))\n        change y by (I)\n        change size by (((100) - (size)) / (5))\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [9]> then\n    show\n    go to [front v] layer\n    set size to (0) %\n    point in direction (90)\n    repeat (30)\n        set [i v] to (((I) * (0.1)) + (((0) - (y position)) / (5)))\n        change y by (I)\n        change size by (((100) - (size)) / (5))\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [3]> then\n    show\n    set size to (0) %\n    point in direction (90)\n    repeat (30)\n        set [i v] to (((I) * (0.1)) + (((0) - (y position)) / (5)))\n        change y by (I)\n        change size by (((100) - (size)) / (5))\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [5]> then\n    show\n    set size to (0) %\n    point in direction (90)\n    repeat (30)\n        set [i v] to (((I) * (0.1)) + (((0) - (y position)) / (5)))\n        change y by (I)\n        change size by (((100) - (size)) / (5))\n    end\n    wait (3.6) seconds\n    repeat (30)\n        change y by ((y position) / (2))\n        change size by (((0) - (size)) / (15))\n        change [ghost v] effect by (4)\n    end\nend\n\nwhen I receive [up v]\nif <<(costume [number v]) < [10]> and <(costume [number v]) > [6]>> then\n    repeat (50)\n        set [i v] to (((I) * (0.1)) + (((50) - (y position)) / (5)))\n        change y by (I)\n        change size by (((70) - (size)) / (5))\n    end\n    repeat (30)\n        set [i v] to (((I) * (0.6)) + (((-) - (y position)) / (5)))\n        change y by (I)\n        change size by (((100) - (size)) / (5))\n    end\n    repeat (30)\n        change y by (((y position) + (3)) / (3))\n        change size by (-1)\n        change [ghost v] effect by (4)\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [11]> then\n    show\n    set size to (0) %\n    point in direction (90)\n    repeat (50)\n        set [i v] to (((I) * (0.8)) + (((0) - (y position)) / (5)))\n        change y by (I)\n        change size by (((100) - (size)) / (5))\n    end\n    repeat (50)\n        set [i v] to (((I) * (0.8)) + (((-100) - (y position)) / (5)))\n        change y by (I)\n        change size by (((0) - (size)) / (5))\n        change [ghost v] effect by (5)\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [2]> then\n    show\n    set size to (0) %\n    point in direction (90)\n    set x to (-300)\n    repeat (50)\n        set [i v] to (((I) * (0.1)) + (((0) - (x position)) / (8)))\n        change x by (I)\n        change size by (((100) - (size)) / (5))\n        go to [front v] layer\n    end\n    broadcast (Intro over v)\n    repeat (30)\n        change x by (((x position) - (1)) / (3))\n        change [ghost v] effect by (4)\n    end\nend\n\nwhen I receive [intro over v]\nif <(costume [number v]) > [2]> then\n    delete this clone\nend\n\nwhen I receive [intro over v]\nrepeat (100)\n    change volume by (-1)\nend\n\nwhen I receive [delete all v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@Menu\n\nwhen flag clicked\nset [weapon number v] to [1]\nset [no menu? v] to [0]\nhide\n\nwhen I receive [play game v]\nset [no menu? v] to [0]\nhide\nbroadcast (No Menu v)\n\nwhen I receive [dead v]\nset [no menu? v] to [0]\nhide\n\nwhen I receive [intro over v]\nbroadcast (No Menu v)\nset [no menu? v] to [0]\nset [play? v] to [0]\nclear graphic effects\nset drag mode [not draggable v]\nhide\ngo to x: (0) y: (0)\nswitch costume to (title v)\ncreate clone of (_myself_ v)\nswitch costume to (play v)\ncreate clone of (_myself_ v)\nswitch costume to (instructions v)\ncreate clone of (_myself_ v)\nrepeat until <(Play?) = [1]>\n    if <(No Menu?) = [1]> then\n        stop [other scripts in sprite v]\n        wait until <(No Menu?) = [0]>\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [1]> then\n    go to x: (0) y: (300)\n    set size to (100) %\n    show\n    repeat (20)\n        change y by (((80) - (y position)) / (5))\n    end\n    repeat until <(Play?) = [1]>\n        if <touching (mouse-pointer v)?> then\n            change size by (((100) - (size)) / (5))\n        else\n            change size by (((80) - (size)) / (5))\n        end\n    end\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nelse\n    if <(costume [number v]) = [2]> then\n        wait (0.5) seconds\n        go to x: (0) y: (0)\n        set size to (0) %\n        show\n        repeat until <(Play?) = [1]>\n            repeat until <touching (mouse-pointer v)?>\n                change size by (((100) - (size)) / (5))\n            end\n            repeat until <not <touching (mouse-pointer v)?>>\n                change size by (((115) - (size)) / (5))\n                if <mouse down?> then\n                    set [play? v] to [1]\n                    broadcast (Play Game v)\n                end\n            end\n        end\n        repeat (10)\n            change [ghost v] effect by (10)\n            change size by (((0) - (size)) / (5))\n        end\n        delete this clone\n    end\nend\n\nwhen I receive [no menu v]\ndelete this clone\n\nwhen I receive [delete all v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@Volume\n\nwhen I receive [volume toggle v]\nif <(costume [number v]) = [2]> then\n    set volume to (0) %\nelse\n    set volume to (100) %\nend\n\nwhen this sprite clicked\nbroadcast (volume toggle v)\nnext costume\n\nwhen I receive [intro over v]\nset size to (90) %\npoint in direction (90)\ngo to x: (180) y: (140)\ngo to [front v] layer\nclear graphic effects\nswitch costume to (1 v)\nshow\nforever\n    forever\n        repeat until <touching (mouse-pointer v)?>\n            change size by (((150) - (size)) / (5))\n        end\n        repeat until <not <touching (mouse-pointer v)?>>\n            change size by (((200) - (size)) / (5))\n        end\n    end\nend\n\nwhen flag clicked\nhide\nwait (12) seconds\nstop all sounds\nset volume to (100) %\nforever\n    play sound [02. Main Titles v] until done\nend\n\nwhen I receive [play game v]\nhide\n\nwhen I receive [delete all v]\nhide\nset volume to (0) %\nstop [other scripts in sprite v]\n\n@You Died!\n\nwhen flag clicked\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [dead v]\nwait (.5) seconds\ngo to x: (0) y: (0)\nswitch costume to (you lost v)\nset size to (100) %\nshow\ngo to [front v] layer\ncreate clone of (_myself_ v)\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\n\nwhen I receive [intro over v]\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [delete all v]\nhide\nstop [other scripts in sprite v]\n\n@Thumbnail\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    reset timer\n    hide\nend\n\nwhen [timer v] > (0.01)\nset [ghost v] effect to (100)\nrepeat (10)\n    show\n    change [ghost v] effect by (-10)\n    go to [front v] layer\nend\n\n