3d platformer 2 

Instructions: I got a lot of requests for this and now it's finally done. 3d platformer 2 is better in every way for example: layering, filling, mouse control and 3rd person\n\ninstructions: \n-wasd to move (look in settings for zqsd)\n-arrow keys to rotate the camera(look in settings for mouse control)\n-space to jump\n-try messing with the settings for some new features \n\nblocks:\n- blue are platforms\n- red is lava\n- yellow are bouncers\n- purple are no jump platforms\n- brown are teleporters\n- green is the end of a level\n\nedit log:\n16-5-2020: Made resolution medium and high a lot faster.\n2-10-2019: Shared

@Stage\n\nwhen flag clicked\nforever\n    set [fps v] to ((frame) - (1))\n    set [frame v] to [0]\n    reset timer\n    repeat until <(timer) > [1]>\n        change [frame v] by (1)\n    end\nend\n\nwhen flag clicked\nforever\n    play sound [music v] until done\n    wait (2) seconds\nend\n\n@empty\n\n@game\n\ndefine Distance (x1) (y1) (z1) (x2) (y2) (z2)\nset [distance v] to ([sqrt v] of (((((x1) - (x2)) * ((x1) - (x2))) + (((y1) - (y2)) * ((y1) - (y2)))) + (((z1) - (z2)) * ((z1) - (z2)))) )\n\ndefine Set Point 2: (x2) (y2) (z2)\nset [x2 v] to (x2)\nset [y2 v] to (y2)\nset [z2 v] to (z2)\n\ndefine Draw Line (x1) (y1) (z1) to (x2) (y2) (z2)\nSet Point 1: ((x1) - (cam x)) ((y1) - (cam y)) ((z1) - (cam z))\nSet Point 2: ((x2) - (cam x)) ((y2) - (cam y)) ((z2) - (cam z))\nSet Point 1: (((z1) * (sin Y)) + ((x1) * (cos Y))) (y1) (((z1) * (cos Y)) - ((x1) * (sin Y)))\nSet Point 2: (((z2) * (sin Y)) + ((x2) * (cos Y))) (y2) (((z2) * (cos Y)) - ((x2) * (sin Y)))\nSet Point 1: (x1) (((y1) * (cos X)) - ((z1) * (sin X))) (((y1) * (sin X)) + ((z1) * (cos X)))\nSet Point 2: (x2) (((y2) * (cos X)) - ((z2) * (sin X))) (((y2) * (sin X)) + ((z2) * (cos X)))\nif <not <<(z1) < (near plane)> and <(z2) < (near plane)>>> then\n    Z Clipping\n    Set Screen Point 1: ((view factor) * ((x1) / (z1))) ((view factor) * ((y1) / (z1)))\n    Set Screen Point 2: ((view factor) * ((x2) / (z2))) ((view factor) * ((y2) / (z2)))\n    XY Clipping\n    go to x: (x1) y: (y1)\n    pen down\n    go to x: (x2) y: (y2)\n    pen up\nend\n\ndefine Set Screen Point 1: (x1) (y1)\nset [x1 v] to (x1)\nset [y1 v] to (y1)\n\ndefine Set Screen Point 2: (x2) (y2)\nset [x2 v] to (x2)\nset [y2 v] to (y2)\n\ndefine --- (label)\n\ndefine Calculate Trig Values\nset [sin x v] to ([sin v] of (rot X) )\nset [cos x v] to ([cos v] of (rot X) )\nif <(3th person) = [1]> then\n    set [sin y v] to ([sin v] of ((rot Y) + (-90)) )\n    set [cos y v] to ([cos v] of ((rot Y) + (-90)) )\nelse\n    set [sin y v] to ([sin v] of (rot Y) )\n    set [cos y v] to ([cos v] of (rot Y) )\nend\n\ndefine Z Clipping\nif <<(z1) < (near plane)> or <(z2) < (near plane)>> then\n    set [m v] to (((near plane) - (z1)) / ((z2) - (z1)))\n    if <(z1) < (near plane)> then\n        Set Point 1: ((x1) + (((x2) - (x1)) * (m))) ((y1) + (((y2) - (y1)) * (m))) (near plane)\n    else\n        if <(z2) < (near plane)> then\n            Set Point 2: ((x1) + (((x2) - (x1)) * (m))) ((y1) + (((y2) - (y1)) * (m))) (near plane)\n        end\n    end\nend\n\ndefine XY Clipping\nset [m v] to (((y2) - (y1)) / ((x2) - (x1)))\nif <(x1) > [240]> then\n    if <(x2) > [240]> then\n        stop [this script v]\n    else\n        Set Screen Point 1: (240) ((y1) + (((240) - (x1)) * (m)))\n    end\nend\nif <(y1) > [180]> then\n    if <(y2) > [180]> then\n        stop [this script v]\n    else\n        Set Screen Point 1: ((x1) + (((180) - (y1)) / (m))) (180)\n    end\nend\nif <(x1) < [-240]> then\n    if <(x2) < [-240]> then\n        stop [this script v]\n    else\n        Set Screen Point 1: (-240) ((y1) + (((-240) - (x1)) * (m)))\n    end\nend\nif <(y1) < [-180]> then\n    if <(y2) < [-180]> then\n        stop [this script v]\n    else\n        Set Screen Point 1: ((x1) + (((-180) - (y1)) / (m))) (-180)\n    end\nend\nif <(x2) > [240]> then\n    Set Screen Point 2: (240) ((y1) + (((240) - (x1)) * (m)))\nend\nif <(y2) > [180]> then\n    Set Screen Point 2: ((x1) + (((180) - (y1)) / (m))) (180)\nend\nif <(x2) < [-240]> then\n    Set Screen Point 2: (-240) ((y1) + (((-240) - (x1)) * (m)))\nend\nif <(y2) < [-180]> then\n    Set Screen Point 2: ((x1) + (((-180) - (y1)) / (m))) (-180)\nend\n\nwhen flag clicked\nset [3th person v] to [0]\nset [level v] to [1]\nset [settings? v] to [0]\nset [reverse control v] to [0]\nset [mouse control v] to [0]\nset [wasd? v] to [0]\nset [layering v] to [1]\ngame reset\nforever\n    erase all\n    render\n    tick\n    wait until <(settings?) = [0]>\n    if <(level) = [14]> then\n        erase all\n        stop [this script v]\n    end\nend\n\ndefine tick\nif <[1] = (3th person)> then\n    if <(wasd?) = [0]> then\n        if <key (w v) pressed?> then\n            change [cam x vel v] by ((() - ([sin v] of ((rot Y) + (-90)) )) * (3))\n            change [cam z vel v] by (([cos v] of ((rot Y) + (-90)) ) * (3))\n        end\n        if <key (s v) pressed?> then\n            change [cam x vel v] by (([sin v] of ((rot Y) + (-90)) ) * (3))\n            change [cam z vel v] by ((() - ([cos v] of ((rot Y) + (-90)) )) * (3))\n        end\n        if <key (d v) pressed?> then\n            change [cam x vel v] by (([sin v] of ((rot Y) + (0)) ) * (3))\n            change [cam z vel v] by (([cos v] of ((rot Y) + (180)) ) * (3))\n        end\n        if <key (a v) pressed?> then\n            change [cam x vel v] by (([sin v] of ((rot Y) + (180)) ) * (3))\n            change [cam z vel v] by (([cos v] of ((rot Y) + (0)) ) * (3))\n        end\n        if <<<key (space v) pressed?> and <[4] > (falling?)>> and <(no jump) = [0]>> then\n            set [cam y vel v] to [16]\n        end\n    else\n        if <key (z v) pressed?> then\n            change [cam x vel v] by ((() - ([sin v] of ((rot Y) + (-90)) )) * (3))\n            change [cam z vel v] by (([cos v] of ((rot Y) + (-90)) ) * (3))\n        end\n        if <key (s v) pressed?> then\n            change [cam x vel v] by (([sin v] of ((rot Y) + (-90)) ) * (3))\n            change [cam z vel v] by ((() - ([cos v] of ((rot Y) + (-90)) )) * (3))\n        end\n        if <key (d v) pressed?> then\n            change [cam x vel v] by (([sin v] of ((rot Y) + (0)) ) * (3))\n            change [cam z vel v] by (([cos v] of ((rot Y) + (180)) ) * (3))\n        end\n        if <key (q v) pressed?> then\n            change [cam x vel v] by (([sin v] of ((rot Y) + (180)) ) * (3))\n            change [cam z vel v] by (([cos v] of ((rot Y) + (0)) ) * (3))\n        end\n        if <<<key (space v) pressed?> and <[4] > (falling?)>> and <(no jump) = [0]>> then\n            set [cam y vel v] to [16]\n        end\n    end\nelse\n    if <(wasd?) = [0]> then\n        if <key (w v) pressed?> then\n            change [cam x vel v] by ((() - ([sin v] of (rot Y) )) * (3))\n            change [cam z vel v] by (([cos v] of (rot Y) ) * (3))\n        end\n        if <key (s v) pressed?> then\n            change [cam x vel v] by (([sin v] of (rot Y) ) * (3))\n            change [cam z vel v] by ((() - ([cos v] of (rot Y) )) * (3))\n        end\n        if <key (d v) pressed?> then\n            change [cam x vel v] by (([sin v] of ((rot Y) + (90)) ) * (3))\n            change [cam z vel v] by (([cos v] of ((rot Y) + (-90)) ) * (3))\n        end\n        if <key (a v) pressed?> then\n            change [cam x vel v] by (([sin v] of ((rot Y) + (-90)) ) * (3))\n            change [cam z vel v] by (([cos v] of ((rot Y) + (90)) ) * (3))\n        end\n        if <<<key (space v) pressed?> and <[4] > (falling?)>> and <(no jump) = [0]>> then\n            set [cam y vel v] to [16]\n        end\n    else\n        if <key (z v) pressed?> then\n            change [cam x vel v] by ((() - ([sin v] of (rot Y) )) * (3))\n            change [cam z vel v] by (([cos v] of (rot Y) ) * (3))\n        end\n        if <key (s v) pressed?> then\n            change [cam x vel v] by (([sin v] of (rot Y) ) * (3))\n            change [cam z vel v] by ((() - ([cos v] of (rot Y) )) * (3))\n        end\n        if <key (d v) pressed?> then\n            change [cam x vel v] by (([sin v] of ((rot Y) + (90)) ) * (3))\n            change [cam z vel v] by (([cos v] of ((rot Y) + (-90)) ) * (3))\n        end\n        if <key (q v) pressed?> then\n            change [cam x vel v] by (([sin v] of ((rot Y) + (-90)) ) * (3))\n            change [cam z vel v] by (([cos v] of ((rot Y) + (90)) ) * (3))\n        end\n        if <<<key (space v) pressed?> and <[4] > (falling?)>> and <(no jump) = [0]>> then\n            set [cam y vel v] to [16]\n        end\n    end\nend\nif <<key (space v) pressed?> and <(no jump) = [1]>> then\n    if <(no jump sound?) = [0]> then\n        start sound [no jump v]\n    end\nend\nif <<key (space v) pressed?> and <(no jump) = [1]>> then\n    set [no jump sound? v] to [1]\nelse\n    set [no jump sound? v] to [0]\nend\nif <<key (space v) pressed?> and <[4] > (falling?)>> then\n    if <(jump sound?) = [0]> then\n        start sound [jump v]\n    end\nend\nif <<key (space v) pressed?> and <[4] > (falling?)>> then\n    set [jump sound? v] to [1]\nelse\n    set [jump sound? v] to [0]\nend\nif <(mouse control) = [1]> then\n    if <(reverse control) = [1]> then\n        set [rot x v] to ((mouse y) * (-0.75))\n        set [rot y v] to ((mouse x) * (-0.75))\n    else\n        set [rot x v] to ((mouse y) * (0.75))\n        set [rot y v] to ((mouse x) * (0.75))\n    end\nelse\n    if <(reverse control) = [1]> then\n        if <key (up arrow v) pressed?> then\n            change [rot x vel v] by (-2)\n        end\n        if <key (down arrow v) pressed?> then\n            change [rot x vel v] by (2)\n        end\n        if <key (right arrow v) pressed?> then\n            change [rot y vel v] by (2)\n        end\n        if <key (left arrow v) pressed?> then\n            change [rot y vel v] by (-2)\n        end\n    else\n        if <key (up arrow v) pressed?> then\n            change [rot x vel v] by (2)\n        end\n        if <key (down arrow v) pressed?> then\n            change [rot x vel v] by (-2)\n        end\n        if <key (right arrow v) pressed?> then\n            change [rot y vel v] by (-2)\n        end\n        if <key (left arrow v) pressed?> then\n            change [rot y vel v] by (2)\n        end\n    end\nend\nchange [falling? v] by (1)\nchange [cam y vel v] by (-0.9)\nchange y by ([floor v] of (cam y vel) )\nset [rot x vel v] to ((rot x vel) * (0.7))\nset [rot y vel v] to ((rot y vel) * (0.7))\nchange [rot x v] by (rot x vel)\nchange [rot y v] by (rot y vel)\nif <(rot X) > [90]> then\n    set [rot x v] to [90]\nend\nif <[-90] > (rot X)> then\n    set [rot x v] to [-90]\nend\nif <(rot Y) > [180]> then\n    set [rot y v] to [-180]\nend\nif <[-180] > (rot Y)> then\n    set [rot y v] to [180]\nend\nif <[-1000] > (cam y y)> then\n    game reset\n    start sound [dead v]\nend\nset [cam x vel v] to ((cam x vel) * (0.7))\nset [cam z vel v] to ((cam z vel) * (0.7))\nchange x by (cam x vel)\nchange z by (cam z vel)\nif <(3th person) = [1]> then\n    set [cam y v] to (((cam y y) + (([sin v] of ((rot X) + (180)) ) * (200))) + (100))\n    set [cam x v] to (((cam x x) + (([cos v] of ((rot Y) + (180)) ) * (200))) + (() - (([sin v] of ((rot X) + (90)) ) * (50))))\n    set [cam z v] to (((cam z z) + (([sin v] of ((rot Y) + (180)) ) * (200))) + (() - (([sin v] of ((rot X) + (90)) ) * (50))))\nelse\n    set [cam y v] to ((cam y y) + (100))\n    set [cam x v] to (cam x x)\n    set [cam z v] to (cam z z)\nend\n\ndefine render\nif <(layering) = [1]> then\n    sort\nend\nCalculate Trig Values\nDistance (cam x) ((cam y) + (100)) (cam z) (cam x x) (cam y y) (cam z z)\nset [player draw? v] to [0]\nset [distance player v] to (Distance)\nset [render i v] to [0]\nrepeat (length of [all blocks sorted v])\n    change [render i v] by (1)\n    if <<(distance player) > (item (render i) of [all blocks sorted distance v])> and <(3th person) = [1]>> then\n        set pen size to (5)\n        set pen color to (#ff5af8)\n        Draw Line (cam x x) (cam y y) (cam z z) to (cam x x) ((cam y y) + (100)) (cam z z)\n        set pen size to (20)\n        Draw Line (cam x x) ((cam y y) + (100)) (cam z z) to (cam x x) ((cam y y) + (100)) (cam z z)\n        set [player draw? v] to [1]\n    end\n    if <(item (render i) of [all block sorted type v]) = [1]> then\n        set pen color to (#5ee1ff)\n    else\n        if <(item (render i) of [all block sorted type v]) = [2]> then\n            set pen color to (#ff5252)\n        else\n            if <(item (render i) of [all block sorted type v]) = [3]> then\n                set pen color to (#78ff33)\n            else\n                if <(item (render i) of [all block sorted type v]) = [4]> then\n                    set pen color to (#e9ff50)\n                else\n                    if <(item (render i) of [all block sorted type v]) = [5]> then\n                        set pen color to (#c327ff)\n                    else\n                        if <(item (render i) of [all block sorted type v]) = [6]> then\n                            set pen color to (#8a590f)\n                        else\n                            if <(item (render i) of [all block sorted type v]) = [7]> then\n                                set pen color to (#ff7a00)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    calculate cube location\n    draw cube at (x cube) (y cube) (z cube)\nend\nif <<(3th person) = [1]> and <(player draw?) = [0]>> then\n    set pen size to (5)\n    set pen color to (#ff5af8)\n    Draw Line (cam x x) (cam y y) (cam z z) to (cam x x) ((cam y y) + (100)) (cam z z)\n    set pen size to (20)\n    Draw Line (cam x x) ((cam y y) + (100)) (cam z z) to (cam x x) ((cam y y) + (100)) (cam z z)\nend\n\ndefine add block at (x) (y) (z) (t)\nadd (join ((x) + (45)) (join ((y) + (45)) ((z) + (45)))) to [all blocks sorted v]\nadd [0] to [all blocks sorted distance v]\nif <(t) = [1]> then\n    add (join ((x) + (45)) (join ((y) + (45)) ((z) + (45)))) to [level blocks v]\n    add [1] to [all block sorted type v]\nelse\n    if <(t) = [2]> then\n        add (join ((x) + (45)) (join ((y) + (45)) ((z) + (45)))) to [level danger v]\n        add [2] to [all block sorted type v]\n    else\n        if <(t) = [3]> then\n            add (join ((x) + (45)) (join ((y) + (45)) ((z) + (45)))) to [level end v]\n            add [3] to [all block sorted type v]\n        else\n            if <(t) = [4]> then\n                add (join ((x) + (45)) (join ((y) + (45)) ((z) + (45)))) to [level bouncers v]\n                add [4] to [all block sorted type v]\n            else\n                if <(t) = [5]> then\n                    add (join ((x) + (45)) (join ((y) + (45)) ((z) + (45)))) to [level no jump v]\n                    add [5] to [all block sorted type v]\n                else\n                    if <(t) = [6]> then\n                        add (join ((x) + (45)) (join ((y) + (45)) ((z) + (45)))) to [level teleport v]\n                        add [6] to [all block sorted type v]\n                    else\n                        if <(t) = [7]> then\n                            add [7] to [all block sorted type v]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine level (l)\ndelete all of [level blocks v]\ndelete all of [level danger v]\ndelete all of [level end v]\ndelete all of [level bouncers v]\ndelete all of [all block sorted type v]\ndelete all of [all blocks sorted v]\ndelete all of [all blocks sorted distance v]\ndelete all of [level no jump v]\ndelete all of [level teleport v]\nif <(l) = [1]> then\n    add block at [0] [-1] [0] [1]\n    add block at [2] [0] [0] [1]\n    add block at [4] [1] [0] [1]\n    add block at [4] [2] [2] [1]\n    add block at [4] [3] [4] [3]\nelse\n    if <(l) = [2]> then\n        add block at [0] [-1] [0] [1]\n        add block at [2] [0] [0] [1]\n        add block at [4] [0] [-2] [1]\n        add block at [4] [0] [-5] [1]\n        add block at [4] [1] [-7] [3]\n    else\n        if <(l) = [3]> then\n            add block at [0] [-1] [0] [1]\n            add block at [1] [-1] [0] [1]\n            add block at [2] [0] [0] [2]\n            add block at [2] [-1] [0] [1]\n            add block at [3] [-1] [0] [1]\n            add block at [4] [-1] [0] [1]\n            add block at [5] [0] [0] [2]\n            add block at [5] [-1] [0] [1]\n            add block at [6] [-1] [0] [1]\n            add block at [7] [-1] [0] [1]\n            add block at [9] [1] [0] [3]\n        else\n            if <(l) = [4]> then\n                add block at [0] [-1] [0] [1]\n                add block at [2] [0] [0] [2]\n                add block at [3] [-1] [0] [1]\n                add block at [5] [0] [0] [1]\n                add block at [7] [1] [0] [2]\n                add block at [8] [0] [0] [1]\n                add block at [10] [1] [0] [1]\n                add block at [12] [2] [0] [3]\n            else\n                if <(l) = [5]> then\n                    add block at [0] [-1] [0] [1]\n                    add block at [1] [0] [0] [2]\n                    add block at [0] [0] [1] [2]\n                    add block at [1] [-1] [1] [1]\n                    add block at [3] [-1] [3] [1]\n                    add block at [4] [0] [3] [2]\n                    add block at [3] [0] [4] [2]\n                    add block at [4] [-1] [4] [1]\n                    add block at [6] [0] [6] [3]\n                else\n                    if <(l) = [6]> then\n                        add block at [0] [-1] [0] [1]\n                        add block at [1] [-1] [0] [1]\n                        add block at [1] [0] [0] [4]\n                        add block at [3] [4] [0] [4]\n                        add block at [5] [8] [0] [4]\n                        add block at [7] [12] [0] [3]\n                    else\n                        if <(l) = [7]> then\n                            add block at [0] [-1] [0] [1]\n                            add block at [1] [-1] [0] [1]\n                            add block at [1] [0] [0] [4]\n                            add block at [1] [6] [0] [1]\n                            add block at [2] [6] [0] [1]\n                            add block at [2] [3] [0] [1]\n                            add block at [4] [3] [0] [1]\n                            add block at [7] [3] [0] [1]\n                            add block at [9] [4] [0] [3]\n                        else\n                            if <(l) = [8]> then\n                                add block at [0] [-1] [0] [1]\n                                add block at [2] [-1] [0] [1]\n                                add block at [4] [0] [0] [4]\n                                add block at [6] [4] [0] [2]\n                                add block at [7] [3] [0] [1]\n                                add block at [10] [1] [0] [4]\n                                add block at [14] [4] [0] [1]\n                                add block at [18] [-2] [0] [3]\n                            else\n                                if <(l) = [9]> then\n                                    add block at [0] [-1] [0] [1]\n                                    add block at [1] [-1] [0] [5]\n                                    add block at [2] [0] [0] [5]\n                                    add block at [2] [1] [-1] [1]\n                                    add block at [2] [2] [-1] [1]\n                                    add block at [3] [0] [0] [5]\n                                    add block at [4] [0] [0] [5]\n                                    add block at [5] [0] [0] [5]\n                                    add block at [6] [0] [0] [5]\n                                    add block at [7] [0] [0] [1]\n                                    add block at [6] [1] [-1] [1]\n                                    add block at [6] [2] [-1] [1]\n                                    add block at [8] [0] [-2] [1]\n                                    add block at [6] [0] [-3] [1]\n                                    add block at [4] [1] [-3] [3]\n                                else\n                                    if <(l) = [10]> then\n                                        add block at [0] [-1] [0] [5]\n                                        add block at [1] [-1] [0] [4]\n                                        add block at [3] [3] [0] [5]\n                                        add block at [5] [1] [0] [1]\n                                        add block at [5] [1] [-2] [4]\n                                        add block at [5] [5] [-5] [1]\n                                        add block at [5] [5] [-5] [1]\n                                        add block at [4] [5] [-5] [1]\n                                        add block at [3] [5] [-5] [5]\n                                        add block at [1] [5] [-5] [1]\n                                        add block at [-2] [6] [-5] [3]\n                                    else\n                                        if <(l) = [11]> then\n                                            add block at [0] [-1] [0] [1]\n                                            add block at [1] [-1] [0] [1]\n                                            add block at [2] [-1] [0] [1]\n                                            add block at [2] [0] [0] [6]\n                                            add block at [0] [3] [-5] [7]\n                                            add block at [0] [0] [-5] [1]\n                                            add block at [1] [0] [-5] [1]\n                                            add block at [2] [0] [-5] [1]\n                                            add block at [4] [1] [-5] [3]\n                                        else\n                                            if <(l) = [12]> then\n                                                add block at [0] [-1] [0] [1]\n                                                add block at [1] [-1] [0] [1]\n                                                add block at [2] [0] [0] [2]\n                                                add block at [2] [-1] [0] [1]\n                                                add block at [3] [-1] [0] [1]\n                                                add block at [4] [-1] [0] [1]\n                                                add block at [5] [0] [0] [2]\n                                                add block at [5] [-1] [0] [1]\n                                                add block at [6] [-1] [0] [1]\n                                                add block at [7] [-1] [0] [1]\n                                                add block at [8] [-1] [0] [1]\n                                                add block at [8] [0] [0] [6]\n                                                add block at [0] [6] [-4] [7]\n                                                add block at [0] [3] [-4] [1]\n                                                add block at [0] [3] [-3] [1]\n                                                add block at [0] [3] [0] [1]\n                                                add block at [0] [4] [3] [3]\n                                            else\n                                                if <(l) = [13]> then\n                                                    add block at [0] [-1] [0] [1]\n                                                    add block at [1] [-1] [0] [1]\n                                                    add block at [3] [-1] [0] [1]\n                                                    add block at [5] [0] [0] [1]\n                                                    add block at [7] [1] [0] [6]\n                                                    add block at [10] [4] [-5] [7]\n                                                    add block at [10] [1] [-5] [1]\n                                                    add block at [10] [1] [-4] [1]\n                                                    add block at [10] [1] [-3] [1]\n                                                    add block at [10] [2] [-3] [2]\n                                                    add block at [10] [1] [-2] [1]\n                                                    add block at [10] [1] [-1] [1]\n                                                    add block at [10] [2] [0] [2]\n                                                    add block at [10] [1] [2] [1]\n                                                    add block at [10] [2] [4] [2]\n                                                    add block at [10] [1] [5] [1]\n                                                    add block at [10] [2] [7] [6]\n                                                    add block at [2] [6] [-1] [7]\n                                                    add block at [2] [3] [-1] [1]\n                                                    add block at [1] [4] [0] [2]\n                                                    add block at [0] [4] [1] [1]\n                                                    add block at [-1] [5] [0] [2]\n                                                    add block at [-2] [5] [-1] [1]\n                                                    add block at [-4] [6] [-3] [6]\n                                                    add block at [10] [9] [-7] [7]\n                                                    add block at [10] [6] [-7] [1]\n                                                    add block at [9] [6] [-7] [1]\n                                                    add block at [7] [6] [-7] [5]\n                                                    add block at [6] [7] [-7] [1]\n                                                    add block at [5] [7] [-7] [5]\n                                                    add block at [3] [7] [-7] [1]\n                                                    add block at [1] [8] [-7] [6]\n                                                    add block at [5] [10] [4] [7]\n                                                    add block at [5] [7] [4] [1]\n                                                    add block at [5] [7] [3] [1]\n                                                    add block at [5] [7] [2] [4]\n                                                    add block at [5] [8] [-2] [4]\n                                                    add block at [5] [12] [-4] [4]\n                                                    add block at [2] [16] [-4] [4]\n                                                    add block at [2] [20] [-1] [4]\n                                                    add block at [5] [24] [-1] [4]\n                                                    add block at [5] [28] [-4] [3]\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine draw cube at (x) (y) (z)\nif <[3] = (resolution)> then\n    set pen size to (10)\n    if <(item (render i) of [all blocks sorted distance v]) < [1500]> then\n        set [fill res v] to [50]\n    else\n        set [fill res v] to [0]\n    end\n    --- [up cube]\n    Draw Line ((x) + (-50)) ((y) + (50)) ((z) + (-50)) to ((x) + (50)) ((y) + (50)) ((z) + (-50))\n    if <(cam y) > ((y) + (50))> then\n        set [fill i v] to [0]\n        repeat ((fill res) - (1))\n            change [fill i v] by (1)\n            Draw Line ((x) + ((((100) / (fill res)) * (fill i)) - (50))) ((y) + (50)) ((z) + (50)) to ((x) + ((((100) / (fill res)) * (fill i)) - (50))) ((y) + (50)) ((z) + (-50))\n        end\n    end\n    Draw Line ((x) + (50)) ((y) + (50)) ((z) + (-50)) to ((x) + (50)) ((y) + (50)) ((z) + (50))\n    Draw Line ((x) + (50)) ((y) + (50)) ((z) + (50)) to ((x) + (-50)) ((y) + (50)) ((z) + (50))\n    Draw Line ((x) + (-50)) ((y) + (50)) ((z) + (50)) to ((x) + (-50)) ((y) + (50)) ((z) + (-50))\n    --- [down cube]\n    Draw Line ((x) + (-50)) ((y) + (-50)) ((z) + (-50)) to ((x) + (50)) ((y) + (-50)) ((z) + (-50))\n    if <((y) + (-50)) > (cam y)> then\n        set [fill i v] to [0]\n        repeat ((fill res) - (1))\n            change [fill i v] by (1)\n            Draw Line ((x) + ((((100) / (fill res)) * (fill i)) - (50))) ((y) + (-50)) ((z) + (50)) to ((x) + ((((100) / (fill res)) * (fill i)) - (50))) ((y) + (-50)) ((z) + (-50))\n        end\n    end\n    Draw Line ((x) + (50)) ((y) + (-50)) ((z) + (-50)) to ((x) + (50)) ((y) + (-50)) ((z) + (50))\n    Draw Line ((x) + (50)) ((y) + (-50)) ((z) + (50)) to ((x) + (-50)) ((y) + (-50)) ((z) + (50))\n    Draw Line ((x) + (-50)) ((y) + (-50)) ((z) + (50)) to ((x) + (-50)) ((y) + (-50)) ((z) + (-50))\n    --- [edge cube]\n    Draw Line ((x) + (-50)) ((y) + (-50)) ((z) + (-50)) to ((x) + (-50)) ((y) + (50)) ((z) + (-50))\n    if <((x) + (-50)) > (cam x)> then\n        set [fill i v] to [0]\n        repeat ((fill res) - (1))\n            change [fill i v] by (1)\n            Draw Line ((x) + (-50)) ((y) + ((((100) / (fill res)) * (fill i)) - (50))) ((z) + (50)) to ((x) + (-50)) ((y) + ((((100) / (fill res)) * (fill i)) - (50))) ((z) + (-50))\n        end\n    end\n    Draw Line ((x) + (50)) ((y) + (-50)) ((z) + (-50)) to ((x) + (50)) ((y) + (50)) ((z) + (-50))\n    if <(cam x) > ((x) + (50))> then\n        set [fill i v] to [0]\n        repeat ((fill res) - (1))\n            change [fill i v] by (1)\n            Draw Line ((x) + (50)) ((y) + ((((100) / (fill res)) * (fill i)) - (50))) ((z) + (50)) to ((x) + (50)) ((y) + ((((100) / (fill res)) * (fill i)) - (50))) ((z) + (-50))\n        end\n    end\n    Draw Line ((x) + (50)) ((y) + (-50)) ((z) + (50)) to ((x) + (50)) ((y) + (50)) ((z) + (50))\n    if <((z) + (-50)) > (cam z)> then\n        set [fill i v] to [0]\n        repeat ((fill res) - (1))\n            change [fill i v] by (1)\n            Draw Line ((x) + (-50)) ((y) + ((((100) / (fill res)) * (fill i)) - (50))) ((z) + (-50)) to ((x) + (50)) ((y) + ((((100) / (fill res)) * (fill i)) - (50))) ((z) + (-50))\n        end\n    end\n    Draw Line ((x) + (-50)) ((y) + (-50)) ((z) + (50)) to ((x) + (-50)) ((y) + (50)) ((z) + (50))\n    if <(cam z) > ((z) + (50))> then\n        set [fill i v] to [0]\n        repeat ((fill res) - (1))\n            change [fill i v] by (1)\n            Draw Line ((x) + (-50)) ((y) + ((((100) / (fill res)) * (fill i)) - (50))) ((z) + (50)) to ((x) + (50)) ((y) + ((((100) / (fill res)) * (fill i)) - (50))) ((z) + (50))\n        end\n    end\nelse\n    if <[2] = (resolution)> then\n        set pen size to (50)\n        if <(item (render i) of [all blocks sorted distance v]) < [700]> then\n            set [fill res v] to [25]\n        else\n            set [fill res v] to [0]\n        end\n        --- [up cube]\n        Draw Line ((x) + (-50)) ((y) + (50)) ((z) + (-50)) to ((x) + (50)) ((y) + (50)) ((z) + (-50))\n        if <(cam y) > ((y) + (50))> then\n            set [fill i v] to [0]\n            repeat ((fill res) - (1))\n                change [fill i v] by (1)\n                Draw Line ((x) + ((((100) / (fill res)) * (fill i)) - (50))) ((y) + (50)) ((z) + (50)) to ((x) + ((((100) / (fill res)) * (fill i)) - (50))) ((y) + (50)) ((z) + (-50))\n            end\n        end\n        Draw Line ((x) + (50)) ((y) + (50)) ((z) + (-50)) to ((x) + (50)) ((y) + (50)) ((z) + (50))\n        Draw Line ((x) + (50)) ((y) + (50)) ((z) + (50)) to ((x) + (-50)) ((y) + (50)) ((z) + (50))\n        Draw Line ((x) + (-50)) ((y) + (50)) ((z) + (50)) to ((x) + (-50)) ((y) + (50)) ((z) + (-50))\n        --- [down cube]\n        Draw Line ((x) + (-50)) ((y) + (-50)) ((z) + (-50)) to ((x) + (50)) ((y) + (-50)) ((z) + (-50))\n        if <((y) + (-50)) > (cam y)> then\n            set [fill i v] to [0]\n            repeat ((fill res) - (1))\n                change [fill i v] by (1)\n                Draw Line ((x) + ((((100) / (fill res)) * (fill i)) - (50))) ((y) + (-50)) ((z) + (50)) to ((x) + ((((100) / (fill res)) * (fill i)) - (50))) ((y) + (-50)) ((z) + (-50))\n            end\n        end\n        Draw Line ((x) + (50)) ((y) + (-50)) ((z) + (-50)) to ((x) + (50)) ((y) + (-50)) ((z) + (50))\n        Draw Line ((x) + (50)) ((y) + (-50)) ((z) + (50)) to ((x) + (-50)) ((y) + (-50)) ((z) + (50))\n        Draw Line ((x) + (-50)) ((y) + (-50)) ((z) + (50)) to ((x) + (-50)) ((y) + (-50)) ((z) + (-50))\n        --- [edge cube]\n        Draw Line ((x) + (-50)) ((y) + (-50)) ((z) + (-50)) to ((x) + (-50)) ((y) + (50)) ((z) + (-50))\n        if <((x) + (-50)) > (cam x)> then\n            set [fill i v] to [0]\n            repeat ((fill res) - (1))\n                change [fill i v] by (1)\n                Draw Line ((x) + (-50)) ((y) + ((((100) / (fill res)) * (fill i)) - (50))) ((z) + (50)) to ((x) + (-50)) ((y) + ((((100) / (fill res)) * (fill i)) - (50))) ((z) + (-50))\n            end\n        end\n        Draw Line ((x) + (50)) ((y) + (-50)) ((z) + (-50)) to ((x) + (50)) ((y) + (50)) ((z) + (-50))\n        if <(cam x) > ((x) + (50))> then\n            set [fill i v] to [0]\n            repeat ((fill res) - (1))\n                change [fill i v] by (1)\n                Draw Line ((x) + (50)) ((y) + ((((100) / (fill res)) * (fill i)) - (50))) ((z) + (50)) to ((x) + (50)) ((y) + ((((100) / (fill res)) * (fill i)) - (50))) ((z) + (-50))\n            end\n        end\n        Draw Line ((x) + (50)) ((y) + (-50)) ((z) + (50)) to ((x) + (50)) ((y) + (50)) ((z) + (50))\n        if <((z) + (-50)) > (cam z)> then\n            set [fill i v] to [0]\n            repeat ((fill res) - (1))\n                change [fill i v] by (1)\n                Draw Line ((x) + (-50)) ((y) + ((((100) / (fill res)) * (fill i)) - (50))) ((z) + (-50)) to ((x) + (50)) ((y) + ((((100) / (fill res)) * (fill i)) - (50))) ((z) + (-50))\n            end\n        end\n        Draw Line ((x) + (-50)) ((y) + (-50)) ((z) + (50)) to ((x) + (-50)) ((y) + (50)) ((z) + (50))\n        if <(cam z) > ((z) + (50))> then\n            set [fill i v] to [0]\n            repeat ((fill res) - (1))\n                change [fill i v] by (1)\n                Draw Line ((x) + (-50)) ((y) + ((((100) / (fill res)) * (fill i)) - (50))) ((z) + (50)) to ((x) + (50)) ((y) + ((((100) / (fill res)) * (fill i)) - (50))) ((z) + (50))\n            end\n        end\n    else\n        if <[1] = (resolution)> then\n            set pen size to (10)\n            --- [up cube]\n            Draw Line ((x) + (-50)) ((y) + (50)) ((z) + (-50)) to ((x) + (50)) ((y) + (50)) ((z) + (-50))\n            Draw Line ((x) + (50)) ((y) + (50)) ((z) + (-50)) to ((x) + (50)) ((y) + (50)) ((z) + (50))\n            Draw Line ((x) + (50)) ((y) + (50)) ((z) + (50)) to ((x) + (-50)) ((y) + (50)) ((z) + (50))\n            Draw Line ((x) + (-50)) ((y) + (50)) ((z) + (50)) to ((x) + (-50)) ((y) + (50)) ((z) + (-50))\n            --- [down cube]\n            Draw Line ((x) + (-50)) ((y) + (-50)) ((z) + (-50)) to ((x) + (50)) ((y) + (-50)) ((z) + (-50))\n            Draw Line ((x) + (50)) ((y) + (-50)) ((z) + (-50)) to ((x) + (50)) ((y) + (-50)) ((z) + (50))\n            Draw Line ((x) + (50)) ((y) + (-50)) ((z) + (50)) to ((x) + (-50)) ((y) + (-50)) ((z) + (50))\n            Draw Line ((x) + (-50)) ((y) + (-50)) ((z) + (50)) to ((x) + (-50)) ((y) + (-50)) ((z) + (-50))\n            --- [edge cube]\n            Draw Line ((x) + (-50)) ((y) + (-50)) ((z) + (-50)) to ((x) + (-50)) ((y) + (50)) ((z) + (-50))\n            Draw Line ((x) + (50)) ((y) + (-50)) ((z) + (-50)) to ((x) + (50)) ((y) + (50)) ((z) + (-50))\n            Draw Line ((x) + (50)) ((y) + (-50)) ((z) + (50)) to ((x) + (50)) ((y) + (50)) ((z) + (50))\n            Draw Line ((x) + (-50)) ((y) + (-50)) ((z) + (50)) to ((x) + (-50)) ((y) + (50)) ((z) + (50))\n        end\n    end\nend\n\ndefine calculate cube location\nset [all blocks sorted item # v] to (item (render i) of [all blocks sorted v])\nset [x cube v] to (((join (letter (1) of (all blocks sorted item #)) (letter (2) of (all blocks sorted item #))) - (45)) * (100))\nset [y cube v] to (((join (letter (3) of (all blocks sorted item #)) (letter (4) of (all blocks sorted item #))) - (45)) * (100))\nset [z cube v] to (((join (letter (5) of (all blocks sorted item #)) (letter (6) of (all blocks sorted item #))) - (45)) * (100))\n\ndefine change x by (xs)\nchange [cam x x v] by (xs)\nrepeat until <<<not <[level blocks v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round (((cam y y) + (100)) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?>> and <not <[level bouncers v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round (((cam y y) + (100)) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?>>> and <not <[level no jump v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round (((cam y y) + (100)) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?>>>\n    if <(xs) > [0]> then\n        change [cam x x v] by (-1)\n    else\n        change [cam x x v] by (1)\n    end\n    set [cam x vel v] to [0]\nend\nif <[level danger v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round (((cam y y) + (100)) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?> then\n    game reset\n    start sound [dead v]\nend\nif <[level end v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round (((cam y y) + (100)) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?> then\n    change [level v] by (1)\n    game reset\n    start sound [level end v]\nend\nrepeat until <<<not <[level blocks v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round ((cam y y) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?>> and <not <[level bouncers v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round ((cam y y) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?>>> and <not <[level no jump v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round ((cam y y) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?>>>\n    if <(xs) > [0]> then\n        change [cam x x v] by (-1)\n    else\n        change [cam x x v] by (1)\n    end\n    set [cam x vel v] to [0]\nend\nif <[level danger v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round ((cam y y) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?> then\n    game reset\n    start sound [dead v]\nend\nif <[level end v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round ((cam y y) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?> then\n    change [level v] by (1)\n    game reset\n    start sound [level end v]\nend\nif <[level teleport v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round ((cam y y) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?> then\n    start sound [teleport v]\n    set [falling? v] to [69]\n    set [cam x vel v] to [0]\n    set [cam y vel v] to [0]\n    set [cam z vel v] to [0]\n    if <(level) = [11]> then\n        set [cam x x v] to [0]\n        set [cam y y v] to [300]\n        set [cam z z v] to [-500]\n    else\n        if <(level) = [12]> then\n            set [cam x x v] to [0]\n            set [cam y y v] to [600]\n            set [cam z z v] to [-400]\n        else\n            if <<<[101] > (cam y y)> and <(level) = [13]>> and <(cam x x) < [800]>> then\n                set [cam x x v] to [1000]\n                set [cam y y v] to [400]\n                set [cam z z v] to [-500]\n            else\n                if <<[201] > (cam y y)> and <(level) = [13]>> then\n                    set [cam x x v] to [200]\n                    set [cam y y v] to [600]\n                    set [cam z z v] to [-100]\n                else\n                    if <<[601] > (cam y y)> and <(level) = [13]>> then\n                        set [cam x x v] to [1000]\n                        set [cam y y v] to [900]\n                        set [cam z z v] to [-700]\n                    else\n                        if <<[801] > (cam y y)> and <(level) = [13]>> then\n                            set [cam x x v] to [500]\n                            set [cam y y v] to [1000]\n                            set [cam z z v] to [400]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nif <[level teleport v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round (((cam y y) + (100)) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?> then\n    start sound [teleport v]\n    set [falling? v] to [69]\n    set [cam x vel v] to [0]\n    set [cam y vel v] to [0]\n    set [cam z vel v] to [0]\n    if <(level) = [11]> then\n        set [cam x x v] to [0]\n        set [cam y y v] to [300]\n        set [cam z z v] to [-500]\n    else\n        if <(level) = [12]> then\n            set [cam x x v] to [0]\n            set [cam y y v] to [600]\n            set [cam z z v] to [-400]\n        else\n            if <<<[101] > (cam y y)> and <(level) = [13]>> and <(cam x x) < [800]>> then\n                set [cam x x v] to [1000]\n                set [cam y y v] to [400]\n                set [cam z z v] to [-500]\n            else\n                if <<[201] > (cam y y)> and <(level) = [13]>> then\n                    set [cam x x v] to [200]\n                    set [cam y y v] to [600]\n                    set [cam z z v] to [-100]\n                else\n                    if <<[601] > (cam y y)> and <(level) = [13]>> then\n                        set [cam x x v] to [1000]\n                        set [cam y y v] to [900]\n                        set [cam z z v] to [-700]\n                    else\n                        if <<[801] > (cam y y)> and <(level) = [13]>> then\n                            set [cam x x v] to [500]\n                            set [cam y y v] to [1000]\n                            set [cam z z v] to [400]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine change z by (zs)\nchange [cam z z v] by (zs)\nrepeat until <<<not <[level blocks v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round (((cam y y) + (100)) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?>> and <not <[level bouncers v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round (((cam y y) + (100)) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?>>> and <not <[level no jump v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round (((cam y y) + (100)) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?>>>\n    if <(zs) > [0]> then\n        change [cam z z v] by (-1)\n    else\n        change [cam z z v] by (1)\n    end\n    set [cam z vel v] to [0]\nend\nif <[level danger v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round (((cam y y) + (100)) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?> then\n    game reset\n    start sound [dead v]\nend\nif <[level end v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round (((cam y y) + (100)) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?> then\n    change [level v] by (1)\n    game reset\n    start sound [level end v]\nend\nrepeat until <<<not <[level blocks v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round ((cam y y) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?>> and <not <[level bouncers v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round ((cam y y) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?>>> and <not <[level no jump v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round ((cam y y) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?>>>\n    if <(zs) > [0]> then\n        change [cam z z v] by (-1)\n    else\n        change [cam z z v] by (1)\n    end\n    set [cam z vel v] to [0]\nend\nif <[level danger v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round ((cam y y) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?> then\n    game reset\n    start sound [dead v]\nend\nif <[level end v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round ((cam y y) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?> then\n    change [level v] by (1)\n    game reset\n    start sound [level end v]\nend\nif <[level teleport v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round ((cam y y) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?> then\n    start sound [teleport v]\n    set [falling? v] to [69]\n    set [cam x vel v] to [0]\n    set [cam y vel v] to [0]\n    set [cam z vel v] to [0]\n    if <(level) = [11]> then\n        set [cam x x v] to [0]\n        set [cam y y v] to [300]\n        set [cam z z v] to [-500]\n    else\n        if <(level) = [12]> then\n            set [cam x x v] to [0]\n            set [cam y y v] to [600]\n            set [cam z z v] to [-400]\n        else\n            if <<<[101] > (cam y y)> and <(level) = [13]>> and <(cam x x) < [800]>> then\n                set [cam x x v] to [1000]\n                set [cam y y v] to [400]\n                set [cam z z v] to [-500]\n            else\n                if <<[201] > (cam y y)> and <(level) = [13]>> then\n                    set [cam x x v] to [200]\n                    set [cam y y v] to [600]\n                    set [cam z z v] to [-100]\n                else\n                    if <<[601] > (cam y y)> and <(level) = [13]>> then\n                        set [cam x x v] to [1000]\n                        set [cam y y v] to [900]\n                        set [cam z z v] to [-700]\n                    else\n                        if <<[801] > (cam y y)> and <(level) = [13]>> then\n                            set [cam x x v] to [500]\n                            set [cam y y v] to [1000]\n                            set [cam z z v] to [400]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nif <[level teleport v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round (((cam y y) + (100)) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?> then\n    start sound [teleport v]\n    set [falling? v] to [69]\n    set [cam x vel v] to [0]\n    set [cam y vel v] to [0]\n    set [cam z vel v] to [0]\n    if <(level) = [11]> then\n        set [cam x x v] to [0]\n        set [cam y y v] to [300]\n        set [cam z z v] to [-500]\n    else\n        if <(level) = [12]> then\n            set [cam x x v] to [0]\n            set [cam y y v] to [600]\n            set [cam z z v] to [-400]\n        else\n            if <<<[101] > (cam y y)> and <(level) = [13]>> and <(cam x x) < [800]>> then\n                set [cam x x v] to [1000]\n                set [cam y y v] to [400]\n                set [cam z z v] to [-500]\n            else\n                if <<[201] > (cam y y)> and <(level) = [13]>> then\n                    set [cam x x v] to [200]\n                    set [cam y y v] to [600]\n                    set [cam z z v] to [-100]\n                else\n                    if <<[601] > (cam y y)> and <(level) = [13]>> then\n                        set [cam x x v] to [1000]\n                        set [cam y y v] to [900]\n                        set [cam z z v] to [-700]\n                    else\n                        if <<[801] > (cam y y)> and <(level) = [13]>> then\n                            set [cam x x v] to [500]\n                            set [cam y y v] to [1000]\n                            set [cam z z v] to [400]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine change y by (ys)\nchange [cam y y v] by (ys)\nif <<[level blocks v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round ((cam y y) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?> or <[level no jump v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round ((cam y y) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?>> then\n    if <(ys) > [0]> then\n        set [platform sound? v] to [0]\n    else\n        if <(platform sound?) = [0]> then\n            set [platform sound? v] to [1]\n            start sound [platforms v]\n        end\n    end\nelse\n    set [platform sound? v] to [0]\nend\nrepeat until <not <[level blocks v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round (((cam y y) + (100)) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?>>\n    if <(ys) > [0]> then\n        change [cam y y v] by (-1)\n    else\n        change [cam y y v] by (1)\n        set [falling? v] to [0]\n    end\n    set [cam y vel v] to [0]\nend\nif <[level danger v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round (((cam y y) + (100)) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?> then\n    game reset\n    start sound [dead v]\nend\nif <[level end v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round (((cam y y) + (100)) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?> then\n    change [level v] by (1)\n    game reset\n    start sound [level end v]\nend\nrepeat until <not <[level blocks v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round ((cam y y) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?>>\n    if <(ys) > [0]> then\n        change [cam y y v] by (-1)\n    else\n        change [cam y y v] by (1)\n        set [falling? v] to [0]\n    end\n    set [cam y vel v] to [0]\nend\nif <[level danger v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round ((cam y y) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?> then\n    game reset\n    start sound [dead v]\nend\nif <[level end v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round ((cam y y) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?> then\n    change [level v] by (1)\n    game reset\n    start sound [level end v]\nend\nrepeat until <not <[level bouncers v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round ((cam y y) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?>>\n    if <(ys) > [0]> then\n        change [cam y y v] by (-1)\n        set [cam y vel v] to [0]\n    else\n        change [cam y y v] by (1)\n        set [cam y vel v] to [30]\n        start sound [bouncer v]\n    end\nend\nrepeat until <not <[level bouncers v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round (((cam y y) + (100)) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?>>\n    if <(ys) > [0]> then\n        change [cam y y v] by (-1)\n        set [cam y vel v] to [0]\n    else\n        change [cam y y v] by (1)\n        set [cam y vel v] to [30]\n    end\nend\nrepeat until <not <[level no jump v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round (((cam y y) + (100)) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?>>\n    if <(ys) > [0]> then\n        change [cam y y v] by (-1)\n    else\n        change [cam y y v] by (1)\n    end\n    set [cam y vel v] to [0]\nend\nif <[level no jump v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round ((cam y y) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?> then\n    repeat until <not <[level no jump v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round ((cam y y) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?>>\n        if <(ys) > [0]> then\n            change [cam y y v] by (-1)\n        else\n            change [cam y y v] by (1)\n            set [no jump v] to [1]\n        end\n        set [cam y vel v] to [0]\n    end\nelse\n    set [no jump v] to [0]\nend\nif <[level teleport v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round ((cam y y) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?> then\n    start sound [teleport v]\n    set [falling? v] to [69]\n    set [cam x vel v] to [0]\n    set [cam y vel v] to [0]\n    set [cam z vel v] to [0]\n    if <(level) = [11]> then\n        set [cam x x v] to [0]\n        set [cam y y v] to [300]\n        set [cam z z v] to [-500]\n    else\n        if <(level) = [12]> then\n            set [cam x x v] to [0]\n            set [cam y y v] to [600]\n            set [cam z z v] to [-400]\n        else\n            if <<<[101] > (cam y y)> and <(level) = [13]>> and <(cam x x) < [800]>> then\n                set [cam x x v] to [1000]\n                set [cam y y v] to [400]\n                set [cam z z v] to [-500]\n            else\n                if <<[201] > (cam y y)> and <(level) = [13]>> then\n                    set [cam x x v] to [200]\n                    set [cam y y v] to [600]\n                    set [cam z z v] to [-100]\n                else\n                    if <<[601] > (cam y y)> and <(level) = [13]>> then\n                        set [cam x x v] to [1000]\n                        set [cam y y v] to [900]\n                        set [cam z z v] to [-700]\n                    else\n                        if <<[801] > (cam y y)> and <(level) = [13]>> then\n                            set [cam x x v] to [500]\n                            set [cam y y v] to [1000]\n                            set [cam z z v] to [400]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nif <[level teleport v] contains (join ((round ((cam x x) / (100))) + (45)) (join ((round (((cam y y) + (100)) / (100))) + (45)) ((round ((cam z z) / (100))) + (45))))?> then\n    start sound [teleport v]\n    set [falling? v] to [69]\n    set [cam x vel v] to [0]\n    set [cam y vel v] to [0]\n    set [cam z vel v] to [0]\n    if <(level) = [11]> then\n        set [cam x x v] to [0]\n        set [cam y y v] to [300]\n        set [cam z z v] to [-500]\n    else\n        if <(level) = [12]> then\n            set [cam x x v] to [0]\n            set [cam y y v] to [600]\n            set [cam z z v] to [-400]\n        else\n            if <<<[101] > (cam y y)> and <(level) = [13]>> and <(cam x x) < [800]>> then\n                set [cam x x v] to [1000]\n                set [cam y y v] to [400]\n                set [cam z z v] to [-500]\n            else\n                if <<[201] > (cam y y)> and <(level) = [13]>> then\n                    set [cam x x v] to [200]\n                    set [cam y y v] to [600]\n                    set [cam z z v] to [-100]\n                else\n                    if <<[601] > (cam y y)> and <(level) = [13]>> then\n                        set [cam x x v] to [1000]\n                        set [cam y y v] to [900]\n                        set [cam z z v] to [-700]\n                    else\n                        if <<[801] > (cam y y)> and <(level) = [13]>> then\n                            set [cam x x v] to [500]\n                            set [cam y y v] to [1000]\n                            set [cam z z v] to [400]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine game reset\nset [no jump v] to [0]\nset [falling? v] to [666]\nset [rot x v] to [0]\nif <(3th person) = [1]> then\n    set [rot y v] to [0]\nelse\n    set [rot y v] to [-90]\nend\nset [cam x x v] to [0]\nset [cam x vel v] to [0]\nif <(mouse control) = [1]> then\n    if <(reverse control) = [1]> then\n        set [rot y v] to (mouse x)\n        set [rot x v] to (mouse y)\n    else\n        set [rot y v] to ((mouse x) * (-1))\n        set [rot x v] to ((mouse y) * (-1))\n    end\nend\nset [cam y y v] to [0]\nset [cam y vel v] to [0]\nset [cam z z v] to [0]\nset [cam z vel v] to [0]\nlevel (level)\n\ndefine sort\nset [sort i v] to [0]\nrepeat (length of [all blocks sorted distance v])\n    change [sort i v] by (1)\n    set [all blocks sorted item # v] to (item (sort i) of [all blocks sorted v])\n    if <(3th person) = [1]> then\n        Distance (((cam x x) + (([cos v] of ((rot Y) + (180)) ) * (200))) + (() - (([sin v] of ((rot X) + (90)) ) * (50)))) (((cam y y) + (([sin v] of ((rot X) + (180)) ) * (200))) + (100)) (((cam z z) + (([sin v] of ((rot Y) + (180)) ) * (200))) + (() - (([sin v] of ((rot X) + (90)) ) * (50)))) (((join (letter (1) of (all blocks sorted item #)) (letter (2) of (all blocks sorted item #))) - (45)) * (100)) (((join (letter (3) of (all blocks sorted item #)) (letter (4) of (all blocks sorted item #))) - (45)) * (100)) (((join (letter (5) of (all blocks sorted item #)) (letter (6) of (all blocks sorted item #))) - (45)) * (100))\n    else\n        Distance (cam x x) (cam y y) (cam z z) (((join (letter (1) of (all blocks sorted item #)) (letter (2) of (all blocks sorted item #))) - (45)) * (100)) (((join (letter (3) of (all blocks sorted item #)) (letter (4) of (all blocks sorted item #))) - (45)) * (100)) (((join (letter (5) of (all blocks sorted item #)) (letter (6) of (all blocks sorted item #))) - (45)) * (100))\n    end\n    replace item (sort i) of [all blocks sorted distance v] with (Distance)\nend\nset [done? sort v] to [0]\nrepeat until <(done? sort) = [1]>\n    set [done? sort v] to [1]\n    set [sort i v] to (length of [all block sorted type v])\n    repeat ((sort i) - (1))\n        if <(item (sort i) of [all blocks sorted distance v]) > (item ((sort i) - (1)) of [all blocks sorted distance v])> then\n            set [sort dis v] to (item (sort i) of [all blocks sorted distance v])\n            set [sort pos v] to (item (sort i) of [all blocks sorted v])\n            set [sort t v] to (item (sort i) of [all block sorted type v])\n            replace item (sort i) of [all blocks sorted distance v] with (item ((sort i) - (1)) of [all blocks sorted distance v])\n            replace item (sort i) of [all blocks sorted v] with (item ((sort i) - (1)) of [all blocks sorted v])\n            replace item (sort i) of [all block sorted type v] with (item ((sort i) - (1)) of [all block sorted type v])\n            replace item ((sort i) - (1)) of [all blocks sorted distance v] with (sort dis)\n            replace item ((sort i) - (1)) of [all blocks sorted v] with (sort pos)\n            replace item ((sort i) - (1)) of [all block sorted type v] with (sort t)\n            set [done? sort v] to [0]\n        end\n        change [sort i v] by (-1)\n    end\nend\n\ndefine Set Point 1: (x1) (y1) (z1)\nset [x1 v] to (x1)\nset [y1 v] to (y1)\nset [z1 v] to (z1)\n\nrender\n\n@resolution\n\nwhen this sprite clicked\nchange [resolution v] by (1)\nif <(resolution) > [3]> then\n    set [resolution v] to [1]\nend\nstart sound [Click v]\n\nwhen flag clicked\nset [resolution v] to [1]\nforever\n    if <(level) = [14]> then\n        hide\n    else\n        show\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (20)\n        else\n            set [brightness v] effect to (0)\n        end\n        switch costume to (resolution)\n    end\nend\n\n@the end\n\nwhen flag clicked\nset [timer v] to [0]\nset [size v] to [100]\nforever\n    if <(level) = [14]> then\n        hide variable [fps v]\n        hide variable [level v]\n        show\n        set size to ((([cos v] of (((timer) - (1)) * (5000)) ) * (10)) + (size)) %\n        change [timer v] by (0.001)\n    else\n        show variable [fps v]\n        show variable [level v]\n        hide\n    end\nend\n\n@settings\n\nwhen flag clicked\nforever\n    if <(level) = [14]> then\n        hide\n    else\n        show\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (20)\n        else\n            set [brightness v] effect to (0)\n        end\n        if <(settings?) = [1]> then\n            switch costume to (costume2 v)\n        else\n            switch costume to (costume1 v)\n        end\n    end\nend\n\nwhen this sprite clicked\nif <(settings?) = [1]> then\n    set [settings? v] to [0]\nelse\n    set [settings? v] to [1]\nend\nstart sound [Click v]\n\n@setting 2\n\nwhen flag clicked\nforever\n    if <(settings?) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\n@settings background\n\nwhen flag clicked\nforever\n    if <(settings?) = [1]> then\n        go to [back v] layer\n        set [ghost v] effect to (35)\n        show\n    else\n        hide\n    end\nend\n\n@mouse controll\n\nwhen flag clicked\nforever\n    if <(settings?) = [1]> then\n        show\n        if <(mouse control) = [1]> then\n            switch costume to (costume1 v)\n        else\n            switch costume to (costume2 v)\n        end\n    else\n        hide\n    end\nend\n\n@3rd person\n\nwhen flag clicked\nforever\n    if <(settings?) = [1]> then\n        show\n        if <(3th person) = [1]> then\n            switch costume to (costume1 v)\n        else\n            switch costume to (costume2 v)\n        end\n    else\n        hide\n    end\nend\n\n@reverse controls\n\nwhen flag clicked\nforever\n    if <(settings?) = [1]> then\n        show\n        if <(reverse control) = [1]> then\n            switch costume to (costume1 v)\n        else\n            switch costume to (costume2 v)\n        end\n    else\n        hide\n    end\nend\n\n@wasd-zqsd\n\nwhen flag clicked\nforever\n    if <(settings?) = [1]> then\n        show\n        if <(wasd?) = [1]> then\n            switch costume to (costume2 v)\n        else\n            switch costume to (costume1 v)\n        end\n    else\n        hide\n    end\nend\n\n@layering\n\nwhen flag clicked\nforever\n    if <(settings?) = [1]> then\n        show\n        if <(layering) = [1]> then\n            switch costume to (costume1 v)\n        else\n            switch costume to (costume2 v)\n        end\n    else\n        hide\n    end\nend\n\n@thumbnail\n\nwhen flag clicked\nhide\n\n@fps level\n\nwhen flag clicked\nforever\n    if <(level) = [14]> then\n        hide\n    else\n        show\n    end\nend\n\n@wasd/zqsd hitbox\n\nwhen flag clicked\nforever\n    if <(settings?) = [1]> then\n        show\n        go to [front v] layer\n        set [ghost v] effect to (99)\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <(wasd?) = [1]> then\n    set [wasd? v] to [0]\nelse\n    set [wasd? v] to [1]\nend\nstart sound [Click v]\n\n@mouse control hitbox\n\nwhen flag clicked\nforever\n    if <(settings?) = [1]> then\n        show\n        set [ghost v] effect to (99)\n        go to [front v] layer\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <(mouse control) = [1]> then\n    set [mouse control v] to [0]\nelse\n    set [mouse control v] to [1]\nend\nstart sound [Click v]\n\n@3rd person hitbox\n\nwhen flag clicked\nforever\n    if <(settings?) = [1]> then\n        show\n        set [ghost v] effect to (99)\n        go to [front v] layer\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <(3th person) = [1]> then\n    set [3th person v] to [0]\nelse\n    set [3th person v] to [1]\nend\nstart sound [Click v]\n\n@reverse control hitbox\n\nwhen flag clicked\nforever\n    if <(settings?) = [1]> then\n        show\n        set [ghost v] effect to (99)\n        go to [front v] layer\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <(reverse control) = [1]> then\n    set [reverse control v] to [0]\nelse\n    set [reverse control v] to [1]\nend\nstart sound [Click v]\n\n@layering hitbox\n\nwhen flag clicked\nforever\n    if <(settings?) = [1]> then\n        show\n        set [ghost v] effect to (99)\n        go to [front v] layer\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <(layering) = [1]> then\n    set [layering v] to [0]\nelse\n    set [layering v] to [1]\nend\nstart sound [Click v]\n\n