Sushi Rescue Platformer

Instructions: Platformer Boss Battle\n\nHeart, star and follow for a muffin\n=============================================\nJust another filler project. Arrow keys to move, Z to go through the dialogue, avoid all the bad things. It's pretty short, and no I am not making it a full game. I was just bored so I made this.\n=============================================\nCredits: \nMe @JWhandle\nToby Fox and Undertale for music\n@awesomeal82 for typing script\n=============================================\nSorry if there are bugs, I really didn't put a lot of effort in it because I have been working on the heist movie.

@Stage\n\nwhen flag clicked\n\nwhen I receive [intro done v]\nwait (1) seconds\nset volume to (40) %\n\n@Intro\n\nwhen flag clicked\nset [id v] to [1]\ncreate clone of (_myself_ v)\nset [id v] to [2]\ncreate clone of (_myself_ v)\nset [id v] to [3]\ncreate clone of (_myself_ v)\nset [id v] to [4]\ncreate clone of (_myself_ v)\nstart sound [Never Mind v]\nswitch costume to (1 v)\nshow\ngo to x: (0) y: (0)\npoint in direction (-90)\nset size to (300) %\nset [sine v] to [30]\nrepeat (40)\n    change size by (((100) - (size)) * (1))\n    turn right (((90) - (direction)) * (0.18)) degrees\nend\nset [glide v] to [7]\nrepeat (20)\n    change y by ((glide) - (1))\n    change [glide v] by (-0.34)\nend\nwait (5.8) seconds\nhide\n\nwhen I start as a clone\nif <(id) = [1]> then\n    clear graphic effects\n    show\n    go to x: (0) y: (0)\n    point in direction (90)\n    set size to (100) %\n    switch costume to (bg v)\nelse\n    if <(id) = [2]> then\n        id 2\n    else\n        if <(id) = [3]> then\n            id 3\n        else\n            id 4\n        end\n    end\nend\n\ndefine id 2\ngo to x: (0) y: (0)\nswitch costume to (dot2 v)\nhide\nclear graphic effects\ngo to [front v] layer\nwait (7) seconds\nshow\nset size to (0.5) %\nset [vel v] to [1]\nswitch costume to (dot v)\nrepeat (50)\n    switch costume to (dot2 v)\n    change [vel v] by ((size) / (50))\n    change size by (vel)\n    switch costume to (dot v)\nend\nbroadcast (Intro Done v)\n\nwhen I receive [intro done v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\ndefine id 3\ngo to x: (0) y: (0)\nswitch costume to (dot2 v)\nhide\nclear graphic effects\ngo to [front v] layer\nwait (7.2) seconds\nshow\nset size to (0.5) %\nset [vel v] to [1]\nswitch costume to (dot v)\nrepeat (50)\n    switch costume to (dot2 v)\n    change [vel v] by ((size) / (50))\n    change size by (vel)\n    switch costume to (smaller dot v)\nend\n\ndefine id 4\ngo to x: (0) y: (0)\nswitch costume to (dot2 v)\nhide\nclear graphic effects\ngo to [front v] layer\nwait (7.4) seconds\nshow\nset size to (0.5) %\nset [vel v] to [1]\nswitch costume to (dot v)\nrepeat (50)\n    switch costume to (dot2 v)\n    change [vel v] by ((size) / (50))\n    change size by (vel)\n    switch costume to (crazy dot v)\n    turn left (1) degrees\nend\n\n@text\n\nwhen flag clicked\nhide\ngo to [front v] layer\nwait (2.4) seconds\ngo to x: (0) y: (-60)\nset size to (100) %\nset [ghost v] effect to (100)\nshow\nset [rotation v] to [-10]\nrepeat (70)\n    change [ghost v] effect by (rotation)\n    change [rotation v] by (-1)\n    wait (0.01) seconds\nend\nset [ghost v] effect to (0)\n\nwhen I receive [message1 v]\nhide\n\nwhen I receive [intro done v]\nhide\n\n@Player\n\nwhen flag clicked\nset volume to (50) %\nset [level v] to [1]\nset [deaths v] to [0]\nhide\n\ndefine Platformer Physics (speed) (friction) (jump height)\nchange [y velocity v] by (-1)\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    change [x velocity v] by (speed)\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    change [x velocity v] by ((0) - (speed))\nend\nset [x velocity v] to ((X Velocity) * (friction))\nchange x by (X Velocity)\nset [slope v] to [0]\nif <touching (level v)?> then\n    repeat until <<not <touching (level v)?>> or <(Slope) = [-8]>>\n        change [slope v] by (-1)\n        change y by (1)\n    end\nend\nif <touching (level v)?> then\n    change y by (Slope)\n    repeat until <not <touching (level v)?>>\n        change x by ((0) - (([abs v] of (X Velocity) ) / (X Velocity)))\n    end\n    set [x velocity v] to [0]\nend\nchange y by (Y Velocity)\nif <touching (level v)?> then\n    repeat until <not <touching (level v)?>>\n        change y by ((([abs v] of (Y Velocity) ) / (Y Velocity)) * (-1))\n    end\n    set [y velocity v] to [0]\nend\nchange y by (-1)\nif <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> and <touching (level v)?>> then\n    set [y velocity v] to (jump height)\nend\nchange y by (1)\n\ndefine Detection\nif <touching (flag v)?> then\n    broadcast (Next v)\n    start sound [Ding Sound Effect v]\n    set [level v] to ((Level) + (1))\n    set [x velocity v] to [0]\n    set [y velocity v] to [0]\n    go to x: (-215) y: (-78)\nend\nif <<<touching (danger v)?> or <(y position) = [-179]>> and <not <(CHEAT) = [1]>>> then\n    start sound [Oops v]\n    set [deaths v] to ((DEATHS) + (1))\n    repeat (3)\n        hide\n        wait (0.11) seconds\n        show\n        wait (0.11) seconds\n    end\n    hide\n    wait (0.11) seconds\n    show\n    go to x: (-215) y: (-78)\n    set [x velocity v] to [0]\n    set [y velocity v] to [0]\nend\nif <<<touching (saws v)?> or <touching (saws2 v)?>> and <not <(CHEAT) = [1]>>> then\n    start sound [Pew v]\n    set [deaths v] to ((DEATHS) + (1))\n    clear graphic effects\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    go to x: (-215) y: (-78)\n    set [x velocity v] to [0]\n    set [y velocity v] to [0]\n    wait (0.4) seconds\n    clear graphic effects\nend\nif <touching (bouncy v)?> then\n    start sound [Big Boing v]\n    set [y velocity v] to [18]\nend\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    point in direction (90)\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    point in direction (-90)\nend\n\nwhen I receive [intro done v]\npoint in direction (90)\nset size to (100) %\nset [cheat v] to [0]\nwait (0.1) seconds\nshow\nswitch costume to (costume1 v)\ngo [forward v] (88) layers\ngo to x: (-215) y: (-78)\nset rotation style [left-right v]\nset [level v] to [1]\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nforever\n    Platformer Physics [0.95] [0.88] [11.8]\n    Detection\nend\n\nwhen flag clicked\nforever\n    Cheats Menu\nend\n\ndefine Cheats Menu\nif <<<key (1 v) pressed?> and <<(username) = [250119code2]> or <(username) = [250119test2]>>> and <not <(CHEAT) = [1]>>> then\n    set [cheat v] to [1]\n    wait (0.3) seconds\nelse\n    if <<key (1 v) pressed?> and <(CHEAT) = [1]>> then\n        set [cheat v] to [0]\n        wait (0.3) seconds\n    end\nend\nif <<key (up arrow v) pressed?> and <(CHEAT) = [1]>> then\n    set [y velocity v] to [8]\nend\nif <<key (down arrow v) pressed?> and <(CHEAT) = [1]>> then\n    set [y velocity v] to [-6]\nend\n\nwhen flag clicked\nforever\n    set [x v] to (round (x position))\n    set [y v] to (round (y position))\nend\n\n@Level\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Danger\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    switch costume to (Level)\nend\n\n@Flag\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Saws\n\nwhen flag clicked\nhide\n\ndefine Clone At X: (x) (y)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [next v]\nif  then\n    delete this clone\nend\nif <(Level) = [8]> then\n    Clone At X: [-124] [-110]\n    Clone At X: [25] [-110]\nend\nif <(Level) = [9]> then\n    Clone At X: [156] [65]\nend\nif <(Level) = [10]> then\n    Clone At X: [-138] [-110]\n    Clone At X: [7] [-110]\nend\nif <(Level) = [11]> then\n    Clone At X: [22] [-110]\nend\nif <(Level) = [12]> then\n    Clone At X: [71] [25]\nend\nif <(Level) = [13]> then\n    Clone At X: [-124] [-110]\nend\nif <(Level) = [14]> then\n    Clone At X: [-130] [-110]\n    Clone At X: [130] [45]\nend\nif <(Level) = [16]> then\n    Clone At X: [-117] [-110]\n    Clone At X: [71] [-110]\nend\nif <(Level) = [18]> then\n    Clone At X: [44] [-110]\nend\n\nwhen I start as a clone\nshow\ngo to [back v] layer\nforever\n    turn right (4) degrees\n    repeat until <not <(Level) = [10]>>\n        if <(Level) = [10]> then\n            turn right (4) degrees\n            repeat (60)\n                turn right (4) degrees\n                change x by (1)\n            end\n            wait (1) seconds\n            repeat (60)\n                turn left (5) degrees\n                change x by (-1)\n            end\n            wait (1) seconds\n        end\n    end\n    repeat until <not <(Level) = [11]>>\n        if <(Level) = [11]> then\n            turn right (4) degrees\n            repeat (110)\n                turn right (4) degrees\n                change x by (1)\n            end\n            wait (1) seconds\n            repeat (110)\n                turn left (5) degrees\n                change x by (-1)\n            end\n            wait (1) seconds\n        end\n    end\n    repeat until <not <(Level) = [12]>>\n        if <(Level) = [12]> then\n            turn right (4) degrees\n            repeat (60)\n                turn right (4) degrees\n                change x by (1)\n            end\n            wait (1) seconds\n            repeat (60)\n                turn left (5) degrees\n                change x by (-1)\n            end\n            wait (1) seconds\n        end\n    end\n    repeat until <not <(Level) = [14]>>\n        if <(Level) = [14]> then\n            turn right (4) degrees\n            repeat (50)\n                turn right (4) degrees\n                change y by (2)\n            end\n            wait (1) seconds\n            repeat (50)\n                turn right (4) degrees\n                change y by (-2)\n            end\n            wait (1) seconds\n        end\n    end\n    repeat until <not <(Level) = [16]>>\n        if <(Level) = [16]> then\n            turn right (4) degrees\n            repeat (80)\n                turn right (4) degrees\n                change y by (2)\n            end\n            wait (1) seconds\n            repeat (80)\n                turn right (4) degrees\n                change y by (-2)\n            end\n            wait (1) seconds\n        end\n    end\nend\n\n@Level Shading\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\n    set [ghost v] effect to (55)\n    go [backward v] (98) layers\nend\n\n@TN\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nforever\n    if <(GAME OVER) = [0]> then\n        go to [front v] layer\n    else\n        go [forward v] (77) layers\n    end\nend\n\n@BG Effects\n\nwhen I start as a clone\nshow\nset [ghost v] effect to (pick random (70) to (80))\nrepeat until <(y position) > [177]>\n    move (pick random (3) to (4)) steps\n    go to [back v] layer\nend\ndelete this clone\n\nwhen I receive [intro done v]\nhide\ngo to [back v] layer\nforever\n    go to x: (pick random (-240) to (240)) y: (-180)\n    set size to (pick random (70) to (100)) %\n    point in direction (pick random (-30) to (30))\n    create clone of (_myself_ v)\n    wait (0.10) seconds\nend\n\nwhen I start as a clone\n\n@Decoration\n\nwhen flag clicked\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\ngo [backward v] (98) layers\nforever\n    switch costume to (Level)\nend\n\ngo [backward v] (98) layers\n\n@Music Button\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\nshow\nswitch costume to (costume1 v)\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by (((90) - (size)) / (5))\n        set [brightness v] effect to (5)\n    else\n        change size by (((75) - (size)) / (5))\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [intro done v]\nwait (0.8) seconds\nset volume to (50) %\nforever\n    play sound [Plugged \(post mastering\) v] until done\n    play sound [mbb-beach v] until done\nend\n\nwhen this sprite clicked\nif <(volume) = [50]> then\n    switch costume to (costume2 v)\n    set volume to (0) %\nelse\n    switch costume to (costume1 v)\n    set volume to (50) %\nend\n\n@Text\n\nwhen flag clicked\nclear graphic effects\nforever\n    switch costume to (Level)\n    if <touching (player v)?> then\n        set [ghost v] effect to (30)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\n@Bouncy\n\nwhen flag clicked\nhide\n\ndefine Clone At X: (x) (y)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nforever\n    show\n    if <touching (player v)?> then\n        switch costume to (crouch v)\n        wait (0.1) seconds\n    else\n        switch costume to (idle v)\n    end\nend\n\nwhen I receive [next v]\nif  then\n    delete this clone\nend\nif <(Level) = [3]> then\n    Clone At X: [-121] [-86]\nend\nif <(Level) = [4]> then\n    Clone At X: [127] [-86]\nend\nif <(Level) = [5]> then\n    Clone At X: [-150] [-88]\n    Clone At X: [203] [46]\nend\nif <(Level) = [6]> then\nif <(Level) = [7]> then\n    Clone At X: [-117] [-87.8]\n    Clone At X: [1] [-87.6]\n    Clone At X: [105] [-88.2]\nend\nif <(Level) = [8]> then\n    Clone At X: [203] [-96.8]\nend\nif <(Level) = [9]> then\n    Clone At X: [-147] [-100]\nend\nif <(Level) = [10]> then\n    Clone At X: [154] [-100]\nend\nif <(Level) = [11]> then\n    Clone At X: [210] [-100]\nend\nif <(Level) = [12]> then\n    Clone At X: [204] [40]\nend\nif <(Level) = [14]> then\n    Clone At X: [30] [-69]\nend\nif <(Level) = [15]> then\n    Clone At X: [196] [-103]\nend\nif <(Level) = [17]> then\n    Clone At X: [-76] [-100]\n    Clone At X: [-215] [32]\nend\n\n@GAME OVER\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\n\nwhen I receive [intro done v]\nset [game over v] to [0]\nwait until <(DEATHS) = [50]>\nset [game over v] to [1]\nrepeat (100)\n    change [ghost v] effect by (-1)\n    go to [front v] layer\nend\ngo [forward v] (99) layers\nstop [all v]\n\n@Saws2\n\nwhen flag clicked\nhide\n\ndefine Clone At X: (x) (y)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [next v]\nif  then\n    delete this clone\nend\nif <(Level) = [16]> then\n    Clone At X: [-27] [40]\n    Clone At X: [161] [40]\nend\n\nwhen I start as a clone\nshow\ngo to [back v] layer\nforever\n    turn right (4) degrees\n    repeat until <not <(Level) = [16]>>\n        if <(Level) = [16]> then\n            turn right (4) degrees\n            repeat (80)\n                turn right (4) degrees\n                change y by (-2)\n            end\n            wait (1) seconds\n            repeat (80)\n                turn right (4) degrees\n                change y by (2)\n            end\n            wait (1) seconds\n        end\n    end\nend\n\nClone At X: [25] [-110]\n\n