Platformer

Instructions: WASD to move. Press R to reset the level. Press mouse (left click) to shoot. (for boss level)\n\nNote: music is sort of loud, so feel free to turn down the volume\n\n#platformer #game #fun #awesome

@Stage\n\n@Sprite1\n\nwhen flag clicked\nhide\nwait (3) seconds\nforever\n    play sound [{RUNAWAY} v] until done\nend\n\nwhen I receive [message1 v]\nsay [Oh yeah!? Let's just see about that!!!] for (2) seconds\n\nwhen flag clicked\nforever\n    if <touching (boss v)?> then\n        broadcast (game over v)\n    end\nend\n\nwhen I receive [game over v]\nhide\n\nwhen backdrop switches to [backdrop1 v]\n\nwhen flag clicked\nswitch backdrop to (backdrop11 v)\n\nplay note (63) for (0.2) beats\nplay note (60) for (0.2) beats\nplay note (63) for (0.5) beats\nplay note (63) for (1) beats\nplay note (53) for (0.2) beats\nplay note (53) for (0.2) beats\nplay note (60) for (0.25) beats\nplay note (62) for (0.5) beats\nplay note (53) for (1) beats\nplay drum (1 v) for (0.25) beats\n\nwhen backdrop switches to [backdrop1 v]\ngo to [front v] layer\nshow\ngo to x: (-184) y: (40)\nset [gravity v] to [5]\nforever\n    change [y vel v] by (-0.5)\n    if <key (d v) pressed?> then\n        point in direction (90)\n        change [x vel v] by (0.7)\n    end\n    if <key (a v) pressed?> then\n        point in direction (-90)\n        change [x vel v] by (-0.7)\n    end\n    set [x vel v] to ((X vel) * (0.9))\n    change x by (X vel)\n    if <touching color (#7f7f7f)?> then\n        change y by (1)\n        if <touching color (#7f7f7f)?> then\n            change y by (1)\n            if <touching color (#7f7f7f)?> then\n                change y by (1)\n                if <touching color (#7f7f7f)?> then\n                    change y by (1)\n                    if <touching color (#7f7f7f)?> then\n                        change y by (1)\n                        if <touching color (#7f7f7f)?> then\n                            change x by ((X vel) * (-1))\n                            change x by (-1)\n                            change y by (-5)\n                            change x by (1)\n                            if <key (w v) pressed?> then\n                                if <(X vel) > [0]> then\n                                    set [x vel v] to [-8]\n                                else\n                                    set [x vel v] to [8]\n                                end\n                                set [y vel v] to [8]\n                            else\n                                set [x vel v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (Y vel)\n    if <touching color (#7f7f7f)?> then\n        change y by ((Y vel) * (-1))\n        set [y vel v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#7f7f7f)?> then\n        if <key (w v) pressed?> then\n            set [y vel v] to [10]\n        end\n    end\n    if <touching color (#8a55d7)?> then\n        go to x: (-200) y: (-120)\n        set [x vel v] to [0]\n        set [y vel v] to [0]\n    end\n    if <key (r v) pressed?> then\n        go to x: (-189) y: (-3)\n    end\n    if <touching (sprite2 v)?> then\n        go to x: (-204) y: (-6)\n        switch backdrop to (next backdrop v)\n    end\n    if <touching color (#ff0000)?> then\n        go to x: (-204) y: (-6)\n    end\nend\n\n@Sprite2\n\nwhen backdrop switches to [backdrop8 v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [portal open v]\nshow\n\nwhen I receive [game over v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [game over v]\nhide\n\nwhen backdrop switches to [backdrop11 v]\nhide\n\nwhen backdrop switches to [backdrop1 v]\nshow\n\nwhen backdrop switches to [backdrop10 v]\nhide\n\nwhen backdrop switches to [backdrop9 v]\nhide\nstop [other scripts in sprite v]\n\n@Sprite3\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop6 v]\nhide\n\nwhen backdrop switches to [backdrop5 v]\nshow\nforever\n    glide (0.5) secs to x: (33) y: (34)\n    wait (0.5) seconds\n    glide (0.5) secs to x: (189) y: (36)\n    wait (0.5) seconds\nend\n\n@Sprite4\n\nwhen flag clicked\nswitch costume to (costume2 v)\n\nwhen backdrop switches to [backdrop12 v]\nhide\n\nwhen backdrop switches to [backdrop7 v]\nshow\nrepeat until <(backdrop [name v]) = [8]>\n    switch costume to (costume1 v)\n    wait (1) seconds\n    switch costume to (costume2 v)\n    wait (1) seconds\nend\n\n@Sprite5\n\nwhen flag clicked\nswitch costume to (costume2 v)\n\nwhen backdrop switches to [backdrop12 v]\nhide\n\nwhen backdrop switches to [backdrop7 v]\nshow\nrepeat until <(backdrop [name v]) = [8]>\n    switch costume to (costume1 v)\n    wait (1) seconds\n    switch costume to (costume2 v)\n    wait (1) seconds\nend\n\n@Sprite6\n\nwhen flag clicked\nswitch costume to (costume2 v)\n\nwhen backdrop switches to [backdrop7 v]\nshow\nrepeat until <(backdrop [name v]) = [8]>\n    switch costume to (costume1 v)\n    wait (1) seconds\n    switch costume to (costume2 v)\n    wait (1) seconds\nend\n\nwhen backdrop switches to [backdrop12 v]\nhide\n\n@boss\n\nwhen backdrop switches to [backdrop8 v]\ngo to x: (8) y: (-159)\nswitch costume to (costume2 v)\nshow\nsay [There is NOOO way you are getting through that portal!!!] for (2) seconds\nbroadcast (message1 v)\nset [time until self destruction v] to [1000]\nshow variable [time until self destruction v]\nforever\n    if <(Time Until Self Destruction) = [0 ]> then\n        switch costume to (costume1 v)\n        wait (0.5) seconds\n        hide\n        hide variable [time until self destruction v]\n        broadcast (portal open v)\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume2 v)\nset [time until self destruction v] to [30]\nhide variable [time until self destruction v]\nhide\ngo to x: (8) y: (-159)\n\nwhen backdrop switches to [backdrop8 v]\nwait (4) seconds\nglide (1) secs to x: (7) y: (43)\nforever\n    switch costume to (costume2 v)\n    wait (2) seconds\n    switch costume to (costume3 v)\n    wait (2) seconds\n    switch costume to (costume2 v)\n    wait (2) seconds\n    switch costume to (costume4 v)\n    wait (2) seconds\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite12 v)?> then\n        change [time until self destruction v] by (-1)\n    end\nend\n\nwhen I receive [game over v]\nhide variable [time until self destruction v]\nswitch backdrop to (backdrop10 v)\n\nwhen I receive [start again v]\nhide\n\n@Sprite8\n\nwhen flag clicked\nhide\nswitch costume to (costume2 v)\n\nwhen this sprite clicked\nswitch backdrop to (backdrop1 v)\nbroadcast (start again v)\nhide\n\nwhen backdrop switches to [backdrop9 v]\nshow\nswitch costume to (costume1 v)\nforever\n    switch costume to (costume2 v)\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [game over v]\nshow\ngo to [front v] layer\nswitch costume to (costume1 v)\nforever\n    switch costume to (costume2 v)\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume1 v)\n    end\nend\n\n@Sprite9\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\nforever\n    switch costume to (costume1 v)\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    end\nend\n\nwhen this sprite clicked\nswitch backdrop to (backdrop1 v)\nhide\n\n@Sprite10\n\nwhen flag clicked\nhide\n\nshow\ngo to [front v] layer\n\n@Sprite11\n\nwhen flag clicked\nhide\n\nwhen I receive [message1 v]\nsay [Oh yeah!? Let's just see about that!!!] for (2) seconds\n\nwhen I receive [game over v]\nhide\n\nwhen flag clicked\nswitch backdrop to (backdrop11 v)\nforever\n    wait (0.5) seconds\n    next costume\nend\n\nwhen backdrop switches to [backdrop1 v]\n\nforever\nend\n\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nchange [ghost v] effect by (50)\nwait (0.5) seconds\nchange [ghost v] effect by (50)\nhide\n\nwhen flag clicked\nforever\n    if <touching (boss v)?> then\n        broadcast (GAME OVER v)\n    end\nend\n\ngo to [front v] layer\nshow\ngo to x: (-184) y: (40)\nset [gravity v] to [5]\nforever\n    change [y vel v] by (-0.5)\n    if <key (right arrow v) pressed?> then\n        point in direction (90)\n        change [x vel v] by (0.7)\n    end\n    if <key (left arrow v) pressed?> then\n        point in direction (-90)\n        change [x vel v] by (-0.7)\n    end\n    set [x vel v] to ((X vel) * (0.9))\n    change x by (X vel)\n    if <touching color (#7f7f7f)?> then\n        change y by (1)\n        if <touching color (#7f7f7f)?> then\n            change y by (1)\n            if <touching color (#7f7f7f)?> then\n                change y by (1)\n                if <touching color (#7f7f7f)?> then\n                    change y by (1)\n                    if <touching color (#7f7f7f)?> then\n                        change y by (1)\n                        if <touching color (#7f7f7f)?> then\n                            change x by ((X vel) * (-1))\n                            change x by (-1)\n                            change y by (-5)\n                            change x by (1)\n                            if <key (up arrow v) pressed?> then\n                                if <(X vel) > [0]> then\n                                    set [x vel v] to [-8]\n                                else\n                                    set [x vel v] to [8]\n                                end\n                                set [y vel v] to [8]\n                            else\n                                set [x vel v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (Y vel)\n    if <touching color (#7f7f7f)?> then\n        change y by ((Y vel) * (-1))\n        set [y vel v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#7f7f7f)?> then\n        if <key (up arrow v) pressed?> then\n            set [y vel v] to [10]\n        end\n    end\n    if <touching color (#8a55d7)?> then\n        go to x: (-200) y: (-120)\n        set [x vel v] to [0]\n        set [y vel v] to [0]\n    end\n    if <key (r v) pressed?> then\n        go to x: (-189) y: (-3)\n    end\n    if <touching (sprite2 v)?> then\n        go to x: (-204) y: (-6)\n        switch backdrop to (next backdrop v)\n    end\n    if <touching color (#ff0000)?> then\n        go to x: (-204) y: (-6)\n    end\nend\n\nif <not <key (left arrow v) pressed?>> then\n    go to (lead v)\nend\n\n@Sprite12\n\nwhen I start as a clone\nchange [ghost v] effect by (50)\nwait (0.5) seconds\nchange [ghost v] effect by (50)\ndelete this clone\n\nwhen backdrop switches to [backdrop1 v]\nhide\nforever\n    point towards (mouse-pointer v)\n    go to (sprite1 v)\n    if <mouse down?> then\n        repeat until <<touching (_edge_ v)?> or <touching (boss v)?>>\n            show\n            move (20) steps\n            create clone of (_myself_ v)\n        end\n        hide\n    end\nend\n\nwhen flag clicked\nhide\n\nchange [color v] effect by (50)\n\n@lead\n\n@Sprite13\n\nwhen backdrop switches to [backdrop15 v]\ngo to x: (-36) y: (138)\nshow\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop8 v]\nhide\n\n@Minions3\n\nwhen backdrop switches to [backdrop15 v]\nshow\nforever\n    move (3) steps\n    turn right (pick random (-20) to (20)) degrees\n    if on edge, bounce\n    if <touching color (#00ff55)?> then\n        change y by (5)\n    end\nend\n\nwhen flag clicked\ngo to x: (-16) y: (105)\nhide\n\nwhen backdrop switches to [backdrop8 v]\nhide\n\n@Minions2\n\nwhen backdrop switches to [backdrop15 v]\nshow\nforever\n    move (3) steps\n    turn right (pick random (-20) to (20)) degrees\n    if on edge, bounce\n    if <touching color (#00ff55)?> then\n        change y by (5)\n    end\nend\n\nwhen flag clicked\ngo to x: (-16) y: (105)\nhide\n\nwhen backdrop switches to [backdrop8 v]\nhide\n\n@Minions4\n\nwhen backdrop switches to [backdrop15 v]\nshow\nforever\n    move (3) steps\n    turn right (pick random (-20) to (20)) degrees\n    if on edge, bounce\n    if <touching color (#00ff55)?> then\n        change y by (5)\n    end\nend\n\nwhen flag clicked\ngo to x: (-16) y: (105)\nhide\n\nwhen backdrop switches to [backdrop8 v]\nhide\n\n@Sprite7\n\nwhen I receive [game over v]\nshow\n\nwhen flag clicked\nhide\n\nwhen I receive [start again v]\nhide\n\n@Sprite14\n\n@HAMBURGEREREREREREr\n\nwhen backdrop switches to [backdrop9 v]\nshow\nset size to (60) %\nforever\n    repeat (15)\n        change size by (1)\n        turn right (1) degrees\n    end\n    repeat (15)\n        change size by (-1)\n        turn right (-1) degrees\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [start again v]\nhide\n\n@HAMBURGEREREREREREr2\n\nwhen backdrop switches to [backdrop9 v]\nshow\nset size to (60) %\nforever\n    repeat (15)\n        change size by (1)\n        turn right (1) degrees\n    end\n    repeat (15)\n        change size by (-1)\n        turn right (-1) degrees\n    end\nend\n\ngo to x: (-36) y: (137)\n\nwhen flag clicked\nhide\n\nwhen I receive [start again v]\nhide\n\n@Sprite15\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\ngo to [front v] layer\ngo [backward v] (1) layers\nwait (3) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\n@Sprite16\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\nset size to (25) %\nrepeat until <(size) = [100]>\n    change size by (5)\nend\nwait (1) seconds\nrepeat (50)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen flag clicked\nrepeat (24)\n    turn right (15) degrees\nend\n\nturn left (15) degrees\n\nwhen flag clicked\nstart sound [Batman Transition - Comical Sound Effect \(HD\).mp3 v]\n\n