Stealing The Diamond || A Henry Stickmin Platformer  

Instructions: *I would not recommend playing in full screen*\n\nHey! The Toppat Clan has stolen the Okavango Diamond, and it's up to Henry to get it back! Can Henry stop the Toppat clan and save his buddy Charles?\n\nUse the arrow keys or WASD to move, space to jump\n\nOnce you get to curtain places, then the game will flash a checkpoint code on the screen. This allows you to not have to finish the whole game in one sitting. \n\n(4-20-21) Top Loved!!! :D

@Stage\n\nwhen I receive [start \(showing game\) v]\nset volume to (35) %\nif <<(Check. Boss) = [1]> or <(Check. Airship) = [1]>> then\n    stop all sounds\n    stop [this script v]\nend\nforever\n    play sound [The_Legend_of_Zelda_Majora_s_Mask_3D_Termina_Fi2 v] until done\nend\n\nwhen I receive [respawn \(grassland\) v]\nset volume to (40) %\n\nwhen I receive [death v]\nset volume to (0) %\n\nwhen I receive [death v]\nswitch costume to (costume1 v)\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\n\nwhen I receive [respawn \(grassland\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [next level v]\nif <(Checkpoint) = [0]> then\n    if <(Level) = [10]> then\n        set volume to (15) %\n    else\n        set volume to (35) %\n    end\nelse\n    set volume to (0) %\nend\n\nwhen I receive [back a level v]\nif <(Checkpoint) = [0]> then\n    if <(Level) = [10]> then\n        set volume to (15) %\n    else\n        set volume to (35) %\n    end\nelse\n    set volume to (0) %\nend\n\nwhen I receive [portal v]\nset volume to (0) %\n\nwhen I receive [end of grassland v]\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\n\nwhen I receive [start of airship v]\nswitch backdrop to (blue sky 2 2 v)\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen flag clicked\nbroadcast (Intro + Play Screen v)\n\nwhen I receive [start \(showing game\) v]\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [intro + play screen v]\nwait (8.75) seconds\nswitch backdrop to (backdrop2 v)\n\nwhen flag clicked\nswitch backdrop to (backdrop3 v)\n\nwhen I receive [start game v]\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\nwait (2) seconds\nbroadcast (Start Animation  v)\n\nwhen I receive [start animation  v]\nswitch backdrop to (360_f_257717689_doezjdovmhy2lzbswm1evgum8v7ytbwx v)\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [after level 0 v]\nrepeat (20)\n    wait (0.1) seconds\n    change [brightness v] effect by (-5)\nend\n\nwhen I receive [level 1 v]\nrepeat (20)\n    wait (0.1) seconds\n    change [brightness v] effect by (5)\nend\n\nwhen I receive [ask code v]\nask [Enter checkpoint code here: \(Click check to submit or close\)] and wait\nif <(answer) = [Demo22]> then\n    broadcast (Checkpoint \(Demo22\) v)\nelse\n    if <(answer) = [Airship22]> then\n        broadcast (Checkpoint \(Airship22\) v)\n    else\n        if <(answer) = [Boss22]> then\n            broadcast (Checkpoint \(Boss22\) v)\n        end\n    end\nend\n\n@Blank\n\n@ Intro / Play Screen\n\nwhen flag clicked\nset [start v] to [0]\nset [clone id \(intro\) v] to [0]\nset [beat drop v] to [0]\nhide\nwait (8.5) seconds\nset [beat drop v] to [1]\n\nwhen I receive [intro + play screen v]\nset volume to (100) %\nstart sound [Main_Menu_Intro_Loomian_Legacy_Soundtrack v]\ncreate clone of (_myself_ v)\nwait (0) seconds\nchange [clone id \(intro\) v] by (1)\ncreate clone of (_myself_ v)\nwait (0) seconds\nchange [clone id \(intro\) v] by (1)\ncreate clone of (_myself_ v)\nwait (0) seconds\nchange [clone id \(intro\) v] by (1)\ncreate clone of (_myself_ v)\nwait (0) seconds\nchange [clone id \(intro\) v] by (1)\ncreate clone of (_myself_ v)\nwait (0) seconds\nchange [clone id \(intro\) v] by (1)\ncreate clone of (_myself_ v)\nwait (0) seconds\nchange [clone id \(intro\) v] by (1)\ncreate clone of (_myself_ v)\nwait (0) seconds\nchange [clone id \(intro\) v] by (1)\ncreate clone of (_myself_ v)\nwait (0) seconds\nchange [clone id \(intro\) v] by (1)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(Clone ID \(Intro\)) = [0]> then\n    set [ghost v] effect to (100)\n    switch costume to (costume3 v)\n    go to x: (0) y: (0)\n    wait (1) seconds\n    show\n    repeat (20)\n        change [ghost v] effect by (-5)\n    end\n    wait (2) seconds\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    hide\nend\n\nwhen I start as a clone\nif <(Clone ID \(Intro\)) = [1]> then\n    clear graphic effects\n    set size to (100) %\n    go to x: (-250) y: (110)\n    switch costume to (costume2 v)\n    wait (4.75) seconds\n    show\n    glide (0.2) secs to x: (0) y: (100)\n    wait until <(Beat Drop) = [1]>\n    repeat (10)\n        change size by (5)\n        change [ghost v] effect by (10)\n    end\nend\n\nwhen I start as a clone\nif <(Clone ID \(Intro\)) = [2]> then\n    clear graphic effects\n    set size to (100) %\n    set [ghost v] effect to (100)\n    go to x: (0) y: (10)\n    switch costume to (costume1 v)\n    wait (4.5) seconds\n    show\n    repeat (20)\n        change [ghost v] effect by (-5)\n    end\n    wait until <(Beat Drop) = [1]>\n    repeat (10)\n        change size by (5)\n        change [ghost v] effect by (10)\n    end\nend\n\nwhen I start as a clone\nif <(Clone ID \(Intro\)) = [3]> then\n    clear graphic effects\n    set size to (100) %\n    go to x: (250) y: (-100)\n    switch costume to (28120-6-the-legend-of-zelda-logo-image v)\n    wait (5.25) seconds\n    show\n    glide (0.2) secs to x: (0) y: (-100)\n    wait until <(Beat Drop) = [1]>\n    repeat (10)\n        change size by (5)\n        change [ghost v] effect by (10)\n    end\nend\n\nwhen I start as a clone\nif <(Clone ID \(Intro\)) = [4]> then\n    clear graphic effects\n    go to x: (-15) y: (90)\n    switch costume to (costume5 v)\n    wait (8.5) seconds\n    show\nend\n\nwhen I start as a clone\nif <(Clone ID \(Intro\)) = [5]> then\n    clear graphic effects\n    show\n    go to [back v] layer\n    switch costume to (costume4 v)\n    wait (8.5) seconds\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\nend\n\nwhen I start as a clone\nif <(Clone ID \(Intro\)) = [6]> then\n    clear graphic effects\n    point in direction (90)\n    switch costume to (costume9 v)\n    go to x: (275) y: (-87)\n    hide\n    wait (10) seconds\n    show\n    glide (2) secs to x: (-75) y: (-87)\n    turn right (7.5) degrees\n    glide (1.25) secs to x: (-250) y: (-60)\n    hide\n    wait (3) seconds\n    switch costume to (costume8 v)\n    turn right (5) degrees\n    show\n    glide (1) secs to x: (-75) y: (-87)\n    point in direction (90)\n    glide (1.5) secs to x: (275) y: (-87)\n    hide\n    wait (3) seconds\n    switch costume to (costume9 v)\n    go to x: (275) y: (-87)\n    show\n    glide (2) secs to x: (0) y: (-87)\n    wait (1) seconds\n    switch costume to (costume11 v)\nend\n\nwhen I start as a clone\nif <(Clone ID \(Intro\)) = [7]> then\n    clear graphic effects\n    point in direction (90)\n    switch costume to (costume10 v)\n    go to x: (-245) y: (-60)\n    hide\n    wait (17.5) seconds\n    show\n    turn right (5) degrees\n    show\n    glide (1) secs to x: (-75) y: (-83)\n    point in direction (90)\n    glide (1.5) secs to x: (275) y: (-83)\n    hide\nend\n\nwhen I start as a clone\nif <(Clone ID \(Intro\)) = [8]> then\n    clear graphic effects\n    go to x: (10) y: (-50)\n    set [ghost v] effect to (100)\n    point in direction (90)\n    switch costume to (costume12 v)\n    hide\n    wait (9) seconds\n    show\n    repeat until <(Play) = [1]>\n        repeat (20)\n            change [ghost v] effect by (-5)\n        end\n        wait (0.5) seconds\n        repeat (20)\n            wait (0.01) seconds\n            change [ghost v] effect by (5)\n        end\n    end\nend\n\nwhen [any v] key pressed\nif <(Beat Drop) = [1]> then\n    broadcast (Start Game v)\n    set [start v] to [1]\n    set [beat drop v] to [0]\n    stop [this script v]\nend\n\nwhen I start as a clone\nforever\n    if <(Clone ID \(Intro\)) = [4]> then\n        if <(Start) = [1]> then\n            repeat (20)\n                change [brightness v] effect by (-5)\n                wait (0.1) seconds\n            end\n            delete this clone\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(Start) = [1]> then\n        hide variable [☁ record time v]\n        hide variable [☁ beat the game v]\n        reset timer\n        repeat (20)\n            change [brightness v] effect by (-5)\n            wait (0.1) seconds\n        end\n        delete this clone\n    end\nend\n\nwhen I receive [start game v]\nrepeat (20)\n    change volume by (-5)\n    wait (0.1) seconds\nend\n\nwhen I receive [checkpoint \(demo22\) v]\nrepeat (20)\n    change volume by (-5)\n    wait (0.01) seconds\nend\n\nwhen I receive [checkpoint \(airship22\) v]\nrepeat (20)\n    change volume by (-5)\n    wait (0.01) seconds\nend\n\nwhen I receive [checkpoint \(boss22\) v]\nrepeat (20)\n    change volume by (-5)\n    wait (0.01) seconds\nend\n\nwhen I receive [checkpoint \(boss22\) v]\ndelete this clone\n\nwhen I receive [checkpoint \(airship22\) v]\ndelete this clone\n\nwhen I receive [checkpoint \(demo22\) v]\ndelete this clone\n\n@Player\n\ndefine Player Tick (speed) (friction) Console <right> <left> <up>\nset [x_vel v] to (((X_Vel) + ((<right> - <left>) * (speed))) * (friction))\npoint in direction ((([abs v] of (X_Vel) ) / (X_Vel)) * (90))\nchange x by (X_Vel)\nif <touching (levels v)?> then\n    set [slope v] to [0]\n    repeat until <<(Slope) = [10]> or <not <touching (levels v)?>>>\n        change [slope v] by (1)\n        change y by (1)\n    end\n    if <touching (levels v)?> then\n        change y by ((Slope) * (-1))\n        repeat until <not <touching (levels v)?>>\n            change x by ((([abs v] of (X_Vel) ) / (X_Vel)) * (-1))\n        end\n        if <up> then\n            set [y_vel v] to [12]\n            if <(([abs v] of (X_Vel) ) / (X_Vel)) = [1]> then\n                set [x_vel v] to [-24]\n            else\n                set [x_vel v] to [24]\n            end\n        else\n            set [x_vel v] to [0]\n        end\n    end\nend\nif <<up> and <(Jumping) < [3]>> then\n    set [y_vel v] to [12]\nelse\n    change [y_vel v] by (-1)\nend\nchange [jumping v] by (1)\nchange y by (Y_Vel)\nif <touching (levels v)?> then\n    repeat until <not <touching (levels v)?>>\n        change y by ((([abs v] of (Y_Vel) ) / (Y_Vel)) * (-1))\n    end\n    if <(([abs v] of (Y_Vel) ) / (Y_Vel)) = [-1]> then\n        set [jumping v] to [0]\n    end\n    set [y_vel v] to [0]\nend\n\ndefine Reset Player Data\nset rotation style [left-right v]\ngo to x: (-200) y: (-30)\nset [jumping v] to [0]\nset [slope v] to [0]\nset [x_vel v] to [0.000001]\nset [y_vel v] to [-0.00001]\n\nwhen flag clicked\nset [movement v] to [0]\nset [checkpoint v] to [0]\nset [level 19 v] to [0]\nset [invincibility v] to [0]\nset [music v] to [0]\nset [x_vel v] to [0]\nset [y_vel v] to [0]\npoint in direction (90)\nset volume to (100) %\nswitch costume to (costume1 v)\nclear graphic effects\nset size to (130) %\nhide\n\nwhen flag clicked\nforever\n    if <<<(x position) = [243]> or <(x position) > [243]>> and <not <<<<(Level) = [19]> or <(Level) = [20]>> or <(Level) = [21]>> or <(Level) = [0]>>>> then\n        change [level v] by (1)\n        Reset Player Data\n        broadcast (Next level v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Invincibility) = [0]> then\n        if <<(y position) = [-183]> or <(y position) < [-183]>> then\n            wait (0.01) seconds\n            change [health v] by (-1)\n            start sound [Cartoon Falling Sound Effects v]\n            Reset Player Data\n            Movement\n        end\n    end\nend\n\nwhen I receive [start \(showing game\) v]\nshow\n\nwhen I receive [start \(movement\) v]\nset [movement v] to [1]\nset [death movement v] to [0]\nrepeat until <(Movement) = [0]>\n    if <(Death Movement) = [0]> then\n        Player Tick [3] [.7] Console <<key (right arrow v) pressed?> or <key (d v) pressed?>> <<key (left arrow v) pressed?> or <key (a v) pressed?>> <<key (up arrow v) pressed?> or <key (w v) pressed?>>\n    end\nend\n\nwhen I receive [death v]\nwait (0.5) seconds\nset [death movement v] to [1]\nwait (3) seconds\nrepeat (6)\n    next costume\n    wait (0.1) seconds\nend\nwait (0.5) seconds\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\nwait (1) seconds\nif <(Checkpoint) = [0]> then\n    broadcast (Respawn \(Grassland\) v)\nend\nif <(Checkpoint) = [1]> then\n    broadcast (Respawn \(Airship\) v)\nend\nif <(Checkpoint) = [2]> then\n    broadcast (Respawn \(Level 19\) v)\nend\n\nwhen I receive [respawn \(grassland\) v]\ngo to x: (-179) y: (-116)\nset [health v] to [3]\nswitch costume to (costume1 v)\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\nset [death movement v] to [0]\nset [death v] to [0]\n\nwhen [r v] key pressed\nReset Player Data\n\nwhen flag clicked\nforever\n    if <(Portal) = [0]> then\n        if <touching (portal v)?> then\n            broadcast (Portal v)\n            wait (0.1) seconds\n            set [portal v] to [1]\n        end\n    end\nend\n\nwhen I receive [portal v]\nset [death movement v] to [1]\nrepeat (10)\n    wait (0.1) seconds\n    move (5) steps\n    change size by (-13)\nend\nset [brightness v] effect to (-100)\nstart sound [Pop v]\nhide\nwait (0.5) seconds\nset [checkpoint v] to [1]\nbroadcast (End Of Grassland v)\n\nwhen I receive [start of airship v]\nset [level v] to [11]\nset [death movement v] to [0]\nset size to (130) %\nshow\nReset Player Data\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [respawn \(airship\) v]\ngo to x: (-179) y: (-116)\nset [health v] to [3]\nswitch costume to (costume1 v)\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\nset [death movement v] to [0]\nset [death v] to [0]\n\nwhen I receive [start \(movement\) v]\nforever\n    if <(Level) > [0]> then\n        go to [front v] layer\n    end\nend\n\nwhen I receive [start \(movement\) v]\nforever\n    if <<<touching (spikes v)?> or <touching (tophats v)?>> or <touching (poison heart v)?>> then\n        if <(Invincibility) = [0]> then\n            wait (0.01) seconds\n            change [health v] by (-1)\n            Reset Player Data\n            Movement\n        end\n    end\nend\n\nwhen I receive [start \(movement\) v]\nforever\n    if <touching (tophats v)?> then\n        play sound [Cartoon punch sound effect v] until done\n    end\nend\n\nwhen I receive [start \(movement\) v]\nset [movement v] to [1]\n\nwhen I receive [start \(showing game\) v]\nReset Player Data\nshow\n\ndefine Movement\nif <not <(Health) = [0]>> then\n    set [death movement v] to [1]\n    wait (0.5) seconds\n    set [death movement v] to [0]\nend\n\nwhen flag clicked\nforever\n    if <<<<(x position) = [242]> or <(x position) > [242]>> and <(Level) = [19]>> and <(Level 19) = [0]>> then\n        set [death movement v] to [1]\n        broadcast (After Level 19 v)\n        wait (0) seconds\n        set [level 19 v] to [1]\n    end\nend\n\nwhen I receive [after level 19 v]\nhide\nwait (4) seconds\nchange [level v] by (1)\nbroadcast (Next level v)\nbroadcast (Boss fight animation v)\n\nwhen I receive [boss fight animation v]\nhide\nclear graphic effects\ngo to x: (-250) y: (-117)\nwait (4.25) seconds\nshow\nglide (0.75) secs to x: (-150) y: (-117)\n\nwhen I receive [respawn \(level 19\) v]\ngo to x: (-179) y: (-116)\nset [health v] to [3]\nswitch costume to (costume1 v)\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\nset [death movement v] to [0]\nset [death v] to [0]\n\nwhen I receive [next level v]\nif <<(Level) = [19]> or <(Level) = [20]>> then\n    set [checkpoint v] to [2]\nend\n\nwhen I receive [boss fight v]\nset [death movement v] to [0]\n\nwhen I receive [boss fight v]\nforever\n    if <touching (reginald copperbottom v)?> then\n        if <(Invincibility) = [0]> then\n            start sound [Cartoon punch sound effect2 v]\n            change [health v] by (-1)\n            Push Back\n        end\n    end\nend\n\ndefine Push Back\nif <(x position) > [0]> then\n    move (-150) steps\nend\nif <(x position) < [0]> then\n    move (150) steps\nend\nMovement\n\nwhen I receive [respawn \(level 19\) v]\nset [level 19 v] to [0]\n\nwhen I start as a clone\nif <(Clone ID \(Laser\)) = [0]> then\n    forever\n        if <touching (reginald copperbottom v)?> then\n            if <(Boss Health) = [25]> then\n                change [boss health v] by (3)\n                delete this clone\n            else\n                change [boss health v] by (1)\n                delete this clone\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(Clone ID \(Laser\)) = [0]> then\n    start sound [Laser Sound Effect \(No Copyright\) Bd Sound Effects \[HD\] v]\n    switch costume to (costume8 v)\n    repeat (20)\n        move (10) steps\n    end\n    delete this clone\nend\n\nwhen [space v] key pressed\nif <(Laser Activate) = [1]> then\n    if <(Laser) = [1]> then\n        create clone of (_myself_ v)\n        wait (0) seconds\n        set [laser v] to [0]\n        wait (0.5) seconds\n        set [laser v] to [1]\n    end\nend\n\nwhen I receive [start \(movement\) v]\nset [laser v] to [1]\nset [clone id \(laser\) v] to [0]\n\nwhen flag clicked\nforever\n    if <<(Level) = [19]> or <(Level) = [20]>> then\n        set [laser activate v] to [1]\n    else\n        set [laser activate v] to [0]\n    end\nend\n\nwhen I receive [boss fight v]\nforever\n    set [laser v] to [1]\n    wait (5) seconds\nend\n\nwhen flag clicked\nforever\n    if <<<<(x position) = [242]> or <(x position) > [242]>> and <(Level) = [20]>> and <(Level 21!!!) = [1]>> then\n        wait (0) seconds\n        set [death movement v] to [1]\n        broadcast (After Level 20 v)\n        wait (0) seconds\n        set [level 21!!! v] to [0]\n    end\nend\n\nwhen I receive [after level 20 v]\nhide\nwait (4) seconds\nchange [level v] by (1)\nbroadcast (Next level v)\nbroadcast (Level 21!!! v)\n\nwhen I receive [level 21!!! v]\nset [death movement v] to [1]\nclear graphic effects\ngo to x: (-250) y: (-117)\nwait (3.5) seconds\nshow\nglide (0.75) secs to x: (-150) y: (-117)\nset [death movement v] to [0]\n\nwhen I receive [level 21!!! v]\nforever\n    if <touching (crystal v)?> then\n        broadcast (Win + It's A Dream v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [start animation  v]\nswitch costume to (costume7 v)\npoint in direction (0)\ngo to x: (-175) y: (-60)\nset rotation style [all around v]\nset [death movement v] to [1]\nshow\nset [brightness v] effect to (-100)\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\nwait (5.5) seconds\nrepeat (6)\n    wait (0.01) seconds\n    switch costume to ((costume [number v]) - (1))\nend\nwait (2) seconds\nrepeat (9)\n    wait (0.01) seconds\n    turn right (10) degrees\nend\nset rotation style [left-right v]\nset [level 0 v] to [1]\nset [death movement v] to [0]\nbroadcast (Start \(Movement\) v)\n\nwhen flag clicked\nforever\n    if <<<<(x position) = [242]> or <(x position) > [242]>> and <(Level) = [0]>> and <(Level 0) = [1]>> then\n        set [death movement v] to [1]\n        broadcast (After Level 0 v)\n        wait (0) seconds\n        set [level 0 v] to [0]\n    end\nend\n\nwhen I receive [after level 0 v]\nhide\nwait (4) seconds\nbroadcast (Level 1 v)\n\nwhen I receive [level 1 v]\ngo to x: (-200) y: (-117)\nbroadcast (Start \(Showing Game\) v)\nset [brightness v] effect to (-100)\nshow\nrepeat (20)\n    wait (0.1) seconds\n    change [brightness v] effect by (5)\nend\nset [death movement v] to [0]\n\nwhen I receive [start animation  v]\nwait until <touching (scroll v)?>\nbroadcast (Note \(Level 0\) v)\nwait (0) seconds\nstop [this script v]\n\nwhen I receive [note \(level 0\) v]\ngo to [back v] layer\n\nwhen I receive [level 1 v]\nrepeat (10)\n    go to x: (-200) y: (-117)\nend\n\nwhen I receive [portal v]\nwait until <touching (laser  v)?>\nbroadcast (Pick Up Laser v)\nwait (0) seconds\nstop [this script v]\n\nwhen I receive [checkpoint \(demo22\) v]\nwait (4) seconds\nbroadcast (Start \(Movement\) v)\nbroadcast (Start \(Showing Game\) v)\n\nwhen I receive [checkpoint \(airship22\) v]\nwait (1) seconds\nbroadcast (Portal v)\nwait (6) seconds\nbroadcast (Start \(Movement\) v)\nbroadcast (Start \(Showing Game\) v)\n\nwhen I receive [checkpoint \(boss22\) v]\nwait (1) seconds\nbroadcast (Portal v)\nwait (6) seconds\nbroadcast (Start \(Movement\) v)\nbroadcast (Start \(Showing Game\) v)\n\nwhen I receive [win + it's a dream v]\nset [death movement v] to [1]\nwait (0.1) seconds\nrepeat (10)\n    wait (0.15) seconds\n    change [brightness v] effect by (-10)\nend\nwait (1) seconds\nbroadcast (End v)\n\nwhen I receive [end v]\nhide\n\n@Levels\n\nwhen flag clicked\nset [level v] to [0]\nclear graphic effects\nhide\n\nwhen I receive [start \(showing game\) v]\nshow\n\nwhen I receive [respawn \(grassland\) v]\nset [level v] to [1]\n\nwhen I receive [respawn \(grassland\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [death v]\nswitch costume to (costume1 v)\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\n\nwhen I receive [end of grassland v]\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\nwait (1) seconds\nbroadcast (Start Of Airship v)\n\nwhen I receive [start of airship v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [respawn \(airship\) v]\nset [level v] to [11]\n\nwhen I receive [respawn \(airship\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [after level 19 v]\nrepeat (20)\n    wait (0.1) seconds\n    change [brightness v] effect by (-5)\nend\n\nwhen I receive [boss fight animation v]\nrepeat (20)\n    wait (0.075) seconds\n    change [brightness v] effect by (5)\nend\n\nwhen I receive [respawn \(level 19\) v]\nset [level v] to [19]\n\nwhen I receive [respawn \(level 19\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [after level 20 v]\nrepeat (20)\n    wait (0.1) seconds\n    change [brightness v] effect by (-5)\nend\n\nwhen I receive [level 21!!! v]\nrepeat (20)\n    wait (0.075) seconds\n    change [brightness v] effect by (5)\nend\n\nwhen I receive [start animation  v]\nshow\nset volume to (25) %\nstart sound [Rock A Bye Baby - Super Soothing And Relaxing Sleep Music For Babies - Free Download v]\nset [brightness v] effect to (-100)\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\nwait (5) seconds\nstop all sounds\nwait (0) seconds\nset volume to (40) %\nstart sound [The Legend of Zelda Majora's Mask 3D - Inside a House - Music v]\n\nwhen I receive [after level 0 v]\nrepeat (20)\n    wait (0.1) seconds\n    change [brightness v] effect by (-5)\nend\n\nwhen I receive [level 1 v]\nset [level v] to [1]\nrepeat (20)\n    wait (0.1) seconds\n    change [brightness v] effect by (5)\nend\n\nwhen I receive [after level 0 v]\nrepeat (10)\n    wait (0.2) seconds\n    change volume by (-4)\nend\n\nset [brightness v] effect to (-100)\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [level 1 v]\nset [level v] to [1]\n\nwhen I receive [start animation  v]\nset [level v] to [0]\n\nwhen I receive [start animation  v]\nset [level v] to [0]\nforever\n    switch costume to ((Level) + (1))\nend\n\nwhen I receive [checkpoint \(demo22\) v]\nwait (4.01) seconds\nset [level v] to [7]\nset [check. demo v] to [1]\n\nwhen I receive [checkpoint \(demo22\) v]\nset [level v] to [0]\nforever\n    switch costume to ((Level) + (1))\nend\n\nwhen I receive [checkpoint \(boss22\) v]\nset [level v] to [0]\nforever\n    switch costume to ((Level) + (1))\nend\n\nwhen I receive [checkpoint \(airship22\) v]\nset [level v] to [0]\nforever\n    switch costume to ((Level) + (1))\nend\n\nwhen I receive [checkpoint \(airship22\) v]\nwait (7.01) seconds\nset [level v] to [11]\nset [check. airship v] to [1]\n\nwhen I receive [checkpoint \(boss22\) v]\nwait (7.01) seconds\nrepeat (100)\n    set [level v] to [19]\n    set [check. boss v] to [1]\nend\n\nwhen I receive [win + it's a dream v]\nwait (1) seconds\nrepeat (10)\n    wait (0.15) seconds\n    change [brightness v] effect by (-10)\nend\n\n@Grass\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [death v]\nswitch costume to (costume1 v)\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\n\nwhen I receive [respawn \(grassland\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [end of grassland v]\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\n\nwhen I receive [start of airship v]\nforever\n    hide\nend\n\nwhen I receive [start of airship v]\nset volume to (40) %\nforever\n    play sound [The Legend of Zelda Majora's Mask 3D - Pirates' Fortress - Music v] until done\nend\n\nwhen I receive [death v]\nset volume to (0) %\n\nwhen I receive [respawn \(airship\) v]\nset volume to (40) %\n\nwhen I receive [after level 19 v]\nrepeat (20)\n    wait (0.1) seconds\n    change volume by (-2)\nend\n\nwhen I receive [respawn \(level 19\) v]\nset volume to (40) %\n\nwhen I receive [start \(showing game\) v]\ngo to [back v] layer\nshow\n\nwhen I receive [level 1 v]\nset [brightness v] effect to (-100)\nrepeat (20)\n    wait (0.1) seconds\n    change [brightness v] effect by (5)\nend\n\n@Trees\n\nwhen flag clicked\nclear graphic effects\ngo to [back v] layer\nhide\n\nwhen I receive [start \(showing game\) v]\nshow\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [respawn \(grassland\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [death v]\nswitch costume to (costume1 v)\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\n\nwhen I receive [start of airship v]\nforever\n    hide\nend\n\nwhen I receive [level 1 v]\nset [brightness v] effect to (-100)\nrepeat (20)\n    wait (0.1) seconds\n    change [brightness v] effect by (5)\nend\n\n@Clouds\n\nwhen flag clicked\nhide\nclear graphic effects\nforever\n    go to [back v] layer\nend\n\nwhen I receive [start \(showing game\) v]\nshow\nchange [ghost v] effect by (25)\nforever\n    wait (0.00000000000000001) seconds\n    next costume\nend\n\nwhen I receive [death v]\nswitch costume to (costume1 v)\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\n\nwhen I receive [respawn \(grassland\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [end of grassland v]\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\n\nwhen I receive [start of airship v]\nforever\n    hide\nend\n\nwhen I receive [level 1 v]\nset [brightness v] effect to (-100)\nrepeat (20)\n    wait (0.1) seconds\n    change [brightness v] effect by (5)\nend\n\n@Spikes\n\nwhen flag clicked\nclear graphic effects\nshow\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [respawn \(grassland\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [death v]\nswitch costume to (costume1 v)\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        play sound [Spike Trap Sound Effect v] until done\n    end\nend\n\nwhen I receive [start of airship v]\nclear graphic effects\n\nwhen I receive [respawn \(airship\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\n@Coin Count\n\nwhen flag clicked\nclear graphic effects\nset [coins v] to [0]\nhide\n\nwhen I receive [start \(movement\) v]\nforever\n    if <(Coins) > [-1]> then\n        go to x: (365) y: (49)\n    end\n    if <(Coins) > [9]> then\n        go to x: (355) y: (49)\n    end\n    if <(Coins) > [19]> then\n        go to x: (350) y: (49)\n    end\nend\n\nwhen I receive [respawn \(grassland\) v]\nset [coins v] to [0]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [death v]\nswitch costume to (costume1 v)\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\n\nwhen I receive [end of grassland v]\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\n\nwhen I receive [start of airship v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [respawn \(airship\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [after level 19 v]\nrepeat (20)\n    wait (0.1) seconds\n    change [brightness v] effect by (-5)\nend\n\nwhen I receive [boss fight animation v]\nrepeat (20)\n    wait (0.075) seconds\n    change [brightness v] effect by (5)\nend\n\nwhen I receive [respawn \(level 19\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [start \(showing game\) v]\nswitch costume to (costume1 v)\ngo to x: (365) y: (49)\nshow\nset size to (100) %\nforever\n    switch costume to ((Coins) + (1))\n    if <(Coins) > [29]> then\n        set [coins v] to [0]\n        start sound [The Legend of Zelda Sound Effects - Obtain Heart v]\n        change [health v] by (1)\n    end\nend\n\nwhen I receive [after level 20 v]\nrepeat (20)\n    wait (0.1) seconds\n    change [brightness v] effect by (-5)\nend\n\nwhen I receive [level 21!!! v]\nrepeat (20)\n    wait (0.075) seconds\n    change [brightness v] effect by (5)\nend\n\nwhen I receive [start animation  v]\nshow\nset [brightness v] effect to (-100)\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [after level 0 v]\nrepeat (20)\n    wait (0.1) seconds\n    change [brightness v] effect by (-5)\nend\n\nwhen I receive [level 1 v]\nrepeat (20)\n    wait (0.1) seconds\n    change [brightness v] effect by (5)\nend\n\nwhen I receive [start animation  v]\nswitch costume to (costume4 v)\nset [coins v] to [0]\n\nwhen I receive [win + it's a dream v]\nwait (1) seconds\nrepeat (10)\n    wait (0.15) seconds\n    change [brightness v] effect by (-10)\nend\n\n@Coin\n\ndefine Create Coin At X: (x) Y: (y)\nwait (0) seconds\nset [x v] to (x)\nset y to (y)\nset x to (x)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\ngo to [back v] layer\nshow\nforever\n    if <touching (player v)?> then\n        start sound [smw_coin v]\n        change [coins v] by (1)\n        delete this clone\n    end\nend\n\nwhen flag clicked\nclear graphic effects\nset [clone? v] to [1]\nhide\n\nwhen I receive [next level v]\nif <(Level) = [2]> then\n    Create Coin At X: (10) Y: (-20)\n    Create Coin At X: (50) Y: (-20)\n    Create Coin At X: (-30) Y: (-20)\nend\nif <(Level) = [3]> then\n    Create Coin At X: (-75) Y: (-40)\n    Create Coin At X: (-35) Y: (-40)\n    Create Coin At X: (5) Y: (-40)\n    Create Coin At X: (45) Y: (-40)\n    Create Coin At X: (85) Y: (-40)\n    Create Coin At X: (125) Y: (-40)\n    Create Coin At X: (165) Y: (-40)\n    Create Coin At X: (205) Y: (-40)\nend\nif <(Level) = [4]> then\n    Create Coin At X: (-1) Y: (150)\nend\nif <(Level) = [5]> then\n    Create Coin At X: (70) Y: (72)\n    Create Coin At X: (30) Y: (72)\n    Create Coin At X: (-10) Y: (72)\n    Create Coin At X: (-50) Y: (72)\n    Create Coin At X: (-90) Y: (72)\n    Create Coin At X: (-130) Y: (72)\n    Create Coin At X: (-170) Y: (72)\n    Create Coin At X: (-210) Y: (72)\nend\nif <(Level) = [7]> then\n    Create Coin At X: (-6) Y: (-55)\n    Create Coin At X: (146) Y: (10)\nend\nif <(Level) = [8]> then\n    Create Coin At X: (-40) Y: (-5)\n    Create Coin At X: (0) Y: (-5)\n    Create Coin At X: (40) Y: (-5)\nend\nif <(Level) = [9]> then\n    Create Coin At X: (109) Y: (140)\n    Create Coin At X: (-109) Y: (140)\nend\nif <(Level) = [10]> then\n    Create Coin At X: (-160) Y: (-110)\n    Create Coin At X: (-120) Y: (-110)\n    Create Coin At X: (-80) Y: (-110)\n    Create Coin At X: (-40) Y: (-110)\n    Create Coin At X: (0) Y: (-110)\n    Create Coin At X: (40) Y: (-110)\n    Create Coin At X: (80) Y: (-110)\nend\nif <(Level) = [13]> then\n    Create Coin At X: (-22) Y: (-115)\n    Create Coin At X: (13) Y: (-115)\n    Create Coin At X: (205) Y: (-10)\n    Create Coin At X: (175) Y: (-10)\n    Create Coin At X: (205) Y: (30)\n    Create Coin At X: (175) Y: (30)\nend\nif <(Level) = [14]> then\n    Create Coin At X: (110) Y: (-45)\n    Create Coin At X: (110) Y: (-5)\n    Create Coin At X: (110) Y: (35)\n    Create Coin At X: (30) Y: (-5)\n    Create Coin At X: (30) Y: (35)\n    Create Coin At X: (30) Y: (75)\nend\nif <(Level) = [15]> then\n    Create Coin At X: (-46) Y: (-115)\n    Create Coin At X: (170) Y: (-115)\nend\nif <(Level) = [16]> then\n    Create Coin At X: (0) Y: (-20)\nend\nif <(Level) = [18]> then\n    Create Coin At X: (-90) Y: (40)\n    Create Coin At X: (-60) Y: (40)\n    Create Coin At X: (-30) Y: (40)\n    Create Coin At X: (0) Y: (40)\n    Create Coin At X: (30) Y: (40)\n    Create Coin At X: (60) Y: (40)\n    Create Coin At X: (90) Y: (40)\n    Create Coin At X: (-90) Y: (80)\n    Create Coin At X: (-60) Y: (80)\n    Create Coin At X: (-30) Y: (80)\n    Create Coin At X: (0) Y: (80)\n    Create Coin At X: (30) Y: (80)\n    Create Coin At X: (60) Y: (80)\n    Create Coin At X: (90) Y: (80)\n    Create Coin At X: (-90) Y: (120)\n    Create Coin At X: (-60) Y: (120)\n    Create Coin At X: (-30) Y: (120)\n    Create Coin At X: (0) Y: (120)\n    Create Coin At X: (30) Y: (120)\n    Create Coin At X: (60) Y: (120)\n    Create Coin At X: (90) Y: (120)\n    Create Coin At X: (-90) Y: (160)\n    Create Coin At X: (-60) Y: (160)\n    Create Coin At X: (-30) Y: (160)\n    Create Coin At X: (0) Y: (160)\n    Create Coin At X: (30) Y: (160)\n    Create Coin At X: (60) Y: (160)\n    Create Coin At X: (90) Y: (160)\nend\n\nwhen I receive [next level v]\ndelete this clone\n\nwhen I start as a clone\nset size to (10) %\nswitch costume to (costume1 v)\nset [clone? v] to [1]\nforever\n    wait (0.05) seconds\n    next costume\nend\n\nwhen I receive [next level v]\ndelete this clone\n\nwhen I receive [back a level v]\ndelete this clone\n\nwhen I receive [back a level v]\ndelete this clone\n\nwhen I receive [back a level v]\ndelete this clone\n\nwhen I receive [next level v]\ndelete this clone\n\nwhen I receive [death v]\nswitch costume to (costume1 v)\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\n\nwhen I receive [respawn \(grassland\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [respawn \(grassland\) v]\ndelete this clone\n\nwhen I receive [respawn \(grassland\) v]\ndelete this clone\n\nwhen I receive [end of grassland v]\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\n\nwhen I receive [start of airship v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [respawn \(airship\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [respawn \(airship\) v]\ndelete this clone\n\nwhen I receive [respawn \(airship\) v]\ndelete this clone\n\n@Hearts\n\nwhen flag clicked\nset [death v] to [0]\nset [health v] to [3]\nclear graphic effects\nset size to (180) %\nswitch costume to (3 hearts v)\nhide\n\nwhen I receive [start \(movement\) v]\nshow\nforever\n    if <<(Health) = [0]> and <(Death) = [0]>> then\n        switch costume to (no hearts v)\n        broadcast (Death v)\n        wait (0.1) seconds\n        change [death v] by (1)\n    end\n    if <(Health) = [1]> then\n        switch costume to (1 heart v)\n    end\n    if <(Health) = [2]> then\n        switch costume to (2 hearts v)\n    end\n    if <(Health) = [3]> then\n        switch costume to (3 hearts v)\n    end\n    if <(Health) = [4]> then\n        switch costume to (4 hearts v)\n    end\n    if <(Health) = [5]> then\n        switch costume to (5 hearts v)\n    end\nend\n\nwhen I receive [health up v]\nif <(Health) < [6]> then\n    change [health v] by (1)\nend\n\nwhen I receive [respawn \(grassland\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [death v]\nswitch costume to (costume1 v)\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\n\nwhen I receive [end of grassland v]\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\n\nwhen I receive [start of airship v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [respawn \(airship\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [after level 19 v]\nrepeat (20)\n    wait (0.1) seconds\n    change [brightness v] effect by (-5)\nend\n\nwhen I receive [boss fight animation v]\nrepeat (20)\n    wait (0.075) seconds\n    change [brightness v] effect by (5)\nend\n\nwhen I receive [respawn \(level 19\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [after level 20 v]\nrepeat (20)\n    wait (0.1) seconds\n    change [brightness v] effect by (-5)\nend\n\nwhen I receive [level 21!!! v]\nrepeat (20)\n    wait (0.075) seconds\n    change [brightness v] effect by (5)\nend\n\nwhen I receive [start animation  v]\nshow\nset [brightness v] effect to (-100)\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [after level 0 v]\nrepeat (20)\n    wait (0.1) seconds\n    change [brightness v] effect by (-5)\nend\n\nwhen I receive [level 1 v]\nrepeat (20)\n    wait (0.1) seconds\n    change [brightness v] effect by (5)\nend\n\nwhen I receive [win + it's a dream v]\nwait (1) seconds\nrepeat (10)\n    wait (0.15) seconds\n    change [brightness v] effect by (-10)\nend\n\n@Tophats\n\nwhen flag clicked\nset [clone id v] to [0]\nset [clone code v] to [0]\nset [clones v] to [0]\nclear graphic effects\ngo to [front v] layer\nhide\n\nwhen I start as a clone\nif <(Clone ID) = [0]> then\n    forever\n        show\n        switch costume to (costume1 v)\n        go to x: (-84) y: (-44)\n        glide (2.5) secs to x: (185) y: (-44)\n        switch costume to (costume2 v)\n        glide (2.5) secs to x: (-84) y: (-44)\n    end\nend\n\nwhen I receive [next level v]\nif <(Level) = [3]> then\n    create clone of (_myself_ v)\nend\nif <(Level) = [8]> then\n    change [clone id v] by (1)\n    wait (0.01) seconds\n    create clone of (_myself_ v)\n    wait (0.01) seconds\n    change [clone id v] by (1)\n    create clone of (_myself_ v)\nend\nif <(Level) = [12]> then\n    change [clone id v] by (1)\n    wait (0.01) seconds\n    create clone of (_myself_ v)\n    wait (0.01) seconds\n    change [clone id v] by (1)\n    create clone of (_myself_ v)\n    wait (0.01) seconds\n    change [clone id v] by (1)\n    create clone of (_myself_ v)\nend\nif <(Level) = [14]> then\n    change [clone id v] by (1)\n    wait (0.01) seconds\n    create clone of (_myself_ v)\nend\nif <(Level) = [17]> then\n    change [clone id v] by (1)\n    wait (0.01) seconds\n    create clone of (_myself_ v)\n    wait (0.01) seconds\n    change [clone id v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [death v]\nswitch costume to (costume1 v)\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\n\nwhen I receive [respawn \(grassland\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [next level v]\nif <<<(Level) < [3]> or <(Level) > [3]>> and <(Clone ID) = [0]>> then\n    delete this clone\nend\nif <<<(Level) < [8]> or <(Level) > [8]>> and <(Clone ID) = [1]>> then\n    delete this clone\nend\nif <<<(Level) < [8]> or <(Level) > [8]>> and <(Clone ID) = [2]>> then\n    delete this clone\nend\nif <<<(Level) < [12]> or <(Level) > [12]>> and <(Clone ID) = [3]>> then\n    delete this clone\nend\nif <<<(Level) < [12]> or <(Level) > [12]>> and <(Clone ID) = [4]>> then\n    delete this clone\nend\nif <<<(Level) < [12]> or <(Level) > [12]>> and <(Clone ID) = [5]>> then\n    delete this clone\nend\nif <<<(Level) < [14]> or <(Level) > [4]>> and <(Clone ID) = [6]>> then\n    delete this clone\nend\nif <<<(Level) < [17]> or <(Level) > [17]>> and <(Clone ID) = [7]>> then\n    delete this clone\nend\nif <<<(Level) < [17]> or <(Level) > [17]>> and <(Clone ID) = [8]>> then\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone ID) = [1]> then\n    forever\n        show\n        switch costume to (costume1 v)\n        go to x: (-120) y: (-118)\n        glide (1) secs to x: (-5) y: (-118)\n        switch costume to (costume2 v)\n        glide (1) secs to x: (-120) y: (-118)\n    end\nend\n\nwhen I start as a clone\nif <(Clone ID) = [2]> then\n    forever\n        show\n        switch costume to (costume2 v)\n        go to x: (120) y: (-118)\n        glide (1) secs to x: (10) y: (-118)\n        switch costume to (costume1 v)\n        glide (1) secs to x: (120) y: (-118)\n    end\nend\n\nwhen I start as a clone\nif <(Clone ID) = [3]> then\n    forever\n        show\n        switch costume to (costume2 v)\n        go to x: (-50) y: (-83)\n        glide (2) secs to x: (-154) y: (-83)\n        switch costume to (costume1 v)\n        glide (2) secs to x: (-50) y: (-83)\n    end\nend\n\nwhen I start as a clone\nif <(Clone ID) = [4]> then\n    forever\n        show\n        switch costume to (costume2 v)\n        go to x: (90) y: (-61)\n        glide (2) secs to x: (-10) y: (-61)\n        switch costume to (costume1 v)\n        glide (2) secs to x: (90) y: (-61)\n    end\nend\n\nwhen I start as a clone\nif <(Clone ID) = [5]> then\n    forever\n        show\n        switch costume to (costume2 v)\n        go to x: (220) y: (-38)\n        glide (2) secs to x: (130) y: (-38)\n        switch costume to (costume1 v)\n        glide (2) secs to x: (220) y: (-38)\n    end\nend\n\nwhen I receive [respawn \(airship\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [respawn \(grassland\) v]\nif <(Checkpoint) = [0]> then\n    set [clone id v] to [0]\nend\n\nwhen I receive [respawn \(airship\) v]\nif <(Checkpoint) = [1]> then\n    set [clone id v] to [2]\nend\n\nwhen I start as a clone\nif <(Clone ID) = [6]> then\n    forever\n        show\n        switch costume to (costume2 v)\n        go to x: (112) y: (-118)\n        glide (5) secs to x: (-222) y: (-118)\n        switch costume to (costume1 v)\n        glide (5) secs to x: (112) y: (-118)\n    end\nend\n\nwhen I receive [respawn \(grassland\) v]\nrepeat (10)\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone ID) = [7]> then\n    switch costume to (costume7 v)\n    forever\n        repeat until <(costume [number v]) = [10]>\n            wait (0.05) seconds\n            next costume\n        end\n        switch costume to (costume7 v)\n    end\nend\n\nwhen I start as a clone\nif <(Clone ID) = [7]> then\n    forever\n        show\n        go to x: (243) y: (-65)\n        glide (5) secs to x: (-243) y: (-65)\n        wait (0.1) seconds\n        hide\n        wait (0.5) seconds\n    end\nend\n\nwhen I start as a clone\nif <(Clone ID) = [8]> then\n    switch costume to (costume3 v)\n    forever\n        repeat until <(costume [number v]) = [6]>\n            wait (0.05) seconds\n            next costume\n        end\n        switch costume to (costume3 v)\n    end\nend\n\nwhen I start as a clone\nif <(Clone ID) = [8]> then\n    forever\n        show\n        go to x: (-243) y: (75)\n        glide (5) secs to x: (243) y: (75)\n        wait (0.1) seconds\n        hide\n        wait (0.5) seconds\n    end\nend\n\nwhen I receive [death v]\nwait (3) seconds\nrepeat (50)\n    delete this clone\nend\n\nwhen I receive [checkpoint \(airship22\) v]\nwait (9) seconds\nset [clone id v] to [2]\n\n@giphy (13)\n\nwhen flag clicked\nclear graphic effects\nset [clone id \(heart\) v] to [0]\nhide\n\nwhen I receive [next level v]\nif <(Level) = [5]> then\n    Create Heart At X: [215] Y: [62]\nend\nif <(Level) = [9]> then\n    Create Heart At X: [-100] Y: [-124]\nend\nif <(Level) = [14]> then\n    Create Heart At X: [-80] Y: [97]\nend\n\nwhen I start as a clone\ngo to [back v] layer\nset size to (20) %\nshow\nforever\n    if <touching (player v)?> then\n        start sound [The Legend of Zelda Sound Effects - Obtain Heart v]\n        change [health v] by (1)\n        delete this clone\n    end\nend\n\ndefine Create Heart At X: (x) Y: (y)\nwait (0) seconds\nset [x v] to (x)\nset y to (y)\nset x to (x)\ncreate clone of (_myself_ v)\n\nwhen I receive [next level v]\ndelete this clone\n\nwhen I receive [back a level v]\ndelete this clone\n\nwhen I receive [respawn \(grassland\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [death v]\nswitch costume to (costume1 v)\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\n\nwhen I receive [respawn \(airship\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [respawn \(airship\) v]\ndelete this clone\n\nwhen I receive [respawn \(airship\) v]\ndelete this clone\n\nwhen I receive [respawn \(grassland\) v]\ndelete this clone\n\nwhen I receive [respawn \(grassland\) v]\ndelete this clone\n\n@Portal\n\nwhen flag clicked\nset [portal v] to [0]\ngo to [back v] layer\ngo to x: (175) y: (-18)\nhide\n\nwhen I receive [next level v]\nif <(Level) = [10]> then\n    show\n    switch costume to (giphy \(14\) v)\n    set volume to (50) %\n    start sound [Portal Sound Effects All Sounds v]\n    repeat until <not <(Level) = [10]>>\n        wait (0.05) seconds\n        next costume\n    end\nelse\n    hide\n    set volume to (0) %\n    switch costume to (giphy \(14\) v)\nend\n\nwhen I receive [back a level v]\nif <(Level) = [10]> then\n    show\n    switch costume to (giphy \(14\) v)\n    set volume to (50) %\n    start sound [Portal Sound Effects All Sounds v]\n    repeat until <not <(Level) = [10]>>\n        wait (0.05) seconds\n        next costume\n    end\nelse\n    hide\n    set volume to (0) %\n    switch costume to (giphy \(14\) v)\nend\n\nwhen I receive [end of grassland v]\nrepeat (20)\n    change [brightness v] effect by (-5)\n    change volume by (-2.5)\n    wait (0.1) seconds\nend\nhide\n\n@Window\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\nwhen I receive [start of airship v]\ngo to x: (15) y: (10)\nshow\nset [brightness v] effect to (-100)\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [death v]\nswitch costume to (costume1 v)\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\n\nwhen I receive [respawn \(airship\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [next level v]\nforever\n    if <(Level) = [11]> then\n        go to x: (15) y: (10)\n    end\n    if <(Level) = [13]> then\n        go to x: (-50) y: (0)\n    end\n    if <(Level) = [15]> then\n        go to x: (-50) y: (0)\n    end\n    if <(Level) = [17]> then\n        go to x: (-20) y: (0)\n    end\n    if <(Level) = [19]> then\n        go to x: (-20) y: (0)\n    end\nend\n\n@Tophat Background\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nforever\n    go to [back v] layer\nend\n\nwhen I receive [start of airship v]\nshow\nset [brightness v] effect to (-100)\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [death v]\nswitch costume to (costume1 v)\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\n\nwhen I receive [respawn \(airship\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [after level 19 v]\nrepeat (20)\n    wait (0.1) seconds\n    change [brightness v] effect by (-5)\nend\n\nwhen I receive [boss fight animation v]\nrepeat (20)\n    wait (0.075) seconds\n    change [brightness v] effect by (5)\nend\n\nwhen I receive [respawn \(level 19\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [after level 20 v]\nrepeat (20)\n    wait (0.1) seconds\n    change [brightness v] effect by (-5)\nend\n\nwhen I receive [level 21!!! v]\nrepeat (20)\n    wait (0.075) seconds\n    change [brightness v] effect by (5)\nend\n\nwhen I receive [win + it's a dream v]\nwait (1) seconds\nrepeat (10)\n    wait (0.15) seconds\n    change [brightness v] effect by (-10)\nend\n\nwhen I receive [new record! v]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nswitch costume to (costume23 v)\ngo to [front v] layer\nset [ghost v] effect to (0)\ngo to x: (0) y: (206)\nshow\nstart sound [Win v]\nglide (1) secs to x: (0) y: (140)\nwait (1.5) seconds\nglide (1) secs to x: (0) y: (206)\nhide\n\n@Poison Heart\n\nwhen flag clicked\nclear graphic effects\nset [clone id poison heart v] to [0]\nhide\n\nwhen I receive [next level v]\nif <(Level) = [15]> then\n    Create Poison Heart At X: [68] Y: [-125]\nend\n\nwhen I start as a clone\ngo to [back v] layer\nset size to (25) %\nshow\nforever\n    if <touching (player v)?> then\n        start sound [Poison Sound EffectRagnarok Online v]\n        delete this clone\n    end\nend\n\nwhen I receive [next level v]\ndelete this clone\n\nwhen I receive [respawn \(grassland\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [death v]\nswitch costume to (costume1 v)\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\n\nwhen I receive [respawn \(airship\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [respawn \(airship\) v]\ndelete this clone\n\nwhen I receive [respawn \(airship\) v]\ndelete this clone\n\nwhen I receive [respawn \(grassland\) v]\ndelete this clone\n\nwhen I receive [respawn \(grassland\) v]\ndelete this clone\n\ndefine Create Poison Heart At X: (x) Y: (y)\nwait (0) seconds\nset [x v] to (x)\nset y to (y)\nset x to (x)\ncreate clone of (_myself_ v)\n\nwhen I receive [next level v]\ndelete this clone\n\n@Charles\n\nwhen flag clicked\nhide\n\nwhen I receive [boss fight animation v]\nstop all sounds\nset size to (62) %\ngo to x: (5) y: (-111)\nswitch costume to (2 v)\nset [brightness v] effect to (-100)\nshow\nrepeat (20)\n    wait (0.075) seconds\n    change [brightness v] effect by (5)\nend\nwait (4) seconds\nstart sound [New Super Mario Bros v]\nglide (1) secs to x: (259) y: (72)\nhide\nwait (1.5) seconds\nbroadcast (Boss Fight Music v)\n\nwhen I receive [boss fight animation v]\nwait (6.5) seconds\nrepeat (50)\n    wait (0.05) seconds\n    next costume\nend\n\nwhen I receive [death v]\nset volume to (0) %\nstop all sounds\n\nwhen I receive [boss fight animation v]\nset volume to (50) %\n\nwhen I receive [boss fight music v]\nforever\n    start sound [The Legend of Zelda Majora's Mask 3D - Boss Battle - Music v]\n    wait (146) seconds\nend\n\nwhen I receive [boss fight v]\nforever\n    if <(Level 21!!!) = [1]> then\n        set volume to (0) %\n        stop [other scripts in sprite v]\n    end\nend\n\n@Golden Heart\n\nwhen flag clicked\nclear graphic effects\nset [clone id \(golden heart\) v] to [0]\nhide\n\nwhen I receive [next level v]\nif <(Level) = [20]> then\n    Create Golden Heart At X: [0] Y: [147]\nend\n\nwhen I start as a clone\nset [brightness v] effect to (-100)\ngo to [back v] layer\nset size to (25) %\nshow\nrepeat (20)\n    wait (0.075) seconds\n    change [brightness v] effect by (5)\nend\nforever\n    if <touching (player v)?> then\n        set [pitch v] effect to (50)\n        start sound [The Legend of Zelda Sound Effects - Obtain Heart v]\n        set [health v] to [5]\n        delete this clone\n    end\nend\n\nwhen I receive [next level v]\ndelete this clone\n\nwhen I receive [respawn \(grassland\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [death v]\nswitch costume to (costume1 v)\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\n\nwhen I receive [respawn \(airship\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [respawn \(airship\) v]\ndelete this clone\n\nwhen I receive [respawn \(airship\) v]\ndelete this clone\n\nwhen I receive [respawn \(grassland\) v]\ndelete this clone\n\nwhen I receive [respawn \(grassland\) v]\ndelete this clone\n\nwhen I receive [next level v]\ndelete this clone\n\ndefine Create Golden Heart At X: (x) Y: (y)\nwait (0) seconds\nset [x v] to (x)\nset y to (y)\nset x to (x)\ncreate clone of (_myself_ v)\n\nwhen I receive [boss fight animation v]\n\nwhen I receive [after level 20 v]\nrepeat (20)\n    wait (0.1) seconds\n    change [brightness v] effect by (-5)\nend\n\nwhen I receive [level 21!!! v]\nrepeat (20)\n    wait (0.075) seconds\n    change [brightness v] effect by (5)\nend\n\n@Reginald Copperbottom\n\nwhen flag clicked\nset [stop v] to [1]\nset [boss attacks/moves v] to [0]\nset [boss fight wait v] to [0]\nset [level 21!!! v] to [0]\nset [boss health v] to [25]\nset [boss death message v] to [0]\nhide\n\nwhen I receive [boss fight animation v]\nclear graphic effects\nset size to (65) %\ngo to x: (248) y: (-112)\nswitch costume to (costume3 v)\nwait (9) seconds\nshow\nclear graphic effects\nglide (1) secs to x: (169) y: (-112)\nwait (2) seconds\nset [stop v] to [0]\nbroadcast (Boss Fight v)\n\nwhen I receive [death v]\nset [stop v] to [1]\nset [boss attacks/moves v] to [0]\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\nhide\nset [boss health v] to [25]\n\nwhen I receive [boss fight v]\nrepeat until <(Stop) = [1]>\n    set [boss attacks/moves v] to (pick random (1) to (5))\n    wait (0) seconds\n    set [boss fight wait v] to [1]\n    wait until <(Boss Fight Wait) = [0]>\nend\n\nwhen I receive [boss fight v]\nforever\n    if <<<(Boss Attacks/Moves) = [1]> or <(Boss Attacks/Moves) = [2]>> or <(Boss Attacks/Moves) = [3]>> then\n        wait (0.01) seconds\n        repeat (pick random (1) to (4))\n            Move\n        end\n        set [boss fight wait v] to [0]\n        wait (0.01) seconds\n    else\n        if <(Boss Attacks/Moves) = [4]> then\n            wait (0.01) seconds\n            repeat (pick random (1) to (2))\n                Teleport (Top)\n                Teleport (Bottom)\n            end\n            set [boss fight wait v] to [0]\n            wait (0.01) seconds\n        else\n            if <(Boss Attacks/Moves) = [5]> then\n                wait (0.01) seconds\n                repeat (pick random (1) to (2))\n                    Teleport (Bottom)\n                    Teleport (Top)\n                end\n                set [boss fight wait v] to [0]\n                wait (0.01) seconds\n            end\n        end\n    end\nend\n\ndefine Move\nif <(y position) = [-112]> then\n    if <<<(x position) > [150]> and <(x position) < [250]>> or <<(x position) = [150]> or <(x position) = [250]>>> then\n        glide (pick random (1) to (2)) secs to x: (pick random (-1) to (-75)) y: (-112)\n        switch costume to (costume1 v)\n    else\n        if <<<(x position) > [100]> and <(x position) < [150]>> or <<(x position) = [100]> or <(x position) = [150]>>> then\n            glide (pick random (1) to (2)) secs to x: (pick random (-1) to (-100)) y: (-112)\n            switch costume to (costume1 v)\n        else\n            if <<<(x position) > [50]> and <(x position) < [100]>> or <<(x position) = [50]> or <(x position) = [100]>>> then\n                glide (pick random (1) to (2)) secs to x: (pick random (25) to (-150)) y: (-112)\n                switch costume to (costume1 v)\n            else\n                if <<<(x position) > [0]> and <(x position) < [50]>> or <<(x position) = [0]> or <(x position) = [50]>>> then\n                    glide (pick random (1) to (2)) secs to x: (pick random (-100) to (-200)) y: (-112)\n                    switch costume to (costume1 v)\n                else\n                    if <<<(x position) > [-50]> and <(x position) < [0]>> or <<(x position) = [-50]> or <(x position) = [0]>>> then\n                        glide (pick random (1) to (2)) secs to x: (pick random (100) to (200)) y: (-112)\n                        switch costume to (costume3 v)\n                    else\n                        if <<<(x position) > [-100]> and <(x position) < [-50]>> or <<(x position) = [-100]> or <(x position) = [-50]>>> then\n                            glide (pick random (1) to (2)) secs to x: (pick random (25) to (150)) y: (-112)\n                            switch costume to (costume3 v)\n                        else\n                            if <<<(x position) > [-150]> and <(x position) < [-100]>> or <<(x position) = [-100]> or <(x position) = [-150]>>> then\n                                glide (pick random (1) to (2)) secs to x: (pick random (1) to (100)) y: (-112)\n                                switch costume to (costume3 v)\n                            else\n                                if <<<(x position) > [-250]> and <(x position) < [-150]>> or <<(x position) = [-150]> or <(x position) = [-250]>>> then\n                                    glide (pick random (1) to (2)) secs to x: (pick random (1) to (75)) y: (-112)\n                                    switch costume to (costume3 v)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nelse\n    if <<<(x position) > [-110]> and <(x position) < [0]>> or <(x position) = [-110]>> then\n        glide (pick random (0.5) to (1.5)) secs to x: (pick random (1) to (110)) y: (57)\n        switch costume to (costume3 v)\n    else\n        if <<<(x position) > [0]> and <(x position) < [100]>> or <(x position) = [100]>> then\n            glide (pick random (0.5) to (1.5)) secs to x: (pick random (-1) to (-110)) y: (57)\n            switch costume to (costume1 v)\n        end\n    end\nend\n\ndefine Teleport (Bottom)\nrepeat (20)\n    wait (pick random (0.005) to (0.025)) seconds\n    change [ghost v] effect by (5)\nend\nif <(x position) > [0]> then\n    go to x: (pick random (-250) to (-1)) y: (-112)\n    switch costume to (costume1 v)\nelse\n    if <(x position) < [0]> then\n        go to x: (pick random (250) to (1)) y: (-112)\n        switch costume to (costume3 v)\n    end\nend\nrepeat (20)\n    wait (pick random (0.005) to (0.025)) seconds\n    change [ghost v] effect by (-5)\nend\n\ndefine Teleport (Top)\nrepeat (20)\n    wait (pick random (0.005) to (0.025)) seconds\n    change [ghost v] effect by (5)\nend\nif <(x position) > [-5]> then\n    go to x: (pick random (-6) to (-110)) y: (57)\n    switch costume to (costume1 v)\nelse\n    if <(x position) < [-5]> then\n        go to x: (pick random (-4) to (104)) y: (57)\n        switch costume to (costume3 v)\n    end\nend\nrepeat (20)\n    wait (pick random (0.005) to (0.025)) seconds\n    change [ghost v] effect by (-5)\nend\n\nwhen I receive [boss fight v]\nforever\n    if <(Boss Health) > [52]> then\n        wait (0.25) seconds\n        set [boss death message v] to [1]\n    end\nend\n\nwhen I receive [boss fight v]\nforever\n    if <(Boss Death Message) = [1]> then\n        stop [other scripts in sprite v]\n        change [☁ beat the game v] by (1)\n        set [laser activate v] to [0]\n        set [invincibility v] to [1]\n        set [time v] to (timer)\n        if <<<(Check. Demo) = [0]> and <(Check. Airship) = [0]>> and <(Check. Boss) = [0]>> then\n            if <(Time) < (☁ Record Time)> then\n                set [☁ record time v] to (Time)\n                broadcast (New Record! v)\n            end\n        end\n        clear graphic effects\n        stop all sounds\n        wait (1) seconds\n        switch costume to (costume4 v)\n        start sound [Laser Gun Charge-up Sound Effect v]\n        repeat (15)\n            change x by (2)\n            wait (0.01) seconds\n            change x by (-2)\n            wait (0.01) seconds\n            change y by (2)\n            wait (0.01) seconds\n            change y by (-2)\n            wait (0.01) seconds\n        end\n        start sound [sound effects explosion v]\n        start sound [Boss Defeated - The Legend of Zelda Majora's Mask 3D Music v]\n        repeat (10)\n            change size by (10)\n            change [ghost v] effect by (10)\n        end\n        hide\n        wait (6) seconds\n        set [level 21!!! v] to [1]\n        wait (0) seconds\n        set [boss death message v] to [0]\n    end\nend\n\n@Sprite1\n\nwhen I receive [death v]\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [boss fight v]\nclear graphic effects\nswitch costume to (25 v)\ngo to x: (-13) y: (-18)\nshow\nset size to (100) %\nrepeat until <(Boss Health) = [0]>\n    switch costume to (Boss Health)\nend\n\nwhen I receive [level 21!!! v]\nswitch costume to (26 v)\nhide\nrepeat (20)\n    wait (0.075) seconds\n    change [brightness v] effect by (5)\nend\n\nwhen I receive [after level 20 v]\nrepeat (20)\n    wait (0.1) seconds\n    change [brightness v] effect by (-5)\nend\n\nwhen I receive [boss fight v]\nforever\n    if <(Level 21!!!) = [1]> then\n        switch costume to (26 v)\n    end\nend\n\n@Crystal\n\nwhen flag clicked\npoint in direction (90)\nset size to (250) %\nhide\n\nwhen I receive [level 21!!! v]\nstart sound [Boss Room Calm - The Legend of ZeldaTwilight Princess v]\nswitch costume to (crystal-a v)\ngo to x: (-81) y: (-51)\nshow\nset [brightness v] effect to (-100)\nrepeat (20)\n    wait (0.075) seconds\n    change [brightness v] effect by (5)\nend\n\nwhen I receive [win + it's a dream v]\nhide\n\n@Sprite2\n\nwhen flag clicked\nhide\n\nwhen I receive [level 21!!! v]\nset [brightness v] effect to (-100)\nshow\nrepeat (20)\n    wait (0.075) seconds\n    change [brightness v] effect by (5)\nend\n\nwhen I receive [level 21!!! v]\ngo to x: (0) y: (-40)\nforever\n    turn right (1) degrees\nend\n\nwhen I receive [start animation  v]\ngo to x: (80) y: (-72)\nrepeat until <(Level) = [1]>\n    turn right (1) degrees\nend\n\nwhen I receive [start animation  v]\nset [brightness v] effect to (-100)\nshow\nrepeat (20)\n    wait (0.075) seconds\n    change [brightness v] effect by (5)\nend\n\nwhen I receive [note \(level 0\) v]\nwait (1) seconds\nhide\n\nwhen I receive [note \(level 10\) v]\nwait (1) seconds\nhide\n\nwhen I receive [after level 0 v]\nrepeat (20)\n    wait (0.1) seconds\n    change [brightness v] effect by (-5)\nend\nhide\n\nwhen I receive [start \(showing game\) v]\nclear graphic effects\ngo to x: (2) y: (-85)\nwait until <(Level) = [19]>\nshow\nrepeat until <(Level) = [20]>\n    turn right (1) degrees\nend\n\nwhen I receive [pick up laser v]\nhide\n\nwhen I receive [win + it's a dream v]\nhide\n\n@Scroll\n\nwhen I receive [after level 0 v]\nrepeat (20)\n    wait (0.1) seconds\n    change [brightness v] effect by (-5)\nend\nhide\n\nwhen flag clicked\nset [clone id \(note\) v] to [0]\nset size to (20) %\nhide\n\ndefine Create Note At X: (x) Y: (y)\nwait (0) seconds\nset [x v] to (x)\nset y to (y)\nset x to (x)\ncreate clone of (_myself_ v)\nwait (0) seconds\nchange [clone id \(note\) v] by (1)\n\nwhen I receive [start animation  v]\nCreate Note At X: [80] Y: [-72]\n\nwhen I start as a clone\nif <(Clone ID \(Note\)) = [0]> then\n    show\n    set [brightness v] effect to (-100)\n    repeat (20)\n        change [brightness v] effect by (5)\n        wait (0.1) seconds\n    end\n    forever\n        if <(Note) = [1]> then\n            delete this clone\n        end\n    end\nend\n\n@Note\n\nwhen flag clicked\nset [note v] to [0]\nhide\nforever\n    go [forward v] (1000) layers\n    go to [front v] layer\nend\n\nwhen I receive [note \(level 0\) v]\nswitch costume to (1 v)\nshow\nset size to (1) %\nrepeat (10)\n    wait (0.01) seconds\n    change size by (10)\nend\nset [note v] to [1]\n\nwhen this sprite clicked\nrepeat (10)\n    wait (0.01) seconds\n    change size by (-10)\nend\nhide\n\n@Laser \n\nwhen flag clicked\nset [clone id \(messages\) v] to [0]\nswitch costume to (36e97ff1454e679 \(1\)6 v)\ngo to x: (10) y: (-75)\nset size to (50) %\nhide\n\nwhen I receive [start \(showing game\) v]\nwait until <(Level) = [19]>\nshow\n\nwhen I receive [pick up laser v]\nhide\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(Clone ID \(Messages\)) = [2]> then\n    switch costume to (costume1 v)\n    go to x: (-300) y: (0)\n    hide\n    wait (1) seconds\n    show\n    glide (7) secs to x: (300) y: (0)\n    hide\n    delete this clone\nend\n\nwhen I start as a clone\nclear graphic effects\nwait (1) seconds\nrepeat (25)\n    repeat (20)\n        change [ghost v] effect by (-5)\n    end\n    wait (0.1) seconds\n    repeat (20)\n        wait (0.01) seconds\n        change [ghost v] effect by (5)\n    end\nend\n\nwhen I receive [after level 19 v]\ndelete this clone\n\nwhen I receive [start of airship v]\nif <<(Check. Airship) = [0]> and <(Check. Boss) = [0]>> then\n    wait (2.5) seconds\n    create clone of (_myself_ v)\n    wait (0) seconds\n    change [clone id \(messages\) v] by (1)\nend\n\nwhen I receive [next level v]\ndelete this clone\n\nwhen I start as a clone\nif <(Clone ID \(Messages\)) = [0]> then\n    switch costume to (costume2 v)\n    go to x: (-300) y: (0)\n    hide\n    wait (1) seconds\n    show\n    glide (7) secs to x: (300) y: (0)\n    hide\n    delete this clone\nend\n\nwhen I receive [next level v]\nif <(Level) = [19]> then\n    create clone of (_myself_ v)\n    wait (0) seconds\n    change [clone id \(messages\) v] by (1)\nend\n\nwhen I start as a clone\nif <(Clone ID \(Messages\)) = [1]> then\n    switch costume to (costume3 v)\n    go to x: (-300) y: (0)\n    hide\n    wait (0.1) seconds\n    show\n    glide (7) secs to x: (300) y: (0)\n    hide\n    delete this clone\nend\n\nwhen I receive [start of airship v]\nwait (7.9) seconds\nif <(Check. Boss) = [0]> then\n    if <(Check. Airship) = [1]> then\n        set [clone id \(messages\) v] to [0]\n    end\nend\n\nwhen I receive [checkpoint \(boss22\) v]\nwait (8) seconds\nif <(Check. Boss) = [1]> then\n    set [clone id \(messages\) v] to [2]\nend\n\n@Records \n\nwhen flag clicked\nforever\n    if <(Records Glide) = [0]> then\n        if <touching (mouse-pointer v)?> then\n            glide (0.3) secs to x: (-170) y: (-160)\n        else\n            go to x: (-170) y: (-190)\n        end\n    end\nend\n\nwhen flag clicked\nhide variable [☁ beat the game v]\nhide variable [☁ record time v]\nset [records glide v] to [0]\nset [records var v] to [0]\nhide\nswitch costume to (button3-a v)\nforever\n    if <(Start) = [0]> then\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (5)\n        else\n            clear graphic effects\n        end\n    end\nend\n\nwhen I receive [intro + play screen v]\nwait (8.75) seconds\nshow\n\nwhen I receive [start game v]\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\nhide\n\nwhen this sprite clicked\nif <(Records Var) = [0]> then\n    broadcast (Records Show v)\nelse\n    broadcast (Records Hide v)\n    wait (0) seconds\n    set [records glide v] to [0]\n    set [records var v] to [0]\nend\n\nwhen I receive [records show v]\nset [records glide v] to [1]\nswitch costume to (button3-a2 v)\nwait (0) seconds\nset [records var v] to [1]\n\nwhen I receive [records hide v]\nshow\n\nwhen I receive [records hide v]\nswitch costume to (button3-a v)\n\nwhen I receive [records show v]\nshow variable [☁ beat the game v]\nshow variable [☁ record time v]\n\nwhen I receive [records hide v]\nhide variable [☁ beat the game v]\nhide variable [☁ record time v]\n\nwhen I receive [checkpoint \(airship22\) v]\nhide\n\nwhen I receive [checkpoint \(boss22\) v]\nhide\n\nwhen I receive [checkpoint \(demo22\) v]\nhide\n\n@Codes\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        glide (0.3) secs to x: (170) y: (-160)\n    else\n        go to x: (170) y: (-190)\n    end\nend\n\nwhen flag clicked\nhide\nswitch costume to (button3-a v)\nforever\n    if <(Start) = [0]> then\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (5)\n        else\n            clear graphic effects\n        end\n    end\nend\n\nwhen I receive [intro + play screen v]\nwait (8.75) seconds\nshow\n\nwhen I receive [start game v]\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\nhide\n\nwhen this sprite clicked\nbroadcast (Ask Code v)\n\nwhen I receive [checkpoint \(demo22\) v]\nhide\n\nwhen I receive [checkpoint \(airship22\) v]\nhide\n\nwhen I receive [checkpoint \(boss22\) v]\nhide\n\nwhen I receive [records show v]\ngo to [back v] layer\n\nwhen I receive [records hide v]\ngo to [front v] layer\n\n@detector\n\nwhen I start as a clone\nif <(clone id) = [0]> then\n    go to x: (-15) y: (0)\n    set [loved__ v] to [0]\n    switch costume to (love v)\n    forever\n        set [love? v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [loved__ v] to [1]\n        end\n    end\nend\nif <(clone id) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (fave v)\n    set [faved___ v] to [0]\n    forever\n        set [fav v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [faved___ v] to [1]\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [start animation  v]\nhide\nset [faved___ v] to [0]\nset [loved__ v] to [0]\nset [clone id v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(LOVED__) = [1]> and <(FAVED___) = [1]>>\nwait (1) seconds\nshow\ngo to x: (0) y: (50)\nreset timer\nswitch costume to (pick random (1) to (4))\nset [ghost v] effect to (100)\nchange [health v] by (1)\nstart sound [The Legend of Zelda Sound Effects - Obtain Heart v]\nrepeat until <(timer) > [3.5]>\n    change y by ((y position) / (-15))\n    change [ghost v] effect by (-3)\nend\nreset timer\nrepeat until <(timer) > [3.5]>\n    change y by (((y position) - (-100)) / (-15))\n    change [ghost v] effect by (10)\nend\n\n@Loading Screen\n\nwhen flag clicked\nset [check. airship v] to [0]\nset [check. boss v] to [0]\nset [check. demo v] to [0]\ngo to x: (0) y: (0)\nhide\nforever\n    go to [front v] layer\nend\n\nwhen I receive [checkpoint \(airship22\) v]\nset [beat drop v] to [0]\nset [checkpoint v] to [1]\nshow\nwait until <(Check. Airship) = [1]>\nrepeat (20)\n    change [ghost v] effect by (5)\n    wait (0.01) seconds\nend\nhide\n\nwhen I receive [checkpoint \(boss22\) v]\nset [beat drop v] to [0]\nset [checkpoint v] to [2]\nshow\nwait until <(Check. Boss) = [1]>\nrepeat (20)\n    change [ghost v] effect by (5)\n    wait (0.01) seconds\nend\nhide\n\nwhen I receive [checkpoint \(demo22\) v]\nset [beat drop v] to [0]\nset [checkpoint v] to [0]\nshow\nwait until <(Check. Demo) = [1]>\nrepeat (20)\n    change [ghost v] effect by (5)\n    wait (0.01) seconds\nend\nhide\n\ndefine Loading...\nshow\nswitch costume to (costume4 v)\nwait (0.25) seconds\nrepeat (8)\n    next costume\n    wait (0.25) seconds\nend\n\nwhen I receive [checkpoint \(demo22\) v]\nrepeat until <(Check. Demo) = [1]>\n    Loading...\nend\n\nwhen I receive [checkpoint \(airship22\) v]\nrepeat until <(Check. Airship) = [1]>\n    Loading...\nend\n\nwhen I receive [checkpoint \(boss22\) v]\nrepeat until <(Check. Boss) = [1]>\n    Loading...\nend\n\n@End Messages\n\nwhen flag clicked\ngo to [front v] layer\nset [brightness v] effect to (-100)\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [end v]\nwait (1) seconds\nrepeat (5)\n    Next Costume\nend\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\ndefine Next Costume\nshow\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\nwait (2) seconds\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\nnext costume\nwait (2) seconds\n\n@Tophat Clouds\n\nwhen I start as a clone\nif <<(Level) = [17]> or <(Level) = [19]>> then\n    go to x: (-100) y: (Y)\nelse\n    go to (window v)\nend\nshow\nset [ghost v] effect to (25)\nset size to (pick random (25) to (30)) %\nswitch costume to (pick random (1) to (4))\nif <<<<<(Level) = [11]> or <(Level) = [13]>> or <(Level) = [15]>> or <(Level) = [17]>> or <(Level) = [19]>> then\n    set [y v] to (pick random (50) to (-40))\nelse\n    set [y v] to (pick random (-175) to (175))\nend\nset y to (Y)\nif <<(Level) = [17]> or <(Level) = [19]>> then\n    repeat (17)\n        move ((size) / (5)) steps\n    end\n    repeat (17)\n        move ((size) / (6)) steps\n    end\n    repeat until <touching (tophat background v)?>\n        move ((size) / (8)) steps\n    end\n    delete this clone\nelse\n    repeat (10)\n        move ((size) / (5)) steps\n    end\n    repeat (10)\n        move ((size) / (6)) steps\n    end\n    repeat until <touching (tophat background v)?>\n        move ((size) / (8)) steps\n    end\n    delete this clone\nend\n\nwhen I receive [start of airship v]\nset [brightness v] effect to (-100)\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [next level v]\nif <(Level) = [11]> then\n    repeat until <not <(Level) = [11]>>\n        create clone of (_myself_ v)\n        wait (0.3) seconds\n    end\nend\nif <(Level) = [12]> then\n    repeat until <not <(Level) = [12]>>\n        delete this clone\n    end\nend\nif <(Level) = [13]> then\n    repeat until <not <(Level) = [13]>>\n        create clone of (_myself_ v)\n        wait (0.3) seconds\n    end\nend\nif <(Level) = [14]> then\n    repeat until <not <(Level) = [14]>>\n        delete this clone\n    end\nend\nif <(Level) = [15]> then\n    repeat until <not <(Level) = [15]>>\n        create clone of (_myself_ v)\n        wait (0.3) seconds\n    end\nend\nif <(Level) = [16]> then\n    repeat until <not <(Level) = [16]>>\n        delete this clone\n    end\nend\nif <(Level) = [17]> then\n    repeat until <not <(Level) = [17]>>\n        create clone of (_myself_ v)\n        wait (0.3) seconds\n    end\nend\nif <(Level) = [18]> then\n    repeat until <not <(Level) = [18]>>\n        delete this clone\n    end\nend\nif <(Level) = [19]> then\n    repeat until <not <(Level) = [19]>>\n        delete this clone\n    end\nend\n\nwhen flag clicked\nset [play v] to [0]\nforever\n    hide\nend\n\nwhen I receive [start of airship v]\nif <(Level) = [11]> then\n    repeat until <not <(Level) = [11]>>\n        create clone of (_myself_ v)\n        wait (0.3) seconds\n    end\nend\n\nwhen I receive [death v]\nswitch costume to (costume1 v)\nrepeat (20)\n    change [brightness v] effect by (-5)\n    wait (0.1) seconds\nend\n\nwhen I receive [respawn \(airship\) v]\nrepeat (20)\n    change [brightness v] effect by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [respawn \(airship\) v]\nset [level v] to [11]\nrepeat until <not <(Level) = [11]>>\n    create clone of (_myself_ v)\n    wait (0.3) seconds\nend\n\n