DEMO || Stealing The Diamond || A Henry Stickmin Platformer #games
@Stage\n\nwhen I receive [start \(showing game\) v]\nset volume to (35) %\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 \(movement\) v]\nset [code freehearts v] to [0]\nforever\n    if <key (c v) pressed?> then\n        ask [Insert Code Below] and wait\n    end\n    if <<(answer) = [FreeHeart]> or <(answer) = [Free Heart]>> then\n        if <(Code FreeHearts) = [0]> then\n            start sound [The Legend of Zelda Sound Effects - Obtain Heart v]\n            change [health v] by (1)\n            wait (0) seconds\n            set [code freehearts v] to [1]\n        end\n    end\nend\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\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        go to [front v] layer\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        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\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) = [0]> or <(Level) = [8]>>>> 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 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 [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\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 [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 I receive [boss fight v]\nforever\n    set [laser v] to [1]\n    wait (5) seconds\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 (7)\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\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\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 [death v]\nset volume to (0) %\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 [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 [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\nwhen flag clicked\nforever\n    if <(Level) = [8]> then\n        hide\n    end\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\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 \(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 [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 flag clicked\nforever\n    if <(Level) = [8]> then\n        hide\n    end\nend\n\n@Coin\n\ndefine Create Coin At X: (x) Y: (y)\nwait (0) seconds\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: (-185) Y: (-110)\n    Create Coin At X: (-145) Y: (-110)\n    Create Coin At X: (-105) Y: (-110)\n    Create Coin At X: (-75) Y: (-110)\n    Create Coin At X: (-35) Y: (-110)\n    Create Coin At X: (5) Y: (-110)\n    Create Coin At X: (45) Y: (-110)\n    Create Coin At X: (85) Y: (-110)\n    Create Coin At X: (125) Y: (-110)\n    Create Coin At X: (165) Y: (-110)\n    Create Coin At X: (205) Y: (-110)\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 [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\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 animation  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 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 flag clicked\nforever\n    if <(Level) = [8]> then\n        hide\n    end\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\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\n\nwhen I receive [respawn \(grassland\) v]\nif <(Checkpoint) = [0]> then\n    set [clone id v] to [0]\nend\n\nwhen I receive [respawn \(grassland\) v]\nrepeat (10)\n    delete this clone\nend\n\nwhen I receive [death v]\nwait (3) seconds\nrepeat (50)\n    delete this clone\nend\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 [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 \(grassland\) v]\ndelete this clone\n\nwhen I receive [respawn \(grassland\) v]\ndelete this clone\n\n@Sprite2\n\nwhen flag clicked\nhide\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 [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\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\nwhen I receive [next level v]\nif <(Level) = [10]> then\n    Create Note At X: [0] Y: [-72]\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@Sprite1\n\nwhen flag clicked\ngo to x: (0) y: (0)\nrepeat (10)\n    hide\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [8]> then\n        show\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\nhide\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 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\nwhen flag clicked\nhide\n\n
*Please note that this is a demo, and not the full game*\n\nThe full game is out!!! Play it here! \nhttps://scratch.mit.edu/projects/517111396/\n\nThe Okavango Diamond has been stolen, and Henry needs to get it back! \n\nUse the arrow keys or WASD to move, space to jump\n\nFull game comes out April 17th! \n\n(4-18-21) Top Loved! :D