-Dungeons- A Platformer V1.1

Instructions:                                ~New Update!~\nI know this is small, but I quickly made the fog that rolls across your screen a bit smoother when it comes and leaves from your view.\n\n~Past Updates~ \nV1.0 - Release \nV1.1 - Difficulty Update\nV1.2 - Smoother Fog\n\nControls:\n Arrow keys to move.\n "X" to punch.\n Spacebar to get rid of, or change text.\n\n My FIRST GAME!\n I'm super happy that I finally finished this. I know it's not perfect, I'm super proud never the less. This has to be the hardest project I've ever done (I have other scratch accounts). Now before you ask, no, the "clouds" rolling across your screen are NOT actually clouds, but instead fog. And I know the final animation is kinda bad, but whatever. Please report any glitches you find in the comments.\n \nBtw, the animated cutscenes are usually kinda laggy at first. If you don't mind losing all of your progress, click the green flag when you get to that part, and the next time you get to a cutscene it should be smoother.

@Stage\n\nwhen flag clicked\nset volume to (100) %\nforever\n    play sound [633206_Random-Song-01 v] until done\nend\n\nwhen I receive [start cutscene v]\nrepeat (20)\n    change volume by (-5)\nend\nstop [other scripts in sprite v]\n\nwhen I receive [bossfight v]\nif <(volume) = [0]> then\n    wait (0.4) seconds\n    repeat (20)\n        change volume by (5)\n    end\nend\n\nwhen I receive [bossfight v]\nforever\n    play sound [790340_dj-N-Theory-of-Everything- \(1\) v] until done\nend\n\nwhen I receive [start v]\nif <(volume) < [100]> then\n    stop [other scripts in sprite v]\n    set volume to (100) %\n    forever\n        play sound [633206_Random-Song-01 v] until done\n    end\nend\n\nwhen I receive [game over v]\nrepeat (20)\n    change volume by (-5)\nend\n\nset [lives v] to [1]\n\n@player\n\ndefine Movement (steps)\nchange [falling v] by (1)\nrepeat (steps)\n    set [previous pos v] to (x position)\n    change x by ((xSpeed) / (steps))\n    Check Solid Colision\n    if <(Touching) > [0]> then\n        Collide X - Slope or Wall?\n    end\n    set [previous pos v] to (y position)\n    change y by ((ySpeed) / (steps))\n    Check Solid Colision\n    if <(Touching) > [0]> then\n        Collide Y - Ceiling or Floor?\n    end\nend\n\nwhen I receive [tick v]\nMoved by Moving Platform\nswitch backdrop to <touching (map v)?>\nControl Keys - Up, Down\nControl Keys - Left, Right\nControl Keys - Attack\nMovement (([abs v] of (xSpeed) ) + ([abs v] of (ySpeed) ))\nSet Costume\n\ndefine Control Keys - Up, Down\nif <key (up arrow v) pressed?> then\n    if <<(Wall Slide) > [0]> and <[0] = (jumping)>> then\n        set [jumping v] to [1]\n        set [falling v] to [3]\n        set [wall slide v] to [0]\n        turn right (180) degrees\n        set [xspeed v] to (((direction) / (90)) * (8))\n        set [long jump v] to [13]\n    end\n    if <<(Falling) < [4]> and <[0] = (jumping)>> then\n        set [jumping v] to [1]\n        set [falling v] to [3]\n    end\n    if <<(jumping) > [0]> and <(jumping) < [6]>> then\n        change [jumping v] by (1)\n        set [yspeed v] to (JUMP FORCE)\n    end\nelse\n    set [jumping v] to [0]\nend\nchange [yspeed v] by (-1.5)\nif <(Wall Slide) > [0]> then\n    Check Wall Slide\n    if <(ySpeed) < [0]> then\n        set [yspeed v] to ((ySpeed) * (0.6))\n    end\nend\n\ndefine Control Keys - Left, Right\nif <(Long Jump) > [0]> then\n    change [long jump v] by (-1)\n    stop [this script v]\nend\nset [key x v] to (<key (right arrow v) pressed?> - <key (left arrow v) pressed?>)\nif <(Key X) = [0]> then\n    if <<(Falling) > [2]> and <(Wall Slide) < [1]>> then\n        set [xspeed v] to ((xSpeed) * (0.96))\n        stop [this script v]\n    end\n    if <([abs v] of (xSpeed) ) < [1]> then\n        set [frame v] to [0]\n        set [xspeed v] to [0]\n    else\n        change [frame v] by (0.5)\n    end\nelse\n    if <<(Attack) = [false]> or <(Attack) = [wait]>> then\n        change [xspeed v] by ((Key X) * (ACCELERATION))\n        point in direction ((Key X) * (90))\n        change [frame v] by (1)\n    else\n        set [xspeed v] to [0]\n        set [frame v] to [0]\n    end\nend\nset [xspeed v] to ((xSpeed) * (RESISTANCE))\n\nwhen I receive [game loop v]\nforever\n    broadcast (First v)\n    broadcast (Tick - Platforms v)\n    broadcast (Tick v)\n    broadcast (Jump Sound v)\n    broadcast (Last v)\nend\n\nwhen I receive [last v]\nif <(x position) > [235]> then\n    Begin Scene ((Scene) + (1)) go to x, y: [-235] []\nend\nif <<(x position) < [-235]> and <(Scene) > [1]>> then\n    Begin Scene ((Scene) + (-1)) go to x, y: [235] []\nend\nif <(y position) > [180]> then\n    Begin Scene ((Scene) + (100)) go to x, y: [] [-160]\nend\nif <<(y position) < [-180]> and <(Scene) > [1]>> then\n    Begin Scene ((Scene) + (-100)) go to x, y: [] [180]\nend\nif <<touching (danger - spikes v)?> or <touching (danger - lava v)?>> then\n    broadcast (Lose a Life v)\nend\n\ndefine Begin Scene (scene #) go to x, y: (x) (y)\nset [scene v] to (scene #)\nif <(x) > []> then\n    set x to (x)\nend\nif <(y) > []> then\n    set y to (y)\nend\nbroadcast (Leave da Scene v)\nbroadcast (Change Level v)\nstop [other scripts in sprite v]\nwait (0) seconds\nswitch costume to (hitbox v)\nset rotation style [don't rotate v]\nif <(x) > []> then\n    Fix Colisions in Direction [0]\nelse\n    Fix Colisions in Direction [90]\nend\nSet Costume\nbroadcast (Game Loop v) and wait\n\ndefine Fix Colisions in Direction (direction)\nset [temp v] to (direction)\nset [distance v] to [1]\npoint in direction (direction)\nrepeat (10000)\n    Check Solid Colision\n    if <(Touching) < [1]> then\n        point in direction (Temp)\n        stop [this script v]\n    end\n    move (Distance) steps\n    turn right (180) degrees\n    change [distance v] by (1)\nend\n\nwhen I receive [first v]\nswitch costume to (hitbox v)\nset rotation style [don't rotate v]\nset [platform dx v] to []\nset [platform dy v] to []\n\ndefine Set Costume\nset rotation style [left-right v]\nif <(Wall Slide) > [0]> then\n    switch costume to (hang on v)\n    stop [this script v]\nend\nif <(Falling) > [1]> then\n    if <(ySpeed) > [0]> then\n        switch costume to (jump v)\n    else\n        switch costume to (fall v)\n    end\n    stop [this script v]\nend\nif <(Frame) > [0]> then\n    switch costume to ((1) + ([floor v] of ((Frame) mod (8)) ))\n    set [punch # v] to [0]\nelse\n    switch costume to (hit angle 1 v)\n    set [punch # v] to [1]\n    repeat (5)\n        Check Solid Colision\n        if <(Touching) < [1]> then\n            switch costume to ((costume [number v]) + (5))\n            if <(Attack) = [punch]> then\n                switch costume to (join [punch] (Punch #))\n            end\n            stop [this script v]\n        end\n        change [punch # v] by (1)\n        next costume\n    end\n    switch costume to (stand v)\n    set [punch # v] to [1]\n    if <(Attack) = [punch]> then\n        switch costume to (join [punch] (Punch #))\n    end\nend\n\ndefine Collide X - Slope or Wall?\nCheck Wall Slide\nchange y by (1)\nCheck Solid Colision\nif <(Touching) > [0]> then\n    change y by (1)\n    Check Solid Colision\n    if <(Touching) > [0]> then\n        change y by (-2)\n        set x to (Previous Pos)\n        set [xspeed v] to [0]\n        stop [this script v]\n    end\n    set [xspeed v] to ((xSpeed) * (0.75))\nend\nset [xspeed v] to ((xSpeed) * (0.9))\nSlope Slip\n\ndefine Collide Y - Ceiling or Floor?\nset y to (Previous Pos)\nif <(ySpeed) > [0]> then\n    set [yspeed v] to [0]\n    stop [this script v]\nend\nif <(Falling) > [0]> then\n    set [falling v] to [0]\n    Slope Slip\nend\nset [yspeed v] to ((ySpeed) * (0.9))\n\ndefine Slope Slip\nchange y by (-2)\nchange x by (1)\nCheck Solid Colision\nif <(Touching) < [1]> then\n    set [falling v] to [9]\n    set [wall slide v] to [0]\n    change [xspeed v] by (1)\n    stop [this script v]\nend\nchange x by (-2)\nCheck Solid Colision\nif <(Touching) < [1]> then\n    set [falling v] to [9]\n    change [xspeed v] by (1)\n    stop [this script v]\nend\nchange y by (2)\nchange x by (1)\n\ndefine Check Wall Slide\nif <(Falling) < [2]> then\n    set [wall slide v] to [0]\n    stop [this script v]\nend\nswitch costume to (wall slide hitbox v)\nset rotation style [left-right v]\nCheck Solid Colision\nset [wall slide v] to (Touching)\nswitch costume to (hitbox v)\nset rotation style [don't rotate v]\n\ndefine Reset and Begin Level\nswitch costume to (stand v)\nset [ghost v] effect to (0)\nset [invulnerable v] to [0]\nset [punch time v] to [0]\nset [wall slide v] to [0]\nset [jumping v] to [0]\nset [long jump v] to [0]\nset [nokey? v] to [0]\nset [xspeed v] to [0]\nset [yspeed v] to [0]\nset [falling v] to [99]\npoint in direction (90)\nBegin Scene (SPAWN SCENE) go to x, y: (SPAWN X) (SPAWN Y)\n\nwhen I receive [lose a life v]\nset [invulnerable v] to [1]\nchange [lives v] by (-1)\nif <not <(Code) = [true]>> then\n    set [code v] to [false]\nend\nstart sound [Death Sound v]\nbroadcast (Check Hearts v)\nstop [other scripts in sprite v]\nswitch costume to (death 1 v)\nrepeat (3)\n    next costume\n    wait (0.05) seconds\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nif <(LIVES) > [0]> then\n    wait (0.5) seconds\n    Reset and Begin Level\nelse\n    broadcast (Game OVER v)\nend\n\nwhen I receive [jump sound v]\nif <key (up arrow v) pressed?> then\n    if <<(Jump Sound Fix) = [0]> and <<(Falling) < [5]> or <(Wall Slide) = [1]>>> then\n        start sound [Jump v]\n    end\n    set [jump sound fix v] to [1]\nelse\n    set [jump sound fix v] to [0]\nend\n\ndefine Moved by Moving Platform\nchange x by (Platform DX)\nchange y by (Platform DY)\nCheck Solid Colision\nif <(Touching) > [0]> then\n    Find Closest Space to (x position) (y position) max [16]\n    if <(Touching) > [0]> then\n        broadcast (Lose a Life v)\n    end\nend\n\ndefine Find Closest Space to (x) (y) max (max)\nset [temp v] to (direction)\nset [distance v] to [1]\npoint in direction (0)\nrepeat (max)\n    repeat (16)\n        go to x: (x) y: (y)\n        move (Distance) steps\n        Check Solid Colision\n        if <(Touching) < [1]> then\n            point in direction (Temp)\n            stop [this script v]\n        end\n        turn right (22.5) degrees\n    end\n    change [distance v] by (1)\nend\ngo to x: (x) y: (y)\npoint in direction (Temp)\n\nwhen flag clicked\nbroadcast (Main Menu v)\nhide\n\nwhen I receive [start v]\nset [lives v] to [10]\nshow\nset size to (60) %\ngo to [front v] layer\ngo [forward v] (1) layers\nset [resistance v] to [0.7]\nset [acceleration v] to [2]\nif <(Difficulty) = [Normal]> then\n    set [jump force v] to [10]\nelse\n    set [jump force v] to [12]\nend\nset [frame v] to [0]\nbroadcast (Setup v) and wait\nset [spawn scene v] to [1]\nset [spawn x v] to [-205]\nset [spawn y v] to [-80]\nReset and Begin Level\n\ndefine Check Solid Colision\nif <<touching (map v)?> or <<touching (platform2 v)?> or <<touching (platform3 v)?> or <<touching (platform4 v)?> or <<touching (platform v)?> or <<touching (door 1 v)?> or <touching (platform5 v)?>>>>>>> then\n    set [touching v] to [1]\nelse\n    set [touching v] to [0]\nend\n\ndefine Control Keys - Attack\nif <<<key (x v) pressed?> and <(Attack) = [false]>> and <<(Punch Time) = [-5]> and <(Falling) = [0]>>> then\n    set [attack v] to [punch]\n    set [punch time v] to [6]\n    start sound [punch v]\nelse\n    if <(Punch Time) > [0]> then\n        change [punch time v] by (-1)\n    else\n        set [attack v] to [false]\n        if <not <(Punch Time) < [-3]>> then\n            change [punch time v] by (-1)\n        end\n        if <<(Punch Time) = [-4]> and <not <key (x v) pressed?>>> then\n            set [punch time v] to [-5]\n        end\n    end\nend\n\nset [scene v] to [108]\n\nwhen I receive [start cutscene v]\nstop [other scripts in sprite v]\n\nwhen I receive [bossfight v]\ngo to x: (-185) y: (-110)\nset [spawn x v] to [-185]\nset [spawn y v] to [-110]\nset [spawn scene v] to [Bossfight]\nbroadcast (Game Loop v)\n\nwhen I receive [something v]\nstop [other scripts in sprite v]\n\n@Map\n\nwhen flag clicked\nerase all\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [change level v]\nswitch costume to (join [Scene] (Scene))\nStamp Shadow\n\nwhen I receive [start v]\nset [ghost v] effect to (100)\nswitch costume to (scene1 v)\nset size to (100) %\ngo to [front v] layer\ngo [backward v] (3) layers\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\ndefine Stamp Shadow\nerase all\nset [brightness v] effect to (-100)\nset [ghost v] effect to (70)\nchange y by (-25)\nstamp\nchange y by (25)\nclear graphic effects\n\nset [scene v] to [116]\n\nwhen I receive [bossfight v]\nwait until <(SPAWN SCENE) = [Bossfight]>\nset [scene v] to [Bossfight]\nbroadcast (Change Level v)\n\nset [lives v] to [10]\n\n@danger - spikes\n\nwhen flag clicked\nhide\n\nwhen I receive [change level v]\nswitch costume to (blank v)\nswitch costume to (join [Scene] (Scene))\nStamp Shadow\n\nwhen I receive [start v]\nshow\ngo to x: (0) y: (0)\nswitch costume to (scene1 v)\nset size to (100) %\ngo to [back v] layer\n\ndefine Stamp Shadow\nset [brightness v] effect to (-100)\nset [ghost v] effect to (70)\nchange y by (-24)\nstamp\nchange y by (24)\nclear graphic effects\n\n@danger - lava\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\ngo to [back v] layer\nswitch costume to (scene1 v)\nset size to (100) %\ngo to [back v] layer\nforever\n    set y to ((4) * ([sin v] of ((timer) * (135)) ))\nend\n\nwhen I receive [change level v]\nswitch costume to (blank v)\nswitch costume to (join [Scene] (Scene))\n\nwhen I receive [start v]\nshow\n\nset [scene v] to [115]\n\n@Platform\n\nwhen I receive [change level v]\nhide\nif <(Scene) = [3]> then\n    Animate: x y [140] [20] x y #2 [-5] [20] time [1] time #2 [1] wait [0.5]\nend\nif <(Scene) = [103]> then\n    Animate: x y [135] [-40] x y #2 [-45] [-40] time [1.3] time #2 [1.3] wait [0.5]\nend\nif <(Scene) = [104]> then\n    Animate: x y [0] [110] x y #2 [0] [18] time [1] time #2 [0.1] wait [0.5]\nend\nif <(Scene) = [105]> then\n    Door at: [155] [-115] Key: [Key 1]\nend\nif <(Scene) = [108]> then\n    Animate: x y [115] [-85] x y #2 [-85] [-85] time [2] time #2 [2] wait [0.3]\nend\nif <(Scene) = [112]> then\n    Keypad Door at: x y [175] [-98]\nend\nif <(Scene) = [113]> then\n    Animate: x y [-108] [40] x y #2 [-108] [-141] time [2] time #2 [2] wait [1]\nend\nif <(Scene) = [214]> then\n    Animate: x y [0] [10] x y #2 [75] [10] time [0.5] time #2 [0.5] wait [0.5]\nend\nif <(Scene) = [116]> then\n    Door at: [190] [-76] Key: [Key Multi]\nend\nif <(Scene) = [216]> then\n    Animate: x y [-177] [-125] x y #2 [-177] [50] time [1] time #2 [1.5] wait [0.7]\nend\n\ndefine Animate: x y (x) (y) x y #2 (x2) (y2) time (time) time #2 (time2) wait (wait)\nshow\ngo to [back v] layer\nswitch costume to (join [Scene] (Scene))\ngo to x: (x2) y: (y2)\nforever\n    glide (time) secs to x: (x) y: (y)\n    wait (wait) seconds\n    glide (time2) secs to x: (x2) y: (y2)\n    if <(costume [name v]) = [Scene104]> then\n        start sound [Clang v]\n    end\n    wait (wait) seconds\nend\n\nwhen I receive [tick - platforms v]\nTick - Platform (x position) (y position)\nset [last x v] to (x position)\nset [last y v] to (y position)\n\ndefine Tick - Platform (new x) (new y)\nif <(new y) > (Last Y)> then\n    change y by (1)\nelse\n    set y to ((Last Y) + (1))\nend\nif <touching (player v)?> then\n    set [platform dx v] to ((new x) - (Last X))\n    set [platform dy v] to ((new y) - (Last Y))\nend\ngo to x: (new x) y: (new y)\n\nwhen flag clicked\nhide\n\ndefine Door at: (x) (y) Key: (key name)\nshow\ngo to [back v] layer\nswitch costume to (key name)\ngo to x: (x) y: (y)\nforever\n    wait until <touching (player v)?>\n    if <[collected v] contains (key name)?> then\n        start sound [Open Dorr v]\n        repeat (20)\n            change y by (3.5)\n        end\n        wait (1) seconds\n        start sound [Open Dorr v]\n        repeat (20)\n            change y by (-3.5)\n        end\n        start sound [Door Closing v]\n    else\n        broadcast (NoKey v) and wait\n        wait until <not <(Key X) = [0]>>\n        wait until <(Key X) = [0]>\n    end\nend\n\ndefine Keypad Door at: x y (x) (y)\nif <not <(Code) = [true]>> then\n    go to x: (x) y: (y)\nelse\n    go to x: (175) y: (-28)\nend\nshow\nswitch costume to (key pad door v)\nforever\n    wait until <<touching (player v)?> and <(Code) = [false]>>\n    broadcast (KeyPad v)\nend\n\nwhen I receive [open keypad door v]\nif <(Scene) = [112]> then\n    start sound [Open Dorr v]\n    repeat (20)\n        change y by (3.5)\n    end\nend\n\nwhen I receive [leave da scene v]\ndelete this clone\n\nwhen flag clicked\nset rotation style [left-right v]\nhide\n\n@Text Engine\n\ndefine type (text) x: (x) y: (y)\nswitch costume to ( v)\nset [dialoguedone? v] to [true]\nwait (0.1) seconds\nset [dialoguedone? v] to [false]\nwait (0.3) seconds\nset [text vary v] to [0]\ngo to [front v] layer\nbroadcast (text up v)\ngo to x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\nset [# v] to [0]\nwait (0.1) seconds\nrepeat (length of (text))\n    change [# v] by (1)\n    set [asset v] to (letter (#) of (text))\n    if <(Bad Guy Says Stuff) = [False]> then\n        start sound [type v]\n    else\n        start sound [Bad type v]\n    end\n    create clone of (_myself_ v)\nend\nset [text vary v] to [1]\n\ndefine Clone Setup\nswitch costume to (asset)\ngo to [front v] layer\nrepeat (#)\n    change x by (10)\n    if <(x position) > [180]> then\n        set x to (x)\n        change y by (-15)\n    end\nend\n\nwhen I start as a clone\nClone Setup\nwait until <<(DialogueDone?) = [true]> or <<(text vary) = [1]> and <key (space v) pressed?>>>\nbroadcast (text down v)\ndelete this clone\n\nwhen I receive [start v]\nshow\nset [stop text v] to [0]\ngo to [front v] layer\ntype [you wake up in a dungeon-like place.you are unaware of how you got there.] x: [-180] y: [-125]\n\nwhen I receive [key collect v]\ntype [a key. . . i wonder what this could be used for. . .] x: [-180] y: [-125]\n\nwhen I receive [nokey v]\nif <(Scene) = [105]> then\n    type [when there's a door, there is always a key. . . hopefully.] x: [-180] y: [-125]\nend\nif <(Scene) = [116]> then\n    type [a door with three locks. . . perhaps you need three keys. . .] x: [-180] y: [-125]\nend\n\nwhen I receive [sage text v]\nif <(Sage Dialogue) = [1]> then\n    type [hello, young traveller. you are probably wondering how you got  here.  ] x: [-130] y: [-130]\nend\nif <(Sage Dialogue) = [2]> then\n    type [this dungeon is haunted by a    bitter evil. an evil that plots the destruction of all life.] x: [-130] y: [-130]\nend\nif <(Sage Dialogue) = [3]> then\n    type [this evil feeds on the souls of people such as you and i. . . ] x: [-130] y: [-130]\nend\nif <(Sage Dialogue) = [4]> then\n    type [. . .and gets more powerful     with each soul that it devours.] x: [-130] y: [-130]\nend\nif <(Sage Dialogue) = [5]> then\n    type [so, every day, the evil brings  another person into this        dungeon. . .] x: [-130] y: [-130]\nend\nif <(Sage Dialogue) = [6]> then\n    type [. . .only to take their soul.] x: [-130] y: [-130]\nend\nif <(Sage Dialogue) = [7]> then\n    type [i am one of those people. i was the only one who managed to     hide from the evil.] x: [-130] y: [-130]\nend\nif <(Sage Dialogue) = [8]> then\n    type [the others died. their souls    taken. their will to live gone.] x: [-130] y: [-130]\nend\nif <(Sage Dialogue) = [9]> then\n    type [if i'm correct, you are the     final soul that the evil        needs. . .] x: [-130] y: [-130]\nend\nif <(Sage Dialogue) = [10]> then\n    type [. . .to be powerful enough to     destroy the world.] x: [-130] y: [-130]\nend\nif <(Sage Dialogue) = [11]> then\n    type [if you wish to save humanity,   you must continue to explore    this place alone. ] x: [-130] y: [-130]\nend\nif <(Sage Dialogue) = [12]> then\n    type [i am to old to accompany you,   but i will tell you this-] x: [-130] y: [-130]\nend\nif <(Sage Dialogue) = [13]> then\n    type [-the code is 1382.] x: [-130] y: [-130]\nend\nif <(Sage Dialogue) = [14]> then\n    type [good luck traveller. you'll     need it.] x: [-130] y: [-130]\nend\nif <(Sage Dialogue) > [14]> then\n    set [sage dialogue v] to [15]\nend\n\nwhen I receive [change level v]\nif <(Scene) = [107]> then\n    wait until <(text vary) = [1]>\n    set [dialoguedone? v] to [true]\n    wait (0.1) seconds\n    set [dialoguedone? v] to [false]\nend\nif <<(Stop Text) = [0]> and <(Scene) = [109]>> then\n    type [gah! what is that thing? press "x"   to punch it.] x: [-180] y: [-125]\n    change [stop text v] by (1)\nend\n\nwhen I receive [checkpoint! v]\ntype [checkpoint!] x: [-180] y: [-125]\n\nwhen I receive [blue key v]\ntype [a blue key? perhaps we could use     this later. . .] x: [-180] y: [-125]\n\nwhen I receive [key shard v]\ntype (join (join [you have collected ] (Amount of Key Shards)) [/4 key shards. ]) x: [-180] y: [-125]\n\nwhen I receive [all shards v]\ntype [you've collected all of the key      shards. you combine them all to make a pink key.] x: [-180] y: [-125]\n\nwhen I receive [cutscene1 follow v]\nset [bad guy says stuff v] to [True]\nwait (0.5) seconds\ntype [hello brave one.] x: [-130] y: [-130]\nwait (1) seconds\ntype [i am the so-called "evil" you   have been seeking.] x: [-130] y: [-130]\nwait (1) seconds\ntype [until now, i have been playing  easy.] x: [-130] y: [-130]\nwait (1) seconds\ntype [i did not expect that you would come this far, i'll admit that.] x: [-130] y: [-130]\nwait (1) seconds\ntype [but it doesn't matter. i will   not let you escape without a    fight.] x: [-130] y: [-130]\nwait (1) seconds\ntype [it's time i take you on myself.] x: [-130] y: [-130]\nwait (1) seconds\nset [dialoguedone? v] to [true]\nset [bad guy says stuff v] to [False]\nbroadcast (BossFight v)\n\nwhen I receive [tired v]\ntype [the evil is tired! punch him whilst  he's resting! ] x: [-180] y: [-125]\n\nwhen I receive [something v]\ntype [you have destroyed the evil.] x: [-180] y: [-125]\nwait (1) seconds\ntype [you eventually find your way out of  the dungeon. . .] x: [-180] y: [-125]\nwait (1) seconds\ntype [. . .back to your home. . .] x: [-180] y: [-125]\nwait (1) seconds\nset [dialoguedone? v] to [true]\nbroadcast (Cutscene2 v)\n\n@Splash Screen\n\nwhen I receive [game over v]\ngo to x: (0) y: (0)\nclear graphic effects\nswitch costume to (end screen v)\ngo to [front v] layer\nset size to (20) %\nshow\nbroadcast (Main Menu v)\nstart sound [Low Whoosh v]\nrepeat until <(size) = [100]>\n    change size by ((0.4) * ((100) - (size)))\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [timer v] to [0.01]\nset size to (100) %\nswitch costume to (title screen/thumbnail v)\nshow\nforever\n    set [timer v] to ((timer) + (0.01))\nend\n\nwhen I receive [start v]\ngo to [front v] layer\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen [timer v] > (timer)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nswitch costume to (stop screen v)\nclear graphic effects\nset [ghost v] effect to (100)\nshow\ngo to [front v] layer\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\n\nwhen I receive [cutscene1 follow v]\nswitch costume to (cutscene transition v)\ngo to [front v] layer\nset [ghost v] effect to (100)\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\n\nwhen I receive [bossfight v]\nwait (0.4) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [start cutscene v]\nswitch costume to (cutscene transition v)\ngo to [front v] layer\nset [ghost v] effect to (100)\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nwait (0.5) seconds\nif <(Scene) = [117]> then\n    broadcast (CutScene1 v)\nelse\n    broadcast (Something v) and wait\nend\nrepeat (20)\n    change [ghost v] effect by (5)\nend\n\nhide\n\nwhen I receive [end v]\nswitch costume to (cutscene transition v)\ngo to [front v] layer\nset [ghost v] effect to (0)\nshow\nwait (1) seconds\nswitch costume to (stop screen v)\nplay sound [Stereo Madness v] until done\n\n@Play\n\nwhen flag clicked\nhide\n\nwhen I receive [main menu v]\nswitch costume to (play v)\nwait (0.05) seconds\ngo to x: (0) y: (-35)\nset [frame v] to [0]\ngo to [front v] layer\nset [ghost v] effect to (0)\nshow\nset size to (10) %\nstart sound [Low Whoosh v]\nforever\n    change y by ((0.3) * ([sin v] of (frame) ))\n    change [frame v] by (5)\n    if <touching (mouse-pointer v)?> then\n        change size by ((0.2) * ((120) - (size)))\n    else\n        change size by ((0.2) * ((100) - (size)))\n    end\nend\n\nwhen I receive [keypad v]\nwait until <(Code) = []>\ngo to x: (0) y: (0)\nset size to (100) %\nset [ghost v] effect to (0)\nswitch costume to (keypad back v)\nshow\ngo to [front v] layer\n\nwhen I receive [open keypad door v]\nhide\n\nwhen this sprite clicked\nif <(Code) = [False]> then\n    stop [other scripts in sprite v]\n    broadcast (Start v)\n    start sound [Click v]\n    repeat (10)\n        change size by (5)\n        change [ghost v] effect by (10)\n    end\n    hide\nelse\n    set [code v] to [false]\n    hide\nend\n\n@Scroll\n\nwhen flag clicked\ngo to x: (0) y: (-100)\nhide\n\nwhen I receive [text up v]\ngo to [front v] layer\ngo [backward v] (1) layers\nshow\nif <not <(Sage Dialogue) = [0]>> then\n    switch costume to (sage narrative v)\nelse\n    if <(Bad Guy Says Stuff) = [True]> then\n        switch costume to (evil narrative v)\n    else\n        switch costume to (narrator v)\n    end\nend\nglide (0.15) secs to x: (0) y: (0)\n\nwhen I receive [text down v]\nglide (0.15) secs to x: (0) y: (-100)\nhide\n\n@Space\n\nwhen flag clicked\ngo to x: (-170) y: (-169)\nhide\n\nwhen I receive [text up v]\ngo to [front v] layer\nshow\n\nwhen I receive [text down v]\nhide\n\n@Collectable\n\nwhen flag clicked\nset [frame v] to [0]\nhide\n\nwhen I receive [setup v]\nhide\nset [amount of key shards v] to [0]\ndelete all of [collected v]\nPlace [Key 1] Scene [5] xy [140] [-87]\nPlace [checkpoint] Scene [106] xy [-120] [-70]\nPlace [heart] Scene [104] xy [50] [25]\nPlace [Blue Key] Scene [212] xy [-130] [-65]\nPlace [checkpoint] Scene [112] xy [-140] [10]\nPlace [heart] Scene [110] xy [-210] [30]\nPlace [heart] Scene [214] xy [193] [85]\nPlace [Key Shard1] Scene [16] xy [145] [5]\nPlace [Key Shard2] Scene [16] xy [-170] [95]\nPlace [Key Shard3] Scene [17] xy [170] [-5]\nPlace [Key Shard4] Scene [17] xy [-155] [15]\nPlace [Green Key] Scene [217] xy [85] [-80]\nif <(Difficulty) = [Easy]> then\n    Place [checkpoint] Scene [3] xy [-190] [-55]\n    Place [checkpoint] Scene [109] xy [-77] [50]\n    Place [checkpoint] Scene [114] xy [-120] [115]\nend\n\nwhen I receive [change level v]\nif <(Scene) = (Scene for Collectable)> then\n    show\nelse\n    hide\nend\n\nwhen I start as a clone\nrepeat until <touching (player v)?>\n    change y by ((0.3) * ([sin v] of (frame) ))\n    change [frame v] by (8)\nend\nset [scene for collectable v] to []\nif <(costume [name v]) = [Key 1]> then\n    broadcast (Key collect v)\nend\nbroadcast (Collected v)\nif <(costume [name v]) = [checkpoint]> then\n    start sound [Checkpoint v]\n    set [spawn scene v] to (Scene)\n    set [spawn x v] to ([x position v] of [player v])\n    set [spawn y v] to ([y position v] of [player v])\n    broadcast (CheckPoint! v)\nelse\n    if <(costume [name v]) = [heart]> then\n        if <(LIVES) < [9]> then\n            change [lives v] by (2)\n            broadcast (Check Hearts v)\n        else\n            if <(LIVES) = [9]> then\n                change [lives v] by (1)\n                broadcast (Check Hearts v)\n            end\n        end\n        start sound [Heart v]\n    else\n        if <<(costume [name v]) = [Blue Key]> and <not <(Code) = [true]>>> then\n            broadcast (Blue Key v)\n        else\n            if <<<(costume [name v]) = [Key Shard1]> or <(costume [name v]) = [Key Shard2]>> or <<(costume [name v]) = [Key Shard3]> or <(costume [name v]) = [Key Shard4]>>> then\n                change [amount of key shards v] by (1)\n                if <(Amount of Key Shards) < [4]> then\n                    broadcast (Key Shard v)\n                else\n                    broadcast (All Shards v)\n                    add [Pink Key] to [collected v]\n                end\n            end\n        end\n        add (costume [name v]) to [collected v]\n        start sound [Key Collect v]\n    end\n    if <<<<(costume [name v]) = [Blue Key]> or <(costume [name v]) = [Green Key]>> or <<<(costume [name v]) = [Key Shard1]> or <(costume [name v]) = [Key Shard2]>> or <<(costume [name v]) = [Key Shard3]> or <(costume [name v]) = [Key Shard4]>>>> and <<[collected v] contains [Green Key]?> and <<[collected v] contains [Pink Key]?> and <[collected v] contains [Blue Key]?>>>> then\n        add [Key Multi] to [collected v]\n    end\nend\nhide\n\ndefine Place (type) Scene (scene) xy (x) (y)\nset [scene for collectable v] to (scene)\nswitch costume to (type)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\nset [scene for collectable v] to []\n\nwhen I receive [start v]\ndelete this clone\n\n@Sage\n\nwhen flag clicked\ngo to x: (175) y: (-105)\nhide\nforever\n    if <(Scene) = [7]> then\n        if <touching (player v)?> then\n            if <(Sage Dialogue) = [0]> then\n                broadcast (Sage Text v)\n                set [sage dialogue v] to [1]\n            end\n        end\n        if <<key (space v) pressed?> and <(text vary) = [1]>> then\n            if <(SD Change) = [0]> then\n                change [sage dialogue v] by (1)\n                broadcast (Sage Text v)\n                change [sd change v] by (1)\n            end\n        else\n            set [sd change v] to [0]\n        end\n    else\n        set [sage dialogue v] to [0]\n    end\nend\n\nwhen I receive [change level v]\nhide\nif <(Scene) = [7]> then\n    show\n    go to [back v] layer\nend\n\n@Death Effect\n\nwhen flag clicked\nhide\ngo to [front v] layer\n\nwhen I receive [lose a life v]\nset [ghost v] effect to (100)\nshow\ngo to [front v] layer\nrepeat (4)\n    change [ghost v] effect by (-25)\nend\nwait (0.05) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Hearts\n\nwhen flag clicked\ngo to x: (-155) y: (150)\nhide\n\nwhen I receive [game over v]\nhide\nrepeat (3)\n    wait (0.2) seconds\n    show\n    wait (0.2) seconds\n    hide\nend\n\nwhen I receive [start v]\nswitch costume to (10 v)\ngo to [front v] layer\nshow\n\nwhen I receive [check hearts v]\ngo to [front v] layer\nswitch costume to ((LIVES) + (1))\nrepeat (2)\n    hide\n    wait (0.1) seconds\n    show\n    wait (0.1) seconds\nend\n\nwhen I receive [change level v]\ngo to [front v] layer\n\n@Punch Hitbox\n\nwhen flag clicked\nforever\n    if <(Attack) = [punch]> then\n        set [ghost v] effect to (100)\n        set rotation style [left-right v]\n        point in direction ([direction v] of [player v])\n        go to x: ([x position v] of [player v]) y: ([y position v] of [player v])\n        show\n        wait (0.02) seconds\n        hide\n        wait until <(Attack) = [false]>\n    end\nend\n\n@Enemy\n\nwhen flag clicked\nset rotation style [left-right v]\nset [enemy invulnerable v] to [0]\nset size to (85) %\nhide\ndelete this clone\n\nwhen I receive [change level v]\nif <(Enemy Invulnerable) = [2]> then\n    if <(Dead Enemy Scene) = (Scene)> then\n        show\n    end\n    stop [this script v]\nend\nif <(Scene) = [109]> then\n    Spawn [Enemy 1] at [160] [-95] direction [-90]\nend\nif <(Scene) = [111]> then\n    Spawn [Enemy 2] at [95] [-50] direction [-90]\n    Spawn [Enemy 3] at [-15] [-70] direction [90]\nend\nif <(Scene) = [114]> then\n    Spawn [Enemy 4] at [150] [-80] direction [-90]\n    Spawn [Enemy 5] at [-20] [30] direction [-90]\nend\nif <(Scene) = [115]> then\n    Spawn [Enemy 6] at [-85] [-25] direction [-90]\n    Spawn [Enemy 7] at [75] [0] direction [-90]\nend\nif <(Scene) = [116]> then\n    Spawn [Enemy 8] at [-150] [-60] direction [-90]\nend\n\nwhen I start as a clone\nshow\nset [speed y - enemy v] to [0]\nset [enemy health v] to [3]\nset [frame v] to [0]\nforever\n    if <<not <(Enemy Invulnerable) = [2]>> or <(Dead Enemy Scene) = (Scene)>> then\n        if <(Enemy Invulnerable) = [0]> then\n            switch costume to (hit box v)\n        else\n            if <(Enemy Invulnerable) = [2]> then\n                switch costume to (enemy death v)\n            else\n                switch costume to (enemy damage v)\n            end\n        end\n        set rotation style [don't rotate v]\n        Move Left/Right\n        Move Down\n        if <(Enemy Invulnerable) = [0]> then\n            change [frame v] by (1.5)\n            switch costume to ((1) + (([floor v] of (frame) ) mod (14)))\n        end\n        set rotation style [left-right v]\n        if <not <(Enemy Invulnerable) = [2]>> then\n            Touch Player\n        end\n    end\nend\n\nwhen I receive [leave da scene v]\nif <(Enemy Invulnerable) = [2]> then\n    hide\n    stop [this script v]\nend\ndelete this clone\n\ndefine Move Down\nchange [speed y - enemy v] by (-1)\nchange y by (speed y - enemy)\nrepeat until <not <touching (map v)?>>\n    if <(speed y - enemy) > [0]> then\n        change y by (-1)\n        set [speed y - enemy v] to [1]\n    else\n        change y by (1)\n        set [speed y - enemy v] to [0]\n        if <not <(Enemy Invulnerable) = [2]>> then\n            set [enemy invulnerable v] to [0]\n        end\n    end\nend\n\ndefine Move Left/Right\nif <(Enemy Invulnerable) = [2]> then\nrepeat (4)\n    if <not <<touching (map v)?> or <touching (_edge_ v)?>>> then\n        stop [this script v]\n    end\n    change y by (1)\nend\nchange y by (-4)\nmove (-2.3) steps\nif <(INVULNERABLE) = [1]> then\n    turn right (180) degrees\nend\n\ndefine Touch Player\nif <<<(INVULNERABLE) = [0]> and <<touching (player v)?> and <(Attack) = [false]>>> and <(Enemy Invulnerable) = [0]>> then\n    broadcast (Lose a Life v)\nend\nif <<<<touching (punch hitbox v)?> or <touching (danger - spikes v)?>> and <(Enemy Invulnerable) = [0]>> and <not <(Enemy Health) = [0]>>> then\n    change [enemy health v] by (-1)\n    set [speed y - enemy v] to [10]\n    set [enemy invulnerable v] to [1]\n    if <(Enemy Health) = [0]> then\n        set [enemy invulnerable v] to [2]\n        add (Enemy for List) to [enemies dead v]\n        set [dead enemy scene v] to (Scene)\n    end\nend\n\ndefine Spawn (type) at (x) (y) direction (dir)\nif <[enemies dead v] contains (type)?> then\n    stop [this script v]\nend\nset [enemy for list v] to (type)\ngo to x: (x) y: (y)\npoint in direction (dir)\ncreate clone of (_myself_ v)\n\nwhen I receive [start v]\ndelete all of [enemies dead v]\n\nset [scene v] to [113]\n\n@KeyPad\n\nwhen I receive [keypad v]\ngo to x: (0) y: (0)\nshow\ngo to [front v] layer\nset [code v] to []\nrepeat until <<(Code) = [false]> or <(Code) = [true]>>\n    switch costume to (join [keypad] (length of (Code)))\n    if <(length of (Code)) > [3]> then\n        if <not <(Code) = [1382]>> then\n            start sound [Wrong v]\n            repeat (2)\n                switch costume to (keypad0 v)\n                wait (0.1) seconds\n                switch costume to (denied v)\n                wait (0.1) seconds\n            end\n            set [code v] to []\n        else\n            start sound [Granted v]\n            repeat (2)\n                switch costume to (keypad0 v)\n                wait (0.1) seconds\n                switch costume to (granted v)\n                wait (0.1) seconds\n            end\n            set [code v] to [true]\n            broadcast (Open Keypad Door v)\n        end\n    end\nend\nhide\n\nwhen flag clicked\nhide\nset [code v] to [false]\n\n@KeyPad Buttons\n\nwhen flag clicked\nhide\n\nwhen I receive [keypad v]\nwait until <(Code) = []>\nKeyPad Setup\n\ndefine KeyPad Setup\nshow\nswitch costume to (1 v)\ngo to [front v] layer\ngo to x: (-80) y: (29)\nrepeat (3)\n    repeat (3)\n        create clone of (_myself_ v)\n        change x by (75.5)\n        next costume\n    end\n    set x to (-80)\n    change y by (-50)\nend\nchange x by (75.5)\ncreate clone of (_myself_ v)\nhide\n\nwhen I start as a clone\nrepeat until <<(Code) = [false]> or <(Code) = [true]>>\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        set [code v] to (join (Code) (costume [name v]))\n        wait until <not <mouse down?>>\n        if <(length of (Code)) < [4]> then\n            play sound [Boop v] until done\n        end\n    end\nend\ndelete this clone\n\n@Fog\n\ndefine Setup\nset [previous place v] to []\nrepeat until <(Previous Place) = (x position)>\n    set [previous place v] to (x position)\n    set size to (200) %\n    change x by (-10)\n    set size to (100) %\nend\n\nwhen I receive [start v]\nhide\nforever\n    switch costume to (join [Fog] (pick random (1) to (5)))\n    set y to (pick random (-75) to (75))\n    set [ghost v] effect to (pick random (60) to (90))\n    set [speed v] to (pick random (3) to (5))\n    create clone of (_myself_ v)\n    wait (pick random (1) to (3)) seconds\nend\n\nwhen I receive [main menu v]\nstop [other scripts in sprite v]\n\nwhen I start as a clone\nSetup\nshow\ngo to [front v] layer\nset [previous place v] to []\nrepeat until <(Previous Place) = (x position)>\n    set [previous place v] to (x position)\n    set size to (200) %\n    change x by (Speed)\n    set size to (100) %\nend\ndelete this clone\n\nwhen I receive [change level v]\ndelete this clone\n\nwhen I receive [cutscene1 v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [bossfight v]\nset x to (-324)\nhide\nforever\n    switch costume to (join [Fog] (pick random (1) to (5)))\n    set y to (pick random (-75) to (75))\n    set [ghost v] effect to (pick random (60) to (90))\n    set [speed v] to (pick random (3) to (5))\n    create clone of (_myself_ v)\n    wait (pick random (1) to (3)) seconds\nend\n\nwhen I receive [start cutscene v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@Particles\n\nwhen flag clicked\nhide\nforever\n    if <(LIVES) > [0]> then\n        switch costume to (walking v)\n        if <<<([xspeed v] of [player v]) < [-3]> or <([xspeed v] of [player v]) > [3]>> and <not <([falling v] of [player v]) > [3]>>> then\n            go to x: ([x position v] of [player v]) y: (([y position v] of [player v]) - (pick random (15) to (19)))\n            show\n            create clone of (_myself_ v)\n        end\n        hide\n        wait (0.04) seconds\n    end\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [Walking]> then\n    set size to (pick random (60) to (100)) %\n    clear graphic effects\n    set [yspeed v] to (pick random (2) to (3))\n    repeat (10)\n        change y by (ySpeed)\n        change [ghost v] effect by (10)\n        change [yspeed v] by (-0.5)\n    end\n    delete this clone\nend\n\nwhen I receive [change level v]\ndelete this clone\n\n@CutScene\n\nwhen I receive [cutscene1 v]\nset [bad guy says stuff v] to [True]\nPlayScene: [Look] Frames#: [85] Sounds: [Clang] [Boom] [High Whoosh] FrameForSound: [20] [61] [68]\nPlayScene: [Stance] Frames#: [22] Sounds: [Freak Out] [] [] FrameForSound: [15] [] []\nwait (1) seconds\nbroadcast (CutScene1 Follow v)\n\ndefine PlayScene: (scene) Frames#: (frame#) Sounds: (sound 1) (sound 2) (sound 3) FrameForSound: (frame 1) (frame 2) (frame 3)\nswitch costume to (join (scene) [1])\nset [frame# v] to [0]\ngo to [front v] layer\nshow\nrepeat until <(Frame#) = (frame#)>\n    change [frame# v] by (1)\n    switch costume to (join (scene) (Frame#))\n    if <(frame 1) = (Frame#)> then\n        start sound (sound 1)\n    end\n    if <(frame 2) = (Frame#)> then\n        start sound (sound 2)\n    end\n    if <(frame 3) = (Frame#)> then\n        start sound (sound 3)\n    end\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [start v]\nset [bad guy says stuff v] to [False]\nhide\n\nwhen I receive [bossfight v]\nhide\n\nwhen I receive [cutscene2 v]\nPlayScene: [Found] Frames#: [111] Sounds: [Stereo Madness] [Tap] [] FrameForSound: [1] [71] []\nPlayScene: [House] Frames#: [80] Sounds: [] [] [] FrameForSound: [] [] []\nbroadcast (End v)\n\nbroadcast (Cutscene2 v)\n\n@CutScene BG\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nforever\n    switch costume to ([costume name v] of [cutscene v])\nend\n\nwhen I receive [cutscene1 v]\ngo to [front v] layer\ngo [backward v] (1) layers\nshow\n\nwhen I receive [cutscene1 follow v]\nwait (1) seconds\nhide\n\nbroadcast (CutScene1 v)\n\nwhen I receive [cutscene2 v]\ngo to [front v] layer\ngo [backward v] (1) layers\nshow\n\n@Enemy Powers\n\nwhen flag clicked\nhide\n\nwhen I receive [change level v]\nif <(Scene) = [117]> then\n    switch costume to (darkness v)\n    show\n    go to [front v] layer\n    go to x: (0) y: (0)\n    point in direction (90)\n    go [backward v] (2) layers\n    wait until <touching (player v)?>\n    broadcast (Start Cutscene v)\nelse\n    if <not <(Scene) = [Bossfight]>> then\n        hide\n    end\nend\n\nset [scene v] to [116]\n\nwhen I receive [bossfight v]\nset rotation style [all around v]\nhide\nrepeat until <(LIVES) = [0]>\n    if <<touching (player v)?> and <(INVULNERABLE) = [0]>> then\n        broadcast (Lose a Life v)\n    end\nend\n\nwhen I receive [pewew v]\ngo to x: (-6) y: (-79)\nshow\nswitch costume to (lazar v)\npoint towards (warning v)\nstart sound [Lazar1 v]\n\nwhen I receive [tired v]\nhide\n\nwhen I receive [rocket v]\ngo to x: (-6) y: (-79)\nshow\nswitch costume to (rocket v)\nrepeat (10)\n    wait (2) seconds\n    wait until <(Me Dir) = [Ready]>\n    create clone of (_myself_ v)\nend\nwait (2) seconds\nbroadcast (Tired v)\n\nwhen I start as a clone\nstart sound [rocket v]\npoint in direction (direction)\nmove (70) steps\nset [rocket v] to [1]\nrepeat until <touching (_edge_ v)?>\n    set size to (100) %\n    move (11) steps\n    switch costume to (join [fire] (Rocket))\n    change [rocket v] by (1)\n    if <(Rocket) > [6]> then\n        set [rocket v] to [1]\n    end\n    if <<touching (player v)?> and <(INVULNERABLE) = [0]>> then\n        start sound [Minecraft TNT Sound FX v]\n        broadcast (Lose a Life v)\n        switch costume to (boom v)\n        repeat (5)\n            change size by (10)\n        end\n        repeat (4)\n            change size by (10)\n            change [ghost v] effect by (25)\n        end\n        delete this clone\n    end\nend\ndelete this clone\n\nwhen I receive [rocket v]\nset [rocket dir speed v] to [0]\nrepeat until <(Bossfight) = [Tired]>\n    set [me dir v] to (direction)\n    point towards (player v)\n    set [player dir v] to (direction)\n    point in direction (Me Dir)\n    if <(direction) > (Player Dir)> then\n        change [rocket dir speed v] by (-1.5)\n    end\n    if <(Player Dir) > (direction)> then\n        change [rocket dir speed v] by (1.5)\n    end\n    turn right (Rocket Dir Speed) degrees\n    set [me dir v] to [Ready]\n    set [rocket dir speed v] to ((Rocket Dir Speed) * (0.7))\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen I receive [start v]\nset [costumeframe v] to [False]\nhide\ndelete this clone\n\nwhen I receive [main menu v]\nstop [other scripts in sprite v]\n\nwhen I receive [fly v]\nshow\nset rotation style [left-right v]\nset [costumeframe v] to [Idle]\nset [frame v] to [0]\nrepeat until <<(LIVES) = [0]> or <(Bossfight) = [Tired]>>\n    switch costume to (join [Fly] (CostumeFrame))\n    if <(CostumeFrame) = [Idle]> then\n        change y by ((0.3) * ([sin v] of (Frame) ))\n        change [frame v] by (5)\n    end\nend\n\nwhen I receive [go fly birdie v]\nset rotation style [all around v]\npoint towards (warning v)\nif <(direction) < [0]> then\n    set [costumeframe v] to [2]\nelse\n    set [costumeframe v] to [1]\nend\nstart sound [Low Whoosh v]\nglide (([sqrt v] of ((([abs v] of ((x position) - (Go x)) ) * ([abs v] of ((x position) - (Go x)) )) + (([abs v] of ((y position) - (Go y)) ) * ([abs v] of ((y position) - (Go y)) ))) ) / (500)) secs to x: (Go x) y: (Go y)\nstart sound [Boom v]\nset [costumeframe v] to [Idle]\nset rotation style [left-right v]\n\n@Thicc Boss\n\nwhen flag clicked\nset [bossfight v] to [False]\nhide\n\nwhen I receive [start v]\nset [bossfight v] to [False]\nhide\n\nwhen I receive [bossfight v]\ngo to x: (-5) y: (-97)\nset [boss lives v] to [3]\nshow\nset [bossfight v] to [Idle]\nwait (2) seconds\nbroadcast (LazarBeam v)\n\nwhen I receive [bossfight v]\nrepeat until <(Bossfight) = [False]>\n    switch costume to (Bossfight)\n    if <<not <<(Bossfight) = [Tired]> or <(Bossfight) = [Idle]>>> and <<touching (player v)?> and <(INVULNERABLE) = [0]>>> then\n        broadcast (Lose a Life v)\n    end\nend\n\nwhen I receive [game over v]\nset [bossfight v] to [False]\n\nwhen I receive [tired v]\nset [tired v] to (Bossfight)\nset [bossfight v] to [Tired]\nwait until <touching (punch hitbox v)?>\nchange [boss lives v] by (-1)\nif <(Tired) = [Fly]> then\n    broadcast (Start Cutscene v)\nelse\n    set [bossfight v] to [Idle]\n    wait (0.7) seconds\n    if <(Tired) = [Lazar]> then\n        set [bossfight v] to [Rocket]\n        broadcast (Rocket v)\n    end\n    if <(Tired) = [Rocket]> then\n        set [bossfight v] to [Fly]\n        broadcast (Fly v)\n    end\nend\n\nwhen I receive [pewew v]\nset rotation style [left-right v]\npoint towards (warning v)\n\nwhen I receive [pewew v]\nset [bossfight v] to [Lazar]\n\nwhen I receive [main menu v]\nstop [other scripts in sprite v]\n\n@Warning\n\nwhen I receive [lazarbeam v]\nrepeat (20)\n    Pew\n    wait (0.2) seconds\nend\nwait (0.3) seconds\nbroadcast (Tired v)\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nhide\n\ndefine Pew\nset rotation style [don't rotate v]\ngo to x: (-5) y: (-68)\npoint in direction (pick random (-100) to (100))\nmove (170) steps\nswitch costume to (warning-png-free-image v)\nset [ghost v] effect to (30)\ngo to [front v] layer\nshow\nstart sound [Computer Beep2 v]\nwait (0.1) seconds\nhide\nwait (0.1) seconds\nshow\nstart sound [Computer Beep2 v]\nwait (0.1) seconds\nrepeat (2)\n    change [ghost v] effect by (15)\nend\nhide\nwait (0.1) seconds\nbroadcast (Pewew v) and wait\n\nwhen I receive [fly v]\nwait (1) seconds\nrepeat (9)\n    Fly (pick random (([x position v] of [player v]) - (70)) to (([x position v] of [player v]) + (70))) (pick random (([y position v] of [player v]) - (30)) to (([y position v] of [player v]) + (70)))\nend\nFly [-6] [-79]\nwait (0.6) seconds\nbroadcast (Tired v)\n\nwhen I start as a clone\nset [ghost v] effect to (40)\nwait until <touching (enemy powers v)?>\ndelete this clone\n\ndefine Move\nrepeat until <touching (enemy powers v)?>\n    repeat (50)\n        move (1) steps\n        if <touching (enemy powers v)?> then\n            stop [this script v]\n        end\n    end\n    create clone of (_myself_ v)\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\ndefine Fly (x) (y)\nhide\nset rotation style [all around v]\nif <(INVULNERABLE) = [0]> then\n    set [go x v] to (x)\n    set [go y v] to (y)\nelse\n    set [go x v] to (pick random (-150) to (150))\n    set [go y v] to (pick random (-100) to (100))\nend\ngo to x: (Go x) y: (Go y)\npoint towards (enemy powers v)\nset [ghost v] effect to (40)\nswitch costume to (arrow v)\nshow\nMove\ngo to x: (Go x) y: (Go y)\nwait (1) seconds\nbroadcast (Go Fly Birdie v) and wait\nhide\n\nwhen I receive [start v]\ndelete this clone\n\n@Difficulty\n\nwhen I receive [main menu v]\nswitch costume to (easy v)\ngo to x: (-180) y: (-145)\ncreate clone of (_myself_ v)\nswitch costume to (normal v)\ngo to x: (180) y: (-145)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [difficulty v] to [Normal]\nhide\n\nwhen I start as a clone\nset [umm... v] to (costume [name v])\ngo to [front v] layer\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nforever\n    if <(Difficulty) = (Umm...)> then\n        switch costume to (join (costume [name v]) [ On])\n    else\n        switch costume to (Umm...)\n    end\n    if <touching (mouse-pointer v)?> then\n        set size to (120) %\n    else\n        set size to (100) %\n    end\nend\n\nwhen this sprite clicked\nstart sound [Click v]\nif <(length of (costume [name v])) < [7]> then\n    set [difficulty v] to (costume [name v])\nend\n\nwhen I receive [start v]\ndelete this clone\n\n