=LASER BEAM= - A platformer
@Stage\n\nwhen flag clicked\nforever\n    play sound [No Time To Explain OST Main Theme v] until done\nend\n\n@player\n\nwhen flag clicked\nshow\ngo to x: (-218) y: (0)\nset [yv v] to [0]\nset [xv v] to [0]\nforever\n    if <<mouse down?> and <(energy) > [0]>> then\n        if <<(direction) < [181]> and <(direction) > [99]>> then\n            change [yv v] by ((direction) / (100))\n        end\n        if <<(direction) < [-99]> and <(direction) > [-181]>> then\n            change [yv v] by ((direction) / (-100))\n        end\n        if <<(direction) < [81]> and <(direction) > [-1]>> then\n            change [yv v] by ((direction) / (-100))\n        end\n        if <<(direction) < [1]> and <(direction) > [-81]>> then\n            change [yv v] by ((direction) / (100))\n        end\n        change y by (-1)\n        if <not <touching (level v)?>> then\n            if <<(direction) < [91]> and <(direction) > [9]>> then\n                change [xv v] by ((direction) / (-60))\n            end\n            if <<(direction) < [171]> and <(direction) > [89]>> then\n                change [xv v] by (((direction) - (180)) / (60))\n            end\n            if <<(direction) < [-9]> and <(direction) > [-91]>> then\n                change [xv v] by ((direction) / (-60))\n            end\n            if <<(direction) < [-89]> and <(direction) > [-171]>> then\n                change [xv v] by (((direction) + (180)) / (60))\n            end\n        end\n        change y by (1)\n    else\n    end\n    change [yv v] by (-1)\n    if <key (d v) pressed?> then\n        change [xv v] by (0.5)\n    end\n    if <key (a v) pressed?> then\n        change [xv v] by (-0.5)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change y by (-5)\n                            change x by ((Xv) * (-1))\n                            set [xv v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (Yv)\n    if <touching (level v)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-2)\n    if <touching (level v)?> then\n        set [energy v] to [30]\n    end\n    change y by (2)\n    point towards (mouse-pointer v)\n    if <mouse down?> then\n        set rotation style [left-right v]\n    end\n    if <<touching (spike v)?> or <<<[-175] > (y position)> or <<touching (boss body v)?> and <(boss) = [1]>>> or <<touching (boss rocket v)?> or <touching color (#ff0000)?>>>> then\n        go to x: (-218) y: (-70)\n        set [boss health v] to [200]\n        set [xv v] to [0]\n        set [yv v] to [0]\n        set [move v] to [0]\n    end\n    if <<(x position) > [230]> and <(boss) = [0]>> then\n        go to x: (-218) y: (-70)\n        set [xv v] to [0]\n        set [yv v] to [0]\n        set [move v] to [0]\n        broadcast (Next v)\n    end\nend\n\n@laser\n\nwhen flag clicked\nshow\nforever\n    go to (player gun v)\n    if <(energy) > [-1]> then\n        if <mouse down?> then\n            if <(energy) > [0]> then\n                change [energy v] by (-0.7)\n                if <[10] < (size)> then\n                    change [move v] by (2)\n                end\n                laser\n            else\n                pen up\n                erase all\n                set [size v] to [0]\n            end\n        else\n            repeat until <(size) < [1]>\n                change [size v] by (-15)\n                laser\n            end\n            set [size v] to [0]\n            pen up\n            erase all\n        end\n    else\n        repeat until <(size) < [1]>\n            change [size v] by (-15)\n            laser\n        end\n        pen up\n        erase all\n        set [size v] to [0]\n    end\nend\n\ndefine laser\nshow\npen up\nerase all\nset pen color to (#00ffe5)\nset pen (saturation v) to (100)\nset pen (transparency v) to (0)\nset pen size to (size)\npen up\ngo to (player gun v)\npoint in direction ([direction v] of [player gun v])\nmove (20) steps\nset [step v] to [0]\nrepeat until <<touching (_edge_ v)?> or <<touching (level v)?> or <touching (boss body v)?>>>\n    move (5) steps\n    change [step v] by (5)\nend\nchange pen size by (15)\npen down\npen up\nchange pen (transparency v) by (20)\nset pen (transparency v) to (0)\nset pen size to (size)\nset pen (saturation v) to (100)\ngo to (player gun v)\npoint in direction ([direction v] of [player gun v])\nmove (20) steps\npen down\nrepeat until <<touching (_edge_ v)?> or <<touching (level v)?> or <touching (boss body v)?>>>\n    move (5) steps\nend\nchange pen size by (15)\npen down\npen up\nchange pen size by ((size) * (-1))\nset pen (saturation v) to (0)\nset pen size to ((size) / (2))\npen up\ngo to (player gun v)\npoint in direction ([direction v] of [player gun v])\nmove (20) steps\npen down\nrepeat until <<touching (_edge_ v)?> or <<touching (level v)?> or <touching (boss body v)?>>>\n    move (5) steps\nend\nchange pen size by (15)\npen down\npen up\nchange pen size by ((size) * (-1))\n\nwhen flag clicked\nset [size v] to [0]\nforever\n    if <mouse down?> then\n        if <(energy) > [0]> then\n            start sound [laser v]\n        end\n        if <(energy) < [10]> then\n            if <(size) < (energy)> then\n                change [size v] by (7)\n            end\n            change [size v] by (-2)\n        else\n            if <(size) < [30]> then\n                change [size v] by (7)\n            end\n        end\n    else\n    end\nend\n\nwhen flag clicked\nforever\n    if <(size) > [0]> then\n        repeat (2)\n            change [size v] by (5)\n        end\n        repeat (2)\n            change [size v] by (-5)\n        end\n    end\nend\n\n@player gun\n\nwhen flag clicked\nforever\n    point towards (mouse-pointer v)\n    go to (player v)\n    if <(direction) > [0]> then\n        switch costume to (costume1 v)\n    else\n        switch costume to (costume2 v)\n    end\nend\n\n@level\n\nwhen flag clicked\nset [level v] to [0]\ngo to x: (0) y: (0)\nswitch costume to (1 v)\n\nwhen I receive [next v]\nchange [level v] by (1)\nnext costume\nif <(level) = [12]> then\n    broadcast (boss v)\nend\nif <(level) = [13]> then\n    broadcast (boss die v)\nend\n\nwhen flag clicked\nforever\n    if <key (right arrow v) pressed?> then\n        broadcast (Next v)\n        wait until <not <key (right arrow v) pressed?>>\n    end\nend\n\n@spike\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (1 v)\n\nwhen I receive [next v]\nnext costume\n\n@spining thing\n\nwhen flag clicked\ngo to [front v] layer\ngo [backward v] (1) layers\nset [spin v] to [1]\nforever\n    if <mouse down?> then\n        switch costume to (costume2 v)\n        if <(spin) < [50]> then\n            change [spin v] by (5)\n        end\n    else\n        switch costume to (costume1 v)\n        if <(spin) > [10]> then\n            change [spin v] by (-5)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    go to (mouse-pointer v)\n    turn right (spin) degrees\nend\n\nset [spin v] to [5]\n\n@thumb nail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\nhide variable [energy v]\nwait (1) seconds\ngo to [front v] layer\nrepeat (25)\n    go to [front v] layer\n    change [ghost v] effect by (4)\nend\nshow variable [energy v]\n\n@boss body\n\nwhen flag clicked\nhide\n\nwhen I receive [boss v]\ngo to [front v] layer\ngo [backward v] (2) layers\nshow\nset [boss v] to [1]\nset [boss health v] to [200]\nswitch costume to (costume1 v)\nforever\n    wait (4) seconds\n    switch costume to (costume2 v)\n    wait (2) seconds\n    broadcast (boss laser v)\n    repeat (60)\n    switch costume to (costume1 v)\nend\n\nwhen I receive [boss v]\nwait (3) seconds\nforever\n    repeat (3)\n        create clone of (boss rocket v)\n        wait (1) seconds\n    end\n    wait (5) seconds\nend\n\nwhen I receive [boss v]\ngo to x: (0) y: (130)\npoint in direction (90)\nturn left (-3.5) degrees\nforever\n    turn right (degree) degrees\n    if <touching (laser v)?> then\n        start sound [Crank v]\n        change [boss health v] by (-1)\n    end\nend\n\nwhen I receive [boss v]\nforever\n    if <(boss health) < [1]> then\n        stop [other scripts in sprite v]\n        set [boss v] to [0]\n        point in direction (90)\n        go to [back v] layer\n        switch costume to (costume3 v)\n        pen up\n        erase all\n        repeat (50)\n            change y by (-5)\n            create clone of (explode v)\n        end\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I receive [boss v]\nset [degree v] to [0]\nwait (0.1) seconds\nforever\n    repeat (10)\n        change [degree v] by (-0.1)\n    end\n    repeat (20)\n        change [degree v] by (0.1)\n    end\n    repeat (10)\n        change [degree v] by (-0.1)\n    end\nend\n\nwhen I receive [boss die v]\nstop [other scripts in sprite v]\nset [boss v] to [0]\nhide\ngo to [back v] layer\nstop [this script v]\n\n@boss eyes\n\nwhen flag clicked\nset [boss v] to [0]\nforever\n    if <(boss) = [1]> then\n        go to [front v] layer\n        go [backward v] (1) layers\n        show\n        go to (boss body v)\n        change y by (15)\n        point towards (player v)\n    else\n        hide\n    end\nend\n\n@boss rocket\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nset [bullet health v] to [100]\nforever\n    if <(boss) = [0]> then\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nshow\nset [follow v] to [0]\ngo to (boss body v)\npoint in direction (180)\nrepeat (10)\n    move (10) steps\nend\nset [bullet move v] to [0]\npoint towards (player v)\nrepeat until <<touching (_edge_ v)?> or <touching (level v)?>>\n    change [bullet move v] by (1)\n    move (bullet move) steps\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        wait (0.1) seconds\n        delete this clone\n    end\nend\n\n@boss laser\n\ndefine boss laser\npen down\nset pen color to (#ff0000)\nset pen size to (boss laser size)\nset pen (saturation v) to (100)\npen up\ngo to (boss body v)\npoint in direction ([direction v] of [boss body v])\nturn right (90) degrees\npen down\nrepeat until <touching (level v)?>\n    move (5) steps\nend\nchange pen size by (20)\npen up\nset pen (saturation v) to (0)\nset pen size to ((boss laser size) / (3))\npen up\ngo to (boss body v)\npoint in direction ([direction v] of [boss body v])\nturn right (90) degrees\npen down\nrepeat until <touching (level v)?>\n    move (5) steps\nend\n\nwhen I receive [boss laser v]\nrepeat (60)\n    boss laser\nend\n\nwhen flag clicked\nchange [☁ player v] by (1)\nset [boss laser size v] to [80]\nforever\n    repeat (2)\n        change [boss laser size v] by (10)\n    end\n    repeat (2)\n        change [boss laser size v] by (-10)\n    end\nend\n\n@explode\n\nwhen I start as a clone\ngo to [back v] layer\ngo [forward v] (1) layers\ngo to (boss body v)\nchange y by (pick random (50) to (-50))\nchange x by (pick random (200) to (-200))\nshow\nset size to (200) %\nrepeat (10)\n    change [ghost v] effect by (10)\n    change size by (-40)\nend\n\nwhen flag clicked\nhide\n\n
WELCOME TO =LASER BEAM=!!!\n----------------------------HOW TO PLAY-------------------------\n-A D to move\n-mouse to shoot\n-shoot your laser beam to the ground  to fly\n-you can't jump\n-top left is your energy, touch the ground to charge\n-if the level and boss fight are too hard then use right arrow to skip\n-the boss will reset health if you die\n-all level possible