Sides | A platformer
@Stage\n\nwhen I receive [message1 v]\nswitch backdrop to (backdrop5 v)\nset volume to (0) %\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 flag clicked\nswitch backdrop to (backdrop11 v)\n\nwhen I receive [message1 v]\nwait (0.1) seconds\nwait until <([costume # v] of [ground v]) = [23]>\nstop all sounds\nstop [other scripts in stage v]\nwait until <([costume # v] of [ground v]) = [24]>\nswitch backdrop to (backdrop5 v)\n\nwhen I receive [message1 v]\nset volume to (0) %\nrepeat (25)\n    change volume by (4)\nend\n\nwhen [s v] key pressed\nif <(username) = [joshrawesome]> then\n    broadcast (next level v)\nend\n\n@sides_char_hitbox\n\nwhen I receive [message1 v]\nwait (0.1) seconds\nforever\n    if <<touching (_edge_ v)?> and <(y position) < [-175]>> then\n        go to x: (x position) y: (174)\n    end\n    if <<touching (_edge_ v)?> and <(y position) > [175]>> then\n        go to x: (x position) y: (-174)\n    end\n    if <<touching (_edge_ v)?> and <(x position) > [235]>> then\n        go to x: (-235) y: (y position)\n    end\n    if <<touching (_edge_ v)?> and <(x position) < [-235]>> then\n        go to x: (235) y: (y position)\n    end\nend\n\nwhen I receive [reposition v]\nset [xv v] to [0]\nset [yv v] to [0]\nset [which side in use? v] to [down]\nset [right? v] to [yes]\npoint in direction (90)\ngo to x: (-200) y: (-140)\n\nwhen I receive [message1 v]\nshow\nset [ghost v] effect to (100)\nset size to (55) %\nset [right? v] to [yes]\npoint in direction (90)\ngo to x: (-200) y: (-140)\nset [speed v] to [1]\nset [wall jump mode v] to [1]\nset [jump height v] to [10]\nset [gravity v] to [1]\nset [xv v] to [0]\nset [yv v] to [0]\nset [which side in use? v] to [down]\nset rotation style [all around v]\nforever\n    if <(Hidden?) = [no]> then\n        if <(direction) = [90]> then\n            if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                change [xv v] by (Speed)\n                set [right? v] to [yes]\n            end\n            if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n                change [xv v] by ((Speed) * (-1))\n                set [right? v] to [no]\n            end\n            set [xv v] to ((Xv) * (0.85))\n            change x by (Xv)\n            if <<touching (ground v)?> or <touching color (#330066)?>> then\n                change y by (1)\n                if <<touching (ground v)?> or <touching color (#330066)?>> then\n                    change y by (1)\n                    if <<touching (ground v)?> or <touching color (#330066)?>> then\n                        change y by (1)\n                        if <<touching (ground v)?> or <touching color (#330066)?>> then\n                            change y by (1)\n                            if <<touching (ground v)?> or <touching color (#330066)?>> then\n                                change y by (1)\n                                if <<touching (ground v)?> or <touching color (#330066)?>> then\n                                    change x by ((Xv) * (-1))\n                                    change y by (-5)\n                                    if <(Wall Jump Mode) = [1]> then\n                                        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                            start sound [bump sound v]\n                                            if <(Xv) > [0]> then\n                                                set [xv v] to [-5]\n                                            else\n                                                set [xv v] to [5]\n                                            end\n                                            set [yv v] to [10]\n                                        else\n                                            set [xv v] to [0]\n                                        end\n                                    end\n                                    if <(Wall Jump Mode) = [2]> then\n                                        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                            start sound [bump sound v]\n                                            if <(Xv) > [0]> then\n                                                set [xv v] to [-20]\n                                            else\n                                                set [xv v] to [20]\n                                            end\n                                            set [yv v] to [15]\n                                        else\n                                            set [xv v] to [0]\n                                        end\n                                    end\n                                    if <(Wall Jump Mode) = [2]> then\n                                        start sound [walk v]\n                                        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n            change [yv v] by (-1)\n            change y by ((Yv) / (Gravity))\n            if <<touching (ground v)?> or <touching color (#330066)?>> then\n                change y by (((Yv) / (Gravity)) * (-1))\n                set [yv v] to [0]\n            end\n            change y by (-1)\n            if <<touching (ground v)?> or <touching color (#330066)?>> then\n                if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                    start sound [Jump v]\n                    set [yv v] to (Jump Height)\n                end\n            end\n            change y by (1)\n        end\n        if <(direction) = [-90]> then\n            if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                change [xv v] by (Speed)\n                set [right? v] to [yes]\n            end\n            if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n                change [xv v] by ((Speed) * (-1))\n                set [right? v] to [no]\n            end\n            set [xv v] to ((Xv) * (0.85))\n            change x by (Xv)\n            if <<touching (ground v)?> or <touching color (#330066)?>> then\n                change y by (1)\n                if <<touching (ground v)?> or <touching color (#330066)?>> then\n                    change y by (1)\n                    if <<touching (ground v)?> or <touching color (#330066)?>> then\n                        change y by (1)\n                        if <<touching (ground v)?> or <touching color (#330066)?>> then\n                            change y by (1)\n                            if <<touching (ground v)?> or <touching color (#330066)?>> then\n                                change y by (1)\n                                if <<touching (ground v)?> or <touching color (#330066)?>> then\n                                    change x by ((Xv) * (-1))\n                                    change y by (-5)\n                                    if <(Wall Jump Mode) = [1]> then\n                                        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                            start sound [bump sound v]\n                                            if <(Xv) > [0]> then\n                                                set [xv v] to [-5]\n                                            else\n                                                set [xv v] to [5]\n                                            end\n                                            set [yv v] to [10]\n                                        else\n                                            set [xv v] to [0]\n                                        end\n                                    end\n                                    if <(Wall Jump Mode) = [2]> then\n                                        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                            start sound [walk v]\n                                            if <(Xv) > [0]> then\n                                                set [xv v] to [-20]\n                                            else\n                                                set [xv v] to [20]\n                                            end\n                                            set [yv v] to [15]\n                                        else\n                                            set [xv v] to [0]\n                                        end\n                                    end\n                                    if <(Wall Jump Mode) = [2]> then\n                                        start sound [walk v]\n                                        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n            change [yv v] by (-1)\n            change y by (((Yv) / (Gravity)) * (-1))\n            if <<touching (ground v)?> or <touching color (#330066)?>> then\n                change y by (((Yv) / (Gravity)) * (1))\n                set [yv v] to [0]\n            end\n            change y by (1)\n            if <<touching (ground v)?> or <touching color (#330066)?>> then\n                if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                    start sound [Jump v]\n                    set [yv v] to (Jump Height)\n                end\n            end\n            change y by (-1)\n        end\n        if <(direction) = [180]> then\n            if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                change [xv v] by (Speed)\n                set [right? v] to [yes]\n            end\n            if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n                change [xv v] by ((Speed) * (-1))\n                set [right? v] to [no]\n            end\n            set [xv v] to ((Xv) * (0.85))\n            change y by (Xv)\n            if <<touching (ground v)?> or <touching color (#330066)?>> then\n                change x by (1)\n                if <<touching (ground v)?> or <touching color (#330066)?>> then\n                    change x by (1)\n                    if <<touching (ground v)?> or <touching color (#330066)?>> then\n                        change x by (1)\n                        if <<touching (ground v)?> or <touching color (#330066)?>> then\n                            change x by (1)\n                            if <<touching (ground v)?> or <touching color (#330066)?>> then\n                                change x by (1)\n                                if <<touching (ground v)?> or <touching color (#330066)?>> then\n                                    change y by ((Xv) * (-1))\n                                    change x by (-5)\n                                    if <(Wall Jump Mode) = [1]> then\n                                        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                            start sound [bump sound v]\n                                            if <(Xv) > [0]> then\n                                                set [xv v] to [-5]\n                                            else\n                                                set [xv v] to [5]\n                                            end\n                                            set [yv v] to [10]\n                                        else\n                                            set [xv v] to [0]\n                                        end\n                                    end\n                                    if <(Wall Jump Mode) = [2]> then\n                                        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                            start sound [walk v]\n                                            if <(Xv) > [0]> then\n                                                set [xv v] to [-20]\n                                            else\n                                                set [xv v] to [20]\n                                            end\n                                            set [yv v] to [15]\n                                        else\n                                            set [xv v] to [0]\n                                        end\n                                    end\n                                    if <(Wall Jump Mode) = [2]> then\n                                        start sound [walk v]\n                                        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n            change [yv v] by (-1)\n            change x by (((Yv) / (Gravity)) * (1))\n            if <<touching (ground v)?> or <touching color (#330066)?>> then\n                change x by (((Yv) / (Gravity)) * (-1))\n                set [yv v] to [0]\n            end\n            change x by (-1)\n            if <<touching (ground v)?> or <touching color (#330066)?>> then\n                if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                    start sound [Jump v]\n                    set [yv v] to (Jump Height)\n                end\n            end\n            change x by (1)\n        end\n        if <(direction) = [0]> then\n            if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                change [xv v] by (Speed)\n                set [right? v] to [yes]\n            end\n            if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n                change [xv v] by ((Speed) * (-1))\n                set [right? v] to [no]\n            end\n            set [xv v] to ((Xv) * (0.85))\n            change y by (Xv)\n            if <<touching (ground v)?> or <touching color (#330066)?>> then\n                change x by (1)\n                if <<touching (ground v)?> or <touching color (#330066)?>> then\n                    change x by (1)\n                    if <<touching (ground v)?> or <touching color (#330066)?>> then\n                        change x by (1)\n                        if <<touching (ground v)?> or <touching color (#330066)?>> then\n                            change x by (1)\n                            if <<touching (ground v)?> or <touching color (#330066)?>> then\n                                change x by (1)\n                                if <<touching (ground v)?> or <touching color (#330066)?>> then\n                                    change y by ((Xv) * (-1))\n                                    change x by (-5)\n                                    if <(Wall Jump Mode) = [1]> then\n                                        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                            start sound [bump sound v]\n                                            if <(Xv) > [0]> then\n                                                set [xv v] to [-5]\n                                            else\n                                                set [xv v] to [5]\n                                            end\n                                            set [yv v] to [10]\n                                        else\n                                            set [xv v] to [0]\n                                        end\n                                    end\n                                    if <(Wall Jump Mode) = [2]> then\n                                        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                            start sound [walk v]\n                                            if <(Xv) > [0]> then\n                                                set [xv v] to [-20]\n                                            else\n                                                set [xv v] to [20]\n                                            end\n                                            set [yv v] to [15]\n                                        else\n                                            set [xv v] to [0]\n                                        end\n                                    end\n                                    if <(Wall Jump Mode) = [2]> then\n                                        start sound [walk v]\n                                        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n            change [yv v] by (-1)\n            change x by (((Yv) / (Gravity)) * (-1))\n            if <<touching (ground v)?> or <touching color (#330066)?>> then\n                change x by (((Yv) / (Gravity)) * (1))\n                set [yv v] to [0]\n            end\n            change x by (1)\n            if <<touching (ground v)?> or <touching color (#330066)?>> then\n                if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                    start sound [Jump v]\n                    set [yv v] to (Jump Height)\n                end\n            end\n            change x by (-1)\n        end\n    end\nend\n\nwhen I receive [message1 v]\nforever\n    if <(Which side in use?) = [down]> then\n        point in direction (90)\n    end\n    if <(Which side in use?) = [up]> then\n        point in direction (-90)\n    end\n    if <(Which side in use?) = [right]> then\n        point in direction (0)\n    end\n    if <(Which side in use?) = [left]> then\n        point in direction (180)\n    end\n    if <(Yv) < [-15]> then\n        set [yv v] to [-15]\n    end\n    if <(Xv) < [-15]> then\n        set [xv v] to [-15]\n    end\nend\n\nwhen I receive [message1 v]\nforever\n    if <touching color (#00ff55)?> then\n        broadcast (next level v)\n        set [hidden? v] to [yes]\n        wait until <not <touching color (#00ff55)?>>\n    end\n    if <touching color (#003fff)?> then\n        start sound [walk2 v]\n        broadcast (unlock v)\n        wait until <not <touching color (#003fff)?>>\n    end\nend\n\nwhen I receive [message1 v]\nforever\n    if <<key (a v) pressed?> or <<key (left arrow v) pressed?> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>>> then\n        if <(Yv) = [0]> then\n            play sound [walk v] until done\n        end\n    end\nend\n\nwhen I receive [message1 v]\nforever\n    if <<touching color (#990000)?> or <key (r v) pressed?>> then\n        if <<<([costume name v] of [ground v]) = [Level 10 2nd]> or <([costume name v] of [ground v]) = [Level 16 2nd]>> or <([costume name v] of [ground v]) = [Level 17 2nd]>> then\n            broadcast (previous level v)\n        end\n        set [xv v] to [0]\n        set [yv v] to [0]\n        change [deaths v] by (1)\n        set [which side in use? v] to [down]\n        go to x: (-200) y: (-140)\n    end\n    if <touching color (#ff00bf)?> then\n        start sound [Jump v]\n        set [yv v] to [17]\n    end\n    if <<touching (boss v)?> and <not <([costume # v] of [boss v]) = [4]>>> then\n        set [xv v] to [0]\n        set [yv v] to [0]\n        set [which side in use? v] to [down]\n        go to x: (-200) y: (-140)\n    end\nend\n\nwhen I receive [message1 v]\nforever\n    if <touching color (#330066)?> then\n        broadcast (i v)\n    end\nend\n\nwhen flag clicked\nset [deaths v] to [0]\n\nwhen flag clicked\nhide\n\n@(right) Character\n\nwhen I receive [message1 v]\nshow\ngo to [front v] layer\nset [ghost v] effect to (0)\npoint in direction (90)\nset size to (55) %\nset rotation style [all around v]\nforever\n    go to [front v] layer\n    go to (sides_char_hitbox v)\n    point in direction ([direction v] of [sides_char_hitbox v])\n    if <<(direction) = [90]> or <(direction) = [0]>> then\n        if <(Right?) = [yes]> then\n            show\n        else\n            hide\n        end\n    end\n    if <<(direction) = [-90]> or <(direction) = [180]>> then\n        if <(Right?) = [no]> then\n            show\n        else\n            hide\n        end\n    end\n    if <(Hidden?) = [yes]> then\n        hide\n    end\n    if <touching color (#0d0d0d)?> then\n        set [brightness v] effect to (70)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [reposition v]\npoint in direction (90)\n\nwhen I receive [message1 v]\nswitch costume to (sides_char_move_1 v)\nforever\n    if <<(Yv) > [0]> and <not <(Yv) = [0]>>> then\n        switch costume to (sides_char_move_jump v)\n    else\n        if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>>> then\n            next costume\n            if <(costume [number v]) = [11]> then\n                next costume\n            end\n        else\n            switch costume to (sides_char_move_1 v)\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\n@(left) Character\n\nwhen I receive [message1 v]\nshow\ngo to [front v] layer\nset [ghost v] effect to (0)\npoint in direction (90)\nset size to (55) %\nset rotation style [all around v]\nforever\n    go to [front v] layer\n    go to (sides_char_hitbox v)\n    point in direction ([direction v] of [sides_char_hitbox v])\n    if <<(direction) = [90]> or <(direction) = [0]>> then\n        if <(Right?) = [no]> then\n            show\n        else\n            hide\n        end\n    end\n    if <<(direction) = [-90]> or <(direction) = [180]>> then\n        if <(Right?) = [yes]> then\n            show\n        else\n            hide\n        end\n    end\n    if <(Hidden?) = [yes]> then\n        hide\n    end\n    if <touching color (#0d0d0d)?> then\n        set [brightness v] effect to (70)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [reposition v]\npoint in direction (90)\n\nwhen I receive [message1 v]\nswitch costume to (sides_char_move_1 v)\nforever\n    if <<(Yv) > [0]> and <not <(Yv) = [0]>>> then\n        switch costume to (sides_char_move_jump v)\n    else\n        if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>>> then\n            next costume\n            if <(costume [number v]) = [11]> then\n                next costume\n            end\n        else\n            switch costume to (sides_char_move_1 v)\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\n@Ground\n\nwhen I receive [reposition v]\ngo [backward v] (1) layers\nnext costume\n\nwhen I receive [unlock v]\nnext costume\n\nwhen I receive [message1 v]\nwait until <(costume [number v]) = [24]>\nif <(Deaths) = [0]> then\n    next costume\nend\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 [previous level v]\nswitch costume to ((costume [number v]) - (1))\n\nset [☁ no cheatin' v] to [0]\n\nwhen flag clicked\nhide\n\nwhen I receive [message1 v]\nswitch costume to (level 1 v)\nshow\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\nset size to (2000) %\nforever\n    go to [front v] layer\nend\n\n@Extras\n\nwhen I receive [reposition v]\nnext costume\nwait (1.5) seconds\ngo to [front v] layer\n\nset [which side in use? v] to [right]\n\nwhen I receive [unlock v]\nnext costume\n\nwhen I receive [previous level v]\nswitch costume to ((costume [number v]) - (1))\n\nwhen flag clicked\nhide\n\nwhen I receive [message1 v]\nswitch costume to (level 1 v)\ngo to [front v] layer\nshow\ngo to x: (0) y: (0)\nset size to (2000) %\n\n@Transition\n\nwhen flag clicked\nset [hidden? v] to [no]\ngo to x: (0) y: (0)\nhide\nforever\n    go to [front v] layer\n    if <(Hidden?) = [yes]> then\n        set [which side in use? v] to [down]\n    end\nend\n\ndefine None\nset [x/y v] to (x/y)\nset [v v] to (v)\nif <(V) < [0]> then\n    repeat (([abs v] of (V) ) - (1))\n        change [v v] by (1)\n        if <(X/Y) = [x]> then\n            change x by (V)\n        else\n            change y by (V)\n        end\n    end\nelse\n    repeat (([abs v] of (V) ) - (1))\n        change [v v] by (-1)\n        if <(X/Y) = [x]> then\n            change x by (V)\n        else\n            change y by (V)\n        end\n    end\nend\n\nwhen I receive [next level v]\nset [hidden? v] to [yes]\nset [which side in use? v] to [down]\nshow\nstart sound [computer beeps1 v]\nbroadcast (Hide v)\ngo to x: (-460) y: (0)\nx/y= [x] velocity power= (30.85)\nbroadcast (Reposition v)\nwait (0.5) seconds\nset [hidden? v] to [no]\nx/y= [x] velocity power= (30.85)\nhide\nset [which side in use? v] to [down]\n\nwhen flag clicked\nhide\n\n@Arrow\n\nwhen flag clicked\nhide\n\nwhen I receive [message1 v]\nhide\nwait (1) seconds\nwait until <([costume # v] of [ground v]) = [3]>\nLevel 3 Arrows\nwait until <([costume # v] of [ground v]) = [4]>\nbroadcast (Delete v)\nwait until <([costume # v] of [ground v]) = [5]>\nLevel 5 Arrows\nwait until <([costume # v] of [ground v]) = [6]>\nbroadcast (Delete v)\nwait until <([costume # v] of [ground v]) = [8]>\nLevel 8 Arrows\nwait until <([costume # v] of [ground v]) = [9]>\nbroadcast (Delete v)\nwait until <([costume # v] of [ground v]) = [10]>\nLevel 10 Arrows\nwait until <([costume # v] of [ground v]) = [12]>\nbroadcast (Delete v)\nLevel 11 Arrows\nwait until <([costume # v] of [ground v]) = [13]>\nbroadcast (Delete v)\nwait until <([costume # v] of [ground v]) = [15]>\nLevel 14 Arrows\nwait until <([costume # v] of [ground v]) = [16]>\nbroadcast (Delete v)\nwait until <([costume # v] of [ground v]) = [17]>\nbroadcast (Delete v)\nLevel 16 Arrows\nwait until <([costume # v] of [ground v]) = [19]>\nbroadcast (Delete v)\nLevel 17 Arrows\nwait until <([costume # v] of [ground v]) = [21]>\nbroadcast (Delete v)\nwait until <([costume # v] of [ground v]) = [23]>\nbroadcast (Delete v)\nBoss Arrows\nwait until <([costume # v] of [ground v]) = [24]>\nbroadcast (Delete v)\n\nwhen I start as a clone\nshow\nforever\n    go to [front v] layer\n    if <touching (sides_char_hitbox v)?> then\n        if <(direction) = [90]> then\n            set [which side in use? v] to [right]\n        end\n        if <(direction) = [-90]> then\n            set [which side in use? v] to [left]\n        end\n        if <(direction) = [0]> then\n            set [which side in use? v] to [up]\n        end\n        if <(direction) = [180]> then\n            set [which side in use? v] to [down]\n        end\n    end\nend\n\nwhen I receive [delete v]\ndelete this clone\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\ndefine Level 8 Arrows\npoint in direction (0)\ngo to x: (-187) y: (-109)\ncreate clone of (_myself_ v)\npoint in direction (90)\ngo to x: (-190) y: (-12)\ncreate clone of (_myself_ v)\npoint in direction (-90)\ngo to x: (-70) y: (-106)\ncreate clone of (_myself_ v)\n\ndefine Level 5 Arrows\npoint in direction (90)\ngo to x: (-150) y: (-93)\ncreate clone of (_myself_ v)\n\ndefine Level 3 Arrows\npoint in direction (0)\ngo to x: (-127) y: (-110)\ncreate clone of (_myself_ v)\npoint in direction (90)\ngo to x: (-130) y: (127)\ncreate clone of (_myself_ v)\npoint in direction (90)\ngo to x: (10) y: (-133)\ncreate clone of (_myself_ v)\npoint in direction (180)\ngo to x: (147) y: (130)\ncreate clone of (_myself_ v)\npoint in direction (-90)\ngo to x: (150) y: (33)\ncreate clone of (_myself_ v)\n\ndefine Level 10 Arrows\npoint in direction (90)\ngo to x: (170) y: (-72)\ncreate clone of (_myself_ v)\npoint in direction (180)\ngo to x: (-13) y: (129)\ncreate clone of (_myself_ v)\n\ndefine Level 11 Arrows\npoint in direction (90)\ngo to x: (-190) y: (-53)\ncreate clone of (_myself_ v)\npoint in direction (0)\ngo to x: (123) y: (-70)\ncreate clone of (_myself_ v)\n\ndefine Level 14 Arrows\npoint in direction (-90)\ngo to x: (179) y: (113)\ncreate clone of (_myself_ v)\n\ndefine Level 16 Arrows\npoint in direction (0)\ngo to x: (-127) y: (-110)\ncreate clone of (_myself_ v)\npoint in direction (90)\ngo to x: (110) y: (7)\ncreate clone of (_myself_ v)\n\ndefine Level 17 Arrows\npoint in direction (90)\ngo to x: (-190) y: (-112)\ncreate clone of (_myself_ v)\npoint in direction (180)\ngo to x: (-153) y: (150)\ncreate clone of (_myself_ v)\n\ndefine Boss Arrows\npoint in direction (0)\ngo to x: (-7) y: (-110)\ncreate clone of (_myself_ v)\npoint in direction (180)\ngo to x: (7) y: (111)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\n\nwhen flag clicked\nhide\n\n@Darkness\n\nwhen flag clicked\nhide\n\nwhen I receive [message1 v]\ngo to x: (0) y: (0)\nhide\nforever\n    go [backward v] (1) layers\n    if <<([costume name v] of [ground v]) = [Level 13]> or <([costume name v] of [ground v]) = [Level 15]>> then\n        show\n    else\n        hide\n    end\nend\n\n@Light\n\nwhen I receive [message1 v]\nhide\nset [ghost v] effect to (0)\ngo to [front v] layer\nset size to (2000) %\nforever\n    go to (sides_char_hitbox v)\n    if <<([costume name v] of [ground v]) = [Level 13]> or <([costume name v] of [ground v]) = [Level 15]>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nhide\n\nset size to (2000) %\n\n@Boss\n\nwhen I receive [message1 v]\nhide\nwait until <([costume # v] of [ground v]) = [23]>\nstop all sounds\nswitch backdrop to (backdrop4 v)\nwait (1) seconds\nshow\nstart sound [Jake Kaufman - Shovel Knight Original Soundtrack - 10 The Decadent Dandy \(King Knight Battle\).mp3 v]\nset [boss health v] to [3]\nswitch costume to (sides_boss v)\nset size to (150) %\ngo to x: (-10) y: (-180)\nglide (1) secs to x: (-10) y: (50)\nbroadcast (iii v)\n\nwhen flag clicked\nhide\nerase all\n\nwhen I receive [boss death v]\nrepeat (3)\n    start sound [explbomb v]\n    wait (0.2) seconds\n    start sound [explbomb v]\n    wait (0.2) seconds\n    start sound [explbomb v]\n    wait (0.1) seconds\n    start sound [explbomb v]\nend\n\nwhen I receive [iii v]\nforever\n    if <color (#00cc44) is touching (#000000)?> then\n        start sound [explbomb v]\n        switch costume to (sides_boss_2 v)\n        change [boss health v] by (-1)\n        if <(Boss Health) = [0]> then\n            stop [other scripts in sprite v]\n            broadcast (Boss Death v)\n            stop [this script v]\n        else\n            wait until <not <color (#00cc44) is touching (#000000)?>>\n        end\n    end\nend\n\nwhen I start as a clone\nchange x by (-10)\nset rotation style [left-right v]\nstart sound [laser cannon v]\nswitch costume to (costume1 v)\nset size to (2000) %\npoint in direction (90)\nif <(Which side in use?) = [down]> then\n    repeat until <(y position) < [-165]>\n        stamp\n        change y by (-40)\n    end\n    wait (0.3) seconds\n    erase all\n    delete this clone\nelse\n    repeat until <(y position) > [165]>\n        stamp\n        change y by (40)\n    end\n    wait (0.3) seconds\n    erase all\n    delete this clone\nend\n\nwhen I receive [targeting shock v]\ngo to x: (([x position v] of [sides_char_hitbox v]) + (pick random (-30) to (30))) y: (pick random (50) to (-50))\ncreate clone of (_myself_ v)\n\nwhen I receive [shock v]\ngo to x: (([x position v] of [sides_char_hitbox v]) + (pick random (-60) to (60))) y: (pick random (50) to (-50))\nshow\n\nwhen I receive [boss death v]\nstop all sounds\nset size to (150) %\nglide (1) secs to x: (-10) y: (0)\nrepeat (20)\n    change size by (10)\nend\nrepeat (20)\n    change size by (-20)\nend\nhide\nbroadcast (Next Level v)\n\nwhen I receive [iii v]\nforever\n    repeat (pick random (5) to (20))\n        wait (pick random (0.1) to (0.75)) seconds\n        broadcast (Shock v)\n    end\n    broadcast (Targeting Shock v)\n    wait (0.5) seconds\n    switch costume to (sides_boss_exposed v)\n    wait (pick random (1) to (3)) seconds\n    switch costume to (sides_boss v)\nend\n\nwhen flag clicked\nhide\n\n@Shock\n\nwhen I receive [shock v]\nstart sound [cymbal v]\nshow\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nrepeat (2)\n    change [ghost v] effect by (-50)\nend\nrepeat (2)\n    change [ghost v] effect by (50)\nend\nhide\n\nwhen I receive [targeting shock v]\nstart sound [cymbal v]\nshow\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nrepeat (2)\n    change [ghost v] effect by (-50)\nend\nrepeat (2)\n    change [ghost v] effect by (50)\nend\nhide\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\n@intro (pixel)\n\nwhen I start as a clone\nif <(costume [number v]) = [2]> then\n    stamp\n    repeat (15)\n        change y by (-22)\n        stamp\n    end\nend\nif <(costume [number v]) = [4]> then\n    stamp\n    repeat (13)\n        change y by (-22)\n        stamp\n    end\nend\nif <(costume [number v]) = [6]> then\n    stamp\n    repeat (15)\n        change y by (-22)\n        stamp\n    end\nend\nif <(costume [number v]) = [7]> then\n    stamp\n    repeat (14)\n        change y by (-22)\n        stamp\n    end\nend\n\nwhen flag clicked\nstart sound [Vexento - Particles v]\nset volume to (100) %\nshow\nhide\nerase all\nhide\nswitch costume to (joshrawesome v)\ngo to x: (0) y: (0)\nswitch costume to (test v)\ngo to x: (-220) y: (158)\ncreate clone of (_myself_ v)\nrepeat (20)\n    change x by (22)\n    create clone of (_myself_ v)\nend\nhide\nwait (0.5) seconds\nshow\nhide\nswitch costume to (joshrawesome v)\ngo to x: (0) y: (0)\nswitch costume to (test2 v)\ngo to x: (-98) y: (140)\ncreate clone of (_myself_ v)\nrepeat (9)\n    change x by (22)\n    create clone of (_myself_ v)\n    wait (0.1) seconds\nend\nwait (1) seconds\nset [ghost v] effect to (100)\ngo to x: (1) y: (-2)\nswitch costume to (joshrawesome2 v)\nshow\nrepeat (25)\n    change [ghost v] effect by (-4)\nend\nstamp\nhide\nwait (1) seconds\nswitch costume to (fill in ending black v)\ngo to x: (-100) y: (150)\ncreate clone of (_myself_ v)\nrepeat (10)\n    change x by (22)\n    create clone of (_myself_ v)\n    wait (0.1) seconds\nend\nwait (1) seconds\nswitch costume to (fill in ending white v)\ngo to x: (-220) y: (158)\ncreate clone of (_myself_ v)\nrepeat (20)\n    change x by (22)\n    create clone of (_myself_ v)\nend\nwait (0.7) seconds\nerase all\nrepeat (100)\n    change volume by (-1)\nend\nstop all sounds\nbroadcast (message1 v)\n\n@Thumbnail\n\nwhen flag clicked\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nforever\n    reset timer\nend\n\nwhen [timer v] > (1)\nshow\ngo to [front v] layer\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\n