Kitchen <a platformer>
@Stage\n\n@player\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nSetup\n\nwhen flag clicked\nforever\n    set [x v] to (x position)\n    set [y v] to (y position)\nend\n\nwhen I receive [you lose v]\nset [x v] to [0]\nset [y v] to [0]\ngo to x: (-230) y: (0)\nbroadcast (Fix collision v)\n\ndefine Check touching solid\nif <<<<touching (ground v)?> or <touching (handle v)?>> or <touching (handle2 v)?>> or <<touching (toaster1 v)?> or <touching (toaster2 v)?>>> then\n    set [touching v] to [1]\nelse\n    set [touching v] to [0]\nend\n\nwhen I receive [next level v]\nset [y v] to [0]\nset [x v] to [0]\ngo to x: (-190) y: (0)\n\ndefine Left Right collision and wall jump\nchange y by (-1)\nCheck touching solid\nif <(touching) > [0]> then\n    change y by (1)\n    Check touching solid\n    if <(touching) > [0]> then\n        change y by (1)\n        Check touching solid\n        if <(touching) > [0]> then\n            change y by (1)\n            Check touching solid\n            if <(touching) > [0]> then\n                change y by (1)\n                Check touching solid\n                if <(touching) > [0]> then\n                    change y by (1)\n                    Check touching solid\n                    if <(touching) > [0]> then\n                        change x by ((X) * (-1))\n                        change y by (-5)\n                        if <<<mouse down?> and <(y position) < (mouse y)>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n                            if <(X) > [0]> then\n                                set [x v] to [-7]\n                            else\n                                set [x v] to [7]\n                            end\n                            set [y v] to [14]\n                        else\n                            set [x v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Left Right cotrols\nif <<<mouse down?> and <(x position) > (mouse x)>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n    change [x v] by (-1)\nend\nif <<<mouse down?> and <(x position) < (mouse x)>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n    change [x v] by (1)\nend\nset [x v] to ((X) * (0.9))\nchange x by (X)\n\ndefine Up controls and collisions\nchange y by (-1)\nCheck touching solid\nif <(touching) > [0]> then\n    if <<<mouse down?> and <(y position) < (mouse y)>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        start sound [Jump v]\n        set [y v] to [15]\n    end\nend\nchange y by (1)\nchange [y v] by (-1)\nchange y by (Y)\nCheck touching solid\nif <(touching) > [0]> then\n    change y by ((Y) * (-1))\n    set [y v] to [0]\nend\n\ndefine Check - Death / Win\nif <(x position) > [230]> then\n    change [level v] by (1)\n    broadcast (next level v)\nend\nif <(y position) < [-170]> then\n    start sound [Oops v]\n    broadcast (You Lose v)\nend\n\ndefine Setup\nset [level v] to [1]\ngo to [front v] layer\ngo [backward v] (3) layers\nshow\nset size to (100) %\nswitch costume to (egg-a v)\ngo to x: (-190) y: (50)\nset drag mode [not draggable v]\nset rotation style [left-right v]\npoint in direction (90)\nbroadcast (Game Loop v)\n\nwhen I receive [game loop v]\nforever\n    Left Right cotrols\n    Left Right collision and wall jump\n    Up controls and collisions\n    Check - Death / Win\nend\n\ndefine Fix Collision in Direction (dir)\nset [temp v] to (direction)\nset [distance v] to [1]\npoint in direction (dir)\nrepeat (64)\n    Check touching solid\n    if <(touching) < [1]> then\n        point in direction (temp)\n        stop [this script v]\n    end\n    move (distance) steps\n    change [distance v] by (1)\n    turn left (180) degrees\nend\n\nwhen I receive [fix collision v]\nFix Collision in Direction [0]\n\nwhen flag clicked\nforever\n    Check touching solid\n    if <(touching) > [0]> then\n        broadcast (Fix collision v)\n    end\nend\n\nwhen I receive [you lose v]\nbroadcast (Fix collision v)\n\nwhen I receive [next level v]\nbroadcast (Fix collision v)\n\n@ground\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (level1 v)\n\nwhen I receive [next level v]\nnext costume\n\n@fork\n\nwhen I receive [next level v]\nforever\n    if <(Level) = [3]> then\n        switch costume to (costume1 v)\n        show\n    end\n    if <(Level) = [4]> then\n        switch costume to (costume7 v)\n    end\n    if <(Level) = [5]> then\n        hide\n    end\n    if <(Level) = [8]> then\n        show\n        switch costume to (costume2 v)\n    end\n    if <(Level) = [9]> then\n        show\n        switch costume to (costume3 v)\n    end\n    if <(Level) = [10]> then\n        hide\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nforever\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        broadcast (You Lose v)\n    end\nend\n\n@Knife1\n\nwhen I receive [next level v]\nset [speed y v] to [0]\nif <(Level) = [5]> then\n    switch costume to (costume2 v)\n    point in direction (90)\n    set size to (100) %\n    go to x: (-111) y: (85)\n    create clone of (_myself_ v)\n    go to x: (100) y: (85)\n    create clone of (_myself_ v)\n    stop [this script v]\nend\n\nwhen I start as a clone\nshow\nset [y v] to (y position)\nset [speed y v] to [-1]\nif <<(Level) = [5]> or <(Level) = [10]>> then\n    forever\n        repeat until <(Touching) > [0]>\n            change [speed y v] by (-3)\n            Move Vertical\n        end\n        set [touching v] to [0]\n        Fix\n        start sound [Crunch v]\n        wait (1) seconds\n        repeat until <(y position) > (y)>\n            change y by (4)\n        end\n        wait (2) seconds\n        set [speed y v] to [0]\n    end\nend\n\nwhen flag clicked\nhide\n\ndefine Fix\nrepeat until <not <touching (ground v)?>>\n    change y by (1)\nend\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        broadcast (You Lose v)\n    end\nend\n\ndefine Move Vertical\nrepeat ([abs v] of (speed y) )\n    change y by (-1)\n    if <touching (ground v)?> then\n        set [touching v] to [1]\n        stop [this script v]\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(Level) = [6]> then\n        delete this clone\n    end\nend\n\nstop [other scripts in sprite v]\n\nshow\npoint in direction (0)\nset size to (80) %\n\nshow\n\nset [touching v] to [0]\n\nset [level v] to [3]\n\ndefine Check die\n\nchange x by (10)\n\nif <touching (player v)?> then\n\nswitch costume to (costume2 v)\n\nswitch costume to (costume1 v)\n\nbroadcast (Fix collision v)\n\nwhen I receive [next level v]\nset [speed y v] to [0]\nif <(Level) = [10]> then\n    switch costume to (costume2 v)\n    point in direction (90)\n    set size to (100) %\n    go to x: (-34) y: (120)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nforever\n    if <(Level) = [11]> then\n        delete this clone\n    end\nend\n\n@Knife2\n\nwhen I receive [next level v]\nforever\n    set [speed y v] to [0]\n    if <(Level) = [6]> then\n        switch costume to (costume2 v)\n        point in direction (90)\n        set size to (100) %\n        go to x: (-150) y: (120)\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\ngo to x: (100) y: (85)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nset [y v] to (y position)\nset [speed y v] to [-1]\nif <(Level) = [6]> then\n    repeat until <(Level) = [7]>\n        repeat until <(Touching) > [0]>\n            change [speed y v] by (-3)\n            Move Vertical\n        end\n        set [touching v] to [0]\n        Fix\n        start sound [Crunch v]\n        wait (1) seconds\n        repeat until <(y position) > (y)>\n            change y by (4)\n        end\n        wait (2) seconds\n        set [speed y v] to [0]\n    end\n    delete this clone\nend\n\nwhen flag clicked\nhide\n\ndefine Fix\nrepeat until <not <touching (ground v)?>>\n    change y by (1)\nend\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        broadcast (You Lose v)\n    end\nend\n\nswitch costume to (costume2 v)\n\nif <touching (player v)?> then\n\nswitch costume to (costume1 v)\n\ndefine Move Vertical\nrepeat ([abs v] of (speed y) )\n    change y by (-1)\n    if <touching (ground v)?> then\n        set [touching v] to [1]\n        stop [this script v]\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(Level) = [7]> then\n        delete this clone\n    end\nend\n\nstop [other scripts in sprite v]\n\nshow\npoint in direction (0)\nset size to (80) %\n\nshow\n\nset [touching v] to [0]\n\nset [level v] to [3]\n\n@toaster1\n\nwhen flag clicked\nset [toaster # v] to []\nhide\n\nwait (1) seconds\n\nwhen I receive [next level v]\nif <(Level) = [7]> then\n    stop [other scripts in sprite v]\n    show\n    go to x: (-86) y: (-67)\n    show\n    switch costume to (no v)\n    repeat until <(Level) = [8]>\n        set [toaster # v] to [1]\n        create clone of (toast v)\n        wait (2) seconds\n    end\nend\n\nwhen I receive [next level v]\nif <(Level) = [8]> then\n    stop [other scripts in sprite v]\n    go to x: (70) y: (-65)\n    show\n    switch costume to (no v)\n    repeat until <(Level) = [9]>\n        set [toaster # v] to [1]\n        create clone of (toast v)\n        wait (2.5) seconds\n    end\nend\n\nwait (1) seconds\n\nforever\n\nwhen I receive [next level v]\nif <(Level) = [10]> then\n    stop [other scripts in sprite v]\n    go to x: (-140) y: (-67)\n    show\n    switch costume to (no v)\n    repeat until <(Level) = [11]>\n        set [toaster # v] to [1]\n        create clone of (toast v)\n        wait (2) seconds\n    end\nend\nhide\n\nwhen I receive [next level v]\nif <(Level) = [9]> then\n    stop [other scripts in sprite v]\n    go to x: (-2) y: (-67)\n    show\n    switch costume to (no v)\n    repeat until <(Level) = [10]>\n        set [toaster # v] to [1]\n        create clone of (toast v)\n        wait (2) seconds\n    end\nend\n\n@toaster2\n\nwhen flag clicked\nswitch costume to (no v)\nhide\n\nforever\n    create clone of (toast v)\n    set [toaster # v] to [2]\n    wait (2) seconds\nend\n\nwhen I receive [next level v]\nforever\n    if <(Level) = [7]> then\n        show\n        go to x: (150) y: (-64)\n        switch costume to (no v)\n        wait (1) seconds\n        repeat until <(Level) = [8]>\n            set [toaster # v] to [2]\n            create clone of (toast v)\n            wait (2) seconds\n        end\n        stop [this script v]\n    end\nend\n\nstop [this script v]\n\ngo to x: (166) y: (-64)\n\nwhen I receive [next level v]\nforever\n    if <(Level) = [8]> then\n        stop [other scripts in sprite v]\n        show\n        switch costume to (no v)\n        go to x: (166) y: (-64)\n        wait (1) seconds\n        repeat until <(Level) = [9]>\n            set [toaster # v] to [2]\n            create clone of (toast v)\n            wait (2.5) seconds\n        end\n    end\nend\n\nwhen I receive [next level v]\nforever\n    if <(Level) = [10]> then\n        stop [other scripts in sprite v]\n        show\n        go to x: (150) y: (-64)\n        switch costume to (no v)\n        wait (1) seconds\n        repeat until <(Level) = [11]>\n            set [toaster # v] to [2]\n            create clone of (toast v)\n            wait (2) seconds\n        end\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I receive [next level v]\nforever\n    if <(Level) = [9]> then\n        stop [other scripts in sprite v]\n        show\n        go to x: (101) y: (-66)\n        switch costume to (no v)\n        wait (1) seconds\n        repeat until <(Level) = [10]>\n            set [toaster # v] to [2]\n            create clone of (toast v)\n            wait (2) seconds\n        end\n        stop [this script v]\n    end\nend\n\nwhen I receive [next level v]\nforever\n    if <(Level) = [11]> then\n        hide\n        stop [other scripts in sprite v]\n    end\nend\n\nshow\ngo to x: (150) y: (-64)\nswitch costume to (no v)\nwait (1) seconds\nrepeat until <(Level) = [11]>\n    set [toaster # v] to [2]\n    create clone of (toast v)\n    wait (2) seconds\nend\n\nstop [this script v]\n\n@toast\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\ngo to [back v] layer\nshow\nif <(toaster #) = [1]> then\n    go to (toaster1 v)\nelse\n    go to (toaster2 v)\nend\nset [toaster # v] to []\nchange y by (2)\nset [sy v] to [20]\nforever\n    turn right (15) degrees\nend\n\nwhen I start as a clone\nrepeat until <touching (ground v)?>\n    change [sy v] by (-1)\n    change y by (sy)\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        broadcast (You Lose v)\n    end\nend\n\nwhen I receive [next level v]\nhide\ndelete this clone\n\n@Handle\n\nwhen I receive [next level v]\nforever\n    set [speed y v] to [0]\n    if <(Level) = [5]> then\n        switch costume to (costume2 v)\n        point in direction (90)\n        set size to (100) %\n        go to x: (-111) y: (85)\n        create clone of (_myself_ v)\n        go to x: (100) y: (85)\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\nwhen I start as a clone\nshow\nset [y v] to (y position)\nset [speed y v] to [-1]\nif <<(Level) = [5]> or <(Level) = [10]>> then\n    forever\n        repeat until <(Touching) > [0]>\n            change [speed y v] by (-3)\n            Move Vertical\n        end\n        set [touching v] to [0]\n        Fix\n        wait (1) seconds\n        repeat until <(y position) > (y)>\n            change y by (4)\n        end\n        wait (2) seconds\n        set [speed y v] to [0]\n    end\nend\n\nwhen flag clicked\nhide\n\ndefine Fix\nrepeat until <not <touching (ground v)?>>\n    change y by (1)\nend\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        broadcast (Fix collision v)\n    end\nend\n\nbroadcast (You Lose v)\n\ndefine Move Vertical\nrepeat ([abs v] of (speed y) )\n    change y by (-1)\n    switch costume to (costume3 v)\n    if <touching (ground v)?> then\n        set [touching v] to [1]\n        switch costume to (costume2 v)\n        stop [this script v]\n    end\n    switch costume to (costume2 v)\nend\n\nwhen I start as a clone\nforever\n    if <(Level) = [6]> then\n        delete this clone\n    end\nend\n\nstop [other scripts in sprite v]\n\nshow\npoint in direction (0)\nset size to (80) %\n\nshow\n\nset [touching v] to [0]\n\nset [level v] to [3]\n\ndefine Check die\n\nchange x by (10)\n\nif <touching (player v)?> then\n\nswitch costume to (costume2 v)\n\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nset [speed y v] to [0]\nif <(Level) = [10]> then\n    switch costume to (costume2 v)\n    point in direction (90)\n    set size to (100) %\n    go to x: (-34) y: (120)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nforever\n    if <(Level) = [11]> then\n        delete this clone\n    end\nend\n\n@Handle2\n\nwhen I receive [next level v]\nforever\n    set [speed y v] to [0]\n    if <(Level) = [6]> then\n        switch costume to (costume2 v)\n        point in direction (90)\n        set size to (100) %\n        go to x: (-150) y: (120)\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\nwhen I start as a clone\nshow\nset [y v] to (y position)\nset [speed y v] to [-1]\nif <(Level) = [6]> then\n    repeat until <(Level) = [7]>\n        repeat until <(Touching) > [0]>\n            change [speed y v] by (-3)\n            Move Vertical\n        end\n        set [touching v] to [0]\n        Fix\n        wait (1) seconds\n        repeat until <(y position) > (y)>\n            change y by (4)\n        end\n        wait (2) seconds\n        set [speed y v] to [0]\n    end\n    delete this clone\nend\n\nwhen flag clicked\nhide\n\ndefine Fix\nrepeat until <not <touching (ground v)?>>\n    change y by (1)\nend\n\nwhen I start as a clone\nforever\n\nif <touching (player v)?> then\n    switch costume to (costume2 v)\n    if <touching (player v)?> then\n        broadcast (You Lose v)\n    else\n        broadcast (Fix collision v)\n    end\nend\nswitch costume to (costume1 v)\n\ndefine Move Vertical\nrepeat ([abs v] of (speed y) )\n    change y by (-1)\n    switch costume to (costume3 v)\n    if <touching (ground v)?> then\n        set [touching v] to [1]\n        switch costume to (costume2 v)\n        stop [this script v]\n    end\n    switch costume to (costume2 v)\nend\n\nwhen I start as a clone\nforever\n    if <(Level) = [7]> then\n        delete this clone\n    end\nend\n\nstop [other scripts in sprite v]\n\nshow\npoint in direction (0)\nset size to (80) %\n\nshow\n\nset [touching v] to [0]\n\nset [level v] to [3]\n\n@words\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\nshow\nforever\n    go to [back v] layer\nend\n\ngo to x: (36) y: (28)\n\n@Pic\n\nshow\ngo to x: (0) y: (0)\ngo to [front v] layer\n\nwhen flag clicked\nhide\n\n
WASD keys or arrow keys to move.\nFloor, drawers, and toaster are solid.\nAvoid forks, knifes and toast.\nYou can stand on the handle of the knife.\nAll levels are possible.\n50 loves for part 2.\nPart 2 is out!!\nPart 2: https://scratch.mit.edu/projects/617238282/\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nHI. If you see this, and you think the background is too boring, you can suggest me in the comments!