The Miner 5 | Platformer with Boss Fight    #games
@Stage\n\nwhen I receive [\[intro\] v]\nstop all sounds\nstop [other scripts in sprite v]\nforever\n    play sound [Creo - Exoplanet v] until done\nend\n\nwhen I receive [start platformer v]\nforever\n    play sound [Tobu - Deja Vu \(Original Mix\).mp3 v] until done\nend\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nwait until <(Level) = [2]>\nswitch backdrop to (woodtexture v)\n\n@Blank\n\n@LuckyLMJ's Health Bar\n\ndefine Draw health bar with a length of ( length ) and a thickness of (thickness) at XY (x) (y) max (max) current (current)\ngo to x: ((x) - (( length ) / (2))) y: (y)\nset pen size to ((thickness) + (3))\npen down\nset pen color to (#000000)\nchange x by ( length )\npen up\ngo to x: ((x) - (( length ) / (2))) y: (y)\nset pen size to (thickness)\npen down\nif <((current) / (max)) < [.2]> then\n    set pen color to (#e81818)\n    set pen shade to (50)\n    change pen shade by (((current) / (max)) * (25))\nelse\n    if <((current) / (max)) < [.5]> then\n        set pen color to (#ee7d16)\n        set pen shade to (50)\n        change pen shade by (((current) / (max)) * (20))\n    else\n        if <((current) / (max)) < [.7]> then\n            set pen color to (#e1a91a)\n            set pen shade to (50)\n            change pen shade by (((current) / (max)) * (15))\n        else\n            set pen shade to (30)\n            set pen color to (#0e9a6c)\n            change pen shade by (((current) / (max)) * (10))\n        end\n    end\nend\nchange x by (((current) / (max)) * ( length ))\npen up\n\nwhen flag clicked\nerase all\nset [_boss health v] to [860]\nset [_p health v] to [16]\n\ngo to x: ((x) - ((size) / (45))) y: ((y) - ((size) / (45)))\n\ngo to x: ((x) - ((size) / (45))) y: ((y) - ((size) / (45)))\n\nwhen I receive [\[intro\] v]\nforever\n    erase all\n    Draw health bar with a length of (200) and a thickness of (10) at XY (0) (160) max (860) current (_boss health)\n    Draw health bar with a length of (50) and a thickness of (8) at XY (-200) (-130) max (16) current (_p health)\nend\n\n@story\n\nwhen flag clicked\nstart sound [Sunshine v]\nswitch costume to (costume2 v)\nshow\nforever\n    if <<key (any v) pressed?> or <mouse down?>> then\n        if <(costume [number v]) = [7]> then\n            stop all sounds\n            stop [other scripts in sprite v]\n            broadcast (start platformer v)\n            hide\n            stop [this script v]\n        end\n        next costume\n        wait until <not <<key (any v) pressed?> or <mouse down?>>>\n    end\nend\n\n@Levels\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [start platformer v]\nshow\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [\[intro\] v]\nhide\n\n@Player\n\ndefine Place Player: (x) (y) Set Size To: (size)\ngo to x: (x) y: (y)\nset size to (size) %\n\nwhen flag clicked\nhide\nset [level v] to [1]\nPlace Player: [-200] [0] Set Size To: [100]\nhide variable [y v]\nhide variable [x v]\nset [y v] to [0]\nset [x v] to [0]\nwait until <(Level) = [9]>\nbroadcast (\[intro\] v)\nstop [other scripts in sprite v]\nhide\n\ndefine Gravity, Platform Detection, Physics....\nforever\n    go to [front v] layer\n    change [y v] by (-1)\n    if <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        point in direction (-90)\n        switch costume to (3 v)\n        change [x v] by (-1)\n    end\n    if <<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        point in direction (90)\n        switch costume to (2 v)\n        change [x v] by (1)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching (levels v)?> then\n        change y by (1)\n    end\n    if <touching (levels v)?> then\n        change y by (1)\n    end\n    if <touching (levels v)?> then\n        change y by (1)\n    end\n    if <touching (levels v)?> then\n        change y by (1)\n    end\n    if <touching (levels v)?> then\n        change y by (-4)\n        change x by ((x) * (-1))\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > [0]>>> then\n            set [y v] to [13]\n            if <(x) > [0]> then\n                set [x v] to [-10]\n            else\n                set [x v] to [10]\n            end\n        else\n            set [x v] to [0]\n        end\n    end\n    change y by (y)\n    if <touching (levels v)?> then\n        change y by ((y) - ((y) * (2)))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <((mouse y) - (y position)) > [50]>>> and <touching (levels v)?>> then\n        set [y v] to [13]\n    end\n    change y by (1)\n    if <<<<touching (ghosts v)?> or <touching (spikes v)?>> or <(y position) < [-175]>> or <key (r v) pressed?>> then\n        Place Player: [-200] [0] Set Size To: [100]\n    end\n    if <(x position) > [230]> then\n        change [level v] by (1)\n        Place Player: [-200] [0] Set Size To: [100]\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (q v) pressed?> then\n        Place Player: [-200] [0] Set Size To: [100]\n        change [level v] by (1)\n        wait (1) seconds\n        if <(Level) = [9]> then\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [start platformer v]\nshow\nGravity, Platform Detection, Physics....\n\nwhen I receive [player die v]\nPlace Player: [-200] [0] Set Size To: [100]\n\n@pewpew\n\nwhen flag clicked\nhide\n\nwhen I receive [start platformer v]\nshow\nforever\n    go to (player v)\n    point in direction ([direction v] of [player v])\nend\n\nwhen I receive [\[intro\] v]\nhide\n\n@ingame bullet\n\nwhen flag clicked\nset size to (35) %\nhide\n\nwhen I receive [start platformer v]\nforever\n    go to (pewpew v)\n    point in direction ([direction v] of [pewpew v])\nend\n\nwhen I receive [start platformer v]\nforever\n    if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n        broadcast (shoot v)\n        wait (1.2) seconds\n    end\nend\n\nwhen I receive [shoot v]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nset [color v] effect to (pick random (1) to (100))\nrepeat until <<touching (levels v)?> or <<touching (ghosts v)?> or <touching (_edge_ v)?>>>\n    move (10) steps\nend\ndelete this clone\n\nwhen I receive [\[intro\] v]\nstop [other scripts in sprite v]\nhide\n\n@mobile\n\nwhen flag clicked\nset size to (70) %\nhide\n\nwhen I receive [start platformer v]\nshow\n\nwhen I receive [start platformer v]\nswitch costume to (costume1 v)\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        broadcast (shoot v)\n        wait (1.2) seconds\n    end\nend\n\nwhen I receive [\[intro\] v]\nset [_shooting? v] to [0]\nswitch costume to (costume2 v)\nstop [other scripts in sprite v]\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        if <(_shooting?) = [1]> then\n            set [_shooting? v] to [0]\n        else\n            set [_shooting? v] to [1]\n        end\n    end\nend\n\nwait (0.1) seconds\n\n@ghosts\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\nwhen I receive [start platformer v]\nwait until <(Level) = [5]>\nset [_cloneid v] to [1]\ncreate clone of (_myself_ v)\nwait until <(Level) = [6]>\nrepeat until <(Level) = [7]>\n    set [_cloneid v] to [2]\n    create clone of (_myself_ v)\n    wait (2.2) seconds\nend\nwait until <(Level) = [8]>\nset [_cloneid v] to [1]\nrepeat (5)\n    wait (0.1) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\nif <(_cloneid) = [1]> then\n    go to x: (300) y: (100)\n    repeat until <<touching (ingame bullet v)?> or <(Level) = [6]>>\n        point towards (player v)\n        move (3) steps\n        if <touching (player v)?> then\n            go to x: (300) y: (100)\n            broadcast (player die v)\n        end\n    end\n    delete this clone\nend\nif <(_cloneid) = [2]> then\n    go to x: (350) y: (200)\n    repeat until <<touching (ingame bullet v)?> or <(Level) = [7]>>\n        point towards (player v)\n        move (3) steps\n        if <touching (player v)?> then\n            go to x: (300) y: (100)\n            broadcast (player die v)\n        end\n    end\n    delete this clone\nend\n\nwhen I receive [\[intro\] v]\nstop [other scripts in sprite v]\nhide\n\n@extra\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [start platformer v]\nshow\ngo to [front v] layer\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [\[intro\] v]\nstop [other scripts in sprite v]\nhide\n\n@eyes\n\nwhen flag clicked\ngo to x: (-52) y: (12)\ngo to [front v] layer\nhide\nwait until <(Level) = [4]>\nshow\ncreate clone of (_myself_ v)\nrepeat until <(Level) = [5]>\n    go to [front v] layer\n    point towards (player v)\nend\nhide\n\nwhen I start as a clone\ngo to x: (83) y: (12)\nrepeat until <(Level) = [5]>\n    go to [front v] layer\n    point towards (player v)\nend\ndelete this clone\n\n@assets\n\n@spikes\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [start platformer v]\nwait until <(Level) = [7]>\nshow\nforever\n    switch costume to ((Level) + (6))\nend\n\nwhen I receive [\[intro\] v]\nstop [other scripts in sprite v]\nhide\n\n@bossfight\n\nwhen I receive [\[intro\] v]\nwait (2) seconds\ngo to [front v] layer\nset [b - defeated v] to [0]\nset [a - clone type \(personal\) v] to [N]\nset [b - attack type \(personal\) v] to [N]\nset [a - clone type \(personal\) v] to [N]\nset [clone type v] to [0]\ncreate clone of (_myself_ v)\nwait (0) seconds\nset [clone type v] to [1]\ncreate clone of (_myself_ v)\nwait (0) seconds\nset [clone type v] to [FLARE]\ncreate clone of (_myself_ v)\nwait (0) seconds\nset [clone type v] to [BOSS]\ncreate clone of (_myself_ v)\nwait (1) seconds\n\nwhen flag clicked\nhide\npoint in direction (90)\ngo to x: (0) y: (0)\n\nset [p - player hp v] to [5]\n\nif <[1] > [50]> then\n    stop [all v]\nend\n\nset [b - boss hurt v] to [0]\n\nif <[10] > (B - Grav)> then\n\nwhen I start as a clone\nif <(Clone Type) = [0]> then\n    show\n    switch costume to (ground v)\n    set [ghost v] effect to (0)\nend\nif <(Clone Type) = [1]> then\n    show\n    switch costume to (player v)\nend\nif <(Clone Type) = [FLARE]> then\n    show\n    set [ghost v] effect to (100)\n    switch costume to (flare v)\n    set [flare v] to [0]\n    forever\n        if <(Flare) = [2]> then\n            switch costume to (win v)\n            set [ghost v] effect to (100)\n            repeat (40)\n                change [ghost v] effect by (-2.5)\n            end\n        end\n        if <(Flare) = [1]> then\n            set [ghost v] effect to (0)\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n        end\n        set [flare v] to [0]\n    end\nend\n\nwhen I start as a clone\nif <(Clone Type) = [1]> then\n    go to x: (0) y: (-130)\n    forever\n        if <not <color (#000000) is touching (#c38d43)?>> then\n            change y by (B - Grav)\n            if <(B - Grav) > [-8]> then\n                change [b - grav v] by (-1)\n            end\n            if <not <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n                set [b - jump v] to [0]\n            end\n        end\n        if <color (#000000) is touching (#c38d43)?> then\n            set [b - grav v] to [0]\n            set [b - jump v] to [1]\n        end\n        if <[-125] > (y position)> then\n            set y to (-132)\n        end\n        if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <(B - Jump) = [1]>> then\n            if <[10] > (B - Grav)> then\n                change [b - grav v] by (5)\n            end\n            if <(B - Grav) > [6.5]> then\n                set [b - jump v] to [0]\n            end\n            change y by (B - Grav)\n        end\n    end\nend\n\nwhen I start as a clone\nif <(Clone Type) = [1]> then\n    go to x: (0) y: (-130)\n    forever\n        set [p - player hp v] to (_p health)\n        set rotation style [all around v]\n        if <<key (a v) pressed?> or <<key (left arrow v) pressed?> or <<mouse down?> and <(x position) > (mouse x)>>>> then\n            repeat until <not <<key (a v) pressed?> or <<key (left arrow v) pressed?> or <<mouse down?> and <(x position) > (mouse x)>>>>>\n                switch costume to (player2 v)\n                set [p - facing v] to [-90]\n                change x by (-5)\n            end\n        end\n        if <<key (d v) pressed?> or <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n            repeat until <not <<key (d v) pressed?> or <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>>>\n                switch costume to (player v)\n                set [p - facing v] to [90]\n                change x by (5)\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(Clone Type) = [1]> then\n    forever\n        set [p - player y loc v] to (y position)\n        set [p - player x loc v] to (x position)\n    end\nend\nif <(A - Clone Type \(Personal\)) = [Bullet]> then\n    show\n    go to x: (P - Player X Loc) y: (P - Player Y Loc)\n    switch costume to (bullet v)\n    point towards (mouse-pointer v)\n    repeat until <<touching color (#666666)?> or <touching (_edge_ v)?>>\n        move (10) steps\n    end\n    change [ghost v] effect by (100)\n    wait (0.1) seconds\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone Type) = [1]> then\n    forever\n        if <<key (space v) pressed?> or <(_shooting?) = [1]>> then\n            set [a - clone type \(personal\) v] to [Bullet]\n            set [clone type v] to [N]\n            create clone of (_myself_ v)\n            wait (0.3) seconds\n            if <(B - DEFEATED) = [1]> then\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(B - Attack Type \(Personal\)) = [1]> then\n    clear graphic effects\n    show\n    go to x: (S - Summon/Boss X Pos) y: (S - Summon Bullet Y)\n    go to [front v] layer\n    switch costume to (boss bullet v)\n    point in direction (B - Attack Aim \(Personal\))\n    repeat (200)\n        move (5) steps\n    end\n    delete this clone\nend\nif <(B - Attack Type \(Personal\)) = [2]> then\n    clear graphic effects\n    show\n    go to x: (P - Player X Loc) y: (-132)\n    switch costume to (warning v)\n    repeat (10)\n        show\n        wait (0) seconds\n        hide\n        wait (0) seconds\n    end\n    delete this clone\nend\nif <(B - Attack Type \(Personal\)) = [4]> then\n    clear graphic effects\n    show\n    switch costume to (laser v)\n    Laser Attack [-120]\nend\nif <(B - Attack Type \(Personal\)) = [5]> then\n    clear graphic effects\n    show\n    switch costume to (laser v)\n    Laser Attack [120]\nend\nif <(B - Attack Type \(Personal\)) = [6]> then\n    clear graphic effects\n    show\n    go to x: (S - Boss X Pos) y: (42)\n    go to [front v] layer\n    switch costume to (wave bomb v)\n    point in direction (180)\n    repeat (45)\n        change y by (-4)\n    end\n    set [s - summon/boss x pos v] to (x position)\n    set [b - attack type \(personal\) v] to [7]\n    create clone of (_myself_ v)\n    set [s - summon/boss x pos v] to (x position)\n    set [b - attack type \(personal\) v] to [8]\n    create clone of (_myself_ v)\n    switch costume to (boom v)\n    wait (0.05) seconds\n    repeat (2)\n        next costume\n        wait (0.05) seconds\n    end\n    hide\n    delete this clone\nend\nif <(B - Attack Type \(Personal\)) = [7]> then\n    set rotation style [left-right v]\n    clear graphic effects\n    show\n    go to x: (S - Summon/Boss X Pos) y: (-143)\n    go to [front v] layer\n    switch costume to (wave v)\n    point in direction (90)\n    repeat (100)\n        change x by (5)\n    end\n    delete this clone\nend\nif <(B - Attack Type \(Personal\)) = [8]> then\n    set rotation style [left-right v]\n    clear graphic effects\n    show\n    go to x: (S - Summon/Boss X Pos) y: (-143)\n    go to [front v] layer\n    switch costume to (wave v)\n    point in direction (-90)\n    repeat (100)\n        change x by (-5)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(B - Attack Type \(Personal\)) = [1]> then\n    forever\n        repeat (5)\n            change size by (3)\n        end\n        repeat (5)\n            change size by (-3)\n        end\n    end\nend\nif <(B - Attack Type \(Personal\)) = [3]> then\n    hide\n    point in direction (90)\n    go to x: (P - Player X Loc) y: (-132)\n    wait (1) seconds\n    go to [back v] layer\n    clear graphic effects\n    show\n    switch costume to (spike attack v)\n    repeat (3)\n        change y by (15)\n    end\n    wait (0.5) seconds\n    repeat (3)\n        change y by (-15)\n    end\n    delete this clone\nend\nif <<(B - Attack Type \(Personal\)) = [4]> or <(B - Attack Type \(Personal\)) = [5]>> then\n    forever\n        repeat (3)\n            change size by (4)\n        end\n        repeat (3)\n            change size by (-4)\n        end\n    end\nend\nif <(B - Attack Type \(Personal\)) = [6]> then\n    repeat until <[20] < (costume [number v])>\n        if <[20] < (costume [number v])> then\n            stop [this script v]\n        end\n        switch costume to (wave bomb v)\n        wait (0.03) seconds\n        repeat (3)\n            if <[20] < (costume [number v])> then\n                stop [this script v]\n            end\n            next costume\n            wait (0.03) seconds\n        end\n        if <[20] < (costume [number v])> then\n            stop [this script v]\n        end\n        switch costume to (wave bomb v)\n        wait (0.03) seconds\n    end\nend\n\nwhen I start as a clone\nif <(Clone Type) = [BOSS]> then\n    set [b - boss hurt v] to [0]\n    forever\n        if <touching color (#ffe800)?> then\n            set [brightness v] effect to (20)\n            wait (0.015) seconds\n            set [brightness v] effect to (0)\n            change [b - boss hurt v] by (1)\n            if <(B - DEFEATED) = [1]> then\n                go to x: (0) y: (42)\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(Clone Type) = [BOSS]> then\n    point in direction (180)\n    show\n    go to [back v] layer\n    switch costume to (crystal boss v)\n    go to x: (0) y: (-200)\n    set [b - velocity v] to [7]\n    repeat (70)\n        change y by (B - Velocity)\n        change [b - velocity v] by (-0.1)\n    end\n    forever\n        if <(x position) > (P - Player X Loc)> then\n            change x by (-2)\n        else\n            change x by (2)\n        end\n        if <(B - DEFEATED) = [1]> then\n            go to x: (0) y: (42)\n            stop [this script v]\n        end\n    end\nend\n\nwhen I start as a clone\nif <(Clone Type) = [BOSS]> then\n    wait (2) seconds\n    set [b - phase v] to [1]\n    if <(B - Phase) = [1]> then\n        repeat until <not <(B - Phase) = [1]>>\n            repeat (4)\n                Bullet Attack [180]\n                wait (0.2) seconds\n            end\n            wait (1) seconds\n        end\n    end\n    if <(B - Phase) = [2]> then\n        repeat until <not <(B - Phase) = [2]>>\n            repeat (3)\n                Spike\n                wait (0.2) seconds\n            end\n            repeat (5)\n                Bullet Attack [-145]\n                Bullet Attack [145]\n                Bullet Attack [-160]\n                Bullet Attack [160]\n                wait (0.2) seconds\n            end\n            wait (1) seconds\n        end\n    end\n    if <(B - Phase) = [3]> then\n        repeat (4)\n            set [b - attack type \(personal\) v] to [4]\n            create clone of (_myself_ v)\n            set [b - attack type \(personal\) v] to [5]\n            create clone of (_myself_ v)\n            wait (0.5) seconds\n        end\n        wait (2) seconds\n        repeat until <not <(B - Phase) = [3]>>\n            set [b - attack type \(personal\) v] to [4]\n            create clone of (_myself_ v)\n            set [b - attack type \(personal\) v] to [6]\n            create clone of (_myself_ v)\n            wait (2) seconds\n            set [b - attack type \(personal\) v] to [5]\n            create clone of (_myself_ v)\n            set [b - attack type \(personal\) v] to [6]\n            create clone of (_myself_ v)\n            wait (2) seconds\n        end\n        set [flare v] to [1]\n        set [b - defeated v] to [1]\n        repeat (10)\n            change x by (5)\n            wait (0) seconds\n            change x by (-5)\n            wait (0) seconds\n        end\n        wait (0.2) seconds\n        clear graphic effects\n        switch costume to (cracked v)\n        wait (0.5) seconds\n        switch costume to (cracked2 v)\n        repeat (3)\n            change y by (-0.8)\n        end\n        switch costume to (cracked3 v)\n        repeat (10)\n            change [ghost v] effect by (10)\n            change y by (-1)\n        end\n        set [flare v] to [2]\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nif <(Clone Type) = [1]> then\n    forever\n        if <touching color (#fc3f3f)?> then\n            change [_p health v] by (-1)\n            repeat (20)\n                show\n                wait (0) seconds\n                hide\n                wait (0) seconds\n            end\n            show\n        end\n    end\nend\n\nwhen [m v] key pressed\nstop [all v]\n\nwhen I start as a clone\nif <(Clone Type) = [BOSS]> then\n    forever\n        if <(B - DEFEATED) = [1]> then\n            stop [this script v]\n        end\n        switch costume to (crystal boss v)\n        wait (0.3) seconds\n        repeat (3)\n            if <(B - DEFEATED) = [1]> then\n                stop [this script v]\n            end\n            next costume\n            wait (0.05) seconds\n        end\n        if <(B - DEFEATED) = [1]> then\n            stop [this script v]\n        end\n        switch costume to (crystal boss v)\n        wait (0.05) seconds\n        wait (0.8) seconds\n    end\nend\n\nwhen I start as a clone\nif <(Clone Type) = [BOSS]> then\n    wait (1) seconds\n    forever\n        if <touching color (#ff0000)?> then\n            change [_boss health v] by (-1)\n        end\n        if <[550] > (_boss health)> then\n            set [b - phase v] to [2]\n            if <[380] > (_boss health)> then\n                set [b - phase v] to [3]\n                if <[250] > (_boss health)> then\n                    set [b - phase v] to [3]\n                    if <[2] > (_boss health)> then\n                        set [b - phase v] to [4]\n                        stop [this script v]\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Bullet Attack (aim)\nset [s - summon/boss x pos v] to [N]\nset [clone type v] to [N]\nset [b - attack aim \(personal\) v] to (aim)\nset [b - attack type \(personal\) v] to [1]\nset [s - summon bullet y v] to (y position)\nset [s - summon/boss x pos v] to (x position)\ncreate clone of (_myself_ v)\n\ndefine Spike\nset [clone type v] to [N]\nset [b - attack type \(personal\) v] to [2]\ncreate clone of (_myself_ v)\nwait (0) seconds\nset [b - attack type \(personal\) v] to [3]\ncreate clone of (_myself_ v)\n\ndefine Laser Attack (aim)\ngo to [front v] layer\nset size to (100) %\npoint in direction (aim)\nrepeat (10)\n    hide\n    wait (0) seconds\n    show\n    wait (0) seconds\nend\nrepeat (50)\n    if <(direction) < [0]> then\n        turn left (1) degrees\n    else\n        turn left (-1) degrees\n    end\nend\nif <<[-179] < (direction)> and <(direction) < [-160]>> then\n    repeat (10)\n        show\n        turn left (-0.3) degrees\n        wait (0) seconds\n        hide\n        turn left (-0.3) degrees\n        wait (0) seconds\n    end\nelse\n    repeat (10)\n        show\n        turn left (0.3) degrees\n        wait (0) seconds\n        hide\n        turn left (0.3) degrees\n        wait (0) seconds\n    end\nend\n\nwhen I start as a clone\nif <<(B - Attack Type \(Personal\)) = [4]> or <(B - Attack Type \(Personal\)) = [5]>> then\n    forever\n        go to x: (S - Boss X Pos) y: (42)\n    end\nend\n\nwhen I start as a clone\nif <(Clone Type) = [BOSS]> then\n    forever\n        set [s - boss x pos v] to (x position)\n        if <(B - DEFEATED) = [1]> then\n            go to x: (0) y: (42)\n            stop [this script v]\n        end\n    end\nend\n\nwhen I start as a clone\nif <(Clone Type) = [BOSS]> then\n    wait until <(B - DEFEATED) = [1]>\nend\n\nshow\n\n@cover\n\nwhen flag clicked\nhide\n\nwhen I receive [\[intro\] v]\nshow\nset [ghost v] effect to (35)\ngo to [front v] layer\nswitch costume to (costume1 v)\nwait (2) seconds\nswitch costume to (costume2 v)\nwait (2) seconds\nswitch costume to (costume4 v)\nforever\n    if <(_p health) < [1]> then\n        broadcast (gg v)\n    end\nend\n\nwhen I receive [gg v]\nswitch costume to (costume3 v)\nclear graphic effects\ngo to [front v] layer\nstop [all v]\n\n@thumbnail\n\nwhen flag clicked\nhide\n\ngo to [front v] layer\n\n
double click flag if it has glitches\nMobile friendly (tap through the story)\nWAD or arrows to move\nDown arrow or S to shoot\nQ to skip level\nOn boss fight, mouse to aim \nPlay the other miner games before this!\nMiner 4: https://scratch.mit.edu/projects/493219444/\nMiner 1: https://scratch.mit.edu/projects/486252650/\n\nHeart, star, follow if you enjoyed!