Sir Shield (Platformer)
@Stage\n\nwhen flag clicked\nset volume to (75) %\nswitch backdrop to (2 v)\n\nwhen I receive [title v]\nforever\n    play sound [Jake Kaufman - Shovel Knight Original Soundtrack - 08 The Adventure Awaits \(Map Screen\).mp3 v] until done\nend\n\nwhen I receive [gamestart v]\nstop [other scripts in stage v]\nstop all sounds\nforever\n    play sound [Jake Kaufman - Shovel Knight Original Soundtrack - 09 In the Halls of the Usurper \(Pridemoor Keep\).mp3 v] until done\nend\n\nwhen I receive [bossreset v]\nstop [other scripts in stage v]\nstop all sounds\nforever\n    play sound [Jake Kaufman - Shovel Knight Original Soundtrack - 10 The Decadent Dandy \(King Knight Battle\).mp3 v] until done\nend\n\nwhen I receive [bossded v]\nstop [other scripts in stage v]\nstop all sounds\nforever\n    play sound [Jake Kaufman - Shovel Knight Original Soundtrack - 08 The Adventure Awaits \(Map Screen\).mp3 v] until done\nend\n\nwhen I receive [winscreen v]\nstop [other scripts in stage v]\nswitch backdrop to (2 v)\nstop all sounds\nforever\n    play sound [Jake Kaufman - Shovel Knight Original Soundtrack - 08 The Adventure Awaits \(Map Screen\).mp3 v] until done\nend\n\nwhen I receive [holygrail v]\nstop [other scripts in stage v]\n\nwhen I receive [title v]\nswitch backdrop to (1 v)\n\nwhen flag clicked\nset [mute v] to [-1]\n\nwhen [m v] key pressed\nset [mute v] to ((0) - (mute))\nif <[-1] = (mute)> then\n    broadcast (mute v)\nelse\n    broadcast (unmute v)\nend\n\nwhen I receive [gamestart v]\nswitch backdrop to (1 v)\n\nwhen I receive [unmute v]\nset volume to (75) %\n\nwhen I receive [mute v]\nset volume to (0) %\n\n@Hitbox\n\ndefine physics\nchange y by (yvel)\nif <touching (ground v)?> then\n    ground\n    if <[-.1] < (yvel)> then\n        set [yvel v] to [-1]\n    else\n        set [yvel v] to [0]\n        set [jump v] to [2]\n    end\nelse\n    change [yvel v] by (-0.75)\n    if <(yvel) < [-16]> then\n        set [yvel v] to [-16]\n    end\nend\nchange y by (-1)\nif <<touching (ground v)?> and <(dash) < [2]>> then\n    set [dash v] to [0]\nend\nchange y by (1)\nif <[1] < (dash)> then\n    change [dash v] by (-1)\n    set [yvel v] to [0]\n    move (8) steps\n    if <touching (ground v)?> then\n        goback\n        set [dash v] to [1]\n    end\nend\nif <<[0] = (dash)> and <<key (x v) pressed?> or <key ((join [shift] []) v) pressed?>>> then\n    start sound [Dash v]\n    set [dash v] to [9]\nend\nif <<(dash) < [2]> and <<<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<key (z v) pressed?> or <key (space v) pressed?>>> and <[0] < (jump)>> and <[0] < (jumppress)>>> then\n    start sound [Jump v]\n    set [yvel v] to [8]\n    change [jump v] by (-1)\n    set [jumppress v] to [0]\nelse\n    if <not <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<key (z v) pressed?> or <key (space v) pressed?>>>> then\n        set [jumppress v] to [1]\n    end\nend\nif <(dash) < [2]> then\n    if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n        point in direction (-90)\n        change x by (-3)\n        if <touching (ground v)?> then\n            change x by (3)\n        end\n    end\n    if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n        point in direction (90)\n        change x by (3)\n        if <touching (ground v)?> then\n            change x by (-3)\n        end\n    end\nend\nchange y by (-1)\nif <touching (ground v)?> then\n    set [ycol v] to [1]\nelse\n    set [ycol v] to [0]\nend\nchange y by (1)\nif <<key (r v) pressed?> or <<(y position) < [-180]> or <touching (obstacle v)?>>> then\n    set [diex v] to (x position)\n    set [diey v] to (y position)\n    change [deaths v] by (1)\n    broadcast (die v)\n    reset\nend\nbroadcast (render v)\n\ndefine ground\nset [checkem v] to [0]\nrepeat until <<[360] < (checkem)> or <not <touching (ground v)?>>>\n    change [checkem v] by (1)\n    if <[-.1] < (yvel)> then\n        change y by (-1)\n    else\n        change y by (1)\n    end\nend\nif <[360] < (checkem)> then\n    reset\nend\n\ndefine wall\nset [checkem v] to [0]\nrepeat until <<[360] < (checkem)> or <not <touching (ground v)?>>>\n    change [checkem v] by (1)\n    if <[-.1] < (xvel)> then\n        change x by (-1)\n    else\n        change x by (1)\n    end\nend\nif <[360] < (checkem)> then\n    reset\nend\n\ndefine reset\nshow\nset [yvel v] to [0]\nset [xvel v] to [0]\nset [jump v] to [0]\nset [dash v] to [1]\ngo to x: (-232) y: (-180)\ngoup\n\ndefine goback\nrepeat until <not <touching (ground v)?>>\n    move (-8) steps\nend\n\nwhen I receive [start v]\nreset\nset [ghost v] effect to (100)\nif <[9] = (level)> then\n    stop [other scripts in sprite v]\n    stop [this script v]\nend\nforever\n    physics\nend\n\nwhen flag clicked\nset [deaths v] to [0]\nhide\n\ndefine goup\nrepeat until <not <touching (ground v)?>>\n    change y by (1)\nend\nchange y by (1)\n\nwhen I receive [level v]\nstop [other scripts in sprite v]\n\nwhen I receive [bossreset v]\nreset\n\nwhen I receive [bossded2 v]\nset [diex v] to (x position)\nset [diey v] to (y position)\nchange [deaths v] by (1)\nbroadcast (die v)\nreset\nwait (1) seconds\nbroadcast (boss v) and wait\nbroadcast (bossreset v)\n\nwhen I receive [unmute v]\nset volume to (100) %\n\nwhen I receive [mute v]\nset volume to (0) %\n\n@Ground\n\nwhen flag clicked\nset [level v] to [1]\nswitch costume to (title v)\nhide\n\nwhen I start as a clone\nset size to (100) %\nswitch costume to (break v)\nclear graphic effects\nshow\nforever\n    set [break v] to [0]\n    wait until <<[1] < (dash)> and <(distance to [hitbox v]) < [24]>>\n    change x by (8)\n    if <touching (hitbox v)?> then\n        set [break v] to [1]\n    end\n    change x by (-16)\n    if <touching (hitbox v)?> then\n        set [break v] to [1]\n    end\n    change x by (8)\n    if <[1] = (break)> then\n        set [dash v] to [9]\n        hide\n        wait (4) seconds\n        wait until <not <touching (hitbox v)?>>\n        set [ghost v] effect to (100)\n        show\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n    else\n        show\n    end\nend\n\nwhen I receive [gamestart v]\nset size to (1600) %\ngo to x: (0) y: (-4)\nshow\n\nwhen I receive [s v]\nshow\nclear graphic effects\ndelete this clone\n\nwhen I receive [level v]\nswitch costume to ((level) + (2))\ndelete this clone\n\ndefine clone\nset size to (100) %\nset [clone v] to [0]\nrepeat (length of [breaky v])\n    change [clone v] by (1)\n    go to x: (item (clone) of [breakx v]) y: (item (clone) of [breaky v])\n    create clone of (_myself_ v)\nend\ngo to x: (0) y: (-4)\nset size to (1600) %\n\nwhen I receive [h v]\nset [ghost v] effect to (100)\nclone\n\nwhen I receive [winscreen v]\nhide\n\n@Obstacle\n\nwhen flag clicked\nhide\n\nwhen I receive [level v]\nswitch costume to (level)\n\nwhen I receive [h v]\nset [ghost v] effect to (100)\n\nwhen I receive [s v]\nclear graphic effects\n\nwhen I receive [gamestart v]\nset size to (1600) %\ngo to x: (0) y: (-4)\nshow\n\n@Cosmetic\n\nwhen flag clicked\nhide\n\nwhen I receive [s v]\nclear graphic effects\n\nwhen I receive [level v]\nswitch costume to (level)\n\nwhen I receive [h v]\nset [ghost v] effect to (100)\n\nwhen I receive [gamestart v]\nset size to (1600) %\ngo to x: (0) y: (-4)\nshow\n\n@Intro\n\nwhen flag clicked\nset size to (100) %\nerase all\nset [skiptitle v] to [0]\nif <[1] = (skiptitle)> then\n    broadcast (title v)\n    broadcast (gamestart v)\n    stop [this script v]\nend\nswitch costume to (1 v)\nshow\ngo to x: (-85) y: (300)\nset [yv v] to [-4]\nrepeat until <(y position) < [0]>\n    change y by (yv)\n    change [yv v] by (-1)\nend\nset [yv v] to [12]\nset y to (0)\nstart sound [Hit_Hurt v]\nrepeat until <(y position) < [0]>\n    change y by (yv)\n    change [yv v] by (-1)\nend\nset [yv v] to [6]\nset y to (0)\nstart sound [Hit_Hurt v]\nrepeat until <(y position) < [0]>\n    change y by (yv)\n    change [yv v] by (-1)\nend\nset [yv v] to [3]\nset y to (0)\nstart sound [Hit_Hurt v]\nrepeat until <(y position) < [0]>\n    change y by (yv)\n    change [yv v] by (-1)\nend\nset [yv v] to [1]\nset y to (0)\nstart sound [Hit_Hurt v]\nrepeat until <(y position) < [0]>\n    change y by (yv)\n    change [yv v] by (-1)\nend\nset y to (0)\nstart sound [Hit_Hurt v]\nbroadcast (a v)\nwait (0.5) seconds\nset [yv v] to [0]\nrepeat (26)\n    change [yv v] by (0.45)\n    change x by (yv)\nend\nrepeat (26)\n    change [yv v] by (-0.45)\n    change x by (yv)\nend\nwait (1) seconds\nbroadcast (title v)\nbroadcast (title3 v)\nerase all\n\nwhen I receive [title v]\nhide\n\nwhen I receive [gamestart v]\nbroadcast (level v) and wait\nbroadcast (tiles v)\n\nwhen I receive [unmute v]\nset volume to (100) %\n\n@Text\n\nwhen I receive [clonedelete v]\ndelete this clone\n\nwhen I receive [a v]\nerase all\nprint [j^ameso^uo^] at x: (-195) y: (0) size: (8) centered: (0) clones: (0)\n\nwhen I receive [widths v]\ndelete (all) of [width v]\nadd [5] to [width v]\nadd [3] to [width v]\nadd [3] to [width v]\nadd [3] to [width v]\nadd [3] to [width v]\nadd [3] to [width v]\nadd [2] to [width v]\nadd [3] to [width v]\nadd [3] to [width v]\nadd [1] to [width v]\nadd [2] to [width v]\nadd [3] to [width v]\nadd [1] to [width v]\nadd [5] to [width v]\nadd [3] to [width v]\nadd [3] to [width v]\nadd [3] to [width v]\nadd [3] to [width v]\nadd [2] to [width v]\nadd [3] to [width v]\nadd [3] to [width v]\nadd [3] to [width v]\nadd [3] to [width v]\nadd [5] to [width v]\nadd [3] to [width v]\nadd [3] to [width v]\nadd [3] to [width v]\nadd [4] to [width v]\nadd [4] to [width v]\nadd [4] to [width v]\nadd [4] to [width v]\nadd [4] to [width v]\nadd [4] to [width v]\nadd [4] to [width v]\nadd [4] to [width v]\nadd [1] to [width v]\nadd [4] to [width v]\nadd [4] to [width v]\nadd [3] to [width v]\nadd [5] to [width v]\nadd [4] to [width v]\nadd [4] to [width v]\nadd [4] to [width v]\nadd [4] to [width v]\nadd [4] to [width v]\nadd [4] to [width v]\nadd [3] to [width v]\nadd [4] to [width v]\nadd [5] to [width v]\nadd [8] to [width v]\nadd [4] to [width v]\nadd [5] to [width v]\nadd [4] to [width v]\nadd [1] to [width v]\nadd [2] to [width v]\nadd [2] to [width v]\nadd [1] to [width v]\nadd [4] to [width v]\nadd [5] to [width v]\nadd [3] to [width v]\nadd [3] to [width v]\nadd [4] to [width v]\nadd [2] to [width v]\nadd [4] to [width v]\nadd [4] to [width v]\nadd [4] to [width v]\nadd [4] to [width v]\nadd [4] to [width v]\nadd [4] to [width v]\nadd [4] to [width v]\nadd [4] to [width v]\nadd [4] to [width v]\nadd [4] to [width v]\nadd [4] to [width v]\nadd [1] to [width v]\nadd [3] to [width v]\nadd [4] to [width v]\nadd [3] to [width v]\nadd [3] to [width v]\nadd [4] to [width v]\nadd [3] to [width v]\nadd [3] to [width v]\nadd [3] to [width v]\nadd [3] to [width v]\n\nwhen I start as a clone\nforever\n    if <(level) = [8]> then\n        if <[0] = (bosstext)> then\n            hide\n        else\n            show\n        end\n    else\n        if <[1] < (timer)> then\n            hide\n            if <[2] < (timer)> then\n                reset timer\n                show\n            end\n        else\n            show\n        end\n    end\nend\n\nwhen I receive [gamestart v]\ndelete this clone\n\nwhen I receive [level v]\ndelete this clone\n\ndefine calculate cloud data\nif <<<(deaths) < [1]> or <(deaths) < (☁ lowest_deaths)>> and <not <[winners v] contains (username)?>>> then\n    set [☁ lowest_deaths v] to (deaths)\nend\n\nadd [StormC] to [winners v]\n\nwhen flag clicked\nerase all\n\nwhen I receive [title2 v]\nprint [s^] at x: (-63) y: (110) size: (6) centered: (0) clones: (0)\nprint [i^r^_s^hield] at x: (-35) y: (119) size: (3) centered: (0) clones: (0)\nprint [_and_the] at x: (0) y: (96) size: (2) centered: (1) clones: (0)\nprint [h^o^l^y^_g^r^a^i^l^] at x: (0) y: (60) size: (4) centered: (1) clones: (0)\nprint [\[p^r^e^s^s^_z^_o^r^_s^p^a^c^e^_t^o^_b^e^g^i^n^\]] at x: (0) y: (0) size: (1) centered: (1) clones: (1)\nprint [m^o^v^e^] at x: (0) y: (-44) size: (1) centered: (1) clones: (0)\nprint [d^o^u^b^l^e^_j^u^m^p^] at x: (0) y: (-60) size: (1) centered: (1) clones: (0)\nprint [d^a^s^h^] at x: (0) y: (-76) size: (1) centered: (1) clones: (0)\n\ndefine None\nset size to ((size) * (100)) %\nif <[1] = (centered)> then\n    set [.. v] to [0]\n    set [. v] to [0]\n    set y to (y)\n    repeat until <(length of (text)) < ((.) + (1))>\n        change [. v] by (1)\n        switch costume to (letter (.) of (text))\n        if <[^] = (letter ((1) + (.)) of (text))> then\n            switch costume to (join (letter (.) of (text)) (letter (.) of (text)))\n        else\n        end\n        if <[^] = (letter ((1) + (.)) of (text))> then\n            change [. v] by (1)\n        end\n        change [.. v] by (((item (costume [number v]) of [width v]) + (1)) * (size))\n    end\n    hide\n    set x to ((0) - ((..) / (2)))\nelse\n    go to x: (x) y: (y)\nend\nset [. v] to [0]\nshow\nrepeat until <(length of (text)) < ((.) + (1))>\n    change [. v] by (1)\n    switch costume to (letter (.) of (text))\n    if <[^] = (letter ((1) + (.)) of (text))> then\n        switch costume to (join (letter (.) of (text)) (letter (.) of (text)))\n    else\n    end\n    if <not <[_] = (letter (.) of (text))>> then\n        if <[0] = (clones)> then\n            stamp\n        else\n            create clone of (_myself_ v)\n        end\n    end\n    change x by ((size) * ((item (costume [number v]) of [width v]) + (1)))\n    if <[^] = (letter ((1) + (.)) of (text))> then\n        change [. v] by (1)\n    end\nend\nhide\n\nwhen I receive [start v]\nif <[1] = (level)> then\n    print [z^/s^p^a^c^e^:_j^u^m^p^] at x: (-220) y: (0) size: (1) centered: (0) clones: (0)\n    print [d^o^u^b^l^e^_j^u^m^p^!] at x: (-90) y: (-82) size: (1) centered: (0) clones: (0)\n    print [x^:_d^a^s^h^,_c^o^m^b^i^n^e^_w^i^t^h^_j^u^m^p^s^!] at x: (36) y: (76) size: (1) centered: (0) clones: (0)\nend\nif <[2] = (level)> then\n    print [j^u^m^p^,_d^a^s^h^,_j^u^m^p^!] at x: (-140) y: (-76) size: (1) centered: (0) clones: (0)\n    print [j^u^m^p^,_j^u^m^p^,_d^a^s^h^!] at x: (64) y: (-76) size: (1) centered: (0) clones: (0)\nend\nif <[3] = (level)> then\n    print [t^i^g^h^t^e^n^_u^p^_t^h^e^_p^l^a^t^f^o^r^m^i^n^g^] at x: (-200) y: (126) size: (1) centered: (0) clones: (0)\n    print [o^n^_l^e^v^e^l^_3!] at x: (-200) y: (116) size: (1) centered: (0) clones: (0)\nend\nif <[4] = (level)> then\n    print [g^e^t^t^i^n^g^_t^r^i^c^k^y^_y^e^t^?] at x: (48) y: (100) size: (1) centered: (0) clones: (0)\nend\nif <[5] = (level)> then\n    print [d^a^s^h^_t^h^r^o^u^g^h^_b^l^o^c^k^s^!] at x: (-128) y: (-24) size: (1) centered: (0) clones: (0)\nend\nif <[6] = (level)> then\n    print [b^l^o^c^k^s^_r^e^g^e^n^e^r^a^t^e^!] at x: (0) y: (92) size: (1) centered: (0) clones: (0)\nend\nif <[7] = (level)> then\n    print [t^h^e^_t^r^u^e^_c^h^a^l^l^e^n^g^e^!] at x: (-192) y: (126) size: (1) centered: (0) clones: (0)\nend\nif <[8] = (level)> then\n    print [d^e^f^l^e^c^t^_t^h^e^_f^i^r^e^b^a^l^l^s^!] at x: (0) y: (64) size: (1) centered: (1) clones: (1)\nend\n\nwhen I receive [winscreen v]\nerase all\ncalculate cloud data\nprint [a^] at x: (-120) y: (110) size: (6) centered: (0) clones: (0)\nprint [n^d^_so,_s^ir_s^hield_had_aquired_the_most_valuable] at x: (-90) y: (124) size: (1) centered: (0) clones: (0)\nprint [treasure-_the_h^oly_g^rail._h^e_then_proceeded_to_drink] at x: (-90) y: (114) size: (1) centered: (0) clones: (0)\nprint [apple_juice_out_of_his__newfound_gem_like_the_greatest] at x: (-90) y: (104) size: (1) centered: (0) clones: (0)\nprint [knight_in_the_world.] at x: (-90) y: (94) size: (1) centered: (0) clones: (0)\nprint [w^ow,_you_beat_s^ir_s^hield!] at x: (0) y: (74) size: (1) centered: (1) clones: (0)\nprint (join [t^oo_bad_it_took_you_] (join (deaths) [_deaths_though...])) at x: (0) y: (64) size: (1) centered: (1) clones: (0)\nprint (join [t^his_guy_managed_to_beat_the_game_with_only_] (join (☁ lowest_deaths) [_deaths,_wow!_])) at x: (0) y: (54) size: (1) centered: (1) clones: (0)\nprint [\(p^ress_the_"c^loud_d^ata"_button_to_see_the_username\)] at x: (0) y: (44) size: (1) centered: (1) clones: (0)\nprint [c^ongrats_on_beating_s^ir_s^hield!] at x: (0) y: (0) size: (2) centered: (1) clones: (0)\nprint [i^_you_liked_this,_please_give_a_love_and_favorite!] at x: (0) y: (-20) size: (1) centered: (1) clones: (0)\n\n@Goal\n\nwhen flag clicked\nhide\ndelete (all) of [goalpos v]\nadd [-234,100] to [goalpos v]\nadd [212,-106] to [goalpos v]\nadd [230,110] to [goalpos v]\nadd [230,145] to [goalpos v]\nadd [230,-75] to [goalpos v]\nadd [230,70] to [goalpos v]\nadd [6,-28] to [goalpos v]\nadd [0,-60] to [goalpos v]\n\nwhen I start as a clone\ngo to (costume v)\nshow\nrepeat (32)\n    change y by (2)\nend\npoint in direction (-90)\nreset timer\nrepeat until <[2] < (timer)>\n    move (1) steps\n    turn right (1) degrees\nend\nglide (1) secs to x: (0) y: (64)\nwait (0.5) seconds\nbroadcast (holygrail v)\ndelete this clone\n\nwhen I receive [start v]\nset [numb v] to [0]\nset [memory v] to []\nrepeat until <(letter (numb) of (item (level) of [goalpos v])) = [,]>\n    set [memory v] to (join (memory) (letter (numb) of (item (level) of [goalpos v])))\n    change [numb v] by (1)\nend\nset x to (memory)\nset [memory v] to []\nrepeat until <(numb) = (length of (item (level) of [goalpos v]))>\n    change [numb v] by (1)\n    set [memory v] to (join (memory) (letter (numb) of (item (level) of [goalpos v])))\nend\nset y to (memory)\ngo to x: (((round ((x position) / (16))) * (16)) + (8)) y: (((round ((y position) / (16))) * (16)) + (8))\nshow\nif <<[9] = (level)> or <[8] = (level)>> then\n    hide\nend\nwait until <touching (hitbox v)?>\nhide\nchange [level v] by (1)\nbroadcast (level v) and wait\nbroadcast (tiles v)\n\nwhen I receive [bossded v]\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\n@Costume\n\nwhen I receive [render v]\ngo to (hitbox v)\npoint in direction ([direction v] of [hitbox v])\nchange y by (1)\n\nwhen flag clicked\nhide\n\nwhen I receive [title v]\nforever\n    go to x: (-240) y: (-122)\n    hide\n    wait (4) seconds\n    point in direction (90)\n    show\n    broadcast (run v)\n    repeat (160)\n        change x by (3)\n    end\n    stop [other scripts in sprite v]\n    hide\nend\n\nwhen I receive [bossded2 v]\nhide\n\nwhen I receive [bossreset v]\nshow\n\nwhen I receive [level v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [start v]\nstop [other scripts in sprite v]\nif <[9] = (level)> then\n    stop [other scripts in sprite v]\n    broadcast (9 v)\n    stop [this script v]\nend\nshow\nforever\n    if <[1] < (dash)> then\n        switch costume to (run5 v)\n    else\n        if <[1] = ([ycol v] of [hitbox v])> then\n            if <<key (left arrow v) pressed?> or <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <key (a v) pressed?>>>> then\n                next costume\n                if <[4] < (costume [number v])> then\n                    switch costume to (run1 v)\n                end\n                if <((costume [number v]) mod (2)) = [0]> then\n                    start sound [Step v]\n                end\n                wait (0.05) seconds\n            else\n                switch costume to (idle v)\n            end\n        else\n            if <[0] < ([jump v] of [hitbox v])> then\n                switch costume to (run3 v)\n            else\n                switch costume to (run1 v)\n            end\n        end\n    end\nend\n\nwhen I receive [9 v]\ngo to x: (-231) y: (-59)\nswitch costume to (idle v)\npoint in direction (90)\nshow\nwait (0.5) seconds\nbroadcast (run v)\nrepeat (77)\n    change x by (3)\nend\nstop [other scripts in sprite v]\nswitch costume to (idle v)\nwait (0.5) seconds\nrepeat (8)\n    create clone of (goal v)\n    wait (1.45) seconds\nend\n\nwhen I receive [run v]\nforever\n    next costume\n    if <[4] < (costume [number v])> then\n        switch costume to (run1 v)\n    end\n    wait (0.1) seconds\nend\n\nwhen I receive [mute v]\nset volume to (0) %\n\n@Tiles\n\ndefine render\ngo to x: (-232) y: (-172)\nerase all\nshow\nbroadcast (s v) and wait\ndelete (all) of [breakx v]\ndelete (all) of [breaky v]\nrepeat (23)\n    repeat (30)\n        switch costume to (render v)\n        if <<touching (ground v)?> or <<touching (obstacle v)?> or <touching (cosmetic v)?>>> then\n            if <touching color (#000000)?> then\n                switch costume to (d v)\n                stamp\n            else\n                if <touching color (#666666)?> then\n                    if <(x position) = [-232]> then\n                        set [side v] to []\n                    else\n                        change x by (-16)\n                        if <touching color (#666666)?> then\n                            set [side v] to [2]\n                        else\n                            set [side v] to []\n                        end\n                        change x by (16)\n                    end\n                    switch costume to (join [g] (side))\n                    stamp\n                else\n                    if <touching color (#660000)?> then\n                        switch costume to (s v)\n                        stamp\n                    else\n                        if <touching color (#7f7f7f)?> then\n                            switch costume to (r v)\n                            stamp\n                        else\n                            if <touching color (#b2b2b2)?> then\n                                switch costume to (l v)\n                                stamp\n                            else\n                                if <touching color (#006622)?> then\n                                    switch costume to (a v)\n                                    stamp\n                                else\n                                    if <touching color (#990000)?> then\n                                        switch costume to (u v)\n                                        stamp\n                                    else\n                                        if <touching color (#001966)?> then\n                                            if <(x position) = [-232]> then\n                                                set [side v] to [3]\n                                            else\n                                                change x by (-16)\n                                                if <touching color (#001966)?> then\n                                                    set [side v] to []\n                                                else\n                                                    set [side v] to [3]\n                                                end\n                                                change x by (16)\n                                            end\n                                            switch costume to (join [b] (side))\n                                            stamp\n                                            switch costume to (render v)\n                                            if <(y position) = [-172]> then\n                                                set [side v] to [2]\n                                            else\n                                                change y by (-16)\n                                                if <touching color (#001966)?> then\n                                                    set [side v] to []\n                                                else\n                                                    set [side v] to [2]\n                                                end\n                                                change y by (16)\n                                            end\n                                            switch costume to (join [b] (side))\n                                            stamp\n                                        else\n                                            if <touching color (#009933)?> then\n                                                switch costume to (c v)\n                                                stamp\n                                            else\n                                                if <touching color (#cc0000)?> then\n                                                    switch costume to (s2 v)\n                                                    stamp\n                                                else\n                                                    if <touching color (#663b00)?> then\n                                                        add (x position) to [breakx v]\n                                                        add (y position) to [breaky v]\n                                                    end\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change x by (16)\n    end\n    set x to (-232)\n    change y by (16)\nend\nhide\nset [clone v] to [0]\nbroadcast (h v)\n\nwhen I receive [tiles v]\nrender\nbroadcast (start v)\n\nwhen flag clicked\nhide\n\nwhen I receive [title3 v]\nrender\nbroadcast (title2 v)\n\n@Effects\n\nwhen I receive [die v]\nif <[1] = (costume [number v])> then\n    start sound [Explosion v]\n    go to x: ([diex v] of [hitbox v]) y: ([diey v] of [hitbox v])\n    set [clone v] to [0]\n    repeat (6)\n        change [clone v] by (1)\n        create clone of (_myself_ v)\n    end\nend\n\nwhen flag clicked\nswitch costume to (1 v)\nhide\n\nwhen I start as a clone\nshow\nif <[1] = (clone)> then\n    switch costume to (2 v)\n    set [v v] to [4]\n    repeat until <(y position) < [-176]>\n        change x by (2)\n        change y by (v)\n        turn right (45) degrees\n        change [v v] by (-0.5)\n    end\n    delete this clone\nend\nif <[2] = (clone)> then\n    switch costume to (2 v)\n    set [v v] to [4]\n    repeat until <(y position) < [-176]>\n        change x by (-2)\n        change y by (v)\n        turn right (-45) degrees\n        change [v v] by (-0.5)\n    end\n    delete this clone\nend\nif <[3] = (clone)> then\n    switch costume to (3 v)\n    set [v v] to [6]\n    repeat until <(y position) < [-176]>\n        change x by (2)\n        change y by (v)\n        change [v v] by (-0.5)\n    end\n    delete this clone\nend\nif <[4] = (clone)> then\n    switch costume to (3 v)\n    set [v v] to [6]\n    repeat until <(y position) < [-176]>\n        change x by (-2)\n        change y by (v)\n        change [v v] by (-0.5)\n    end\n    delete this clone\nend\nif <[5] = (clone)> then\n    switch costume to (3 v)\n    set [v v] to [7]\n    repeat until <(y position) < [-176]>\n        change x by (1)\n        change y by (v)\n        change [v v] by (-0.5)\n    end\n    delete this clone\nend\nif <[6] = (clone)> then\n    switch costume to (3 v)\n    set [v v] to [7]\n    repeat until <(y position) < [-176]>\n        change x by (-1)\n        change y by (v)\n        change [v v] by (-0.5)\n    end\n    delete this clone\nend\n\nwhen I receive [unmute v]\nset volume to (100) %\n\nwhen I receive [mute v]\nset volume to (0) %\n\n@Controls\n\nwhen flag clicked\nhide\n\nwhen I receive [title2 v]\ngo to x: (-44) y: (-33)\nshow\nswitch costume to (1 v)\ngo to x: (-64) y: (-33)\nstamp\nswitch costume to (2 v)\ngo to x: (41) y: (-33)\nstamp\nhide\nwait until <<key (z v) pressed?> or <key (space v) pressed?>>\nbroadcast (gamestart v)\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\ndefine size\nset size to (600) %\nswitch costume to (1 v)\n\nshow\ngo to x: (36) y: (48)\nswitch costume to (2 v)\ngo to [front v] layer\nsize\nstop [all v]\n\n@Boss\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nif <[8] = (level)> then\n    broadcast (bossreset v)\nend\n\nwhen I start as a clone\nforever\n    go to x: (dx) y: (dy)\n    if <[0] = (dd)> then\n        point in direction (90)\n    else\n        point in direction (-90)\n    end\nend\n\nwhen I receive [bossreset v]\ndelete this clone\n\nwhen I start as a clone\nshow\nif <[1] = (clone)> then\n    switch costume to (head v)\n    forever\n        if <[1] = (bossani)> then\n            hide\n        else\n            show\n            if <[3] = (bossani)> then\n                switch costume to (head2 v)\n            else\n                switch costume to (head v)\n            end\n        end\n        if <touching (hitbox v)?> then\n            broadcast (bossded2 v)\n        end\n    end\nend\nif <[2] = (clone)> then\n    switch costume to (body v)\n    forever\n        if <[1] = (bossani)> then\n            hide\n        else\n            show\n        end\n        if <touching (hitbox v)?> then\n            broadcast (bossded2 v)\n        end\n    end\nend\nif <[3] = (clone)> then\n    forever\n        if <<[3] = (bossani)> or <[0] = (bossani)>> then\n            show\n            switch costume to (wings1 v)\n            wait (0.1) seconds\n            switch costume to (wings2 v)\n            wait (0.1) seconds\n            switch costume to (wings3 v)\n            wait (0.1) seconds\n            switch costume to (wings2 v)\n            wait (0.1) seconds\n        else\n            if <[1] = (bossani)> then\n                switch costume to (wings1 v)\n                hide\n            else\n                switch costume to (wings1 v)\n                show\n            end\n        end\n    end\nend\n\nwhen I receive [boss v]\nstop [other scripts in sprite v]\n\nwhen I receive [bossreset v]\nset [bosshp v] to [3]\ngo to x: (32) y: (0)\nforever\n    set [dx v] to (x position)\n    set [dy v] to (y position)\nend\n\nwhen I receive [bossreset v]\nswitch costume to (1 v)\nset [clone v] to [0]\nset [bosstext v] to [0]\nrepeat (3)\n    change [clone v] by (1)\n    create clone of (_myself_ v)\nend\nforever\n    set [dd v] to [0]\n    repeat (8)\n        set [bossani v] to [0]\n        repeat (6)\n            change y by (1)\n        end\n        repeat (6)\n            change y by (-1)\n        end\n    end\n    repeat (48)\n        change y by (4)\n    end\n    set [bossani v] to [1]\n    wait (2) seconds\n    go to x: (480) y: (180)\n    repeat (60)\n        change x by (-8)\n        change y by ((0) - ((x position) / (16)))\n        set [bossani v] to [2]\n    end\n    set [bossani v] to [1]\n    set [dd v] to [1]\n    wait (2) seconds\n    go to x: (-480) y: (180)\n    set [bossani v] to [2]\n    repeat (60)\n        change x by (8)\n        change y by ((x position) / (16))\n    end\n    set [bossani v] to [1]\n    set [dd v] to [1]\n    wait (2) seconds\n    set [dd v] to [0]\n    set [bossani v] to [0]\n    go to x: (32) y: (180)\n    repeat (47)\n        change y by (-4)\n    end\n    set [bosstext v] to [1]\n    repeat (2)\n        set [bossani v] to [0]\n        repeat (6)\n            change y by (1)\n        end\n        repeat (6)\n            change y by (-1)\n        end\n        set [bossani v] to [3]\n        create clone of (fire v)\n        wait (0.5) seconds\n    end\n    set [bossani v] to [0]\n    repeat (4)\n        repeat (6)\n            change y by (1)\n        end\n        repeat (6)\n            change y by (-1)\n        end\n    end\n    set [bosstext v] to [0]\nend\n\nwhen I receive [hit v]\nif <[0] = (bosshp)> then\n    stop [other scripts in sprite v]\n    set [bosstext v] to [0]\n    start sound [Explosion11 v]\n    repeat (42)\n        change y by (-4)\n    end\n    broadcast (bossded v)\n    stop [other scripts in sprite v]\n    hide\nelse\n    set [bossani v] to [3]\n    start sound [Explosion v]\n    repeat (6)\n        change x by (4)\n    end\n    repeat (12)\n        change x by (-2)\n    end\n    wait (0.5) seconds\n    set [bossani v] to [0]\nend\n\nwhen I receive [bossded v]\ndelete this clone\n\nwhen I receive [unmute v]\nset volume to (100) %\n\nwhen I receive [mute v]\nset volume to (0) %\n\n@Fire\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\ngo to (boss v)\nchange x by (-16)\nchange y by (-4)\nshow\nrepeat until <touching (hitbox v)?>\n    change x by (-4)\n    if <touching (_edge_ v)?> then\n        delete this clone\n    end\nend\nif <[1] < (dash)> then\n    point towards (boss v)\n    repeat until <touching (boss v)?>\n        move (4) steps\n        if <touching (_edge_ v)?> then\n            delete this clone\n        end\n    end\n    change [bosshp v] by (-1)\n    broadcast (hit v)\n    delete this clone\nelse\n    broadcast (bossded2 v)\n    delete this clone\nend\n\nwhen I receive [hit v]\ndelete this clone\n\nwhen I receive [bossreset v]\ndelete this clone\n\n@Grail\n\nwhen flag clicked\nhide\n\ndefine size\nset size to (400) %\nswitch costume to (2 v)\n\nwhen I receive [holygrail v]\nswitch costume to (1 v)\ngo to x: (0) y: (65)\nshow\ncreate clone of (_myself_ v)\ngo to [front v] layer\nset size to (400) %\nstop all sounds\nplay sound [Jake Kaufman - Shovel Knight Original Soundtrack - 06 For Shovelry! \(Boss Victory\).mp3 v] until done\nbroadcast (fade v)\nrepeat (50)\n    change size by (-6)\nend\nglide (1) secs to x: (6) y: (-54)\nwait (0.5) seconds\nbroadcast (winscreen v)\n\nwhen I receive [fade v]\nif <[2] = (costume [number v])> then\n    repeat (25)\n        change [ghost v] effect by (4)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nswitch costume to (3 v)\nsize\nset [ghost v] effect to (50)\nset [brightness v] effect to (100)\nforever\n    turn right (2) degrees\nend\n\nwhen I receive [unmute v]\nset volume to (100) %\n\nwhen I receive [mute v]\nset volume to (0) %\n\n
CONTROLS:\nMove - Arrows / WASD\nDouble Jump - Z / Space\nDash - X