Hand Drawn a platformer 
@Stage\n\n@Game\n\ndefine draw (camx) (camy) (quality)\npen up\nerase all\nif <(quality) = [low]> then\n    set [exposure v] to [0]\nelse\n    set [exposure v] to ((fire) / (200))\nend\nset pen color C1: (1) (96) (215) (255) C2: (0) (0) (0) (0) exposure: (exposure)\nset pen size to (255)\ngo to x: (-250) y: (90)\npen down\nset x to (250)\npen up\ngo to x: (-250) y: (-90)\npen down\nset x to (250)\npen up\nif <(quality) = [high]> then\n    get draw platforms (camx) (camy) (-460) (260) (-200) (400)\nelse\n    get draw platforms (camx) (camy) (-260) (260) (-200) (200)\nend\nif <not <(quality) = [low]>> then\n    draw shadows (quality)\nend\ndraw platforms (quality) (timer)\ndraw enemies ((frame) / (STEPS)) (camx) (camy)\ndraw player ((playerX) - (camx)) ((playerY) - (camy)) (quality)\n\ndefine fill tri, inner 1 (ax) (ay) (bx) (by) (cx) (cy) (lena) (lenb) (lenc) (res*1.4)\nset [_peri v] to (((lena) + (lenb)) + (lenc))\nset [_ind v] to (([sqrt v] of ((((((lenb) + (lenc)) - (lena)) * (((lenc) + (lena)) - (lenb))) * (((lena) + (lenb)) - (lenc))) / (_peri)) ) + ((res*1.4) / (1.5)))\nif <(_ind) > (res*1.4)> then\n    set [_incx v] to (((((lena) * (ax)) + ((lenb) * (bx))) + ((lenc) * (cx))) / (_peri))\n    set [_incy v] to (((((lena) * (ay)) + ((lenb) * (by))) + ((lenc) * (cy))) / (_peri))\n    if <<(lena) < (lenb)> and <(lena) < (lenc)>> then\n        fill tri, inner 2 (ax) (ay) (bx) (by) (cx) (cy) ((_incx) - (ax)) ((_incy) - (ay)) ((_incx) - (bx)) ((_incy) - (by)) ((_incx) - (cx)) ((_incy) - (cy)) (_ind) ((-0.5) - ((_ind) / (([sqrt v] of ((((_incx) - (ax)) * ((_incx) - (ax))) + (((_incy) - (ay)) * ((_incy) - (ay)))) ) * (4)))) (_incx) (_incy) (res*1.4)\n    else\n        if <<(lenb) > (lena)> or <(lenb) > (lenc)>> then\n            fill tri, inner 2 (cx) (cy) (bx) (by) (ax) (ay) ((_incx) - (cx)) ((_incy) - (cy)) ((_incx) - (bx)) ((_incy) - (by)) ((_incx) - (ax)) ((_incy) - (ay)) (_ind) ((-0.5) - ((_ind) / (([sqrt v] of ((((_incx) - (cx)) * ((_incx) - (cx))) + (((_incy) - (cy)) * ((_incy) - (cy)))) ) * (4)))) (_incx) (_incy) (res*1.4)\n        else\n            fill tri, inner 2 (bx) (by) (ax) (ay) (cx) (cy) ((_incx) - (bx)) ((_incy) - (by)) ((_incx) - (ax)) ((_incy) - (ay)) ((_incx) - (cx)) ((_incy) - (cy)) (_ind) ((-0.5) - ((_ind) / (([sqrt v] of ((((_incx) - (bx)) * ((_incx) - (bx))) + (((_incy) - (by)) * ((_incy) - (by)))) ) * (4)))) (_incx) (_incy) (res*1.4)\n        end\n    end\nend\n\ndefine fill triangle (ax) (ay) (bx) (by) (cx) (cy) resolution: (res)\nfill tri, inner 1 (ax) (ay) (bx) (by) (cx) (cy) ([sqrt v] of ((((bx) - (cx)) * ((bx) - (cx))) + (((by) - (cy)) * ((by) - (cy)))) ) ([sqrt v] of ((((ax) - (cx)) * ((ax) - (cx))) + (((ay) - (cy)) * ((ay) - (cy)))) ) ([sqrt v] of ((((ax) - (bx)) * ((ax) - (bx))) + (((ay) - (by)) * ((ay) - (by)))) ) ((res) * (1.4))\nset pen size to (res)\ngo to x: (ax) y: (ay)\npen down\ngo to x: (bx) y: (by)\ngo to x: (cx) y: (cy)\ngo to x: (ax) y: (ay)\npen up\n\ndefine fill rightTri (rx) (ry) (hx) (hy) resolution: (res)\nfill tri, inner 1 (rx) (ry) (hx) (ry) (rx) (hy) ([sqrt v] of ((((hx) - (rx)) * ((hx) - (rx))) + (((ry) - (hy)) * ((ry) - (hy)))) ) ([abs v] of ((ry) - (hy)) ) ([abs v] of ((rx) - (hx)) ) ((res) * (1.4))\nset pen size to (res)\ngo to x: (rx) y: (ry)\npen down\ngo to x: (hx) y: (ry)\ngo to x: (rx) y: (hy)\ngo to x: (rx) y: (ry)\npen up\n\ndefine fillRect (x1) (x2) (y1) (y2)\nset [_width v] to ((x2) - (x1))\nset [_height v] to ((y2) - (y1))\nif <<(_width) > [255]> and <(_height) > [255]>> then\n    fillRect (x1) ((((x1) + (x2)) / (2)) + (1)) (y1) (y2)\n    fillRect ((((x1) + (x2)) / (2)) - (1)) (x2) (y1) (y2)\nelse\n    if <<(_width) < [1]> and <(_height) < [1]>> then\n        set pen size to (1)\n        go to x: (((x1) + (x2)) / (2)) y: (((y1) + (y2)) / (2))\n        pen down\n        pen up\n    else\n        if <(_height) < (_width)> then\n            set [_pensize v] to ([floor v] of (_height) )\n            set [_offset v] to ((_pensize) / (2))\n            set pen size to (_pensize)\n            go to x: ((x1) + (_offset)) y: (((y1) + (y2)) / (2))\n            pen down\n            set x to ((x2) - (_offset))\n            pen up\n        else\n            set [_pensize v] to ([floor v] of (_width) )\n            set [_offset v] to ((_pensize) / (2))\n            set pen size to (_pensize)\n            go to x: (((x1) + (x2)) / (2)) y: ((y1) + (_offset))\n            pen down\n            set y to ((y2) - (_offset))\n            pen up\n        end\n        set [_pensize v] to ([ceiling v] of ((0.146446609) * (_pensize)) )\n        set [_offset v] to ((_pensize) / (2))\n        repeat until <(_pensize) < [2]>\n            set pen size to (_pensize)\n            go to x: ((x1) + (_offset)) y: ((y1) + (_offset))\n            pen down\n            set x to ((x2) - (_offset))\n            set y to ((y2) - (_offset))\n            set x to ((x1) + (_offset))\n            set y to ((y1) + (_offset))\n            pen up\n            set [_pensize v] to ([ceiling v] of ((0.146446609) * (_pensize)) )\n            set [_offset v] to ((_pensize) / (2))\n        end\n        set pen size to (1)\n        go to x: ((x1) + (0.5)) y: ((y1) + (0.5))\n        pen down\n        repeat (3)\n            set x to ((x2) - (0.5))\n            set y to ((y2) - (0.5))\n            set x to ((x1) + (0.5))\n            set y to ((y1) + (0.5))\n        end\n        pen up\n    end\nend\n\ndefine draw player (x) (y) (quality)\nset pen color C1: ((1) - ((fire) / (100))) (0) (127) (255) C2: ((fire) / (100)) (255) (159) (0) exposure: (exposure)\nset pen size to (22)\ngo to x: (x) y: (y)\npen down\npen up\nset pen size to (6)\ngo to x: ((x) - (9)) y: ((y) - (9))\npen down\nset x to ((x) + (9))\nset y to ((y) + (9))\nset x to ((x) - (9))\nset y to ((y) - (9))\npen up\nset pen size to (7)\nset pen color C1: (1) (255) (255) (255) C2: (0) (255) (255) (255) exposure: (exposure)\ngo to x: ((x) - (5)) y: ((y) + (5))\npen down\npen up\nset x to ((x) + (5))\npen down\npen up\nset pen size to (4)\nset pen color C1: (1) (0) (0) (0) C2: (0) (255) (255) (255) exposure: (exposure)\ngo to x: (((x) - (5)) + ((0.8) * (<(velX) > [0]> - <(velX) < [0]>))) y: (((y) + (5)) + ((0.8) * (<(velY) > [0]> - <(velY) < [0]>)))\npen down\npen up\nset x to (((x) + (5)) + ((0.8) * (<(velX) > [0]> - <(velX) < [0]>)))\npen down\npen up\n\ndefine draw platforms (quality) (timer)\nset pen size to (6)\nset pen color C1: (1) (0) (0) (0) C2: (0) (0) (0) (0) exposure: (exposure)\nset [_i0 v] to [1]\nrepeat ((length of [drawnormplats v]) / (4))\n    go to x: (item (_i0) of [drawnormplats v]) y: (item ((_i0) + (1)) of [drawnormplats v])\n    pen down\n    go to x: (item ((_i0) + (2)) of [drawnormplats v]) y: (item ((_i0) + (3)) of [drawnormplats v])\n    pen up\n    change [_i0 v] by (4)\nend\nset pen size to (6)\nset pen color C1: (1) (239) (95) (239) C2: (0) (0) (0) (0) exposure: (exposure)\nset [_i0 v] to [1]\nrepeat ((length of [drawbounceplats v]) / (4))\n    go to x: (item (_i0) of [drawbounceplats v]) y: (item ((_i0) + (1)) of [drawbounceplats v])\n    pen down\n    go to x: (item ((_i0) + (2)) of [drawbounceplats v]) y: (item ((_i0) + (3)) of [drawbounceplats v])\n    pen up\n    change [_i0 v] by (4)\nend\nif <not <(quality) = [low]>> then\n    set pen color C1: (0.35) (255) (255) (0) C2: (0.65) (96) (215) (255) exposure: (exposure)\n    if <(quality) = [high]> then\n        set pen size to ((10) + (((6) / (2)) * (([sin v] of ((50) * (timer)) ) + (1))))\n    else\n        set pen size to (14)\n    end\n    set [_i0 v] to [1]\n    repeat ((length of [drawcheckpplats v]) / (4))\n        go to x: (item (_i0) of [drawcheckpplats v]) y: (item ((_i0) + (1)) of [drawcheckpplats v])\n        pen down\n        go to x: (item ((_i0) + (2)) of [drawcheckpplats v]) y: (item ((_i0) + (3)) of [drawcheckpplats v])\n        pen up\n        change [_i0 v] by (4)\n    end\nend\nset pen size to (6)\nset pen color C1: (1) (255) (255) (0) C2: (0) (0) (0) (0) exposure: (exposure)\nset [_i0 v] to [1]\nrepeat ((length of [drawcheckpplats v]) / (4))\n    go to x: (item (_i0) of [drawcheckpplats v]) y: (item ((_i0) + (1)) of [drawcheckpplats v])\n    pen down\n    go to x: (item ((_i0) + (2)) of [drawcheckpplats v]) y: (item ((_i0) + (3)) of [drawcheckpplats v])\n    pen up\n    change [_i0 v] by (4)\nend\nif <not <(quality) = [low]>> then\n    set pen color C1: (0.4) (0) (255) (0) C2: (0.6) (96) (215) (255) exposure: (exposure)\n    if <(quality) = [high]> then\n        set pen size to ((10) + (((8) / (2)) * (([sin v] of ((50) * (timer)) ) + (1))))\n    else\n        set pen size to (16)\n    end\n    set [_i0 v] to [1]\n    repeat ((length of [drawgoalplats v]) / (4))\n        go to x: (item (_i0) of [drawgoalplats v]) y: (item ((_i0) + (1)) of [drawgoalplats v])\n        pen down\n        go to x: (item ((_i0) + (2)) of [drawgoalplats v]) y: (item ((_i0) + (3)) of [drawgoalplats v])\n        pen up\n        change [_i0 v] by (4)\n    end\nend\nset pen size to (6)\nset pen color C1: (1) (0) (255) (0) C2: (0) (0) (0) (0) exposure: (exposure)\nset [_i0 v] to [1]\nrepeat ((length of [drawgoalplats v]) / (4))\n    go to x: (item (_i0) of [drawgoalplats v]) y: (item ((_i0) + (1)) of [drawgoalplats v])\n    pen down\n    go to x: (item ((_i0) + (2)) of [drawgoalplats v]) y: (item ((_i0) + (3)) of [drawgoalplats v])\n    pen up\n    change [_i0 v] by (4)\nend\nif <(quality) = [low]> then\n    set pen size to (6)\n    set pen color C1: (1) (255) (159) (0) C2: (0) (0) (0) (0) exposure: (0)\n    set [_i0 v] to [1]\n    repeat ((length of [drawfireplats v]) / (4))\n        go to x: (item (_i0) of [drawfireplats v]) y: (item ((_i0) + (1)) of [drawfireplats v])\n        pen down\n        go to x: (item ((_i0) + (2)) of [drawfireplats v]) y: (item ((_i0) + (3)) of [drawfireplats v])\n        pen up\n        change [_i0 v] by (4)\n    end\nelse\n    set pen color C1: (0.6) (255) (159) (0) C2: (0.4) (96) (215) (255) exposure: (exposure)\n    if <(quality) = [high]> then\n        set pen size to ((10) + (((6) / (2)) * (([sin v] of ((100) * (timer)) ) + (1))))\n    else\n        set pen size to (12)\n    end\n    set [_i0 v] to [1]\n    repeat ((length of [drawfireplats v]) / (4))\n        go to x: (item (_i0) of [drawfireplats v]) y: (item ((_i0) + (1)) of [drawfireplats v])\n        pen down\n        go to x: (item ((_i0) + (2)) of [drawfireplats v]) y: (item ((_i0) + (3)) of [drawfireplats v])\n        pen up\n        change [_i0 v] by (4)\n    end\n    set pen size to (6)\n    if <(quality) = [high]> then\n        set [_i0 v] to (([sin v] of ((100) * (timer)) ) / (2))\n        if <(_i0) < [0]> then\n            set pen color C1: ((0.6) + ((0.4) * ((1) + ((2) * (_i0))))) (255) (159) (0) C2: (0) (0) (0) (0) exposure: (exposure)\n        else\n            set pen color C1: (1) (255) (159) (0) C2: (0) (0) (0) (0) exposure: (exposure)\n        end\n    else\n        set pen color C1: (1) (255) (159) (0) C2: (0) (0) (0) (0) exposure: (exposure)\n    end\n    set [_i0 v] to [1]\n    repeat ((length of [drawfireplats v]) / (4))\n        go to x: (item (_i0) of [drawfireplats v]) y: (item ((_i0) + (1)) of [drawfireplats v])\n        pen down\n        go to x: (item ((_i0) + (2)) of [drawfireplats v]) y: (item ((_i0) + (3)) of [drawfireplats v])\n        pen up\n        change [_i0 v] by (4)\n    end\nend\nset pen size to (6)\nif <(quality) = [high]> then\n    set pen color C1: ((0.7) + (((0.3) / (2)) * (([sin v] of ((100) * (timer)) ) + (1)))) (255) (63) (31) C2: (0) (0) (0) (0) exposure: (exposure)\nelse\n    set pen color C1: (1) (255) (63) (31) C2: (0) (0) (0) (0) exposure: (exposure)\nend\nset [_i0 v] to [1]\nrepeat ((length of [drawlethalplats v]) / (4))\n    go to x: (item (_i0) of [drawlethalplats v]) y: (item ((_i0) + (1)) of [drawlethalplats v])\n    pen down\n    go to x: (item ((_i0) + (2)) of [drawlethalplats v]) y: (item ((_i0) + (3)) of [drawlethalplats v])\n    pen up\n    change [_i0 v] by (4)\nend\n\ndefine draw shadows (quality)\nset pen color C1: (0.55) (1) (191) (255) C2: (0.45) (0) (0) (0) exposure: (exposure)\nif <(quality) = [high]> then\n    set [_i1 v] to [-461]\n    set [_i2 v] to [401]\nelse\n    set [_i1 v] to [-261]\n    set [_i2 v] to [201]\nend\nset [_i0 v] to [1]\nrepeat ((length of [drawnormplats v]) / (4))\n    render shadow (item (_i0) of [drawnormplats v]) (item ((_i0) + (1)) of [drawnormplats v]) (item ((_i0) + (2)) of [drawnormplats v]) (item ((_i0) + (3)) of [drawnormplats v]) (_i1) (_i2) (6)\n    change [_i0 v] by (4)\nend\nset [_i0 v] to [1]\nrepeat ((length of [drawbounceplats v]) / (4))\n    render shadow (item (_i0) of [drawbounceplats v]) (item ((_i0) + (1)) of [drawbounceplats v]) (item ((_i0) + (2)) of [drawbounceplats v]) (item ((_i0) + (3)) of [drawbounceplats v]) (_i1) (_i2) (6)\n    change [_i0 v] by (4)\nend\n\ndefine fill tri, inner 2 (ax) (ay) (bx) (by) (cx) (cy) (aox) (aoy) (box) (boy) (cox) (coy) (ind) (rate) (incx) (incy) (res*1.4)\nif <(ind) > [255]> then\n    fill triangle (incx) (incy) (ax) (ay) (bx) (by) resolution: ((0.71428571428) * (res*1.4))\n    fill triangle (incx) (incy) (bx) (by) (cx) (cy) resolution: ((0.71428571428) * (res*1.4))\n    fill triangle (incx) (incy) (ax) (ay) (cx) (cy) resolution: ((0.71428571428) * (res*1.4))\nelse\n    go to x: (round (incx)) y: (round (incy))\n    set pen size to ([floor v] of (ind) )\n    pen down\n    pen up\n    set [_td v] to ((rate) + (1))\n    repeat until <((ind) * (_td)) < (res*1.4)>\n        set pen size to ((ind) * (_td))\n        go to x: (((aox) * (_td)) + (ax)) y: (((aoy) * (_td)) + (ay))\n        pen down\n        go to x: (((box) * (_td)) + (bx)) y: (((boy) * (_td)) + (by))\n        go to x: (((cox) * (_td)) + (cx)) y: (((coy) * (_td)) + (cy))\n        go to x: (((aox) * (_td)) + (ax)) y: (((aoy) * (_td)) + (ay))\n        pen up\n        change [_td v] by ((_td) * (rate))\n    end\n    set pen size to ((ind) * (_td))\n    go to x: (((aox) * (_td)) + (ax)) y: (((aoy) * (_td)) + (ay))\n    pen down\n    go to x: (((box) * (_td)) + (bx)) y: (((boy) * (_td)) + (by))\n    go to x: (((cox) * (_td)) + (cx)) y: (((coy) * (_td)) + (cy))\n    go to x: (((aox) * (_td)) + (ax)) y: (((aoy) * (_td)) + (ay))\n    pen up\nend\n\ndefine reset <pew>\nset [steps v] to [8]\nset [endlevel v] to [0]\nif <pew> then\n    set [framesafterdeath v] to [0]\n    start sound [death v]\n    set [camoffsetx v] to ((checkpointX) - (camX))\n    set [camoffsety v] to ((checkpointY) - (camY))\n    change [deaths v] by (1)\nelse\n    set [framesafterdeath v] to [1000]\n    set [checkpointframe v] to [0]\n    set [camoffsetx v] to [0]\n    set [camoffsety v] to [0]\n    set [deaths v] to [0]\n    set [time v] to (days since 2000)\nend\nset [playerx v] to (checkpointX)\nset [playery v] to (checkpointY)\nset [velx v] to [0]\nset [vely v] to [0]\nset [camx v] to (checkpointX)\nset [camy v] to (checkpointY)\nset [exposure v] to [0]\nset [fire v] to [0]\nset [walljump v] to [0]\nset [wall v] to [false]\nset [previouscheckpoint v] to [1]\nset [previousbump v] to [0]\nset [slopemove v] to [0]\nset [frame v] to (checkpointFrame)\n\ndefine physics <up> <right> <left> (steps) (bounce)\nset [endlevel v] to [0]\nset [bounced v] to [0]\nset [previouscheckpoint v] to (checkpoint)\nset [checkpoint v] to [0]\nset [previousbump v] to (bump)\nchange [bump v] by (-1)\nget physics platforms ((playerX) - (99)) ((playerX) + (99)) ((playerY) - (99)) ((playerY) + (99))\nget physics enemies ((playerX) - (114)) ((playerX) + (114)) ((playerY) - (114)) ((playerY) + (160)) ((frame) / (steps))\nrepeat (steps)\n    change [frame v] by (1)\n    if <up> then\n        if <<(onground) > [0]> and <(fire) < [90]>> then\n            set [vely v] to [25]\n            set [onground v] to [0]\n        else\n            if <<<(wall) = [left]> and <(wallJump) > [0]>> and <right>> then\n                set [vely v] to [18]\n                set [velx v] to [12.5]\n                set [walljump v] to [0]\n            else\n                if <<<(wall) = [right]> and <(wallJump) > [0]>> and <left>> then\n                    set [vely v] to [18]\n                    set [velx v] to [-12.5]\n                    set [walljump v] to [0]\n                end\n            end\n        end\n    end\n    if <right> then\n        change [velx v] by ((3.125) / (steps))\n    end\n    if <left> then\n        change [velx v] by ((-3.125) / (steps))\n    end\n    if <(slopeMove) > [0]> then\n        change [vely v] by ((steps) * (slopeMove))\n    else\n        change [vely v] by ((-1.75) / (steps))\n    end\n    if <([abs v] of (velY) ) > [75]> then\n        set [vely v] to ((75) / (([abs v] of (velY) ) / (velY)))\n    end\n    if <(velY) < [0]> then\n        move down ((playerX) - (12)) ((playerX) + (12)) ((playerY) - (12)) ((velY) / (steps)) (bounce)\n    else\n        if <(velY) > [0]> then\n            move up ((playerX) - (12)) ((playerX) + (12)) ((playerY) + (12)) ((velY) / (steps)) (bounce)\n        end\n    end\n    calculate stuff\n    if <(_j2) > [4.1]> then\n        reset <[0] = [0]>\n        stop [this script v]\n    end\n    if <(_j2) = [3]> then\n        set [endlevel v] to [1]\n        stop [this script v]\n    end\n    change [velx v] by ((steps) * (slopeMove))\n    if <([abs v] of (velX) ) > [75]> then\n        set [velx v] to ((75) / (([abs v] of (velX) ) / (velX)))\n    end\n    if <(velX) < [0]> then\n        move left ((playerY) - (12)) ((playerY) + (12)) ((playerX) - (12)) ((velX) / (steps)) (bounce)\n    else\n        if <(velX) > [0]> then\n            move right ((playerY) - (12)) ((playerY) + (12)) ((playerX) + (12)) ((velX) / (steps)) (bounce)\n        end\n    end\n    calculate stuff\n    if <(_j2) > [4.1]> then\n        reset <[0] = [0]>\n        stop [this script v]\n    end\n    if <(playerY) < (deathBarrier)> then\n        reset <[0] = [0]>\n        stop [this script v]\n    end\n    check enemy collision ((playerX) - (12)) ((playerX) + (12)) ((playerY) - (12)) ((playerY) + (12)) ((frame) / (steps))\n    if <(_i5) = [1]> then\n        reset <[0] = [0]>\n        stop [this script v]\n    end\n    if <(_j2) = [3]> then\n        set [endlevel v] to [1]\n        stop [this script v]\n    end\n    change [onground v] by ((-1) / (steps))\nend\nset [velx v] to ((0.8) * (velX))\nif <([abs v] of (velX) ) < [0.5]> then\n    set [velx v] to [0]\nend\nset [vely v] to ((0.95) * (velY))\nif <([abs v] of (velY) ) < [1]> then\n    set [vely v] to [0]\nend\nchange [fire v] by (-2)\nif <(fire) < [0]> then\n    set [fire v] to [0]\nend\nchange [walljump v] by (-1)\nif <(checkpoint) > [0]> then\n    set [checkpointx v] to (playerX)\n    set [checkpointy v] to (playerY)\n    set [checkpointframe v] to (frame)\n    if <<(previousCheckpoint) = [0]> and <(framesAfterDeath) > [30]>> then\n        start sound [checkpoint v]\n    end\nend\n\ndefine render shadow (x0) (y0) (x1) (y1) (lx) (ly) (res)\nif <(x0) = (lx)> then\n    if <(y0) > (ly)> then\n        set [_j4 v] to (x0)\n        set [_j5 v] to [400]\n    else\n        set [_j4 v] to (x0)\n        set [_j5 v] to [-200]\n    end\nelse\n    set [_j0 v] to (((ly) - (y0)) / ((lx) - (x0)))\n    set [_j1 v] to ((ly) - ((_j0) * (lx)))\n    if <(x0) > (lx)> then\n        set [_j4 v] to [260]\n        set [_j5 v] to (((_j0) * (260)) + (_j1))\n    else\n        set [_j4 v] to [-460]\n        set [_j5 v] to (((_j0) * (-460)) + (_j1))\n    end\n    if <<(_j5) < [-200]> or <(_j5) > [400]>> then\n        if <(y0) > (ly)> then\n            set [_j4 v] to (((400) - (_j1)) / (_j0))\n            set [_j5 v] to [400]\n        else\n            set [_j4 v] to (((-200) - (_j1)) / (_j0))\n            set [_j5 v] to [-200]\n        end\n    end\nend\nif <(x1) = (lx)> then\n    if <(y1) > (ly)> then\n        set [_j6 v] to (x1)\n        set [_j7 v] to [400]\n    else\n        set [_j6 v] to (x1)\n        set [_j7 v] to [-200]\n    end\nelse\n    set [_j2 v] to (((ly) - (y1)) / ((lx) - (x1)))\n    set [_j3 v] to ((ly) - ((_j2) * (lx)))\n    if <(x1) > (lx)> then\n        set [_j6 v] to [260]\n        set [_j7 v] to (((_j2) * (260)) + (_j3))\n    else\n        set [_j6 v] to [-460]\n        set [_j7 v] to (((_j2) * (-460)) + (_j3))\n    end\n    if <<(_j7) < [-200]> or <(_j7) > [400]>> then\n        if <(y1) > (ly)> then\n            set [_j6 v] to (((400) - (_j3)) / (_j2))\n            set [_j7 v] to [400]\n        else\n            set [_j6 v] to (((-200) - (_j3)) / (_j2))\n            set [_j7 v] to [-200]\n        end\n    end\nend\nif <<(x0) = (x1)> and <(y0) = (y1)>> then\n    set pen size to (res)\n    go to x: (x0) y: (y0)\n    pen down\n    go to x: (_j4) y: (_j5)\n    pen up\n    stop [this script v]\nend\nif <<<(x0) = (lx)> and <(x1) = (lx)>> or <(_j0) = (_j2)>> then\n    set pen size to (res)\n    go to x: (x0) y: (y0)\n    pen down\n    go to x: (_j4) y: (_j5)\n    pen up\n    go to x: (x1) y: (y1)\n    pen down\n    go to x: (_j6) y: (_j7)\n    pen up\n    stop [this script v]\nend\nfill triangle (x0) (y0) (_j4) (_j5) (_j6) (_j7) resolution: (res)\nfill triangle (x1) (y1) (x0) (y0) (_j6) (_j7) resolution: (res)\nif <(_j4) = (_j6)> then\n    if <not <<(_j4) = [260]> or <(_j4) = [-460]>>> then\n        if <(_j4) > (lx)> then\n            fillRect (_j4) (260) (-200) (400)\n        else\n            fillRect (-460) (_j4) (-200) (400)\n        end\n    end\nelse\n    if <(_j5) = (_j7)> then\n        if <not <<(_j5) = [-200]> or <(_j5) = [400]>>> then\n            if <(_j5) > (ly)> then\n                fillRect (-460) (260) (_j5) (400)\n            else\n                fillRect (-460) (260) (-200) (_j5)\n            end\n        end\n    else\n        set [_j0 v] to (((_j7) - (_j5)) / ((_j6) - (_j4)))\n        set [_j1 v] to ((_j7) - ((_j0) * (_j6)))\n        if <(lx) > (((ly) - (_j1)) / (_j0))> then\n            set [_j2 v] to [1]\n        else\n            set [_j2 v] to [-1]\n        end\n        if <(ly) > (((_j0) * (lx)) + (_j1))> then\n            set [_j3 v] to [1]\n        else\n            set [_j3 v] to [-1]\n        end\n        if <<<(_j5) = [-200]> and <(_j7) = [400]>> or <<(_j5) = [400]> and <(_j7) = [-200]>>> then\n            if <(_j2) = [1]> then\n                if <(_j4) > (_j6)> then\n                    fill rightTri ((_j6) + (1)) (_j5) ((_j4) + (1)) (_j7) resolution: (res)\n                    fillRect (-460) ((_j6) + (1)) (-200) (400)\n                else\n                    fill rightTri ((_j4) + (1)) (_j7) ((_j6) + (1)) (_j5) resolution: (res)\n                    fillRect (-460) ((_j4) + (1)) (-200) (400)\n                end\n            else\n                if <(_j4) < (_j6)> then\n                    fill rightTri ((_j6) - (1)) (_j5) ((_j4) - (1)) (_j7) resolution: (res)\n                    fillRect ((_j6) - (1)) (260) (-200) (400)\n                else\n                    fill rightTri ((_j4) - (1)) (_j7) ((_j6) - (1)) (_j5) resolution: (res)\n                    fillRect ((_j4) - (1)) (260) (-200) (400)\n                end\n            end\n        else\n            if <<<(_j4) = [-460]> and <(_j6) = [260]>> or <<(_j4) = [260]> and <(_j6) = [-460]>>> then\n                if <(_j3) = [1]> then\n                    if <(_j5) > (_j7)> then\n                        fill rightTri (_j4) ((_j7) + (1)) (_j6) ((_j5) + (1)) resolution: (res)\n                        fillRect (-460) (260) (-200) ((_j7) + (1))\n                    else\n                        fill rightTri (_j6) ((_j5) + (1)) (_j4) ((_j7) + (1)) resolution: (res)\n                        fillRect (-460) (260) (-200) ((_j5) + (1))\n                    end\n                else\n                    if <(_j5) < (_j7)> then\n                        fill rightTri (_j4) ((_j7) - (1)) (_j6) ((_j5) - (1)) resolution: (res)\n                        fillRect (-460) (260) ((_j7) - (1)) (400)\n                    else\n                        fill rightTri (_j6) ((_j5) - (1)) (_j4) ((_j7) - (1)) resolution: (res)\n                        fillRect (-460) (260) ((_j5) - (1)) (400)\n                    end\n                end\n            else\n                if <<(_j2) = [1]> and <(_j3) = [1]>> then\n                    fill triangle (_j4) (_j5) (_j6) (_j7) (-460) (-200) resolution: (res)\n                    if <(_j4) = [260]> then\n                        fill rightTri (260) (-200) (-460) (_j5) resolution: (res)\n                    else\n                        if <(_j5) = [400]> then\n                            fill rightTri (-460) (400) (_j4) (-200) resolution: (res)\n                        end\n                    end\n                    if <(_j6) = [260]> then\n                        fill rightTri (260) (-200) (-460) (_j7) resolution: (res)\n                    else\n                        if <(_j7) = [400]> then\n                            fill rightTri (-460) (400) (_j6) (-200) resolution: (res)\n                        end\n                    end\n                else\n                    if <<(_j2) = [1]> and <(_j3) = [-1]>> then\n                        fill triangle (_j4) (_j5) (_j6) (_j7) (-460) (400) resolution: (res)\n                        if <(_j4) = [260]> then\n                            fill rightTri (260) (400) (-460) (_j5) resolution: (res)\n                        else\n                            if <(_j5) = [-200]> then\n                                fill rightTri (-460) (-200) (_j4) (400) resolution: (res)\n                            end\n                        end\n                        if <(_j6) = [260]> then\n                            fill rightTri (260) (400) (-460) (_j7) resolution: (res)\n                        else\n                            if <(_j7) = [-200]> then\n                                fill rightTri (-460) (-200) (_j6) (400) resolution: (res)\n                            end\n                        end\n                    else\n                        if <<(_j2) = [-1]> and <(_j3) = [1]>> then\n                            fill triangle (_j4) (_j5) (_j6) (_j7) (260) (-200) resolution: (res)\n                            if <(_j4) = [-460]> then\n                                fill rightTri (-460) (-200) (260) (_j5) resolution: (res)\n                            else\n                                if <(_j5) = [400]> then\n                                    fill rightTri (260) (400) (_j4) (-200) resolution: (res)\n                                end\n                            end\n                            if <(_j6) = [-460]> then\n                                fill rightTri (-460) (-200) (260) (_j7) resolution: (res)\n                            else\n                                if <(_j7) = [400]> then\n                                    fill rightTri (260) (400) (_j6) (-200) resolution: (res)\n                                end\n                            end\n                        else\n                            fill triangle (_j4) (_j5) (_j6) (_j7) (260) (400) resolution: (res)\n                            if <(_j4) = [-460]> then\n                                fill rightTri (-460) (400) (260) (_j5) resolution: (res)\n                            else\n                                if <(_j5) = [-200]> then\n                                    fill rightTri (260) (-200) (_j4) (400) resolution: (res)\n                                end\n                            end\n                            if <(_j6) = [-460]> then\n                                fill rightTri (-460) (400) (260) (_j7) resolution: (res)\n                            else\n                                if <(_j7) = [-200]> then\n                                    fill rightTri (260) (-200) (_j6) (400) resolution: (res)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine get draw platforms (camx) (camy) (xmin) (xmax) (ymin) (ymax)\ndelete (all) of [drawgoalplats v]\ndelete (all) of [drawcheckpplats v]\ndelete (all) of [drawnormplats v]\ndelete (all) of [drawbounceplats v]\ndelete (all) of [drawfireplats v]\ndelete (all) of [drawlethalplats v]\nset [_i0 v] to [1]\nrepeat ((length of [platforms v]) / (9))\n    set [_i1 v] to ((item ((_i0) + (1)) of [platforms v]) - (camx))\n    set [_i2 v] to ((item ((_i0) + (2)) of [platforms v]) - (camy))\n    set [_i3 v] to ((item ((_i0) + (3)) of [platforms v]) - (camx))\n    set [_i4 v] to ((item ((_i0) + (4)) of [platforms v]) - (camy))\n    if <(_i1) = (_i3)> then\n        if <<<(_i1) < (xmin)> or <(_i1) > (xmax)>> or <<<(_i2) < (ymin)> and <(_i4) < (ymin)>> or <<(_i2) > (ymax)> and <(_i4) > (ymax)>>>> then\n            set [_i5 v] to [0]\n        else\n            set [_i5 v] to [1]\n            if <(_i2) < (ymin)> then\n                set [_i2 v] to (ymin)\n            else\n                if <(_i2) > (ymax)> then\n                    set [_i2 v] to (ymax)\n                end\n            end\n            if <(_i4) < (ymin)> then\n                set [_i4 v] to (ymin)\n            else\n                if <(_i4) > (ymax)> then\n                    set [_i4 v] to (ymax)\n                end\n            end\n        end\n    else\n        if <(_i2) = (_i4)> then\n            if <<<(_i2) < (ymin)> or <(_i2) > (ymax)>> or <<<(_i1) < (xmin)> and <(_i3) < (xmin)>> or <<(_i1) > (xmax)> and <(_i3) > (xmax)>>>> then\n                set [_i5 v] to [0]\n            else\n                set [_i5 v] to [1]\n                if <(_i1) < (xmin)> then\n                    set [_i1 v] to (xmin)\n                else\n                    if <(_i1) > (xmax)> then\n                        set [_i1 v] to (xmax)\n                    end\n                end\n                if <(_i3) < (xmin)> then\n                    set [_i3 v] to (xmin)\n                else\n                    if <(_i3) > (xmax)> then\n                        set [_i3 v] to (xmax)\n                    end\n                end\n            end\n        else\n            if <<<<(_i1) < (xmin)> and <(_i3) < (xmin)>> or <<(_i1) > (xmax)> and <(_i3) > (xmax)>>> or <<<(_i2) < (ymin)> and <(_i4) < (ymin)>> or <<(_i2) > (ymax)> and <(_i4) > (ymax)>>>> then\n                set [_i5 v] to [0]\n            else\n                if <(_i1) < (xmin)> then\n                    set [_i5 v] to (((xmin) - (_i1)) / ((_i3) - (_i1)))\n                    set [_i1 v] to (((_i5) * ((_i3) - (_i1))) + (_i1))\n                    set [_i2 v] to (((_i5) * ((_i4) - (_i2))) + (_i2))\n                else\n                    if <(_i1) > (xmax)> then\n                        set [_i5 v] to (((xmax) - (_i3)) / ((_i1) - (_i3)))\n                        set [_i1 v] to (((_i5) * ((_i1) - (_i3))) + (_i3))\n                        set [_i2 v] to (((_i5) * ((_i2) - (_i4))) + (_i4))\n                    end\n                end\n                if <(_i2) < (ymin)> then\n                    set [_i5 v] to (((ymin) - (_i2)) / ((_i4) - (_i2)))\n                    set [_i1 v] to (((_i5) * ((_i3) - (_i1))) + (_i1))\n                    set [_i2 v] to (((_i5) * ((_i4) - (_i2))) + (_i2))\n                else\n                    if <(_i2) > (ymax)> then\n                        set [_i5 v] to (((ymax) - (_i4)) / ((_i2) - (_i4)))\n                        set [_i1 v] to (((_i5) * ((_i1) - (_i3))) + (_i3))\n                        set [_i2 v] to (((_i5) * ((_i2) - (_i4))) + (_i4))\n                    end\n                end\n                if <(_i1) < (xmin)> then\n                    set [_i5 v] to (((xmin) - (_i1)) / ((_i3) - (_i1)))\n                    set [_i1 v] to (((_i5) * ((_i3) - (_i1))) + (_i1))\n                    set [_i2 v] to (((_i5) * ((_i4) - (_i2))) + (_i2))\n                else\n                    if <(_i1) > (xmax)> then\n                        set [_i5 v] to (((xmax) - (_i3)) / ((_i1) - (_i3)))\n                        set [_i1 v] to (((_i5) * ((_i1) - (_i3))) + (_i3))\n                        set [_i2 v] to (((_i5) * ((_i2) - (_i4))) + (_i4))\n                    end\n                end\n                if <(_i3) < (xmin)> then\n                    set [_i5 v] to (((xmin) - (_i3)) / ((_i1) - (_i3)))\n                    set [_i3 v] to (((_i5) * ((_i1) - (_i3))) + (_i3))\n                    set [_i4 v] to (((_i5) * ((_i2) - (_i4))) + (_i4))\n                else\n                    if <(_i3) > (xmax)> then\n                        set [_i5 v] to (((xmax) - (_i1)) / ((_i3) - (_i1)))\n                        set [_i3 v] to (((_i5) * ((_i3) - (_i1))) + (_i1))\n                        set [_i4 v] to (((_i5) * ((_i4) - (_i2))) + (_i2))\n                    end\n                end\n                if <(_i4) < (ymin)> then\n                    set [_i5 v] to (((ymin) - (_i4)) / ((_i2) - (_i4)))\n                    set [_i3 v] to (((_i5) * ((_i1) - (_i3))) + (_i3))\n                    set [_i4 v] to (((_i5) * ((_i2) - (_i4))) + (_i4))\n                else\n                    if <(_i4) > (ymax)> then\n                        set [_i5 v] to (((ymax) - (_i2)) / ((_i4) - (_i2)))\n                        set [_i3 v] to (((_i5) * ((_i3) - (_i1))) + (_i1))\n                        set [_i4 v] to (((_i5) * ((_i4) - (_i2))) + (_i2))\n                    end\n                end\n                if <(_i3) < (xmin)> then\n                    set [_i5 v] to (((xmin) - (_i3)) / ((_i1) - (_i3)))\n                    set [_i3 v] to (((_i5) * ((_i1) - (_i3))) + (_i3))\n                    set [_i4 v] to (((_i5) * ((_i2) - (_i4))) + (_i4))\n                else\n                    if <(_i3) > (xmax)> then\n                        set [_i5 v] to (((xmax) - (_i1)) / ((_i3) - (_i1)))\n                        set [_i3 v] to (((_i5) * ((_i3) - (_i1))) + (_i1))\n                        set [_i4 v] to (((_i5) * ((_i4) - (_i2))) + (_i2))\n                    end\n                end\n                set [_i5 v] to [1]\n            end\n        end\n    end\n    if <(_i5) = [1]> then\n        set [_i5 v] to (item (_i0) of [platforms v])\n        if <(_i5) = [0]> then\n            add (_i1) to [drawnormplats v]\n            add (_i2) to [drawnormplats v]\n            add (_i3) to [drawnormplats v]\n            add (_i4) to [drawnormplats v]\n        else\n            if <(_i5) = [1]> then\n                add (_i1) to [drawbounceplats v]\n                add (_i2) to [drawbounceplats v]\n                add (_i3) to [drawbounceplats v]\n                add (_i4) to [drawbounceplats v]\n            else\n                if <(_i5) = [2]> then\n                    add (_i1) to [drawcheckpplats v]\n                    add (_i2) to [drawcheckpplats v]\n                    add (_i3) to [drawcheckpplats v]\n                    add (_i4) to [drawcheckpplats v]\n                else\n                    if <(_i5) = [3]> then\n                        add (_i1) to [drawgoalplats v]\n                        add (_i2) to [drawgoalplats v]\n                        add (_i3) to [drawgoalplats v]\n                        add (_i4) to [drawgoalplats v]\n                    else\n                        if <(_i5) = [4]> then\n                            add (_i1) to [drawfireplats v]\n                            add (_i2) to [drawfireplats v]\n                            add (_i3) to [drawfireplats v]\n                            add (_i4) to [drawfireplats v]\n                        else\n                            if <(_i5) = [5]> then\n                                add (_i1) to [drawlethalplats v]\n                                add (_i2) to [drawlethalplats v]\n                                add (_i3) to [drawlethalplats v]\n                                add (_i4) to [drawlethalplats v]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [_i0 v] by (9)\nend\n\ndefine platform physics (negative) (type) (a0) (a1) (b0) (b1) (m) (b) (lo) (hi) (level) (vel)\nif <not <<<not <(a0) < (hi)>> or <not <(b0) > (lo)>>> or <<(a1) > ((level) + (12))> and <(b1) > ((level) + (12))>>>> then\n    if <(m) = [0]> then\n        set [_j3 v] to ((a1) - (level))\n        if <(_j3) < [12]> then\n            physics platform collision (negative) (m) (vel) (type)\n        end\n    else\n        if <(m) = [I]> then\n            if <(a1) > (b1)> then\n                set [_j3 v] to ((a1) - (level))\n            else\n                set [_j3 v] to ((b1) - (level))\n            end\n            if <(_j3) < [12]> then\n                physics platform collision (negative) (m) (vel) (type)\n            end\n        else\n            if <(a0) < (lo)> then\n                set [_j3 v] to ((((m) * (lo)) + (b)) - (level))\n            else\n                set [_j3 v] to ((a1) - (level))\n            end\n            if <(_j3) < [12]> then\n                physics platform collision (negative) (m) (vel) (type)\n            end\n            if <(b0) > (hi)> then\n                set [_j3 v] to ((((m) * (hi)) + (b)) - (level))\n            else\n                set [_j3 v] to ((b1) - (level))\n            end\n            if <(_j3) < [12]> then\n                physics platform collision (negative) (m) (vel) (type)\n            end\n        end\n    end\nend\n\ndefine platform physics (positive) (type) (a0) (a1) (b0) (b1) (m) (b) (lo) (hi) (level) (vel)\nif <not <<<not <(a0) < (hi)>> or <not <(b0) > (lo)>>> or <<(a1) < ((level) - (12))> and <(b1) < ((level) - (12))>>>> then\n    if <(m) = [0]> then\n        set [_j3 v] to ((a1) - (level))\n        if <(_j3) > [-12]> then\n            physics platform collision (positive) (m) (vel) (type)\n        end\n    else\n        if <(m) = [I]> then\n            if <(a1) < (b1)> then\n                set [_j3 v] to ((a1) - (level))\n            else\n                set [_j3 v] to ((b1) - (level))\n            end\n            if <(_j3) > [-12]> then\n                physics platform collision (positive) (m) (vel) (type)\n            end\n        else\n            if <(a0) < (lo)> then\n                set [_j3 v] to ((((m) * (lo)) + (b)) - (level))\n            else\n                set [_j3 v] to ((a1) - (level))\n            end\n            if <(_j3) > [-12]> then\n                physics platform collision (positive) (m) (vel) (type)\n            end\n            if <(b0) > (hi)> then\n                set [_j3 v] to ((((m) * (hi)) + (b)) - (level))\n            else\n                set [_j3 v] to ((b1) - (level))\n            end\n            if <(_j3) > [-12]> then\n                physics platform collision (positive) (m) (vel) (type)\n            end\n        end\n    end\nend\n\ndefine move left (bottomy) (topy) (playerx) (velx) (bounce)\nset [slopemove v] to [0]\nset [_j4 v] to [false]\nset [_j0 v] to [1]\nset [_j1 v] to (velx)\nset [_j2 v] to [-1]\nrepeat ((length of [physplats v]) / (9))\n    if <(item ((_j0) + (4)) of [physplats v]) > (item ((_j0) + (2)) of [physplats v])> then\n        platform physics (negative) (item (_j0) of [physplats v]) (item ((_j0) + (2)) of [physplats v]) (item ((_j0) + (1)) of [physplats v]) (item ((_j0) + (4)) of [physplats v]) (item ((_j0) + (3)) of [physplats v]) (item ((_j0) + (7)) of [physplats v]) (item ((_j0) + (8)) of [physplats v]) (bottomy) (topy) (playerx) (velx)\n    else\n        platform physics (negative) (item (_j0) of [physplats v]) (item ((_j0) + (4)) of [physplats v]) (item ((_j0) + (3)) of [physplats v]) (item ((_j0) + (2)) of [physplats v]) (item ((_j0) + (1)) of [physplats v]) (item ((_j0) + (7)) of [physplats v]) (item ((_j0) + (8)) of [physplats v]) (bottomy) (topy) (playerx) (velx)\n    end\n    change [_j0 v] by (9)\nend\nchange [playerx v] by (_j1)\nif <(_j2) = [1]> then\n    set [velx v] to (bounce)\nelse\n    if <(_j2) = [4]> then\n        if <<(fire) = [0]> or <(fire) > [99]>> then\n            set [velx v] to ((0.35) * (bounce))\n            set [fire v] to [100]\n        else\n            set [_j2 v] to [4.5]\n        end\n    else\n        if <<(_j2) > [-1]> and <(slopeMove) = [0]>> then\n            set [velx v] to [0]\n        end\n        if <(_j4) = [true]> then\n            if <(velY) < [-5]> then\n                set [vely v] to [-5]\n            end\n            set [wall v] to [left]\n            set [walljump v] to [8]\n        end\n    end\nend\nif <(slopeMove) > [0]> then\n    set [onground v] to [2]\nend\n\ndefine import level (data)\ndelete (all) of [platforms v]\ndelete (all) of [enemies v]\nset [_i0 v] to [1]\nset [_i1 v] to []\nrepeat until <(letter (_i0) of (data)) = [;]>\n    set [_i1 v] to (join (_i1) (letter (_i0) of (data)))\n    change [_i0 v] by (1)\nend\nchange [_i0 v] by (1)\nset [checkpointx v] to ((1) * (_i1))\nset [_i1 v] to []\nrepeat until <(letter (_i0) of (data)) = [;]>\n    set [_i1 v] to (join (_i1) (letter (_i0) of (data)))\n    change [_i0 v] by (1)\nend\nchange [_i0 v] by (1)\nset [checkpointy v] to ((1) * (_i1))\nset [deathbarrier v] to ((checkpointY) - (400))\nrepeat until <(_i0) > (length of (data))>\n    if <(letter (_i0) of (data)) = [6]> then\n        change [_i0 v] by (2)\n        repeat (2)\n            set [_i1 v] to []\n            repeat until <(letter (_i0) of (data)) = [;]>\n                set [_i1 v] to (join (_i1) (letter (_i0) of (data)))\n                change [_i0 v] by (1)\n            end\n            change [_i0 v] by (1)\n            add ((1) * (_i1)) to [enemies v]\n        end\n        repeat (2)\n            set [_i1 v] to []\n            repeat until <(letter (_i0) of (data)) = [;]>\n                set [_i1 v] to (join (_i1) (letter (_i0) of (data)))\n                change [_i0 v] by (1)\n            end\n            change [_i0 v] by (1)\n            add (((1) * (_i1)) - (item ((length of [enemies v]) - (1)) of [enemies v])) to [enemies v]\n        end\n        set [_i1 v] to (item ((length of [enemies v]) - (1)) of [enemies v])\n        set [_i2 v] to (item (last) of [enemies v])\n        add ((2) * (([sqrt v] of (((_i1) * (_i1)) + ((_i2) * (_i2))) ) / (15))) to [enemies v]\n    else\n        add (round (letter (_i0) of (data))) to [platforms v]\n        change [_i0 v] by (2)\n        set [_i1 v] to []\n        repeat until <(letter (_i0) of (data)) = [;]>\n            set [_i1 v] to (join (_i1) (letter (_i0) of (data)))\n            change [_i0 v] by (1)\n        end\n        change [_i0 v] by (1)\n        set [_i1 v] to ((1) * (_i1))\n        set [_i2 v] to []\n        repeat until <(letter (_i0) of (data)) = [;]>\n            set [_i2 v] to (join (_i2) (letter (_i0) of (data)))\n            change [_i0 v] by (1)\n        end\n        change [_i0 v] by (1)\n        set [_i2 v] to ((1) * (_i2))\n        if <((_i2) - (deathBarrier)) < [400]> then\n            set [deathbarrier v] to ((_i2) - (400))\n        end\n        set [_i3 v] to []\n        repeat until <(letter (_i0) of (data)) = [;]>\n            set [_i3 v] to (join (_i3) (letter (_i0) of (data)))\n            change [_i0 v] by (1)\n        end\n        change [_i0 v] by (1)\n        set [_i3 v] to ((1) * (_i3))\n        set [_i4 v] to []\n        repeat until <(letter (_i0) of (data)) = [;]>\n            set [_i4 v] to (join (_i4) (letter (_i0) of (data)))\n            change [_i0 v] by (1)\n        end\n        change [_i0 v] by (1)\n        set [_i4 v] to ((1) * (_i4))\n        if <((_i4) - (deathBarrier)) < [400]> then\n            set [deathbarrier v] to ((_i4) - (400))\n        end\n        if <(_i1) > (_i3)> then\n            set [_i5 v] to (_i1)\n            set [_i1 v] to (_i3)\n            set [_i3 v] to (_i5)\n            set [_i5 v] to (_i2)\n            set [_i2 v] to (_i4)\n            set [_i4 v] to (_i5)\n        end\n        add (_i1) to [platforms v]\n        add (_i2) to [platforms v]\n        add (_i3) to [platforms v]\n        add (_i4) to [platforms v]\n        if <(_i1) = (_i3)> then\n            add [I] to [platforms v]\n            add [0] to [platforms v]\n        else\n            add (((_i4) - (_i2)) / ((_i3) - (_i1))) to [platforms v]\n            add ((_i2) - ((_i1) * (item (last) of [platforms v]))) to [platforms v]\n        end\n        if <(_i2) = (_i4)> then\n            add [I] to [platforms v]\n            add [0] to [platforms v]\n        else\n            add (((_i3) - (_i1)) / ((_i4) - (_i2))) to [platforms v]\n            add ((_i1) - ((_i2) * (item (last) of [platforms v]))) to [platforms v]\n        end\n    end\nend\n\ndefine get physics platforms (xmin) (xmax) (ymin) (ymax)\ndelete (all) of [physplats v]\nset [_i0 v] to [1]\nrepeat ((length of [platforms v]) / (9))\n    set [_i1 v] to (item ((_i0) + (1)) of [platforms v])\n    set [_i2 v] to (item ((_i0) + (2)) of [platforms v])\n    set [_i3 v] to (item ((_i0) + (3)) of [platforms v])\n    set [_i4 v] to (item ((_i0) + (4)) of [platforms v])\n    if <not <<<<(_i1) < (xmin)> and <(_i3) < (xmin)>> or <<(_i1) > (xmax)> and <(_i3) > (xmax)>>> or <<<(_i2) < (ymin)> and <(_i4) < (ymin)>> or <<(_i2) > (ymax)> and <(_i4) > (ymax)>>>>> then\n        add (item (_i0) of [platforms v]) to [physplats v]\n        add (_i1) to [physplats v]\n        add (_i2) to [physplats v]\n        add (_i3) to [physplats v]\n        add (_i4) to [physplats v]\n        add (item ((_i0) + (5)) of [platforms v]) to [physplats v]\n        add (item ((_i0) + (6)) of [platforms v]) to [physplats v]\n        add (item ((_i0) + (7)) of [platforms v]) to [physplats v]\n        add (item ((_i0) + (8)) of [platforms v]) to [physplats v]\n    end\n    change [_i0 v] by (9)\nend\n\nwhen flag clicked\nhide\nclear sound effects\nset volume to (100) %\nset [max_level v] to (length of [levels v])\nif <(mode) = [main menu]> then\n    broadcast (main menu v)\nelse\n    if <(mode) = [level menu]> then\n        broadcast (level menu v)\n    else\n        if <(mode) = [editor]> then\n            broadcast (editor v)\n        else\n            set [mode v] to [main menu]\n            broadcast (main menu v)\n        end\n    end\nend\n\ndefine move up (leftx) (rightx) (playery) (vely) (bounce)\nset [_j0 v] to [1]\nset [_j1 v] to (vely)\nset [_j2 v] to [-1]\nrepeat ((length of [physplats v]) / (9))\n    platform physics (positive) (item (_j0) of [physplats v]) (item ((_j0) + (1)) of [physplats v]) (item ((_j0) + (2)) of [physplats v]) (item ((_j0) + (3)) of [physplats v]) (item ((_j0) + (4)) of [physplats v]) (item ((_j0) + (5)) of [physplats v]) (item ((_j0) + (6)) of [physplats v]) (leftx) (rightx) (playery) (vely)\n    change [_j0 v] by (9)\nend\nset [slopemove v] to [0]\nchange [playery v] by (_j1)\nif <(_j2) = [1]> then\n    set [vely v] to ((-1) * (bounce))\nelse\n    if <(_j2) = [4]> then\n        if <<(fire) = [0]> or <(fire) > [99]>> then\n            set [vely v] to ((-0.35) * (bounce))\n            set [fire v] to [100]\n        else\n            set [_j2 v] to [4.5]\n        end\n    else\n        if <(_j2) > [-1]> then\n            set [vely v] to [0]\n        end\n    end\nend\n\ndefine move right (bottomy) (topy) (playerx) (velx) (bounce)\nset [slopemove v] to [0]\nset [_j4 v] to [false]\nset [_j0 v] to [1]\nset [_j1 v] to (velx)\nset [_j2 v] to [-1]\nrepeat ((length of [physplats v]) / (9))\n    if <(item ((_j0) + (4)) of [physplats v]) > (item ((_j0) + (2)) of [physplats v])> then\n        platform physics (positive) (item (_j0) of [physplats v]) (item ((_j0) + (2)) of [physplats v]) (item ((_j0) + (1)) of [physplats v]) (item ((_j0) + (4)) of [physplats v]) (item ((_j0) + (3)) of [physplats v]) (item ((_j0) + (7)) of [physplats v]) (item ((_j0) + (8)) of [physplats v]) (bottomy) (topy) (playerx) (velx)\n    else\n        platform physics (positive) (item (_j0) of [physplats v]) (item ((_j0) + (4)) of [physplats v]) (item ((_j0) + (3)) of [physplats v]) (item ((_j0) + (2)) of [physplats v]) (item ((_j0) + (1)) of [physplats v]) (item ((_j0) + (7)) of [physplats v]) (item ((_j0) + (8)) of [physplats v]) (bottomy) (topy) (playerx) (velx)\n    end\n    change [_j0 v] by (9)\nend\nchange [playerx v] by (_j1)\nif <(_j2) = [1]> then\n    set [velx v] to ((-1) * (bounce))\nelse\n    if <(_j2) = [4]> then\n        if <<(fire) = [0]> or <(fire) > [99]>> then\n            set [velx v] to ((-0.35) * (bounce))\n            set [fire v] to [100]\n        else\n            set [_j2 v] to [4.5]\n        end\n    else\n        if <<(_j2) > [-1]> and <(slopeMove) = [0]>> then\n            set [velx v] to [0]\n        end\n        if <(_j4) = [true]> then\n            if <(velY) < [-5]> then\n                set [vely v] to [-5]\n            end\n            set [wall v] to [right]\n            set [walljump v] to [8]\n        end\n    end\nend\nif <(slopeMove) > [0]> then\n    set [onground v] to [2]\nend\n\ndefine set pen color C1: (a1) (r1) (g1) (b1) C2: (a2) (r2) (g2) (b2) exposure: (e)\nset [_ind v] to [0]\nset [_incx v] to ((((a1) * (r1)) + ((a2) * (r2))) * ([e ^ v] of ((e) * (0.69314718056)) ))\nif <(_incx) < [255]> then\n    change [_ind v] by ((65536) * (round (_incx)))\nelse\n    change [_ind v] by (16711680)\nend\nset [_incx v] to ((((a1) * (g1)) + ((a2) * (g2))) * ([e ^ v] of ((e) * (0.69314718056)) ))\nif <(_incx) < [255]> then\n    change [_ind v] by ((256) * (round (_incx)))\nelse\n    change [_ind v] by (65280)\nend\nset [_incx v] to ((((a1) * (b1)) + ((a2) * (b2))) * ([e ^ v] of ((e) * (0.69314718056)) ))\nif <(_incx) < [255]> then\n    change [_ind v] by (round (_incx))\nelse\n    change [_ind v] by (255)\nend\nset pen color to (((255) * (16777216)) + (_ind))\n\ndefine move down (leftx) (rightx) (playery) (vely) (bounce)\nset [slopemove v] to [0]\nset [_j0 v] to [1]\nset [_j1 v] to (vely)\nset [_j2 v] to [-1]\nrepeat ((length of [physplats v]) / (9))\n    platform physics (negative) (item (_j0) of [physplats v]) (item ((_j0) + (1)) of [physplats v]) (item ((_j0) + (2)) of [physplats v]) (item ((_j0) + (3)) of [physplats v]) (item ((_j0) + (4)) of [physplats v]) (item ((_j0) + (5)) of [physplats v]) (item ((_j0) + (6)) of [physplats v]) (leftx) (rightx) (playery) (vely)\n    change [_j0 v] by (9)\nend\nchange [playery v] by (_j1)\nif <(_j2) = [1]> then\n    set [vely v] to (bounce)\nelse\n    if <(_j2) = [4]> then\n        if <<(fire) = [0]> or <(fire) > [99]>> then\n            set [vely v] to ((0.35) * (bounce))\n            set [fire v] to [100]\n        else\n            set [_j2 v] to [4.5]\n        end\n    else\n        if <<(_j2) > [-1]> and <(slopeMove) = [0]>> then\n            set [vely v] to [0]\n            set [onground v] to [3]\n        end\n    end\nend\n\ndefine physics platform collision (positive) (m) (vel) (type)\nif <(_j3) < (_j1)> then\n    select platform (m) (vel) (type)\nelse\n    if <<(_j3) = (_j1)> and <(type) > (_j2)>> then\n        select platform (m) (vel) (type)\n    end\nend\n\ndefine physics platform collision (negative) (m) (vel) (type)\nif <(_j3) > (_j1)> then\n    select platform (m) (vel) (type)\nelse\n    if <<(_j3) = (_j1)> and <(type) > (_j2)>> then\n        select platform (m) (vel) (type)\n    end\nend\n\ndefine select platform (m) (vel) (type)\nset [_j1 v] to (_j3)\nset [_j2 v] to (type)\nif <(m) = [l]> then\n    set [slopemove v] to [0]\nelse\n    set [_j4 v] to ((1) / (m))\n    if <([abs v] of (_j4) ) < [1]> then\n        set [slopemove v] to ((_j4) * ((vel) - (_j3)))\n    else\n        set [slopemove v] to [0]\n    end\nend\nset [_j4 v] to <<(type) = [0]> and <(m) = [0]>>\n\ndefine sound\nif <(fire) > [97]> then\n    start sound [small fire v]\nelse\n    if <(bounced) > [0]> then\n        start sound [bounce v]\n    else\n        if <<(bump) = [2]> and <(previousBump) < [1]>> then\n            start sound [bump v]\n        end\n    end\nend\n\ndefine calculate stuff\nchange [bounced v] by <(_j2) = [1]>\nchange [checkpoint v] by <(_j2) = [2]>\nif <<<(_j2) > [0]> and <(_j2) < [4]>> and <(bump) < [1]>> then\n    set [bump v] to [1]\nelse\n    if <(_j2) = [0]> then\n        set [bump v] to [2]\n    end\nend\n\ndefine draw enemies (frame) (camx) (camy)\nset [_i0 v] to [1]\nrepeat ((length of [enemies v]) / (5))\n    set [_i1 v] to ((frame) / (item ((_i0) + (4)) of [enemies v]))\n    set [_i1 v] to ((2) * ([abs v] of ((_i1) - ([floor v] of ((_i1) + (0.5)) )) ))\n    set [_i2 v] to (((item (_i0) of [enemies v]) + ((_i1) * (item ((_i0) + (2)) of [enemies v]))) - (camx))\n    set [_i3 v] to (((item ((_i0) + (1)) of [enemies v]) + ((_i1) * (item ((_i0) + (3)) of [enemies v]))) - (camy))\n    if <<([abs v] of (_i2) ) < [260]> and <([abs v] of (_i3) ) < [200]>> then\n        set pen size to (22)\n        go to x: (_i2) y: (_i3)\n        pen down\n        pen up\n        set pen size to (6)\n        go to x: ((_i2) - (8)) y: ((_i3) - (8))\n        pen down\n        change x by (16)\n        change y by (16)\n        change x by (-16)\n        change y by (-16)\n        pen up\n    end\n    change [_i0 v] by (5)\nend\n\ndefine get physics enemies (xmin) (xmax) (ymin) (ymax) (frame)\ndelete (all) of [physenemies v]\nset [_i0 v] to [1]\nrepeat ((length of [enemies v]) / (5))\n    set [_i1 v] to ((frame) / (item ((_i0) + (4)) of [enemies v]))\n    set [_i1 v] to ((2) * ([abs v] of ((_i1) - ([floor v] of ((_i1) + (0.5)) )) ))\n    set [_i2 v] to ((item (_i0) of [enemies v]) + ((_i1) * (item ((_i0) + (2)) of [enemies v])))\n    set [_i3 v] to ((item ((_i0) + (1)) of [enemies v]) + ((_i1) * (item ((_i0) + (3)) of [enemies v])))\n    if <<<(xmin) < (_i2)> and <(_i2) < (xmax)>> and <<(ymin) < (_i3)> and <(_i3) < (ymax)>>> then\n        add (item (_i0) of [enemies v]) to [physenemies v]\n        add (item ((_i0) + (1)) of [enemies v]) to [physenemies v]\n        add (item ((_i0) + (2)) of [enemies v]) to [physenemies v]\n        add (item ((_i0) + (3)) of [enemies v]) to [physenemies v]\n        add (item ((_i0) + (4)) of [enemies v]) to [physenemies v]\n    end\n    change [_i0 v] by (5)\nend\n\ndefine check enemy collision (leftx) (rightx) (bottomy) (topy) (frame)\nset [_i5 v] to [0]\nset [_i0 v] to [1]\nrepeat ((length of [physenemies v]) / (5))\n    set [_i1 v] to ((frame) / (item ((_i0) + (4)) of [physenemies v]))\n    set [_i1 v] to ((2) * ([abs v] of ((_i1) - ([floor v] of ((_i1) + (0.5)) )) ))\n    set [_i2 v] to ((item (_i0) of [physenemies v]) + ((_i1) * (item ((_i0) + (2)) of [physenemies v])))\n    set [_i3 v] to ((item ((_i0) + (1)) of [physenemies v]) + ((_i1) * (item ((_i0) + (3)) of [physenemies v])))\n    if <not <<<(rightx) < ((_i2) - (8))> or <(leftx) > ((_i2) + (8))>> or <<(topy) < ((_i3) - (8))> or <(bottomy) > ((_i3) + (8))>>>> then\n        set [_i5 v] to [1]\n        stop [this script v]\n    end\n    change [_i0 v] by (5)\nend\n\ndefine end level\nbroadcast (muffle on v)\nset [time v] to ((86400) * ((days since 2000) - (time)))\nstart sound [win v]\npen up\nset pen color to ((4) * (16777216))\nset pen size to (1000)\ngo to x: (0) y: (0)\nrepeat (40)\n    pen down\n    pen up\nend\nif <not <(mode) = [custom]>> then\n    if <(mode) = (unlocked level)> then\n        if <(mode) < (MAX_LEVEL)> then\n            change [unlocked level v] by (1)\n        else\n            set [unlocked level v] to ((MAX_LEVEL) + (0.1))\n        end\n    end\nend\nbroadcast (level end v)\n\ndefine game\nreset <[1] = [0]>\nrepeat until <(endLevel) = [1]>\n    physics <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <key (space v) pressed?>> <<key (right arrow v) pressed?> or <key (d v) pressed?>> <<key (left arrow v) pressed?> or <key (a v) pressed?>> (STEPS) (50)\n    set [camoffsetx v] to (((0.8) * (camOffsetX)) + ((0.2) * ((3) * (velX))))\n    set [camoffsety v] to (((0.8) * (camOffsetY)) + ((0.2) * ((3) * (velY))))\n    set [camx v] to ((playerX) - (camOffsetX))\n    set [camy v] to ((playerY) - (camOffsetY))\n    sound\n    draw (camX) (camY) (quality)\n    change [framesafterdeath v] by (1)\nend\nend level\n\nwhen I receive [next level v]\nchange [mode v] by (1)\nif <(mode) > (MAX_LEVEL)> then\n    set [mode v] to [1]\nend\nbroadcast (start level v)\n\nwhen [r v] key pressed\nif <<(mode) = (round (mode))> or <(mode) = [custom]>> then\n    reset <[0] = [0]>\nend\n\nwhen [t v] key pressed\nif <(username) = [-Rex-]> then\n    set [quality v] to [High]\n    set [mode v] to [main menu]\n    set [music v] to [yes]\n    set [unlocked level v] to [1]\n    set [editor loaded v] to [0]\n    erase all\n    import level [0;30;0;-60;0;60;0;0;-50;-30;-60;0;0;50;-30;-50;-30;0;50;-30;60;0;3;30;100;30;0;1;-220;-110;-120;-110;0;-130;-140;-120;-110;0;-210;-140;-220;-110;0;-210;-140;-130;-140;]\n    reset <[1] = [0]>\n    set [velx v] to [12.5]\n    set [vely v] to [-5]\n    reset timer\n    draw ((playerX) - ((3) * (velX))) ((playerY) - ((3) * (velY))) [high]\n    broadcast (thumbnail text v)\nend\n\nwhen I receive [custom v]\nset [mode v] to [custom]\nimport level (custom level)\ngame\n\nwhen I receive [start level v]\nimport level (item (mode) of [levels v])\ngame\n\nwhen I receive [play v]\nset [mode v] to (round (unlocked level))\nbroadcast (start level v)\n\nwhen I receive [level 1 v]\nset [mode v] to [1]\nbroadcast (start level v)\n\nwhen I receive [level 3 v]\nset [mode v] to [3]\nbroadcast (start level v)\n\nwhen I receive [level 5 v]\nset [mode v] to [5]\nbroadcast (start level v)\n\nwhen I receive [level 7 v]\nset [mode v] to [7]\nbroadcast (start level v)\n\nwhen I receive [level 2 v]\nset [mode v] to [2]\nbroadcast (start level v)\n\nwhen I receive [level 4 v]\nset [mode v] to [4]\nbroadcast (start level v)\n\nwhen I receive [level 6 v]\nset [mode v] to [6]\nbroadcast (start level v)\n\nwhen I receive [level 8 v]\nset [mode v] to [8]\nbroadcast (start level v)\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 (((16777216) * (255)) + ((((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 (((16777216) * (255)) + ((((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 I receive [level end v]\nrender level end\nset [clickaction v] to [none]\nrepeat until <not <(clickAction) = [none]>>\n    repeat until <mouse down?>\n        menu button <([sqrt v] of ((((mouse x) - (120)) * ((mouse x) - (120))) + (((mouse y) - (-30)) * ((mouse y) - (-30)))) ) < [30]> <[1] = [0]> [120] [-30]\n        next level button <([sqrt v] of ((((mouse x) - (200)) * ((mouse x) - (200))) + (((mouse y) - (-30)) * ((mouse y) - (-30)))) ) < [30]> <[1] = [0]> [200] [-30]\n    end\n    if <([sqrt v] of ((((mouse x) - (120)) * ((mouse x) - (120))) + (((mouse y) - (-30)) * ((mouse y) - (-30)))) ) < [30]> then\n        set [clickaction v] to [menu]\n    else\n        if <([sqrt v] of ((((mouse x) - (200)) * ((mouse x) - (200))) + (((mouse y) - (-30)) * ((mouse y) - (-30)))) ) < [30]> then\n            set [clickaction v] to [next]\n        end\n    end\n    wait until <not <mouse down?>>\nend\nbroadcast (muffle off v)\nif <(clickAction) = [menu]> then\n    if <(mode) = [custom]> then\n        broadcast (main menu v)\n    else\n        broadcast (level menu v)\n    end\nelse\n    if <(clickAction) = [next]> then\n        if <(mode) = [custom]> then\n            broadcast (main menu v)\n        else\n            broadcast (next level v)\n        end\n    end\nend\n\ndefine render level end\npen up\nset pen color to (((200) * (16777216)) + (16777215))\nset pen size to (160)\ngo to x: (-400) y: (0)\npen down\nset x to (400)\npen up\nset pen color to ((1) * (8355711))\nset pen size to (2)\ngo to x: (45) y: (-70)\npen down\nset y to (70)\npen up\nPrint | Pos (-230) (60) Size (12) Width (1) RGB (0) (0) (0) WSU (1) (0) (0) CSpace (1) Align [l] Text [Time]\nset [time v] to ((round ((10) * (time))) / (10))\nif <(time) = (round (time))> then\n    set [time v] to (join (time) [.0])\nend\nPrint | Pos (-230) (6) Size (40) Width (0.8) RGB (0) (0) (0) WSU (1) (0) (0) CSpace (1) Align [l] Text (time)\nPrint | Pos (_x) (6) Size (40) Width (0.8) RGB (0) (0) (0) WSU (1) (0) (0) CSpace (1) Align [l] Text [ sec]\nPrint | Pos (-230) (-20) Size (12) Width (1) RGB (0) (0) (0) WSU (1) (0) (0) CSpace (1) Align [l] Text [Deaths]\nPrint | Pos (-230) (-74) Size (40) Width (1) RGB (0) (0) (0) WSU (1) (0) (0) CSpace (1) Align [l] Text (deaths)\nif <(deaths) = [0]> then\n    Print | Pos (_x) (-63) Size (25) Width (1) RGB (0) (0) (0) WSU (1) (0) (0) CSpace (2) Align [l] Text [   :]\n    Print | Pos (_x) (-65) Size (25) Width (1) RGB (0) (0) (0) WSU (1) (0) (0) CSpace (1) Align [l] Text [\)]\nend\nPrint | Pos (55) (38) Size (30) Width (1) RGB (0) (0) (0) WSU (1) (0) (0) CSpace (1) Align [l] Text [You win!]\nmenu button <[1] = [0]> <[0] = [0]> [120] [-30]\nnext level button <[1] = [0]> <[0] = [0]> [200] [-30]\n\ndefine roundRect (x1) (x2) (y)\nset pen color to (((255) * (16777216)) + (32767))\nset pen size to (60)\ngo to x: ((x1) + (30)) y: (y)\npen down\nset x to ((x2) - (30))\npen up\nset pen size to (14)\ngo to x: ((x1) + (7)) y: ((y) - (23))\npen down\nset x to ((x2) - (7))\nset y to ((y) + (23))\nset x to ((x1) + (7))\nset y to ((y) - (23))\npen up\n\ndefine menu button <mouse> <initial> (x) (y)\nset pen color to (((255) * (16777216)) + (32767))\nif <initial> then\n    set pen size to (60)\nelse\n    set pen size to (58)\nend\ngo to x: (x) y: (y)\npen down\npen up\nif <mouse> then\n    set pen color to ((1) * (16777215))\n    set [mouseover v] to [Level Select]\nelse\n    set pen color to ((0) * (0))\nend\nset pen size to (4)\nset y to ((y) + (15))\nrepeat (3)\n    set x to ((x) - (17))\n    pen down\n    set x to ((x) + (17))\n    pen up\n    change y by (-15)\nend\n\ndefine next level button <mouse> <initial> (x) (y)\nset pen color to (((255) * (16777216)) + (32767))\nif <initial> then\n    set pen size to (60)\nelse\n    set pen size to (58)\nend\ngo to x: (x) y: (y)\npen down\npen up\nif <mouse> then\n    set pen color to ((1) * (16777215))\n    set [mouseover v] to [Next Level]\nelse\n    set pen color to ((0) * (0))\nend\nset pen size to (4)\ngo to x: ((x) - (17)) y: (y)\npen down\nset x to ((x) + (17))\npen up\ngo to x: ((x) + (8.5)) y: ((y) + (10))\npen down\ngo to x: ((x) + (17)) y: (y)\ngo to x: ((x) + (8.5)) y: ((y) - (10))\npen up\n\ndefine fill screen (r) (g) (b)\npen up\nerase all\nset pen color to (((255) * (16777216)) + ((((65536) * (round (r))) + ((256) * (round (g)))) + (round (b))))\nset pen size to (200)\ngo to x: (-250) y: (-90)\npen down\nset x to (250)\npen up\ngo to x: (-250) y: (90)\npen down\nset x to (250)\npen up\n\ndefine play button <mouse> <initial> (x) (y)\nset pen color to (((255) * (16777216)) + (32767))\nif <initial> then\n    set pen size to (60)\nelse\n    set pen size to (58)\nend\ngo to x: (x) y: (y)\npen down\npen up\nif <mouse> then\n    set pen color to ((1) * (16777215))\n    set [mouseover v] to [Play]\nelse\n    set pen color to ((0) * (0))\nend\nset pen size to (4)\ngo to x: ((x) + (18)) y: (y)\npen down\ngo to x: (((x) - (2)) + ((20) * ([cos v] of (120) ))) y: ((y) + ((20) * ([sin v] of (120) )))\ngo to x: (((x) - (2)) + ((20) * ([cos v] of (240) ))) y: ((y) + ((20) * ([sin v] of (240) )))\ngo to x: ((x) + (18)) y: (y)\npen up\n\nwhen I receive [main menu v]\nrender main menu\nset [clickaction v] to [none]\nset [previousmouseover v] to []\nreset timer\nrepeat until <not <(clickAction) = [none]>>\n    repeat until <mouse down?>\n        set [previousmouseover v] to (mouseover)\n        set [mouseover v] to []\n        main menu title\n        play button <([sqrt v] of ((((mouse x) - (-60)) * ((mouse x) - (-60))) + (((mouse y) - (0)) * ((mouse y) - (0)))) ) < [30]> <[1] = [0]> [-60] [0]\n        menu button <([sqrt v] of ((((mouse x) - (60)) * ((mouse x) - (60))) + (((mouse y) - (0)) * ((mouse y) - (0)))) ) < [30]> <[1] = [0]> [60] [0]\n        editor button <([sqrt v] of ((((mouse x) - (-60)) * ((mouse x) - (-60))) + (((mouse y) - (-80)) * ((mouse y) - (-80)))) ) < [30]> <[1] = [0]> [-60] [-80]\n        custom button <([sqrt v] of ((((mouse x) - (60)) * ((mouse x) - (60))) + (((mouse y) - (-80)) * ((mouse y) - (-80)))) ) < [30]> <[1] = [0]> [60] [-80]\n        music button <<<[-234] < (mouse x)> and <(mouse x) < [-150]>> and <<[-90] < (mouse y)> and <(mouse y) < [-30]>>> <[1] = [0]> [-192] [-60]\n        quality button <<<[150] < (mouse x)> and <(mouse x) < [234]>> and <<[-90] < (mouse y)> and <(mouse y) < [-30]>>> <[1] = [0]> [192] [-60]\n        mouseover\n    end\n    if <([sqrt v] of ((((mouse x) - (-60)) * ((mouse x) - (-60))) + (((mouse y) - (0)) * ((mouse y) - (0)))) ) < [30]> then\n        set [clickaction v] to [play]\n    else\n        if <([sqrt v] of ((((mouse x) - (60)) * ((mouse x) - (60))) + (((mouse y) - (0)) * ((mouse y) - (0)))) ) < [30]> then\n            set [clickaction v] to [menu]\n        else\n            if <([sqrt v] of ((((mouse x) - (-60)) * ((mouse x) - (-60))) + (((mouse y) - (-80)) * ((mouse y) - (-80)))) ) < [30]> then\n                set [clickaction v] to [editor]\n            else\n                if <([sqrt v] of ((((mouse x) - (60)) * ((mouse x) - (60))) + (((mouse y) - (-80)) * ((mouse y) - (-80)))) ) < [30]> then\n                    set [clickaction v] to [custom]\n                else\n                    if <<<[-234] < (mouse x)> and <(mouse x) < [-150]>> and <<[-90] < (mouse y)> and <(mouse y) < [-30]>>> then\n                        set [clickaction v] to [music]\n                    else\n                        if <<<[150] < (mouse x)> and <(mouse x) < [234]>> and <<[-90] < (mouse y)> and <(mouse y) < [-30]>>> then\n                            set [clickaction v] to [graphics]\n                        end\n                    end\n                end\n            end\n        end\n    end\n    repeat until <not <mouse down?>>\n        main menu title\n    end\n    if <(clickAction) = [music]> then\n        if <(music) = [no]> then\n            set [music v] to [yes]\n            broadcast (music on v)\n        else\n            set [music v] to [no]\n            broadcast (music off v)\n        end\n        set [clickaction v] to [none]\n        set [mouseover v] to []\n    end\nend\nif <(clickAction) = [play]> then\n    set [mode v] to (round (unlocked level))\n    broadcast (play v)\nelse\n    if <(clickAction) = [menu]> then\n        broadcast (level menu v)\n    else\n        if <(clickAction) = [editor]> then\n            broadcast (editor v)\n        else\n            if <(clickAction) = [custom]> then\n                ask [Enter level data:] and wait\n                if <(length of (answer)) > [0]> then\n                    set [custom level v] to (answer)\n                    set [mode v] to [custom]\n                    broadcast (custom v)\n                else\n                    broadcast (main menu v)\n                end\n            else\n                if <(clickAction) = [graphics]> then\n                    if <(quality) = [low]> then\n                        Load Font | Name [Parabolic]\n                        set [quality v] to [Medium]\n                    else\n                        if <(quality) = [medium]> then\n                            Load Font | Name [Parabolic]\n                            set [quality v] to [High]\n                        else\n                            Load Font | Name [Geometric]\n                            set [quality v] to [Low]\n                        end\n                    end\n                    broadcast (main menu v)\n                end\n            end\n        end\n    end\nend\n\ndefine render main menu\nfill screen [96] [215] [255]\nset pen size to (6)\nset pen color to ((0) * (0))\ngo to x: (-250) y: (0)\npen down\nset x to (-140)\nset y to (-140)\nset x to (140)\nset y to (0)\nset x to (250)\npen up\nplay button <[1] = [0]> <[0] = [0]> [-60] [0]\nmenu button <[1] = [0]> <[0] = [0]> [60] [0]\neditor button <[1] = [0]> <[0] = [0]> [-60] [-80]\ncustom button <[1] = [0]> <[0] = [0]> [60] [-80]\nmusic button <[1] = [0]> <[0] = [0]> [-192] [-60]\nquality button <[1] = [0]> <[0] = [0]> [192] [-60]\n\ndefine editor button <mouse> <initial> (x) (y)\nset pen color to (((255) * (16777216)) + (32767))\nif <initial> then\n    set pen size to (60)\nelse\n    set pen size to (58)\nend\ngo to x: (x) y: (y)\npen down\npen up\nif <mouse> then\n    set pen color to ((1) * (16777215))\n    set [mouseover v] to [Level Editor]\nelse\n    set pen color to ((0) * (0))\nend\nset pen size to (4)\ngo to x: ((x) - (17)) y: (y)\npen down\nset x to ((x) + (17))\npen up\ngo to x: (x) y: ((y) - (17))\npen down\nset y to ((y) + (17))\npen up\n\ndefine custom button <mouse> <initial> (x) (y)\nset pen color to (((255) * (16777216)) + (32767))\nif <initial> then\n    set pen size to (60)\nelse\n    set pen size to (58)\nend\ngo to x: (x) y: (y)\npen down\npen up\nif <mouse> then\n    set pen color to ((1) * (16777215))\n    set [mouseover v] to [Load Level]\nelse\n    set pen color to ((0) * (0))\nend\nset pen size to (4)\ngo to x: ((x) - (3)) y: ((y) + (15))\npen down\nset x to ((x) - (15))\nset y to ((y) - (15))\nset x to ((x) + (15))\nset y to ((y) - (3))\npen up\ngo to x: (x) y: (y)\npen down\ngo to x: ((x) + (15)) y: ((y) + (15))\npen up\nset x to ((x) + (4))\npen down\ngo to x: ((x) + (15)) y: ((y) + (15))\nset y to ((y) + (4))\npen up\n\ndefine main menu title\nset pen color to ((1) * (6346751))\nset pen size to (132)\ngo to x: (-250) y: (115)\npen down\nset x to (250)\npen up\nset [time v] to (timer)\nPrint | Pos (0) ((95) + ((15) * ([sin v] of ((80) * (time)) ))) Size (40) Width (1) RGB (0) (0) (0) WSU (1) (0) (0) CSpace (1) Align [c] Text [Pen Platformer]\ndraw player [-225] ((105) + ((15) * ([sin v] of ((80) * (time)) )))\ndraw player [225] ((105) + ((15) * ([sin v] of ((80) * (time)) )))\n\ndefine mouseover\nif <not <(previousMouseover) = (mouseover)>> then\n    set pen color to ((1) * (6346751))\n    set pen size to (37)\n    go to x: (-250) y: (-162.5)\n    pen down\n    set x to (250)\n    pen up\n    if <not <(mouseover) = []>> then\n        Print | Pos (0) (-170) Size (20) Width (1) RGB (127) (127) (127) WSU (1) (0) (0) CSpace (1) Align [c] Text (mouseover)\n    end\nend\n\ndefine draw player (x) (y)\nset pen color to ((1) * (32767))\nset pen size to (22)\ngo to x: (x) y: (y)\npen down\npen up\nset pen size to (6)\ngo to x: ((x) - (9)) y: ((y) - (9))\npen down\nset x to ((x) + (9))\nset y to ((y) + (9))\nset x to ((x) - (9))\nset y to ((y) - (9))\npen up\nset pen color to ((1) * (16777215))\nset pen size to (7)\ngo to x: ((x) - (5)) y: ((y) + (5))\npen down\npen up\nset x to ((x) + (5))\npen down\npen up\nset pen color to ((0) * (0))\nset pen size to (4)\ngo to x: ((x) - (5)) y: ((y) + (5))\npen down\npen up\nset x to ((x) + (5))\npen down\npen up\n\ndefine quality button <mouse> <initial> (x) (y)\nif <mouse> then\n    set [mouseover v] to [Graphics]\nend\nif <<initial> or <<<(previousMouseover) = [Graphics]> and <not <(mouseover) = [Graphics]>>> or <<not <(previousMouseover) = (mouseover)>> and <(mouseover) = [Graphics]>>>> then\n    roundRect ((x) - (42)) ((x) + (42)) (y)\n    if <(mouseover) = [Graphics]> then\n        Print | Pos (x) ((y) + (4)) Size (12) Width (1) RGB (255) (255) (255) WSU (1) (0) (0) CSpace (1) Align [c] Text (quality)\n        Print | Pos (x) ((y) - (16)) Size (12) Width (1) RGB (255) (255) (255) WSU (1) (0) (0) CSpace (1) Align [c] Text [Quality]\n    else\n        Print | Pos (x) ((y) + (4)) Size (12) Width (1) RGB (0) (0) (0) WSU (1) (0) (0) CSpace (1) Align [c] Text (quality)\n        Print | Pos (x) ((y) - (16)) Size (12) Width (1) RGB (0) (0) (0) WSU (1) (0) (0) CSpace (1) Align [c] Text [Quality]\n    end\nend\n\ndefine music button <mouse> <initial> (x) (y)\nif <mouse> then\n    set [mouseover v] to [Music]\nend\nif <<initial> or <<<(previousMouseover) = [Music]> and <not <(mouseover) = [Music]>>> or <<not <(previousMouseover) = (mouseover)>> and <(mouseover) = [Music]>>>> then\n    roundRect ((x) - (42)) ((x) + (42)) (y)\n    if <(music) = [no]> then\n        set [_i0 v] to [No Music]\n    else\n        set [_i0 v] to [Music]\n    end\n    if <(mouseover) = [Music]> then\n        Print | Pos (x) ((y) - (6)) Size (12) Width (1) RGB (255) (255) (255) WSU (1) (0) (0) CSpace (1) Align [c] Text (_i0)\n    else\n        Print | Pos (x) ((y) - (6)) Size (12) Width (1) RGB (0) (0) (0) WSU (1) (0) (0) CSpace (1) Align [c] Text (_i0)\n    end\nend\n\ndefine back button <mouse> <initial> (x) (y)\nset pen color to (((255) * (16777216)) + (32767))\nif <initial> then\n    set pen size to (60)\nelse\n    set pen size to (58)\nend\ngo to x: (x) y: (y)\npen down\npen up\nif <mouse> then\n    set pen color to ((1) * (16777215))\n    set [mouseover v] to [Next Level]\nelse\n    set pen color to ((0) * (0))\nend\nset pen size to (4)\ngo to x: ((x) + (17)) y: (y)\npen down\nset x to ((x) - (17))\npen up\ngo to x: ((x) - (8.5)) y: ((y) + (10))\npen down\ngo to x: ((x) - (17)) y: (y)\ngo to x: ((x) - (8.5)) y: ((y) - (10))\npen up\n\nwhen I receive [level menu v]\nreset timer\nif <(mode) = (round (mode))> then\n    set [scroll v] to ((100) * (mode))\nelse\n    set [scroll v] to [100]\nend\nset [mode v] to [level menu]\nset [clickaction v] to [none]\nrepeat until <not <(clickAction) = [none]>>\n    repeat until <mouse down?>\n        if <(mouse x) > [150]> then\n            change [scroll v] by (((mouse x) - (150)) / (3))\n        else\n            if <(mouse x) < [-150]> then\n                change [scroll v] by (((-150) - (mouse x)) / (-3))\n            end\n        end\n        if <(scroll) < [100]> then\n            set [scroll v] to [100]\n        else\n            if <(scroll) > ((100) * (MAX_LEVEL))> then\n                set [scroll v] to ((100) * (MAX_LEVEL))\n            end\n        end\n        render level menu (scroll) (timer) (mouse x) (mouse y)\n    end\n    set [clickaction v] to [none]\n    render level menu (scroll) (timer) (mouse x) (mouse y)\n    wait until <not <mouse down?>>\nend\nif <(clickAction) = [back]> then\n    set [mode v] to [main menu]\n    broadcast (main menu v)\nelse\n    set [mode v] to (clickAction)\n    broadcast (join [level ] (clickAction))\nend\n\ndefine render level menu (scroll) (timer) (mousex) (mousey)\nfill screen [96] [215] [255]\nback button <([sqrt v] of ((((mousex) - (-200)) * ((mousex) - (-200))) + (((mousey) - (140)) * ((mousey) - (140)))) ) < [30]> <[0] = [0]> [-200] [140]\nif <([sqrt v] of ((((mousex) - (-200)) * ((mousex) - (-200))) + (((mousey) - (140)) * ((mousey) - (140)))) ) < [30]> then\n    set [clickaction v] to [back]\nend\nset [xpos v] to ((100) * ([floor v] of (((scroll) - (270)) / (100)) ))\nif <(xpos) < [100]> then\n    set [xpos v] to [100]\nend\nset [done v] to [0]\nrepeat until <(done) = [1]>\n    if <((xpos) + (100)) > ((100) * (MAX_LEVEL))> then\n        set [done v] to [1]\n    else\n        if <(xpos) < ((100) * (unlocked level))> then\n            set pen color to ((0) * (0))\n        else\n            set pen color to ((1) * (8355711))\n        end\n        set pen size to (4)\n        go to x: (((xpos) - (scroll)) + (20)) y: ((15) * ([sin v] of (((75) * (timer)) + ((xpos) + (20))) ))\n        pen down\n        change [xpos v] by (100)\n        go to x: (((xpos) - (scroll)) - (20)) y: ((15) * ([sin v] of (((75) * (timer)) + ((xpos) - (20))) ))\n        pen up\n        if <((xpos) - (scroll)) > [270]> then\n            set [done v] to [1]\n        end\n    end\nend\nset [xpos v] to ((100) * ([floor v] of (((scroll) - (270)) / (100)) ))\nif <(xpos) < [100]> then\n    set [xpos v] to [100]\nend\nrepeat until <<(xpos) > ((100) * (MAX_LEVEL))> or <((xpos) - (scroll)) > [270]>>\n    box with num ((xpos) - (scroll)) ((15) * ([sin v] of (((75) * (timer)) + (xpos)) )) (round ((xpos) / (100))) (mousex) (mousey)\n    change [xpos v] by (100)\nend\n\ndefine box with num (x) (y) (num) (mousex) (mousey)\nif <(num) > (unlocked level)> then\n    Print | Pos (x) ((y) - (10)) Size (20) Width (1) RGB (127) (127) (127) WSU (1) (0) (0) CSpace (1) Align [c] Text (num)\nelse\n    if <<([abs v] of ((mousex) - (x)) ) < [20]> and <([abs v] of ((mousey) - (y)) ) < [20]>> then\n        set [clickaction v] to (num)\n        Print | Pos (x) ((y) - (10)) Size (20) Width (1) RGB (255) (255) (255) WSU (1) (0) (0) CSpace (1) Align [c] Text (num)\n    else\n        if <(num) < (unlocked level)> then\n            Print | Pos (x) ((y) - (10)) Size (20) Width (1) RGB (0) (127) (0) WSU (1) (0) (0) CSpace (1) Align [c] Text (num)\n            set pen color to ((1) * (65280))\n        else\n            Print | Pos (x) ((y) - (10)) Size (20) Width (1) RGB (0) (0) (0) WSU (1) (0) (0) CSpace (1) Align [c] Text (num)\n        end\n    end\nend\nset pen size to (4)\ngo to x: ((x) - (20)) y: ((y) - (20))\npen down\nchange x by (40)\nchange y by (40)\nchange x by (-40)\nchange y by (-40)\npen up\n\nwhen I receive [thumbnail text v]\nPrint | Pos (-120) (140) Size (30) Width (1) RGB (0) (0) (0) WSU (1) (0) (0) CSpace (1) Align [l] Text [Pen]\nPrint | Pos (0) (80) Size (50) Width (1) RGB (0) (0) (0) WSU (1) (0) (0) CSpace (1) Align [c] Text [Platformer]\nstop [all v]\n\nwhen flag clicked\nif <(music) = [yes]> then\n    broadcast (music on v)\nend\n\n@Editor\n\nwhen flag clicked\nhide\nshow list [level data v]\n\nwhen I receive [editor v]\nset [mode v] to [editor]\nbroadcast (muffle on v)\nif <(editor loaded) = [0]> then\n    ask [Enter level data \(leave blank to create a new level\):] and wait\n    if <(length of (answer)) = [0]> then\n        delete all of [data v]\n        set [playerx v] to [0]\n        set [playery v] to [0]\n    else\n        load data (answer)\n    end\n    set [editor loaded v] to [1]\nend\nset [camx v] to (playerX)\nset [camy v] to (playerY)\nset [zoom v] to [1]\neditor\nexport\nset [editor loaded v] to [0]\nset [mode v] to [main menu]\nbroadcast (muffle off v)\nbroadcast (main menu v)\n\ndefine load data (data)\nset [_i0 v] to [1]\nset [_i1 v] to []\nrepeat until <(letter (_i0) of (data)) = [;]>\n    set [_i1 v] to (join (_i1) (letter (_i0) of (data)))\n    change [_i0 v] by (1)\nend\nchange [_i0 v] by (1)\nset [playerx v] to (round (_i1))\nset [_i1 v] to []\nrepeat until <(letter (_i0) of (data)) = [;]>\n    set [_i1 v] to (join (_i1) (letter (_i0) of (data)))\n    change [_i0 v] by (1)\nend\nchange [_i0 v] by (1)\nset [playery v] to (round (_i1))\ndelete all of [data v]\nrepeat until <(_i0) > (length of (data))>\n    repeat (5)\n        set [_i1 v] to []\n        repeat until <(letter (_i0) of (data)) = [;]>\n            set [_i1 v] to (join (_i1) (letter (_i0) of (data)))\n            change [_i0 v] by (1)\n        end\n        change [_i0 v] by (1)\n        add (round (_i1)) to [data v]\n    end\nend\n\ndefine editor\nset [mousedown v] to [0]\nset [selectedid v] to [none]\nforever\n    adjust position and zoom\n    if <mouse down?> then\n        if <(mousedown) = [0]> then\n            set [selectedtype v] to [none]\n            select\n            if <(selectedType) = [none]> then\n                add line\n            end\n            set [mousedown v] to [1]\n            set [selecttime v] to (days since 2000)\n        else\n            if <(selectedType) = [node]> then\n                if <(selectedID) = [player]> then\n                    set [playerx v] to ((10) * (round ((((zoom) * (mouse x)) + (camX)) / (10))))\n                    set [playery v] to ((10) * (round ((((zoom) * (mouse y)) + (camY)) / (10))))\n                else\n                    replace item (selectedID) of [data v] with ((10) * (round ((((zoom) * (mouse x)) + (camX)) / (10))))\n                    replace item ((selectedID) + (1)) of [data v] with ((10) * (round ((((zoom) * (mouse y)) + (camY)) / (10))))\n                end\n            end\n        end\n    else\n        if <(mousedown) = [1]> then\n            set [mousedown v] to [0]\n            if <(selectedType) = [line]> then\n                if <((86400) * ((days since 2000) - (selectTime))) > [0.5]> then\n                    delete (selectedID) of [data v]\n                    delete (selectedID) of [data v]\n                    delete (selectedID) of [data v]\n                    delete (selectedID) of [data v]\n                    delete (selectedID) of [data v]\n                else\n                    if <(item (selectedID) of [data v]) = [6]> then\n                        replace item (selectedID) of [data v] with [0]\n                    else\n                        replace item (selectedID) of [data v] with ((item (selectedID) of [data v]) + (1))\n                    end\n                end\n            end\n            if <(selectedType) = [back]> then\n                stop [this script v]\n            end\n            set [selectedtype v] to [none]\n            set [selectedid v] to [none]\n        end\n    end\n    draw\nend\n\ndefine export\ngenerate data\ndelete all of [level data v]\nadd [Feel free to share level data in the forum topic linked to in the Notes & Credits!] to [level data v]\nadd [Press space to continue, then see inside and export the list.] to [level data v]\nadd [When done, press space again to exit.] to [level data v]\nhide list [level data v]\nwait until <key (space v) pressed?>\nwait until <not <key (space v) pressed?>>\ngenerate data\ndelete all of [level data v]\nadd (_i0) to [level data v]\nwait until <key (space v) pressed?>\nwait until <not <key (space v) pressed?>>\nshow list [level data v]\ndelete all of [level data v]\n\ndefine draw enemy (x) (y)\nset [_i2 v] to (((x) - (camX)) / (zoom))\nset [_i3 v] to (((y) - (camY)) / (zoom))\nif <<([abs v] of (_i2) ) < [260]> and <([abs v] of (_i3) ) < [200]>> then\n    set pen size to ((22) / (zoom))\n    go to x: (_i2) y: (_i3)\n    pen down\n    pen up\n    set pen size to ((6) / (zoom))\n    go to x: ((_i2) - ((8) / (zoom))) y: ((_i3) - ((8) / (zoom)))\n    pen down\n    change x by ((16) / (zoom))\n    change y by ((16) / (zoom))\n    change x by ((-16) / (zoom))\n    change y by ((-16) / (zoom))\n    pen up\nend\n\ndefine draw player\nset [_i2 v] to (((playerX) - (camX)) / (zoom))\nset [_i3 v] to (((playerY) - (camY)) / (zoom))\nif <<([abs v] of (_i2) ) < [260]> and <([abs v] of (_i3) ) < [200]>> then\n    set pen color to ((1) * (32767))\n    set pen size to ((22) / (zoom))\n    go to x: (_i2) y: (_i3)\n    pen down\n    pen up\n    set pen size to ((6) / (zoom))\n    go to x: ((_i2) - ((9) / (zoom))) y: ((_i3) - ((9) / (zoom)))\n    pen down\n    set x to ((_i2) + ((9) / (zoom)))\n    set y to ((_i3) + ((9) / (zoom)))\n    set x to ((_i2) - ((9) / (zoom)))\n    set y to ((_i3) - ((9) / (zoom)))\n    pen up\n    set pen size to ((7) / (zoom))\n    set pen color to ((1) * (16777215))\n    go to x: ((_i2) - ((5) / (zoom))) y: ((_i3) + ((5) / (zoom)))\n    pen down\n    pen up\n    set x to ((_i2) + ((5) / (zoom)))\n    pen down\n    pen up\n    set pen size to ((4) / (zoom))\n    set pen color to ((0) * (0))\n    go to x: ((_i2) - ((5) / (zoom))) y: ((_i3) + ((5) / (zoom)))\n    pen down\n    pen up\n    set x to ((_i2) + ((5) / (zoom)))\n    pen down\n    pen up\nend\nset pen color to ((1) * (4144959))\nset pen size to (6)\ngo to x: (_i2) y: (_i3)\npen down\npen up\n\ndefine draw\nfill screen [96] [215] [255]\nif <(zoom) = [1]> then\n    draw grid [10]\nend\nset [_i0 v] to [0]\nset pen size to (4)\nrepeat (7)\n    set pen color to (item ((_i0) + (1)) of [colors v])\n    set [_i1 v] to [1]\n    repeat ((length of [data v]) / (5))\n        if <(item (_i1) of [data v]) = (_i0)> then\n            draw line (((item ((_i1) + (1)) of [data v]) - (camX)) / (zoom)) (((item ((_i1) + (2)) of [data v]) - (camY)) / (zoom)) (((item ((_i1) + (3)) of [data v]) - (camX)) / (zoom)) (((item ((_i1) + (4)) of [data v]) - (camY)) / (zoom))\n        end\n        change [_i1 v] by (5)\n    end\n    change [_i0 v] by (1)\nend\nset pen color to (item (6) of [colors v])\nset [_i0 v] to [1]\nrepeat ((length of [data v]) / (5))\n    if <(item (_i0) of [data v]) = [6]> then\n        draw enemy (item ((_i0) + (1)) of [data v]) (item ((_i0) + (2)) of [data v])\n    end\n    change [_i0 v] by (5)\nend\nset pen color to ((1) * (4144959))\nset pen size to (6)\nset [_i0 v] to [1]\nrepeat ((length of [data v]) / (5))\n    change [_i0 v] by (1)\n    repeat (2)\n        go to x: (((item (_i0) of [data v]) - (camX)) / (zoom)) y: (((item ((_i0) + (1)) of [data v]) - (camY)) / (zoom))\n        pen down\n        pen up\n        change [_i0 v] by (2)\n    end\nend\ndraw player\nback button <([sqrt v] of ((((mouse x) - (-210)) * ((mouse x) - (-210))) + (((mouse y) - (150)) * ((mouse y) - (150)))) ) < [20]> [-210] [150]\n\ndefine fill screen (r) (g) (b)\npen up\nerase all\nset pen color to (((255) * (16777216)) + ((((65536) * (round (r))) + ((256) * (round (g)))) + (round (b))))\nset pen size to (200)\ngo to x: (-250) y: (-90)\npen down\nset x to (250)\npen up\ngo to x: (-250) y: (90)\npen down\nset x to (250)\npen up\n\ndefine draw line (x0) (y0) (x1) (y1)\nif <(x0) > (x1)> then\n    draw line (x1) (y1) (x0) (y0)\n    stop [this script v]\nend\nif <(y0) < (y1)> then\n    if <<<(x1) < [-250]> or <(x0) > [250]>> or <<(y1) < [-190]> or <(y0) > [190]>>> then\n        stop [this script v]\n    end\nelse\n    if <<<(x1) < [-250]> or <(x0) > [250]>> or <<(y0) < [-190]> or <(y1) > [190]>>> then\n        stop [this script v]\n    end\nend\nset [_i2 v] to (x0)\nset [_i3 v] to (y0)\nset [_i4 v] to (x1)\nset [_i5 v] to (y1)\nif <(x0) > (x1)> then\n    draw line (x1) (y1) (x0) (y0)\n    stop [this script v]\nend\nif <(_i2) < [-250]> then\n    set [_i3 v] to ((_i3) + (((_i5) - (_i3)) * (((-250) - (_i2)) / ((_i4) - (_i2)))))\n    set [_i2 v] to [-250]\nend\nif <(_i3) < [-190]> then\n    set [_i2 v] to ((_i2) + (((_i4) - (_i2)) * (((-190) - (_i3)) / ((_i5) - (_i3)))))\n    set [_i3 v] to [-190]\nelse\n    if <(_i3) > [190]> then\n        set [_i2 v] to ((_i2) + (((_i4) - (_i2)) * (((190) - (_i3)) / ((_i5) - (_i3)))))\n        set [_i3 v] to [190]\n    end\nend\nif <(_i2) < [-250]> then\n    stop [this script v]\nend\nif <(_i4) > [250]> then\n    set [_i5 v] to ((_i5) - (((_i5) - (_i3)) * (((_i4) - (250)) / ((_i4) - (_i2)))))\n    set [_i4 v] to [250]\nend\nif <(_i5) < [-190]> then\n    set [_i4 v] to ((_i4) + (((_i2) - (_i4)) * (((-190) - (_i5)) / ((_i3) - (_i5)))))\n    set [_i5 v] to [-190]\nelse\n    if <(_i5) > [190]> then\n        set [_i4 v] to ((_i4) + (((_i2) - (_i4)) * (((190) - (_i5)) / ((_i3) - (_i5)))))\n        set [_i5 v] to [190]\n    end\nend\nif <(_i4) < [-250]> then\n    stop [this script v]\nend\ngo to x: (_i2) y: (_i3)\npen down\ngo to x: (_i4) y: (_i5)\npen up\n\ndefine draw grid (res)\nset pen color to ((1) * (16777215))\nset pen size to (1)\nset x to ((-240) - ((camX) mod (res)))\nrepeat (([ceiling v] of ((480) / (res)) ) + (1))\n    set y to (-180)\n    pen down\n    set y to (180)\n    pen up\n    change x by (res)\nend\nset y to ((-180) - ((camY) mod (res)))\nrepeat (([ceiling v] of ((360) / (res)) ) + (1))\n    set x to (-240)\n    pen down\n    set x to (240)\n    pen up\n    change y by (res)\nend\n\ndefine adjust position and zoom\nif <key (w v) pressed?> then\n    change [camy v] by ((20) * (round (zoom)))\nend\nif <key (s v) pressed?> then\n    change [camy v] by ((-20) * (round (zoom)))\nend\nif <key (a v) pressed?> then\n    change [camx v] by ((-20) * (round (zoom)))\nend\nif <key (d v) pressed?> then\n    change [camx v] by ((20) * (round (zoom)))\nend\nif <key (q v) pressed?> then\n    change [zoom v] by (0.125)\nend\nif <key (e v) pressed?> then\n    change [zoom v] by (-0.125)\nend\nif <(zoom) < [1]> then\n    set [zoom v] to [1]\nelse\n    if <(zoom) > [5]> then\n        set [zoom v] to [5]\n    end\nend\n\ndefine select\nif <([sqrt v] of ((((mouse x) - (-210)) * ((mouse x) - (-210))) + (((mouse y) - (150)) * ((mouse y) - (150)))) ) < [20]> then\n    set [selectedtype v] to [back]\n    set [selectedid v] to []\n    stop [this script v]\nend\nif <<([abs v] of ((mouse x) - (((playerX) - (camX)) / (zoom))) ) < [4]> and <([abs v] of ((mouse y) - (((playerY) - (camY)) / (zoom))) ) < [4]>> then\n    set [selectedtype v] to [node]\n    set [selectedid v] to [player]\n    stop [this script v]\nend\nset [_i0 v] to [1]\nrepeat ((length of [data v]) / (5))\n    change [_i0 v] by (1)\n    repeat (2)\n        if <<([abs v] of ((mouse x) - (((item (_i0) of [data v]) - (camX)) / (zoom))) ) < [4]> and <([abs v] of ((mouse y) - (((item ((_i0) + (1)) of [data v]) - (camY)) / (zoom))) ) < [4]>> then\n            set [selectedtype v] to [node]\n            set [selectedid v] to (_i0)\n            set [tempx v] to (item (_i0) of [data v])\n            set [tempy v] to (item ((_i0) + (1)) of [data v])\n            stop [this script v]\n        end\n        change [_i0 v] by (2)\n    end\nend\nset [_i0 v] to [1]\nrepeat ((length of [data v]) / (5))\n    touching line (mouse x) (mouse y) (((item ((_i0) + (1)) of [data v]) - (camX)) / (zoom)) (((item ((_i0) + (2)) of [data v]) - (camY)) / (zoom)) (((item ((_i0) + (3)) of [data v]) - (camX)) / (zoom)) (((item ((_i0) + (4)) of [data v]) - (camY)) / (zoom))\n    if <not <(selectedType) = [none]>> then\n        set [selectedid v] to (_i0)\n        stop [this script v]\n    end\n    change [_i0 v] by (5)\nend\n\ndefine touching line (x) (y) (x0) (y0) (x1) (y1)\nset [_i7 v] to (x0)\nset [_i8 v] to (y0)\nset [_i9 v] to (x1)\nset [_i10 v] to (y1)\nif <(_i7) = (_i9)> then\n    if <not <([abs v] of ((_i7) - (x)) ) > [3]>> then\n        if <(_i8) > (_i10)> then\n            if <<(_i8) > (y)> and <(y) > (_i10)>> then\n                set [selectedtype v] to [line]\n                stop [this script v]\n            end\n        else\n            if <<(_i8) < (y)> and <(y) < (_i10)>> then\n                set [selectedtype v] to [line]\n                stop [this script v]\n            end\n        end\n    end\nelse\n    if <(_i8) = (_i10)> then\n        if <not <([abs v] of ((_i8) - (y)) ) > [3]>> then\n            if <(_i7) > (_i9)> then\n                if <<(_i7) > (x)> and <(x) > (_i9)>> then\n                    set [selectedtype v] to [line]\n                    stop [this script v]\n                end\n            else\n                if <<(_i7) < (x)> and <(x) < (_i9)>> then\n                    set [selectedtype v] to [line]\n                    stop [this script v]\n                end\n            end\n        end\n    else\n        if <<<(_i7) > (_i9)> and <<(_i7) > (x)> and <(x) > (_i9)>>> or <<(_i7) < (_i9)> and <<(_i7) < (x)> and <(x) < (_i9)>>>> then\n            set [_i1 v] to (((_i8) - (_i10)) / ((_i7) - (_i9)))\n            set [_i2 v] to ((_i8) - ((_i1) * (_i7)))\n            set [_i3 v] to ((-1) / (_i1))\n            set [_i4 v] to ((y) - ((_i3) * (x)))\n            set [_i5 v] to (((_i4) - (_i2)) / ((_i1) - (_i3)))\n            set [_i6 v] to (((_i1) * (_i5)) + (_i2))\n            if <not <<([abs v] of ((_i5) - (x)) ) > [3]> or <([abs v] of ((_i6) - (y)) ) > [3]>>> then\n                set [selectedtype v] to [line]\n                stop [this script v]\n            end\n        end\n    end\nend\n\ndefine add line\nadd [0] to [data v]\nrepeat (2)\n    add ((10) * (round ((((zoom) * (mouse x)) + (camX)) / (10)))) to [data v]\n    add ((10) * (round ((((zoom) * (mouse y)) + (camY)) / (10)))) to [data v]\nend\nset [selectedtype v] to [node]\nset [selectedid v] to ((length of [data v]) - (1))\n\ndefine generate data\nset [_i0 v] to (join (join (playerX) [;]) (join (playerY) [;]))\nset [_i1 v] to [1]\nrepeat (length of [data v])\n    set [_i0 v] to (join (_i0) (join (item (_i1) of [data v]) [;]))\n    change [_i1 v] by (1)\nend\n\ndefine back button <mouse> (x) (y)\nset pen color to (((255) * (16777216)) + (32767))\nset pen size to (40)\ngo to x: (x) y: (y)\npen down\npen up\nif <mouse> then\n    set pen color to ((1) * (16777215))\nelse\n    set pen color to ((0) * (0))\nend\nset pen size to (4)\ngo to x: ((x) + (13)) y: (y)\npen down\nset x to ((x) - (13))\npen up\ngo to x: ((x) - (7)) y: ((y) + (6))\npen down\ngo to x: ((x) - (13)) y: (y)\ngo to x: ((x) - (7)) y: ((y) - (6))\npen up\n\n@Music\n\nwhen flag clicked\nhide\nset volume to (0) %\nforever\n    play sound [ParagonX9 - Chaoz Fantasy v] until done\nend\n\nwhen I receive [music off v]\nrepeat (10)\n    change volume by (-3)\nend\nset volume to (0) %\n\nwhen I receive [music on v]\nrepeat (10)\n    change volume by (3)\nend\nset volume to (30) %\n\nwhen I receive [muffle on v]\nif <(music) = [yes]> then\n    repeat (10)\n        change volume by (-2)\n    end\n    set volume to (10) %\nend\n\nwhen I receive [muffle off v]\nif <(music) = [yes]> then\n    repeat (10)\n        change volume by (2)\n    end\n    set volume to (30) %\nend\n\n
Make your own levels in Kirby's Dreamland 3 Maker:\nhttps://scratch.mit.edu/projects/688798402/\nControls:\nMovement - [Arrows]       Float / Jump - [Up Arrow]\nUse Door / Swallow / Crouch - [Down Arrow]\nInhale / Use Ability / Shoot - [Z]\nDrop Ability - [A]       Run - [Space]\n\nThis game is 22.1mb is size. It should take about 2-10 seconds to load, if it takes longer than such, the issue is your internet so please don't complain about it.