Smash It (mobile friendly) 100%pen (no platformer)

Instructions: You constantly loose hp\nuse your mouse/finger to aim. Than release to shoot in direction.\nWhile you're aiming it's slow mo but you're loose life\n\nred dots: regenerate 7 life, +5 score\nsmall yellow dots: regenerate 10 life, +15 score\npink dots: shoots you in random direction\nblack dots: kills you

@Stage\n\n@Sprite1\n\nwhen flag clicked\nset [mode v] to [menu]\ndelete all of [trial_xs v]\ndelete all of [trial_ys v]\nforever\n    if <(mode) = [menu]> then\n        MENU\n    end\n    if <(mode) = [game]> then\n        GAME\n    end\n    if <(mode) = [game over]> then\n        set [mode v] to [menu]\n    end\nend\n\ndefine setup\ndelete all of [dot v]\ndelete all of [xs v]\ndelete all of [ys v]\ncreate dots amount: [300]\nerase all\npen up\nset [x v] to [0]\nset [y v] to [-140]\nset [xv v] to [0]\nset [yv v] to [0]\nset [hp v] to [100]\nset [screen_shake_x v] to [0]\nset [screen_shake_y v] to [0]\nset [score v] to [0]\n\ndefine make ground from x: (x) y: (y) to X: (x) Y: (y)\nset pen color to (#ffffff)\nset pen size to (100)\nif <(y) > (OnScreenvar_y)> then\n    set y to (((y) - (50)) - (y))\n    if <(x) > (OnScreenvar_x)> then\n        set x to ((x) + (x))\n        pen down\n        set x to (240)\n        pen up\n    else\n        set x to (-240)\n        pen down\n        set x to (240)\n        pen up\n    end\nend\n\ndefine onScreen\nset [onscreenvar_x v] to ((x) - (240))\nset [onscreenvar_y v] to ((y) - (180))\nset [onscreenvar_x2 v] to ((x) + (240))\nset [onscreenvar_y2 v] to ((y) + (180))\n\ndefine make wall1 from x: (x) y: (y) to X: (x) Y: (y)\nset pen color to (#ffffff)\nset pen size to (25)\nif <(x) > (OnScreenvar_x2)> then\n\ndefine make wall2 from x: (x) y: (y) to X: (x) Y: (y)\nif <(OnScreenvar_x) > (x)> then\n\ndefine detect wall\nif <<(x) = [490]> or <[490] < (x)>> then\n    set [x v] to [490]\nend\nif <<(x) = [-490]> or <(x) < [-490]>> then\n    set [x v] to [-490]\nend\nif <<(y) = [-140]> or <(y) < [-140]>> then\n    set [y v] to [-140]\n    set [yv v] to [0]\nend\n\ndefine make Arena\nmake ground from x: [-500] y: [-151] to X: [500] Y: [-150]\nmake wall1 from x: [515] y: [-150] to X: [500] Y: [20000]\nmake wall2 from x: [-515] y: [-150] to X: [-500] Y: [200000]\n\ndefine create dots amount: (amount)\nrepeat (amount)\n    set [random v] to (pick random (0) to (10))\n    if <(random) = [1]> then\n        add [2] to [dot v]\n    else\n        if <(random) = [2]> then\n            add [3] to [dot v]\n        else\n            if <(random) = [3]> then\n                add [4] to [dot v]\n            else\n                add [1] to [dot v]\n            end\n        end\n    end\n    add (pick random (-490) to (490)) to [xs v]\n    add (pick random (-100) to (2500)) to [ys v]\nend\n\ndefine update dots (amount)\nset [dot v] to [1]\npen up\nrepeat (amount)\n    if <(item (dot) of [dot v]) = [1]> then\n        if <<<(OnScreenvar_x2) > (item (dot) of [xs v])> and <(item (dot) of [xs v]) > (OnScreenvar_x)>> and <<(OnScreenvar_y2) > (item (dot) of [ys v])> and <(item (dot) of [ys v]) > (OnScreenvar_y)>>> then\n            go to x: ((item (dot) of [xs v]) - (x)) y: ((item (dot) of [ys v]) - (y))\n            set pen size to (25)\n            set pen color to (#ff2a2a)\n            pen down\n        end\n    end\n    if <(item (dot) of [dot v]) = [2]> then\n        if <<<(OnScreenvar_x2) > (item (dot) of [xs v])> and <(item (dot) of [xs v]) > (OnScreenvar_x)>> and <<(OnScreenvar_y2) > (item (dot) of [ys v])> and <(item (dot) of [ys v]) > (OnScreenvar_y)>>> then\n            go to x: ((item (dot) of [xs v]) - (x)) y: ((item (dot) of [ys v]) - (y))\n            set pen size to (15)\n            set pen color to (#fff728)\n            pen down\n        end\n    end\n    if <(item (dot) of [dot v]) = [3]> then\n        if <<<(OnScreenvar_x2) > (item (dot) of [xs v])> and <(item (dot) of [xs v]) > (OnScreenvar_x)>> and <<(OnScreenvar_y2) > (item (dot) of [ys v])> and <(item (dot) of [ys v]) > (OnScreenvar_y)>>> then\n            go to x: ((item (dot) of [xs v]) - (x)) y: ((item (dot) of [ys v]) - (y))\n            set pen size to (25)\n            set pen color to (#ff289a)\n            pen down\n        end\n    end\n    if <(item (dot) of [dot v]) = [4]> then\n        if <<<(OnScreenvar_x2) > (item (dot) of [xs v])> and <(item (dot) of [xs v]) > (OnScreenvar_x)>> and <<(OnScreenvar_y2) > (item (dot) of [ys v])> and <(item (dot) of [ys v]) > (OnScreenvar_y)>>> then\n            go to x: ((item (dot) of [xs v]) - (x)) y: ((item (dot) of [ys v]) - (y))\n            set pen size to (25)\n            set pen color to (#000000)\n            pen down\n        end\n    end\n    change [dot v] by (1)\n    pen up\nend\nset [dot v] to [1]\nrepeat (amount)\n    if <(item (dot) of [dot v]) = [1]> then\n        if <<<(OnScreenvar_x2) > (item (dot) of [xs v])> and <(item (dot) of [xs v]) > (OnScreenvar_x)>> and <<(OnScreenvar_y2) > (item (dot) of [ys v])> and <(item (dot) of [ys v]) > (OnScreenvar_y)>>> then\n            go to x: ((item (dot) of [xs v]) - (x)) y: ((item (dot) of [ys v]) - (y))\n            set pen size to (36)\n            set pen color to (#ff2a2a)\n            set pen (transparency v) to (60)\n            pen down\n        end\n    end\n    if <(item (dot) of [dot v]) = [2]> then\n        if <<<(OnScreenvar_x2) > (item (dot) of [xs v])> and <(item (dot) of [xs v]) > (OnScreenvar_x)>> and <<(OnScreenvar_y2) > (item (dot) of [ys v])> and <(item (dot) of [ys v]) > (OnScreenvar_y)>>> then\n            go to x: ((item (dot) of [xs v]) - (x)) y: ((item (dot) of [ys v]) - (y))\n            set pen size to (22)\n            set pen color to (#fff728)\n            set pen (transparency v) to (60)\n            pen down\n        end\n    end\n    if <(item (dot) of [dot v]) = [3]> then\n        if <<<(OnScreenvar_x2) > (item (dot) of [xs v])> and <(item (dot) of [xs v]) > (OnScreenvar_x)>> and <<(OnScreenvar_y2) > (item (dot) of [ys v])> and <(item (dot) of [ys v]) > (OnScreenvar_y)>>> then\n            go to x: ((item (dot) of [xs v]) - (x)) y: ((item (dot) of [ys v]) - (y))\n            set pen size to (36)\n            set pen color to (#ff289a)\n            set pen (transparency v) to (60)\n            pen down\n        end\n    end\n    if <(item (dot) of [dot v]) = [4]> then\n        if <<<(OnScreenvar_x2) > (item (dot) of [xs v])> and <(item (dot) of [xs v]) > (OnScreenvar_x)>> and <<(OnScreenvar_y2) > (item (dot) of [ys v])> and <(item (dot) of [ys v]) > (OnScreenvar_y)>>> then\n            go to x: ((item (dot) of [xs v]) - (x)) y: ((item (dot) of [ys v]) - (y))\n            set pen size to (36)\n            set pen color to (#000000)\n            set pen (transparency v) to (60)\n            pen down\n        end\n    end\n    change [dot v] by (1)\n    pen up\nend\n\ndefine make hp bar (hp)\nset pen size to (10)\ngo to x: (170) y: (163)\nchange pen size by (3)\nset pen color to (#9e9e9e)\npen down\nchange x by (50)\npen up\nchange pen size by (-5)\ngo to x: (170) y: (163)\nset pen color to (#3ede00)\nchange pen (color v) by (((hp) - (75)) / (2.5))\npen down\nchange x by ((hp) / (2))\npen up\n\ndefine make background\nset pen color to (#525252)\nset pen size to (5000)\npen down\npen up\n\ndefine game\nchange [yv v] by (-0.4)\nchange [y v] by (yv)\nif <mouse down?> then\n    point towards (mouse-pointer v)\n    set [speed v] to ((distance to [mouse-pointer v]) / (4))\nend\nif <(slo mo?) = [1]> then\n    move ((speed) / (24)) steps\n    change [hp v] by (-0.8)\n    reset timer\nelse\n    regenerate hp\n    move (speed) steps\n    set [speed v] to ((speed) / (1.1))\nend\nchange [x v] by (x position)\nchange [y v] by (y position)\n\ndefine mouse thingy\npen up\ngo to x: (0) y: (0)\nif <mouse down?> then\n    set [slo mo? v] to [1]\n    set pen size to ((distance to [mouse-pointer v]) / (17))\n    set pen color to (#e6e6e6)\n    pen down\n    repeat until <<(round (mouse x)) = (x position)> and <(round (mouse y)) = (y position)>>\n        set pen size to ((distance to [mouse-pointer v]) / (17))\n        point towards (mouse-pointer v)\n        move ((distance to [mouse-pointer v]) / (7)) steps\n        set [yv v] to [0]\n    end\nelse\n    set [slo mo? v] to [0]\nend\npen up\n\ndefine regenerate hp\nif <(hp) > [100]> then\n    set [hp v] to [100]\nend\nif <<(timer) > [1]> and <not <(hp) > [100]>>> then\n    change [hp v] by (-0.6)\nend\n\ndefine draw player\ngo to x: (screen_shake_x) y: (screen_shake_y)\nset pen size to (25)\nset pen color to (#009dff)\npen down\npen up\nset pen color to (#009dff)\nset pen size to (36)\nset pen (transparency v) to (60)\nchange pen size by ()\npen down\npen up\n\ndefine detect dots\nset [dot v] to [0]\nrepeat until <(dot) = [151]>\n    if <<<[20] > ((x) - (item (dot) of [xs v]))> and <((x) - (item (dot) of [xs v])) > [-20]>> and <<[20] > ((y) - (item (dot) of [ys v]))> and <((y) - (item (dot) of [ys v])) > [-20]>>> then\n        if <<((speed) + ([abs v] of (yv) )) > [10]> and <(slo mo?) = [0]>> then\n            replace item (dot) of [xs v] with (pick random (-490) to (490))\n            replace item (dot) of [ys v] with (pick random (-100) to (2500))\n            set [yv v] to [4]\n            if <(item (dot) of [dot v]) = [1]> then\n                change [score v] by (5)\n                change [hp v] by (7)\n                set [speed v] to ((speed) / (1.5))\n                point in direction (pick random (-60) to (60))\n            end\n            if <(item (dot) of [dot v]) = [2]> then\n                change [hp v] by (10)\n                change [score v] by (10)\n                turn right (pick random (-60) to (60)) degrees\n                set [speed v] to ((speed) / (2))\n            end\n            if <(item (dot) of [dot v]) = [3]> then\n                change [score v] by (0)\n                set [speed v] to (speed)\n                point in direction (pick random (0) to (360))\n            end\n            if <(item (dot) of [dot v]) = [4]> then\n                set [hp v] to [-150]\n            end\n        end\n    end\n    change [dot v] by (1)\nend\n\ndefine make trial\npen up\nset [dot v] to [1]\nset pen color to (#cecece)\nset pen size to (1)\nrepeat ((length of [trial_xs v]) - (1))\n    if <<<[240] > ((x) - (item (dot) of [trial_xs v]))> and <((x) - (item (dot) of [trial_xs v])) > [-240]>> and <<[180] > ((y) - (item (dot) of [trial_ys v]))> and <((y) - (item (dot) of [trial_ys v])) > [-180]>>> then\n        go to x: ((item (dot) of [trial_xs v]) - (x)) y: ((item (dot) of [trial_ys v]) - (y))\n        set [ioioioiioioiioiioio v] to (((round ((item (dot) of [trial_xs v]) - (x))) + (round ((item (dot) of [trial_ys v]) - (y)))) / (14))\n        if <(length of [trial_xs v]) > [25]> then\n            delete (1) of [trial_xs v]\n            delete (1) of [trial_ys v]\n        end\n        change pen size by (0.33)\n        pen down\n    end\n    change [dot v] by (1)\nend\n\ndefine GAME\nadd (x) to [trial_xs v]\nadd (y) to [trial_ys v]\nset pen color to (#1cd660)\nset pen size to (10)\npen up\nmake trial\npen up\nonScreen\npen up\ndetect wall\npen up\nmake Arena\npen up\nmake hp bar (hp)\npen up\nupdate dots [150]\npen up\nmouse thingy\npen up\ndraw player\npen up\ndetect dots\npen up\ngame\n\ndefine MENU\nmake start button\n\ndefine make start button\ngo to x: (-40) y: (-40)\npoint in direction (0)\nset pen color to (#009dff)\nset pen size to (12)\npen down\nchange y by (80)\npoint in direction (120)\nmove (80) steps\npoint in direction (-120)\nmove (80) steps\nset [text v] to []\nif <<<[40] > (mouse x)> and <(mouse x) > [-50]>> and <<[40] > (mouse y)> and <(mouse y) > [-40]>>> then\n    set [text v] to [play]\n    go to x: (-28) y: (-28)\n    point in direction (0)\n    set pen color to (#009dff)\n    set pen size to (12)\n    pen down\n    change y by (56)\n    point in direction (120)\n    move (56) steps\n    point in direction (-120)\n    move (56) steps\n    go to x: (-16) y: (-16)\n    point in direction (0)\n    set pen color to (#009dff)\n    set pen size to (15)\n    pen down\n    change y by (36)\n    point in direction (120)\n    move (36) steps\n    point in direction (-120)\n    move (36) steps\n    go to x: (0) y: (0)\n    set pen color to (#009dff)\n    set pen size to (23)\n    pen down\n    if <mouse down?> then\n        wait until <not <mouse down?>>\n        set [hp v] to [100]\n        setup\n        setup\n        set [mode v] to [game]\n        set [score v] to [0]\n    end\nend\npen up\n\ndefine game over\nset pen color to (#525252)\nset pen (transparency v) to (98)\nset pen size to (5000)\npen down\npen up\n\n@PTE Ultra+\n\ndefine INTERNAL | calcWW (text) (cspace) (width) (space) (x) (offset)\ndelete all of [_temp0 v]\ndelete all of [_temp1 v]\ndelete all of [_temp2 v]\nset [_i3 v] to [1]\nset [_i4 v] to (space)\nset [_i5 v] to [0]\nset [_i8 v] to [0]\nset [_i9 v] to [0]\nrepeat (length of (text))\n    set [_i6 v] to (letter (_i3) of (text))\n    if <(_i6) = [ ]> then\n        add [1] to [_temp2 v]\n        if <((_i5) + (_i4)) > (width)> then\n            add ((_i9) - (1)) to [_temp0 v]\n            add ((x) + ((offset) * (_i5))) to [_temp1 v]\n            set [_i5 v] to (_i4)\n            set [_i4 v] to (space)\n            set [_i9 v] to ((_i8) + (1))\n        else\n            change [_i5 v] by (_i4)\n            set [_i4 v] to (space)\n            change [_i9 v] by ((_i8) + (1))\n        end\n        set [_i8 v] to [0]\n    else\n        if < [abcdefghijklmnopqrstuvwxyz] contains (_i6)?> then\n            switch costume to (_i6)\n            set [_i7 v] to (costume [number v])\n        else\n            set [_i7 v] to (item # of (_i6) in [_chars v])\n        end\n        if <not <(_i7) = [0]>> then\n            add (_i7) to [_temp2 v]\n            set [_i7 v] to ((item (_i7) of [_charwidths v]) + (cspace))\n            if <((_i4) + (_i7)) > (width)> then\n                add ((_i9) - (1)) to [_temp0 v]\n                add ((x) + ((offset) * (_i5))) to [_temp1 v]\n                set [_i5 v] to (_i4)\n                set [_i4 v] to ((space) + (_i7))\n                set [_i9 v] to ((_i8) + (1))\n                set [_i8 v] to [1]\n                add (item (last) of [_temp2 v]) to [_temp2 v]\n            else\n                change [_i4 v] by (_i7)\n                change [_i8 v] by (1)\n            end\n        end\n    end\n    change [_i3 v] by (1)\nend\nif <(_i8) = [0]> then\n    if <not <(_i9) = [0]>> then\n        add ((_i9) - (1)) to [_temp0 v]\n        add ((x) + ((offset) * (_i5))) to [_temp1 v]\n    end\nelse\n    if <((_i5) + (_i4)) > (width)> then\n        add ((_i9) - (1)) to [_temp0 v]\n        add ((x) + ((offset) * (_i5))) to [_temp1 v]\n        add (_i8) to [_temp0 v]\n        add ((x) + ((offset) * (_i4))) to [_temp1 v]\n    else\n        add ((_i9) + (_i8)) to [_temp0 v]\n        add ((x) + ((offset) * ((_i5) + (_i4)))) to [_temp1 v]\n    end\nend\nrepeat until <<not <(item (1) of [_temp0 v]) < [1]>> or <(length of [_temp0 v]) < [1]>>\n    delete (1) of [_temp0 v]\n    delete (1) of [_temp1 v]\nend\nrepeat until <<not <(item (last) of [_temp0 v]) < [1]>> or <(length of [_temp0 v]) < [1]>>\n    delete (last) of [_temp0 v]\n    delete (last) of [_temp1 v]\nend\n\ndefine Print | Pos (x) (y) Size (size) Width (width) RGB (r) (g) (b) WSU (w) (s) (u) CSpace (cspace) Align (align) Text (text)\nSlow Print | Pos (x) (y) Size (size) Width (width) RGB (r) (g) (b) WSU (w) (s) (u) CSpace (cspace) Align (align) Text (text)\n\ndefine Slow Print | Pos (x) (y) Size (size) Width (width) RGB (r) (g) (b) WSU (w) (s) (u) CSpace (cspace) Align (align) Text (text)\npen up\nset pen color to ((((65536) * (round (r))) + ((256) * (round (g)))) + (round (b)))\nset [_x v] to (x)\nset [_i0 v] to ((0.01) * (size))\nset [_i1 v] to ([abs v] of ((0.125) * ((w) * (size))) )\nif <<(size) = (round (size))> and <not <(w) < [0]>>> then\n    if <<((round (_i1)) mod (2)) = [0]> and <not <(_i1) < [0.5]>>> then\n        set [_y v] to (round (y))\n    else\n        set [_y v] to (([floor v] of (y) ) + (0.5))\n    end\nelse\n    set [_y v] to (y)\nend\nif <(w) < [0]> then\n    set [_i2 v] to ((0.125) * (size))\nelse\n    set [_i2 v] to (_i1)\nend\nINTERNAL | printText (text) (_y) (_i0) ((width) * (_i0)) ([tan v] of (s) ) ((_i0) * (u)) (((cspace) * ((0.475) * ((size) / ([log v] of (((size) + (1.01)) * ((size) + (1.01))) )))) + (_i2)) (align) ([ceiling v] of ((0.15) * ([sqrt v] of ((width) * ((size) * (size))) )) ) ((1) / (([ceiling v] of ((0.15) * ([sqrt v] of ((width) * ((size) * (size))) )) ) + (1))) (_i1) ((_i1) + (1)) (((0.6) + ((0.4) * <([floor v] of ((u) / (100)) ) = [0]>)) * (_i1)) ((0.09375) * (size))\n\ndefine WW Print | Pos (x) (y) Size (size) Width (width) RGB (r) (g) (b) WW Width (ww width) WSU (w) (s) (u) CSpace (cspace) LSpace (lspace) Align (align) Text (text)\nWW Slow Print | Pos (x) (y) Size (size) Width (width) RGB (r) (g) (b) WW Width (ww width) WSU (w) (s) (u) CSpace (cspace) LSpace (lspace) Align (align) Text (text)\n\ndefine WW Slow Print | Pos (x) (y) Size (size) Width (width) RGB (r) (g) (b) WW Width (ww width) WSU (w) (s) (u) CSpace (cspace) LSpace (lspace) Align (align) Text (text)\npen up\nset pen color to ((((65536) * (round (r))) + ((256) * (round (g)))) + (round (b)))\nset [_i0 v] to ((0.01) * (size))\nset [_i1 v] to ([abs v] of ((0.125) * ((w) * (size))) )\nif <<(size) = (round (size))> and <not <(w) < [0]>>> then\n    if <<((round (_i1)) mod (2)) = [0]> and <not <(_i1) < [0.5]>>> then\n        set [_y v] to (round (y))\n    else\n        set [_y v] to (([floor v] of (y) ) + (0.5))\n    end\nelse\n    set [_y v] to (y)\nend\nif <(w) < [0]> then\n    set [_i2 v] to ((0.125) * (size))\nelse\n    set [_i2 v] to (_i1)\nend\nset [_i3 v] to (((100) / (size)) / (width))\nset [_i4 v] to ((_i3) * (((cspace) * ((0.475) * ((size) / ([log v] of (((size) + (1.01)) * ((size) + (1.01))) )))) + (_i2)))\nif <(align) = [r]> then\n    set [_i5 v] to ((-1) * (_i0))\nelse\n    if <(align) = [c]> then\n        set [_i5 v] to ((-0.5) * (_i0))\n    else\n        set [_i5 v] to [0]\n    end\nend\nset [_i5 v] to ((width) * (_i5))\nset [_i6 v] to ((item (1) of [_charwidths v]) + (_i4))\nINTERNAL | calcWW (text) (_i4) (((_i3) * (ww width)) + ((_i6) + (_i4))) (_i6) ((x) - ((_i5) * ((_i6) + (_i4)))) (_i5)\nINTERNAL | printWW (_i0) ((width) * (_i0)) ([tan v] of (s) ) ((_i0) * (u)) <not <(u) = [0]>> (((cspace) * ((0.475) * ((size) / ([log v] of (((size) + (1.01)) * ((size) + (1.01))) )))) + (_i2)) (round ((((-0.65) * ((lspace) * (size))) - (size)) - (_i2))) ([ceiling v] of ((0.15) * ([sqrt v] of ((width) * ((size) * (size))) )) ) ((1) / (([ceiling v] of ((0.15) * ([sqrt v] of ((width) * ((size) * (size))) )) ) + (1))) (_i1) ((_i1) + (1)) (((0.6) + ((0.4) * <([floor v] of ((u) / (100)) ) = [0]>)) * (_i1)) ((0.09375) * (size))\n\ndefine INTERNAL | drawBezier (x2) (y2) (x3) (y3) (qual) (dt)\nINTERNAL | bezier (((x3) - ((2) * (x2))) + (x position)) ((2) * ((x2) - (x position))) (x position) (((y3) - ((2) * (y2))) + (y position)) ((2) * ((y2) - (y position))) (y position) (qual) (dt)\ngo to x: (x3) y: (y3)\n\ndefine INTERNAL | bezier (cx1) (cx2) (x1) (cy1) (cy2) (y1) (qual) (dt)\nset [_i4 v] to [0]\nrepeat (qual)\n    change [_i4 v] by (dt)\n    go to x: (((_i4) * (((_i4) * (cx1)) + (cx2))) + (x1)) y: (((_i4) * (((_i4) * (cy1)) + (cy2))) + (y1))\nend\n\ndefine Newlines | # of Lines (lines) Size (size) Weight (w) LSpace (lspace)\nif <(w) < [0]> then\n    change [_y v] by ((lines) * (round ((((-0.65) * ((lspace) * (size))) - (size)) - ((0.125) * (size)))))\nelse\n    change [_y v] by ((lines) * (round ((((-0.65) * ((lspace) * (size))) - (size)) - ((0.125) * ((w) * (size))))))\nend\nif <<(size) = (round (size))> and <not <(w) < [0]>>> then\n    if <<((round ((0.125) * ((w) * (size)))) mod (2)) = [0]> and <not <((0.125) * ((w) * (size))) < [0.5]>>> then\n        set [_y v] to (round (_y))\n    else\n        set [_y v] to (([floor v] of (_y) ) + (0.5))\n    end\nend\n\ndefine INTERNAL | printWW (height) (width) (slant) (underline) <hasundr> (cspace) (lspace) (bezqual) (bezdt) (weight) (dotweight) (underlwt) (underloffset)\nset [_i0 v] to [1]\nset [_i1 v] to [1]\nrepeat (length of [_temp0 v])\n    set [_x v] to (item (_i0) of [_temp1 v])\n    repeat (item (_i0) of [_temp0 v])\n        INTERNAL | printChar (item (_i1) of [_temp2 v]) (height) (width) (_x) (_y) (slant) (bezqual) (bezdt) (weight) (dotweight)\n        change [_x v] by (cspace)\n        change [_i1 v] by (1)\n    end\n    change [_i1 v] by (1)\n    if <hasundr> then\n        set pen size to (underlwt)\n        go to x: ((((_x) - (cspace)) + ((slant) * (underline))) + (underloffset)) y: ((_y) + (underline))\n        pen down\n        set x to (((item (_i0) of [_temp1 v]) + ((slant) * (underline))) - (underloffset))\n        pen up\n    end\n    change [_y v] by (lspace)\n    change [_i0 v] by (1)\nend\nchange [_y v] by ((-1) * (lspace))\ndelete all of [_temp2 v]\n\ndefine INTERNAL | printText (text) (y) (height) (width) (slant) (underline) (space) (align) (bezqual) (bezdt) (weight) (dotweight) (underlwt) (underloffset)\nif <<(align) = [c]> or <(align) = [r]>> then\n    delete all of [_temp0 v]\n    set [_i0 v] to [1]\n    set [_i1 v] to [0]\n    repeat (length of (text))\n        set [_i2 v] to (letter (_i0) of (text))\n        if < [abcdefghijklmnopqrstuvwxyz] contains (_i2)?> then\n            switch costume to (_i2)\n            change [_i1 v] by (((width) * (item (costume [number v]) of [_charwidths v])) + (space))\n            add (costume [number v]) to [_temp0 v]\n        else\n            set [_i2 v] to (item # of (_i2) in [_chars v])\n            if <not <(_i2) = [0]>> then\n                change [_i1 v] by (((width) * (item (_i2) of [_charwidths v])) + (space))\n                add (_i2) to [_temp0 v]\n            end\n        end\n        change [_i0 v] by (1)\n    end\n    if <(align) = [c]> then\n        change [_x v] by ((-0.5) * ((_i1) - (space)))\n    else\n        change [_x v] by ((-1) * ((_i1) - (space)))\n    end\n    set [_i6 v] to (_x)\n    set [_i0 v] to [1]\n    repeat (length of [_temp0 v])\n        INTERNAL | printChar (item (_i0) of [_temp0 v]) (height) (width) (_x) (y) (slant) (bezqual) (bezdt) (weight) (dotweight)\n        change [_x v] by (space)\n        change [_i0 v] by (1)\n    end\nelse\n    set [_i6 v] to (_x)\n    set [_i0 v] to [1]\n    repeat (length of (text))\n        set [_i7 v] to (letter (_i0) of (text))\n        if < [abcdefghijklmnopqrstuvwxyz] contains (_i7)?> then\n            switch costume to (_i7)\n            INTERNAL | printChar (costume [number v]) (height) (width) (_x) (y) (slant) (bezqual) (bezdt) (weight) (dotweight)\n            change [_x v] by (space)\n        else\n            set [_i7 v] to (item # of (_i7) in [_chars v])\n            if <not <(_i7) = [0]>> then\n                INTERNAL | printChar (_i7) (height) (width) (_x) (y) (slant) (bezqual) (bezdt) (weight) (dotweight)\n                change [_x v] by (space)\n            end\n        end\n        change [_i0 v] by (1)\n    end\nend\nif <not <(underline) = [0]>> then\n    set pen size to (underlwt)\n    go to x: ((((_x) - (space)) + ((slant) * (underline))) + (underloffset)) y: ((y) + (underline))\n    pen down\n    set x to (((_i6) + ((slant) * (underline))) - (underloffset))\n    pen up\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nswitch costume to (sizebypass v)\nset size to (50000) %\nswitch costume to (pte ultra+ v)\n\ndefine INTERNAL | loadFont (font)\nset [_i0 v] to [1]\nrepeat until <(_i0) > (length of (font))>\n    set [_i1 v] to (letter (_i0) of (font))\n    if <[_chars v] contains (_i1)?> then\n        if < [abcdefghijklmnopqrstuvwxyz] contains (_i1)?> then\n            switch costume to (_i1)\n            set [_i4 v] to (costume [number v])\n        else\n            set [_i4 v] to (item # of (_i1) in [_chars v])\n        end\n        if < [abcdefghijklmnopqrstuvwxyz] contains (_i1)?> then\n            switch costume to (_i1)\n            if <(costume [number v]) > [27]> then\n                set [_i2 v] to (item # of (join [_] (_i1)) in [_chardata v])\n                set [_i5 v] to (item (_i2) of [_chardata v])\n                replace item (_i2) of [_chardata v] with []\n                set [_i3 v] to ((item # of (join [_] (_i1)) in [_chardata v]) + (1))\n                replace item (_i2) of [_chardata v] with (_i5)\n            else\n                set [_i3 v] to ((item # of (join [_] (_i1)) in [_chardata v]) + (1))\n            end\n        else\n            set [_i3 v] to ((item # of (join [_] (_i1)) in [_chardata v]) + (1))\n        end\n    else\n        add (_i1) to [_chars v]\n        add [0] to [_charids v]\n        add [0] to [_charwidths v]\n        add (join [_] (_i1)) to [_chardata v]\n        set [_i3 v] to ((length of [_chardata v]) + (1))\n        set [_i4 v] to (length of [_chars v])\n    end\n    add [_] to [_chardata v]\n    change [_i0 v] by (2)\n    set [_i2 v] to []\n    repeat until <(letter (_i0) of (font)) = [ ]>\n        set [_i2 v] to (join (_i2) (letter (_i0) of (font)))\n        change [_i0 v] by (1)\n    end\n    change [_i0 v] by (1)\n    replace item (_i4) of [_charwidths v] with ((1) * (_i2))\n    set [_i2 v] to []\n    repeat until <(letter (_i0) of (font)) = [ ]>\n        set [_i2 v] to (join (_i2) (letter (_i0) of (font)))\n        change [_i0 v] by (1)\n    end\n    change [_i0 v] by (1)\n    if <(letter (1) of (item (_i3) of [_chardata v])) = [_]> then\n        insert (round (_i2)) at (_i3) of [_chardata v] \n    else\n        replace item (_i3) of [_chardata v] with (round (_i2))\n    end\n    change [_i3 v] by (1)\n    repeat (round (_i2))\n        repeat (2)\n            set [_i2 v] to []\n            repeat until <(letter (_i0) of (font)) = [ ]>\n                set [_i2 v] to (join (_i2) (letter (_i0) of (font)))\n                change [_i0 v] by (1)\n            end\n            change [_i0 v] by (1)\n            if <(letter (1) of (item (_i3) of [_chardata v])) = [_]> then\n                insert ((1) * (_i2)) at (_i3) of [_chardata v] \n            else\n                replace item (_i3) of [_chardata v] with ((1) * (_i2))\n            end\n            change [_i3 v] by (1)\n        end\n        set [_i2 v] to []\n        repeat until <(letter (_i0) of (font)) = [ ]>\n            set [_i2 v] to (join (_i2) (letter (_i0) of (font)))\n            change [_i0 v] by (1)\n        end\n        change [_i0 v] by (1)\n        if <(letter (1) of (item (_i3) of [_chardata v])) = [_]> then\n            insert (round (_i2)) at (_i3) of [_chardata v] \n        else\n            replace item (_i3) of [_chardata v] with (round (_i2))\n        end\n        change [_i3 v] by (1)\n        repeat (round (_i2))\n            if <(letter (_i0) of (font)) = [b]> then\n                if <(letter (1) of (item (_i3) of [_chardata v])) = [_]> then\n                    insert [b] at (_i3) of [_chardata v] \n                else\n                    replace item (_i3) of [_chardata v] with [b]\n                end\n                change [_i3 v] by (1)\n                change [_i0 v] by (2)\n                repeat (4)\n                    set [_i2 v] to []\n                    repeat until <(letter (_i0) of (font)) = [ ]>\n                        set [_i2 v] to (join (_i2) (letter (_i0) of (font)))\n                        change [_i0 v] by (1)\n                    end\n                    change [_i0 v] by (1)\n                    if <(letter (1) of (item (_i3) of [_chardata v])) = [_]> then\n                        insert ((1) * (_i2)) at (_i3) of [_chardata v] \n                    else\n                        replace item (_i3) of [_chardata v] with ((1) * (_i2))\n                    end\n                    change [_i3 v] by (1)\n                end\n            else\n                repeat (2)\n                    set [_i2 v] to []\n                    repeat until <(letter (_i0) of (font)) = [ ]>\n                        set [_i2 v] to (join (_i2) (letter (_i0) of (font)))\n                        change [_i0 v] by (1)\n                    end\n                    change [_i0 v] by (1)\n                    if <(letter (1) of (item (_i3) of [_chardata v])) = [_]> then\n                        insert ((1) * (_i2)) at (_i3) of [_chardata v] \n                    else\n                        replace item (_i3) of [_chardata v] with ((1) * (_i2))\n                    end\n                    change [_i3 v] by (1)\n                end\n            end\n        end\n    end\n    set [_i2 v] to []\n    repeat until <(letter (_i0) of (font)) = [ ]>\n        set [_i2 v] to (join (_i2) (letter (_i0) of (font)))\n        change [_i0 v] by (1)\n    end\n    change [_i0 v] by (1)\n    if <(letter (1) of (item (_i3) of [_chardata v])) = [_]> then\n        insert (round (_i2)) at (_i3) of [_chardata v] \n    else\n        replace item (_i3) of [_chardata v] with (round (_i2))\n    end\n    change [_i3 v] by (1)\n    repeat (round (_i2))\n        repeat (2)\n            set [_i2 v] to []\n            repeat until <(letter (_i0) of (font)) = [ ]>\n                set [_i2 v] to (join (_i2) (letter (_i0) of (font)))\n                change [_i0 v] by (1)\n            end\n            change [_i0 v] by (1)\n            if <(letter (1) of (item (_i3) of [_chardata v])) = [_]> then\n                insert ((1) * (_i2)) at (_i3) of [_chardata v] \n            else\n                replace item (_i3) of [_chardata v] with ((1) * (_i2))\n            end\n            change [_i3 v] by (1)\n        end\n    end\n    delete (last) of [_chardata v]\nend\nset [_i0 v] to [1]\nrepeat (length of [_chars v])\n    set [_i1 v] to (item (_i0) of [_chars v])\n    if < [abcdefghijklmnopqrstuvwxyz] contains (_i1)?> then\n        switch costume to (_i1)\n        if <(costume [number v]) > [27]> then\n            set [_i2 v] to (item # of (join [_] (_i1)) in [_chardata v])\n            set [_i3 v] to (item (_i2) of [_chardata v])\n            replace item (_i2) of [_chardata v] with []\n            replace item (_i0) of [_charids v] with ((item # of (join [_] (_i1)) in [_chardata v]) + (2))\n            replace item (_i2) of [_chardata v] with (_i3)\n        else\n            replace item (_i0) of [_charids v] with ((item # of (join [_] (_i1)) in [_chardata v]) + (2))\n        end\n    else\n        replace item (_i0) of [_charids v] with ((item # of (join [_] (_i1)) in [_chardata v]) + (2))\n    end\n    change [_i0 v] by (1)\nend\n\ndefine Import Font | Data (font data)\nset [_i0 v] to [1]\nrepeat until <(letter (_i0) of (font data)) = [{]>\n    change [_i0 v] by (1)\nend\nchange [_i0 v] by (1)\nrepeat until <(letter (_i0) of (font data)) = [\[]>\n    change [_i0 v] by (1)\nend\nchange [_i0 v] by (1)\nset [_i1 v] to []\nrepeat until <(letter (_i0) of (font data)) = [\]]>\n    set [_i1 v] to (join (_i1) (letter (_i0) of (font data)))\n    change [_i0 v] by (1)\nend\nchange [_i0 v] by (1)\nset [_i6 v] to (_i1)\ndelete all of [_temp0 v]\nchange [_i0 v] by (1)\nrepeat until <<(letter (_i0) of (font data)) = [\[]> or <(letter (_i0) of (font data)) = [}]>>\n    change [_i0 v] by (1)\nend\nrepeat until <(letter (_i0) of (font data)) = [}]>\n    change [_i0 v] by (1)\n    delete all of [_temp1 v]\n    add (letter (_i0) of (font data)) to [_temp0 v]\n    change [_i0 v] by (2)\n    set [_i1 v] to []\n    repeat until <<<(letter (_i0) of (font data)) = [,]> or <(letter (_i0) of (font data)) = [;]>> or <(letter (_i0) of (font data)) = [\]]>>\n        set [_i1 v] to (join (_i1) (letter (_i0) of (font data)))\n        change [_i0 v] by (1)\n    end\n    add (_i1) to [_temp0 v]\n    set [_i2 v] to ((length of [_temp0 v]) + (1))\n    set [_i3 v] to [0]\n    repeat until <<(letter (_i0) of (font data)) = [\(]> or <(letter (_i0) of (font data)) = [\]]>>\n        change [_i0 v] by (1)\n    end\n    repeat until <(letter (_i0) of (font data)) = [\]]>\n        set [_i4 v] to ((length of [_temp0 v]) + (3))\n        set [_i5 v] to [0]\n        repeat until <(letter (_i0) of (font data)) = [\)]>\n            change [_i0 v] by (1)\n            if <(letter (_i0) of (font data)) = [b]> then\n                add [b] to [_temp0 v]\n                change [_i0 v] by (1)\n                repeat (4)\n                    change [_i0 v] by (1)\n                    set [_i1 v] to []\n                    repeat until <<<(letter (_i0) of (font data)) = [,]> or <(letter (_i0) of (font data)) = [;]>> or <(letter (_i0) of (font data)) = [\)]>>\n                        set [_i1 v] to (join (_i1) (letter (_i0) of (font data)))\n                        change [_i0 v] by (1)\n                    end\n                    add (_i1) to [_temp0 v]\n                end\n            else\n                change [_i0 v] by (-1)\n                repeat (2)\n                    change [_i0 v] by (1)\n                    set [_i1 v] to []\n                    repeat until <<<(letter (_i0) of (font data)) = [,]> or <(letter (_i0) of (font data)) = [;]>> or <(letter (_i0) of (font data)) = [\)]>>\n                        set [_i1 v] to (join (_i1) (letter (_i0) of (font data)))\n                        change [_i0 v] by (1)\n                    end\n                    add (_i1) to [_temp0 v]\n                end\n            end\n            change [_i5 v] by (1)\n        end\n        if <(_i5) = [1]> then\n            add (item ((length of [_temp0 v]) - (1)) of [_temp0 v]) to [_temp1 v]\n            add (item (last) of [_temp0 v]) to [_temp1 v]\n            delete (last) of [_temp0 v]\n            delete (last) of [_temp0 v]\n        else\n            insert ((_i5) - (1)) at (_i4) of [_temp0 v] \n            change [_i3 v] by (1)\n        end\n        repeat until <<(letter (_i0) of (font data)) = [\(]> or <(letter (_i0) of (font data)) = [\]]>>\n            change [_i0 v] by (1)\n        end\n    end\n    insert (_i3) at (_i2) of [_temp0 v] \n    insert (round ((length of [_temp1 v]) / (2))) at (1) of [_temp1 v] \n    repeat (length of [_temp1 v])\n        add (item (1) of [_temp1 v]) to [_temp0 v]\n        delete (1) of [_temp1 v]\n    end\n    repeat until <<(letter (_i0) of (font data)) = [\[]> or <(letter (_i0) of (font data)) = [}]>>\n        change [_i0 v] by (1)\n    end\nend\nadd [] to [_temp0 v]\nset [_i0 v] to (item # of (_i6) in [_fonts v])\nif <((_i0) mod (2)) = [1]> then\n    replace item ((_i0) + (1)) of [_fonts v] with (_temp0)\nelse\n    add (_i6) to [_fonts v]\n    add (_temp0) to [_fonts v]\nend\ndelete all of [_temp0 v]\n\ndefine Load Font | Name (font)\nset [_i0 v] to (item # of (font) in [_fonts v])\nif <((_i0) mod (2)) = [1]> then\n    INTERNAL | loadFont (item ((_i0) + (1)) of [_fonts v])\nend\n\ndefine Reset Character Data\ndelete all of [_chars v]\ndelete all of [_charids v]\ndelete all of [_charwidths v]\ndelete all of [_chardata v]\nset [_i0 v] to [1]\nrepeat (53)\n    set [_i1 v] to (letter (_i0) of [ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ])\n    add (_i1) to [_chars v]\n    add ((length of [_chardata v]) + (3)) to [_charids v]\n    add [0] to [_charwidths v]\n    add (join [_] (_i1)) to [_chardata v]\n    add [0] to [_chardata v]\n    change [_i0 v] by (1)\nend\n\ndefine INTERNAL | printChar (num) (height) (width) (x) (y) (slant) (bezqual) (bezdt) (weight) (dotweight)\nchange [_x v] by ((width) * (item (num) of [_charwidths v]))\nset [_i3 v] to (item (num) of [_charids v])\nset pen size to (weight)\nrepeat (item ((_i3) - (1)) of [_chardata v])\n    set [_i4 v] to ((height) * (item ((_i3) + (1)) of [_chardata v]))\n    go to x: ((x) + (((width) * (item (_i3) of [_chardata v])) + ((slant) * (_i4)))) y: ((y) + (_i4))\n    pen down\n    change [_i3 v] by (3)\n    repeat (item ((_i3) - (1)) of [_chardata v])\n        if <(item (_i3) of [_chardata v]) = [b]> then\n            set [_i4 v] to ((height) * (item ((_i3) + (2)) of [_chardata v]))\n            set [_i5 v] to ((height) * (item ((_i3) + (4)) of [_chardata v]))\n            INTERNAL | drawBezier ((x) + (((width) * (item ((_i3) + (1)) of [_chardata v])) + ((slant) * (_i4)))) ((y) + (_i4)) ((x) + (((width) * (item ((_i3) + (3)) of [_chardata v])) + ((slant) * (_i5)))) ((y) + (_i5)) (bezqual) (bezdt)\n            change [_i3 v] by (5)\n        else\n            set [_i4 v] to ((height) * (item ((_i3) + (1)) of [_chardata v]))\n            go to x: ((x) + (((width) * (item (_i3) of [_chardata v])) + ((slant) * (_i4)))) y: ((y) + (_i4))\n            change [_i3 v] by (2)\n        end\n    end\n    pen up\nend\nset pen size to (dotweight)\nchange [_i3 v] by (1)\nrepeat (item ((_i3) - (1)) of [_chardata v])\n    set [_i4 v] to ((height) * (item ((_i3) + (1)) of [_chardata v]))\n    go to x: ((x) + (((width) * (item (_i3) of [_chardata v])) + ((slant) * (_i4)))) y: ((y) + (_i4))\n    pen down\n    pen up\n    change [_i3 v] by (2)\nend\n\nwhen flag clicked\nset [highest_score v] to [0]\nforever\n    if <not <(mode) = [game over]>> then\n        erase all\n    end\n    make background\n    if <(mode) = [menu]> then\n        Print | Pos (0) (-80) Size (30) Width (1) RGB (255) (255) (255) WSU (1.4) (0) (0) CSpace (1) Align [c] Text (join [last score: ] (score))\n        Print | Pos (0) (140) Size (30) Width (1) RGB (255) (255) (255) WSU (1.4) (0) (0) CSpace (1) Align [c] Text (join [your best: ] (highest_score))\n        Print | Pos (0) (80) Size (30) Width (1) RGB (255) (255) (255) WSU (1.4) (0) (0) CSpace (1) Align [c] Text (join [world best: ] (☁ highscore))\n        if <(text) = [play]> then\n            Print | Pos (0) (-140) Size (30) Width (1) RGB (255) (255) (255) WSU (1.4) (0) (0) CSpace (1) Align [c] Text [play]\n        end\n    end\n    if <(mode) = [game]> then\n        make background\n        Print | Pos (0) (140) Size (30) Width (1) RGB (255) (255) (255) WSU (1.4) (0) (0) CSpace (1) Align [c] Text (join [score: ] (score))\n        if <(score) > (last score)> then\n            repeat (5)\n                erase all\n                make background\n                point in direction (90)\n                Print | Pos (0) (140) Size (30) Width (1) RGB (255) (255) (255) WSU (1.4) (0) (0) CSpace (1) Align [c] Text (join [score: ] (score))\n                Print | Pos (130) (140) Size (20) Width (1) RGB (255) (255) (255) WSU (1.4) (0) (0) CSpace (1) Align [c] Text (join [ +] ((score) - (last score)))\n            end\n        end\n        if <[0] > (hp)> then\n            set [mode v] to [game over]\n        end\n        if <(score) > (highest_score)> then\n            set [highest_score v] to (score)\n        end\n        if <(score) > (☁ highscore)> then\n            set [☁ highscore v] to (score)\n        end\n        set [last score v] to (score)\n    end\nend\n\ndefine make background\nset pen color to (#525252)\nset pen size to (5000)\npen down\npen up\n\n@Sprite2\n\nwhen [space v] key pressed\nif <(username) = [dn_scrtch]> then\n    show\n    go to [front v] layer\nend\n\nwhen flag clicked\nhide\n\n@Sprite3\n\nwhen flag clicked\nforever\nend\n\nif <mouse down?> then\n    change [music speed v] by (((-60) - (music speed)) / (4))\nelse\n    change [music speed v] by (((0) - (music speed)) / (4))\nend\nset [pitch v] effect to (round (music speed))\n\nwhen flag clicked\nforever\n    play sound [Lights \[Dream Trance\] v] until done\nend\n\nif <(mode) = [game]> then\n    if <mouse down?> then\n        play sound [slow down2 v] until done\n    else\n    end\nend\n\nwhen flag clicked\nforever\nend\n\n