Nature - 3D Platformer #games

Instructions: READ EVERYTHING HERE \n\nI messed up with see inside and unshare lol.\n\nWarning laggy!!!  Use https://forkphorus.github.io/#410656313 if it works (For me it didn't)\n\n                          @k0stya presents\n                                - Nature -\n                             3D Platformer\n                            \n\nThis is a 3D platformer that has many nature aspects such as parkour on trees, climbing jungle trees, and so on! This contains 5 levels of simple but fun challenges!\n\nWARNING!!!\nThis may lag a lot especially the end level. Recommended to play on\n https://forkphorus.github.io/#410656313 if it works (For me it didn't)\n\nG for Wireframe (Less Lag)\nF for Filled (More Lag\n\n                                    -Movement-\n- Wasd to move\n- Arrow keys or cursor to look around\n\nP To Skip\n1 For First Person View\n3 For Third Person Viw\n\n                                   Levels\n~Tree Climb\n~Floating Pond\n~Tree run\n~Vines\n~Floating Falls\n~End Level\n\nI didn't have enough time to add more fun levels with gravity changes, Lava, Bounce. Due to going to camping.\n

@Stage\n\n@Note\n\n@3D\n\ndefine broadcast\nbroadcast (tick v)\nbroadcast (tick v)\n\ndefine Tick\nbroadcast\nerase all\npen up\nset pen size to (2)\nLevel\nTurn and Move\nbroadcast\n\nwhen I receive [tick v]\nbroadcast\nTick\nbroadcast\n\ndefine fill (ax) (ay) (bx) (by) (cx) (cy) resolution: (res)\nset pen size to (20)\nchange pen (brightness v) by (-10)\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\nchange pen (brightness v) by (10)\nif <(Fill on?) = [Yes]> then\n    set [lena v] to ([sqrt v] of ((((bx) - (cx)) * ((bx) - (cx))) + (((by) - (cy)) * ((by) - (cy)))) )\n    set [lenb v] to ([sqrt v] of ((((ax) - (cx)) * ((ax) - (cx))) + (((ay) - (cy)) * ((ay) - (cy)))) )\n    set [lenc v] to ([sqrt v] of ((((ax) - (bx)) * ((ax) - (bx))) + (((ay) - (by)) * ((ay) - (by)))) )\n    set [peri v] to ((1) / (((lena) + (lenb)) + (lenc)))\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    set [ind v] to ([sqrt v] of ((((((lenb) + (lenc)) - (lena)) * (((lenc) + (lena)) - (lenb))) * (((lena) + (lenb)) - (lenc))) * (peri)) )\n    set [aox v] to ((incx) - (ax))\n    set [aoy v] to ((incy) - (ay))\n    set [box v] to ((incx) - (bx))\n    set [boy v] to ((incy) - (by))\n    set [cox v] to ((incx) - (cx))\n    set [coy v] to ((incy) - (cy))\n    if <<(lena) < (lenb)> and <(lena) < (lenc)>> then\n        set [td v] to ([sqrt v] of (((Aox) * (Aox)) + ((Aoy) * (Aoy))) )\n    else\n        if <<(lenb) > (lena)> or <(lenb) > (lenc)>> then\n            set [td v] to ([sqrt v] of (((Cox) * (Cox)) + ((Coy) * (Coy))) )\n        else\n            set [td v] to ([sqrt v] of (((Box) * (Box)) + ((Boy) * (Boy))) )\n        end\n    end\n    set [rate v] to ((((td) * (2)) - (ind)) / ((td) * (4)))\n    set [td v] to ((1) + (0))\n    go to x: (round (incx)) y: (round (incy))\n    set pen size to (ind)\n    pen down\n    repeat ([ceiling v] of (([log v] of ((res) / (ind)) ) / ([log v] of (rate) )) )\n        set [td v] to ((td) * (rate))\n        set pen size to ((ind) * (td))\n        go to x: (((Aox) * (td)) + (ax)) y: (((Aoy) * (td)) + (ay))\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    end\n    pen up\nend\n\ndefine Sort Lists\nset [passes v] to [0]\nset [switches v] to [0]\nrepeat until <<(Passes) > [0]> and <(Switches) = [0]>>\n    set [list_item v] to [0]\n    change [passes v] by (1)\n    set [switches v] to [0]\n    repeat ((length of [block distances v]) - (1))\n        change [list_item v] by (1)\n        if <(item ((List_Item) + (1)) of [block distances v]) > (item (List_Item) of [block distances v])> then\n            set [value v] to (item ((List_Item) + (1)) of [block distances v])\n            replace item ((List_Item) + (1)) of [block distances v] with (item (List_Item) of [block distances v])\n            replace item (List_Item) of [block distances v] with (value)\n            set [value v] to (item ((List_Item) + (1)) of [cube y pos v])\n            replace item ((List_Item) + (1)) of [cube y pos v] with (item (List_Item) of [cube y pos v])\n            replace item (List_Item) of [cube y pos v] with (value)\n            set [value v] to (item ((List_Item) + (1)) of [cube x pos v])\n            replace item ((List_Item) + (1)) of [cube x pos v] with (item (List_Item) of [cube x pos v])\n            replace item (List_Item) of [cube x pos v] with (value)\n            set [value v] to (item ((List_Item) + (1)) of [cube z pos v])\n            replace item ((List_Item) + (1)) of [cube z pos v] with (item (List_Item) of [cube z pos v])\n            replace item (List_Item) of [cube z pos v] with (value)\n            set [value v] to (item ((List_Item) + (1)) of [platform type v])\n            replace item ((List_Item) + (1)) of [platform type v] with (item (List_Item) of [platform type v])\n            replace item (List_Item) of [platform type v] with (value)\n            set [value v] to (item ((List_Item) + (1)) of [teleport x v])\n            replace item ((List_Item) + (1)) of [teleport x v] with (item (List_Item) of [teleport x v])\n            replace item (List_Item) of [teleport x v] with (value)\n            set [value v] to (item ((List_Item) + (1)) of [teleport y v])\n            replace item ((List_Item) + (1)) of [teleport y v] with (item (List_Item) of [teleport y v])\n            replace item (List_Item) of [teleport y v] with (value)\n            set [value v] to (item ((List_Item) + (1)) of [teleport z v])\n            replace item ((List_Item) + (1)) of [teleport z v] with (item (List_Item) of [teleport z v])\n            replace item (List_Item) of [teleport z v] with (value)\n            change [switches v] by (1)\n        end\n    end\nend\n\ndefine Distance\ndelete all of [block distances v]\nset [iii v] to [0]\nrepeat (length of [cube x pos v])\n    change [iii v] by (1)\n    add (round ([sqrt v] of ((((cam z) - (item (iii) of [cube z pos v])) * ((cam z) - (item (iii) of [cube z pos v]))) + ((((cam y) - (item (iii) of [cube y pos v])) * ((cam y) - (item (iii) of [cube y pos v]))) + (((cam x) - (item (iii) of [cube x pos v])) * ((cam x) - (item (iii) of [cube x pos v]))))) )) to [block distances v]\nend\n\ndefine Calculate Trig Values (x) (y)\nset [sin x v] to ([sin v] of (y) )\nset [cos x v] to ([cos v] of (y) )\nset [sin y v] to ([sin v] of (x) )\nset [cos y v] to ([cos v] of (x) )\n\ndefine Turn and Move\nset [speed v] to [2]\nset [rot speed v] to [4]\nchange [rot x v] by ((<key (left arrow v) pressed?> - <key (right arrow v) pressed?>) * (Rot Speed))\nchange [rot y v] by ((<key (up arrow v) pressed?> - <key (down arrow v) pressed?>) * (Rot Speed))\nif <[90] < (rot Y)> then\n    set [rot y v] to [89]\nend\nif <(rot Y) < [-90]> then\n    set [rot y v] to [-89]\nend\nCalculate Trig Values (rot X) (rot Y)\nchange [zvel v] by (((<key (w v) pressed?> - <key (s v) pressed?>) * (cos Y)) * (Speed))\nchange [xvel v] by (((<key (s v) pressed?> - <key (w v) pressed?>) * (sin Y)) * (Speed))\nchange [zvel v] by (((<key (d v) pressed?> - <key (a v) pressed?>) * (sin Y)) * (Speed))\nchange [xvel v] by (((<key (d v) pressed?> - <key (a v) pressed?>) * (cos Y)) * (Speed))\nPhysics\n\ndefine Collisions!\nset [touching platform? v] to [no]\nset [touching end v] to [no]\nset [i v] to [0]\nrepeat (length of [cube x pos v])\n    change [i v] by (1)\n    if <<<not <(Player y) < ((item (i) of [cube y pos v]) - (90))>> and <not <(Player y) > ((item (i) of [cube y pos v]) + (130))>>> and <<<not <(Player Z) < ((item (i) of [cube z pos v]) - (95))>> and <not <(Player Z) > ((item (i) of [cube z pos v]) + (95))>>> and <<not <(Player x) < ((item (i) of [cube x pos v]) - (95))>> and <not <(Player x) > ((item (i) of [cube x pos v]) + (95))>>>>> then\n        if <not <(item (i) of [platform type v]) = [Player]>> then\n            if < (item (i) of [platform type v]) contains [Platform]?> then\n                set [touching platform? v] to [yes]\n            else\n                if <(item (i) of [platform type v]) = [Lava]> then\n                    Reset\n                else\n                    if <(item (i) of [platform type v]) = [Bounce]> then\n                        set [y vel v] to ((Gravity) * (30))\n                    else\n                        if <(item (i) of [platform type v]) = [Teleport]> then\n                            Reset\n                            set [player x v] to (item (i) of [teleport x v])\n                            set [player y v] to (item (i) of [teleport y v])\n                            set [player z v] to (item (i) of [teleport z v])\n                        else\n                            if <(item (i) of [platform type v]) = [Gravity]> then\n                                set [gravity v] to ((Gravity) * (-1))\n                                change [player y v] by ((Gravity) * (200))\n                                set [y vel v] to ((30) * (Gravity))\n                            else\n                                if <(item (i) of [platform type v]) = [Water]> then\n                                    set [y vel v] to ((Y vel) * (0.9))\n                                    set [xvel v] to ((Xvel) * (0.5))\n                                    set [zvel v] to ((Zvel) * (0.5))\n                                    if <key (space v) pressed?> then\n                                        set [y vel v] to ((10) * ((Gravity) * (-1)))\n                                    end\n                                else\n                                    if <(item (i) of [platform type v]) = [End]> then\n                                        change [level v] by (1)\n                                        Reset\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        stop [this script v]\n    end\nend\n\ndefine Physics\nchange [falling? v] by (1)\nchange [y vel v] by (Gravity)\nchange [player y v] by (Y vel)\nCollisions!\nif <(Touching platform?) = [yes]> then\n    Y collision (Y vel)\nend\nchange [player z v] by (Zvel)\nCollisions!\nif <(Touching platform?) = [yes]> then\n    Z Collision (Zvel)\nend\nchange [player x v] by (Xvel)\nCollisions!\nif <(Touching platform?) = [yes]> then\n    X Collisions (Xvel)\nend\nset [zvel v] to ((Zvel) * (0.7))\nset [xvel v] to ((Xvel) * (0.7))\nif <<key (space v) pressed?> and <(Falling?) < [5]>> then\n    set [y vel v] to ((-15) * (Gravity))\nend\nif <(cam y) < [-500]> then\n    Reset\nend\nif <(Person view) = [3]> then\n    Set up 3rd person view cam (Player x) (Player y) (Player Z) [200] [200]\n    Level design ((Player x) / (100)) (((Player y) - (30)) / (100)) ((Player Z) / (100)) [Player]\nelse\n    Set Up First person view\nend\nRender\n\ndefine Y collision (y)\nrepeat until <not <(Touching platform?) = [yes]>>\n    if <(y) > [0]> then\n        change [player y v] by (-1)\n    else\n        change [player y v] by (1)\n        set [falling? v] to [0]\n    end\n    set [y vel v] to [0]\n    Collisions!\nend\n\ndefine Z Collision (z)\nrepeat until <not <(Touching platform?) = [yes]>>\n    if <(z) > [0]> then\n        change [player z v] by (-1)\n    else\n        change [player z v] by (1)\n    end\n    set [zvel v] to [0]\n    Collisions!\nend\n\ndefine X Collisions (x)\nrepeat until <not <(Touching platform?) = [yes]>>\n    if <(x) > [0]> then\n        change [player x v] by (-1)\n    else\n        change [player x v] by (1)\n    end\n    set [xvel v] to [0]\n    Collisions!\nend\n\ndefine Reset\nset [player x v] to [0]\nset [player y v] to [150]\nset [player z v] to [0]\nset [y vel v] to [0]\nset [gravity v] to [-1]\n\ndefine Level\ndelete all of [cube y pos v]\ndelete all of [cube x pos v]\ndelete all of [cube z pos v]\ndelete all of [platform type v]\ndelete all of [teleport x v]\ndelete all of [teleport y v]\ndelete all of [teleport z v]\nif <(Level) = [1]> then\n    Level design [0] [0] [0] [Platform Green]\n    Level design [0] [0] [1] [Platform Green]\n    Level design [1] [0] [1] [Platform Green]\n    Level design [1] [0] [0] [Platform Green]\n    Level design [-1] [0] [1] [Platform Green]\n    Level design [-1] [0] [0] [Platform Green]\n    Level design [2] [1] [2] [Platform Brown]\n    Level design [2] [2] [2] [Platform Brown]\n    Level design [2] [4] [2] [Platform Green]\n    Level design [1] [3] [2] [Platform Green]\n    Level design [2] [3] [3] [Platform Green]\n    Level design [3] [3] [2] [Platform Green]\n    Level design [2] [3] [1] [Platform Green]\n    Level design [-1] [2] [2] [Platform Green]\n    Level design [-3] [1] [2] [Platform Green]\n    Level design [2] [4] [5] [End]\nelse\n    if <(Level) = [2]> then\n        Level design [0] [0] [0] [Platform Green]\n        Level design [1] [0] [1] [Water]\n        Level design [0] [0] [1] [Water]\n        Level design [-1] [0] [1] [Water]\n        Level design [1] [0] [2] [Water]\n        Level design [0] [0] [2] [Water]\n        Level design [-1] [0] [2] [Water]\n        Level design [1] [0] [3] [Water]\n        Level design [0] [0] [3] [Water]\n        Level design [-1] [0] [3] [Water]\n        Level design [1] [-4] [4] [Platform Green]\n        Level design [0] [-4] [4] [Platform Green]\n        Level design [-1] [-4] [4] [Platform Green]\n        Level design [0] [-4] [2] [End]\n    else\n        if <(Level) = [3]> then\n            Level design [0] [-1] [0] [Platform Green]\n            Level design [0] [0] [0] [Platform Brown]\n            Level design [0] [1] [0] [Platform Brown]\n            Level design [0] [3] [0] [Platform Green]\n            Level design [0] [2] [1] [Platform Green]\n            Level design [0] [2] [-1] [Platform Green]\n            Level design [1] [2] [0] [Platform Green]\n            Level design [-1] [2] [0] [Platform Green]\n            Level design [0] [-1] [5] [Platform Green]\n            Level design [0] [0] [5] [Platform Brown]\n            Level design [0] [1] [5] [Platform Brown]\n            Level design [0] [3] [5] [Platform Green]\n            Level design [0] [2] [6] [Platform Green]\n            Level design [0] [2] [4] [Platform Green]\n            Level design [1] [2] [5] [Platform Green]\n            Level design [-1] [2] [5] [Platform Green]\n            Level design [4] [-1] [5] [Platform Green]\n            Level design [4] [0] [5] [Platform Brown]\n            Level design [4] [1] [5] [Platform Brown]\n            Level design [4] [3] [5] [Platform Green]\n            Level design [4] [2] [6] [Platform Green]\n            Level design [4] [2] [4] [Platform Green]\n            Level design [5] [2] [5] [Platform Green]\n            Level design [3] [2] [5] [Platform Green]\n            Level design [8] [0] [5] [End]\n        else\n            if <(Level) = [4]> then\n                Level design [0] [1] [1] [Platform Brown]\n                Level design [0] [2] [1] [Platform Brown]\n                Level design [0] [3] [1] [Platform Brown]\n                Level design [0] [4] [1] [Platform Brown]\n                Level design [0] [5] [1] [Platform Brown]\n                Level design [0] [6] [1] [Platform Brown]\n                Level design [0] [7] [1] [Platform Brown]\n                Level design [0] [8] [1] [Platform Brown]\n                Level design [0] [9] [1] [Platform Brown]\n                Level design [0] [10] [1] [Platform Brown]\n                Level design [0] [0] [0] [Platform Green]\n                Level design [1] [1] [0] [Platform Green]\n                Level design [1] [2] [1] [Platform Green]\n                Level design [1] [3] [2] [Platform Green]\n                Level design [0] [4] [2] [Platform Green]\n                Level design [-1] [5] [2] [Platform Green]\n                Level design [-1] [6] [1] [Platform Green]\n                Level design [-1] [7] [0] [Platform Green]\n                Level design [0] [8] [0] [Platform Green]\n                Level design [1] [9] [0] [Platform Green]\n                Level design [1] [10] [1] [Platform Green]\n                Level design [1] [11] [1] [Platform Green]\n                Level design [1] [11] [2] [Platform Green]\n                Level design [0] [11] [2] [Platform Green]\n                Level design [-1] [11] [2] [Platform Green]\n                Level design [-1] [11] [1] [Platform Green]\n                Level design [-1] [11] [0] [Platform Green]\n                Teleport player from(CUBE POS) [0] [11] [1] To [0] [5] [30]\n                Level design [2] [10] [0] [Platform Green]\n                Level design [2] [10] [1] [Platform Green]\n                Level design [2] [10] [2] [Platform Green]\n                Level design [-2] [10] [0] [Platform Green]\n                Level design [-2] [10] [1] [Platform Green]\n                Level design [-2] [10] [2] [Platform Green]\n                Level design [1] [10] [3] [Platform Green]\n                Level design [0] [10] [3] [Platform Green]\n                Level design [-1] [10] [3] [Platform Green]\n                Level design [1] [10] [-1] [Platform Green]\n                Level design [0] [10] [-1] [Platform Green]\n                Level design [-1] [10] [-1] [Platform Green]\n                Level design [0] [0] [30] [End]\n            else\n                if <(Level) = [5]> then\n                    Level design [0] [0] [0] [Platform Green]\n                    Level design [0] [0] [1] [Water]\n                    Level design [0] [1] [1] [Water]\n                    Level design [0] [2] [1] [Water]\n                    Level design [0] [3] [1] [Water]\n                    Level design [0] [4] [1] [Water]\n                    Level design [0] [5] [1] [Water]\n                    Level design [0] [6] [1] [Water]\n                    Level design [0] [1] [2] [Platform Grey]\n                    Level design [0] [2] [2] [Platform Grey]\n                    Level design [0] [3] [2] [Platform Grey]\n                    Level design [0] [4] [2] [Platform Grey]\n                    Level design [0] [5] [2] [Platform Brown]\n                    Level design [0] [6] [1] [Water]\n                    Level design [1] [1] [2] [Platform Grey]\n                    Level design [1] [2] [2] [Platform Grey]\n                    Level design [1] [3] [2] [Platform Grey]\n                    Level design [1] [4] [2] [Platform Grey]\n                    Level design [1] [5] [2] [Platform Brown]\n                    Level design [1] [6] [1] [Platform Green]\n                    Level design [-1] [1] [2] [Platform Grey]\n                    Level design [-1] [2] [2] [Platform Grey]\n                    Level design [-1] [3] [2] [Platform Grey]\n                    Level design [-1] [4] [2] [Platform Grey]\n                    Level design [-1] [5] [2] [Platform Brown]\n                    Level design [-1] [6] [1] [Platform green]\n                    Level design [0] [6] [2] [Water]\n                    Level design [0] [6] [3] [Water]\n                    Level design [0] [6] [4] [Water]\n                    Level design [1] [6] [4] [Water]\n                    Level design [1] [6] [2] [Platform Green]\n                    Level design [-1] [6] [2] [Platform Green]\n                    Level design [1] [6] [3] [Platform Green]\n                    Level design [-1] [6] [3] [Platform Green]\n                    Level design [-1] [6] [4] [Platform Green]\n                    Level design [0] [6] [6] [Platform Green]\n                    Level design [0] [6] [9] [End]\n                else\n                    Level design [-3] [0] [1] [Water]\n                    Level design [-2] [0] [1] [Water]\n                    Level design [-1] [0] [1] [Water]\n                    Level design [-3] [0] [2] [Water]\n                    Level design [-2] [0] [2] [Water]\n                    Level design [-1] [0] [2] [Water]\n                    Level design [-3] [0] [2] [Platform Green]\n                    Level design [-2] [0] [3] [Water]\n                    Level design [-1] [0] [3] [Water]\n                    Level design [-3] [0] [3] [Platform Green]\n                    Level design [-2] [0] [4] [Water]\n                    Level design [-1] [0] [4] [Water]\n                    Level design [-3] [0] [4] [Platform Green]\n                    Level design [-3] [0] [0] [Platform Green]\n                    Level design [-2] [0] [0] [Platform Green]\n                    Level design [-1] [0] [0] [Platform Green]\n                    Level design [0] [0] [0] [Platform Green]\n                    Level design [1] [0] [0] [Platform Green]\n                    Level design [2] [0] [0] [Platform Green]\n                    Level design [3] [0] [0] [Platform Green]\n                    Level design [0] [0] [1] [Platform Green]\n                    Level design [1] [0] [1] [Platform Green]\n                    Level design [2] [0] [1] [Platform Green]\n                    Level design [3] [0] [1] [Platform Green]\n                    Level design [0] [0] [2] [Platform Green]\n                    Level design [1] [0] [2] [Platform Green]\n                    Level design [2] [0] [2] [Platform Green]\n                    Level design [3] [0] [2] [Platform Green]\n                    Moving platform [2] [0] [4] to [2] [8] [4] Speed [15] Platform type [Platform Green]\n                    Level design [2] [1] [4] [Platform Green]\n                    Level design [0] [0] [3] [Platform Green]\n                    Level design [1] [0] [3] [Platform Green]\n                    Level design [2] [0] [3] [Platform Green]\n                    Level design [0] [0] [3] [Platform Green]\n                    Level design [0] [0] [4] [Water]\n                    Level design [1] [0] [4] [Platform Green]\n                    Level design [3] [0] [4] [Platform Green]\n                    Level design [3] [0] [3] [Platform Green]\n                    Moving platform [2] [0] [4] to [2] [8] [4] Speed [15] Platform type [Platform Green]\n                    Level design [0] [0] [3] [Platform Green]\n                    Level design [1] [0] [3] [Platform Green]\n                    Level design [2] [0] [3] [Platform Green]\n                    Level design [0] [0] [3] [Platform Green]\n                    Level design [0] [0] [4] [Water]\n                    Level design [1] [0] [4] [Platform Green]\n                    Level design [3] [1] [4] [Platform Green]\n                    Level design [3] [1] [3] [Platform Green]\n                    Level design [0] [1] [4] [Water]\n                    Level design [-1] [1] [4] [Water]\n                    Level design [0] [2] [4] [Water]\n                    Level design [-1] [2] [4] [Water]\n                    Level design [0] [3] [4] [Water]\n                    Level design [-1] [3] [4] [Water]\n                    Level design [0] [4] [4] [Water]\n                    Level design [-1] [4] [4] [Water]\n                    Level design [0] [5] [4] [Water]\n                    Level design [-1] [5] [4] [Water]\n                    Level design [0] [1] [5] [Platform Grey]\n                    Level design [-1] [1] [5] [Platform Grey]\n                    Level design [0] [2] [5] [Platform Grey]\n                    Level design [-1] [2] [5] [Platform Grey]\n                    Level design [0] [3] [5] [Platform Grey]\n                    Level design [-1] [3] [5] [Platform Grey]\n                    Level design [0] [4] [5] [Platform Grey]\n                    Level design [-1] [4] [5] [Platform Grey]\n                    Level design [0] [5] [5] [Platform Grey]\n                    Level design [-1] [5] [5] [Platform Grey]\n                    Level design [2] [1] [5] [Platform Grey]\n                    Level design [3] [1] [5] [Platform Grey]\n                    Level design [2] [2] [5] [Platform Grey]\n                    Level design [3] [2] [5] [Platform Grey]\n                    Level design [2] [3] [5] [Platform Grey]\n                    Level design [3] [3] [5] [Platform Grey]\n                    Level design [2] [4] [5] [Platform Grey]\n                    Level design [3] [4] [5] [Platform Grey]\n                    Level design [2] [5] [5] [Platform Grey]\n                    Level design [3] [5] [5] [Platform Grey]\n                    Level design [1] [1] [5] [Platform Grey]\n                    Level design [1] [2] [5] [Platform Grey]\n                    Level design [1] [3] [5] [Platform Grey]\n                    Level design [1] [4] [5] [Platform Grey]\n                    Level design [1] [5] [5] [Platform Grey]\n                    Level design [-2] [1] [5] [Platform Grey]\n                    Level design [-3] [1] [5] [Platform Grey]\n                    Level design [-2] [2] [5] [Platform Grey]\n                    Level design [-3] [2] [5] [Platform Grey]\n                    Level design [-2] [3] [5] [Platform Grey]\n                    Level design [-3] [3] [5] [Platform Grey]\n                    Level design [-2] [4] [5] [Platform Grey]\n                    Level design [-3] [4] [5] [Platform Grey]\n                    Level design [-2] [5] [5] [Platform Grey]\n                    Level design [-3] [5] [5] [Platform Grey]\n                    Level design [-1] [1] [5] [Platform Grey]\n                    Level design [-1] [2] [5] [Platform Grey]\n                    Level design [-1] [3] [5] [Platform Grey]\n                    Level design [-1] [4] [5] [Platform Grey]\n                    Level design [-1] [5] [5] [Platform Grey]\n                    Level design [3] [5] [5] [Platform Green]\n                    Level design [2] [5] [5] [Platform Green]\n                    Level design [1] [5] [5] [Platform Green]\n                    Level design [0] [5] [5] [Water]\n                    Level design [-1] [5] [5] [Water]\n                    Level design [-2] [5] [5] [Platform Green]\n                    Level design [-3] [5] [5] [Platform Green]\n                    Level design [3] [5] [6] [Platform Green]\n                    Level design [2] [5] [6] [Platform Green]\n                    Level design [1] [5] [6] [Platform Green]\n                    Level design [0] [5] [6] [Water]\n                    Level design [-1] [5] [6] [Water]\n                    Level design [-2] [5] [6] [Platform Green]\n                    Level design [-3] [5] [6] [Platform Green]\n                    Level design [3] [5] [7] [Platform Green]\n                    Level design [2] [5] [7] [Platform Green]\n                    Level design [1] [5] [7] [Water]\n                    Level design [0] [5] [7] [Water]\n                    Level design [-1] [5] [7] [Water]\n                    Level design [-2] [5] [6] [Platform Green]\n                    Level design [-3] [5] [6] [Platform Green]\n                    Teleport player from(CUBE POS) [2] [1] [2] To [2] [10] [6]\n                end\n            end\n        end\n    end\nend\n\ndefine Render\nDistance\nSort Lists\nset pen size to (8)\nset [ii v] to [0]\nrepeat (length of [cube x pos v])\n    change [ii v] by (1)\n    if <(item (ii) of [block distances v]) < [1100]> then\n        Select color (item (ii) of [platform type v])\n        Draw Filled Cube At (item (ii) of [cube x pos v]) (item (ii) of [cube y pos v]) (item (ii) of [cube z pos v])\n    end\nend\nDraw Crosshair\n\nwhen flag clicked\nforever\n    if <mouse down?> then\n        set [old mouse x v] to (mouse x)\n        set [old mouse y v] to (mouse y)\n        wait (0.000001) seconds\n        if <not <<<(mouse y) < [-80]> and <(mouse x) < [-140]>> and <(mouse y) < [-80]>>> then\n            change [rot y v] by (((mouse y) - (Old Mouse Y)) / (0.7))\n            change [rot x v] by (((Old Mouse X) - (mouse x)) / (0.7))\n        end\n    end\nend\n\ndefine Select color (current platform type)\nif <(current platform type) = [Platform]> then\n    set pen color to (#33f7db)\nelse\n    if <(current platform type) = [Lava]> then\n        set pen color to (#ff3434)\n    else\n        if <(current platform type) = [Water]> then\n            set pen color to (#207cff)\n        else\n            if <(current platform type) = [Bounce]> then\n                set pen color to (#ffec20)\n            else\n                if <(current platform type) = [Gravity]> then\n                    set pen color to (#ff00d0)\n                else\n                    if <(current platform type) = [Platform Green]> then\n                        set pen color to (#00e61e)\n                    else\n                        if <(current platform type) = [Platform Grey]> then\n                            set pen color to (#b0b0b0)\n                        else\n                            if <(current platform type) = [Platform Brown]> then\n                                set pen color to (#e08a2a)\n                            else\n                                if <(current platform type) = [Teleport]> then\n                                    set pen color to (#bf00ff)\n                                else\n                                    if <(current platform type) = [End]> then\n                                        set pen color to (#00ff15)\n                                    else\n                                        if <(current platform type) = [Player]> then\n                                            set pen color to (#ff9e30)\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Level design (x) (y) (z) (type)\nadd ((x) * (100)) to [cube x pos v]\nadd ((y) * (100)) to [cube y pos v]\nadd ((z) * (100)) to [cube z pos v]\nadd (type) to [platform type v]\nadd [] to [teleport x v]\nadd [] to [teleport y v]\nadd [] to [teleport z v]\n\ndefine Moving platform (x1) (y1) (z1) to (x2) (y2) (z2) Speed (speed) Platform type (type)\nset [speed sin v] to (([sin v] of ((timer) * (speed)) ) + (1))\nLevel design (((((x2) - (x1)) / (2)) * (speed Sin)) + (x1)) (((((y2) - (y1)) / (2)) * (speed Sin)) + (y1)) (((((z2) - (z1)) / (2)) * (speed Sin)) + (z1)) (type)\n\ndefine Set up 3rd person view cam (player x) (player y) (player z) (distance) (height)\nset [cam x v] to ((player x) + (((distance) * (sin Y)) * (cos X)))\nset [cam z v] to ((player z) + ((((distance) * (-1)) * (cos Y)) * (cos X)))\nset [cam y v] to ((player y) + ((distance) * ((sin X) * (-1))))\n\ndefine Draw Filled Cube At (x) (y) (z)\nif <(cam z) < ((z) - (50))> then\n    Draw square| Insert the 2 corners ((x) + (-50)) ((y) + (-50)) ((z) + (-50)) ((x) + (50)) ((y) + (50)) ((z) + (-50))\nend\nif <(cam z) > ((z) + (50))> then\n    Draw square| Insert the 2 corners ((x) + (-50)) ((y) + (-50)) ((z) + (50)) ((x) + (50)) ((y) + (50)) ((z) + (50))\nend\nif <(cam x) > ((x) + (50))> then\n    Draw square| Insert the 2 corners ((x) + (50)) ((y) + (50)) ((z) + (50)) ((x) + (50)) ((y) + (-50)) ((z) + (-50))\nend\nif <(cam x) < ((x) - (50))> then\n    Draw square| Insert the 2 corners ((x) + (-50)) ((y) + (50)) ((z) + (50)) ((x) + (-50)) ((y) + (-50)) ((z) + (-50))\nend\nif <(cam y) > ((y) + (50))> then\n    Fill 3D Tri ((x) + (50)) ((y) + (50)) ((z) + (-50)) ((x) + (-50)) ((y) + (50)) ((z) + (-50)) ((x) + (-50)) ((y) + (50)) ((z) + (50)) [] [] []\n    Fill 3D Tri ((x) + (-50)) ((y) + (50)) ((z) + (50)) ((x) + (50)) ((y) + (50)) ((z) + (50)) ((x) + (50)) ((y) + (50)) ((z) + (-50)) [] [] []\nend\nif <(cam y) < ((y) - (50))> then\n    Fill 3D Tri ((x) + (50)) ((y) + (-50)) ((z) + (-50)) ((x) + (-50)) ((y) + (-50)) ((z) + (-50)) ((x) + (-50)) ((y) + (-50)) ((z) + (50)) [] [] []\n    Fill 3D Tri ((x) + (-50)) ((y) + (-50)) ((z) + (50)) ((x) + (50)) ((y) + (-50)) ((z) + (50)) ((x) + (50)) ((y) + (-50)) ((z) + (-50)) [] [] []\nend\n\ndefine Fill 3D Tri (x1) (y1) (z1) (x2) (y2) (z2) (x3) (y3) (z3) (x4) (y4) (z4)\nX Y Z Setup (x1) (y1) (z1)\nset [x1 v] to (X3)\nset [y1 v] to (Y3)\nset [z1 v] to (Z3)\nX Y Z Setup (x2) (y2) (z2)\nset [x2 v] to (X3)\nset [y2 v] to (Y3)\nset [z2 v] to (Z3)\nX Y Z Setup (x3) (y3) (z3)\nif <not <<(z1) < [1]> and <<(z2) < [1]> and <(Z3) < [1]>>>> then\n    Z Clip\n    set pen (brightness v) to (((1000) - (item (ii) of [block distances v])) / (6))\n    fill ((FOV) * ((x1) / (z1))) ((FOV) * ((y1) / (z1))) ((FOV) * ((x2) / (z2))) ((FOV) * ((y2) / (z2))) ((FOV) * ((X3) / (Z3))) ((FOV) * ((Y3) / (Z3))) resolution: (1)\nend\n\ndefine Set Point (x) (y) (z)\nset [x3 v] to (x)\nset [y3 v] to (y)\nset [z3 v] to (z)\n\ndefine X Y Z Setup (x) (y) (z)\nSet Point ((x) - (cam x)) [] ((z) - (cam z))\nSet Point (((Z3) * (sin Y)) + ((X3) * (cos Y))) ((y) - (cam y)) (((Z3) * (cos Y)) - ((X3) * (sin Y)))\nSet Point (X3) (((Y3) * (cos X)) - ((Z3) * (sin X))) (((Y3) * (sin X)) + ((Z3) * (cos X)))\n\ndefine Z Clip\nif <(z1) < [1]> then\n    set [z1 v] to [1]\nend\nif <(z2) < [1]> then\n    set [z2 v] to [1]\nend\nif <(Z3) < [1]> then\n    set [z3 v] to [1]\nend\n\nwhen flag clicked\nset [fill on? v] to [Yes]\nswitch costume to (costume2 v)\nset size to (Infinity) %\nswitch costume to (costume1 v)\nReset\nset [level v] to [1]\nforever\n    broadcast\nend\n\ndefine Set Up First person view\nset [cam x v] to (Player x)\nset [cam z v] to (Player Z)\nset [cam y v] to (Player y)\n\nwhen [1 v] key pressed\nset [person view v] to [1]\n\nwhen [3 v] key pressed\nset [person view v] to [3]\n\ndefine Draw Crosshair\nset pen size to (2)\nset pen color to (#ffffff)\ngo to x: (-10) y: (0)\npen down\ngo to x: (10) y: (0)\ngo to x: (0) y: (0)\ngo to x: (0) y: (-10)\ngo to x: (0) y: (10)\npen up\n\ndefine Draw square| Insert the 2 corners (x1) (y1) (z1) (x2) (y2) (z2)\nFill 3D Tri (x1) (y1) (z1) (x2) (y2) (z2) (x2) (y1) (z2) [] [] []\nFill 3D Tri (x1) (y1) (z1) (x2) (y2) (z2) (x1) (y2) (z1) [] [] []\n\nLevel design [X] [Y] [Z] [Type]\n\nMoving platform [X1] [Y1] [Z1] to [X2] [Y2] [Z2] Speed [Speed] Platform type [Type]\n\nLevel design [X] [Y] [Z] [Platform]\nLevel design [X] [Y] [Z] [Lava]\nLevel design [X] [Y] [Z] [Bounce]\nLevel design [X] [Y] [Z] [Water]\nLevel design [X] [Y] [Z] [End]\n\ndefine Teleport player from(CUBE POS) (x) (y) (z) To (x1) (y1) (z1)\nadd ((x) * (100)) to [cube x pos v]\nadd ((y) * (100)) to [cube y pos v]\nadd ((z) * (100)) to [cube z pos v]\nadd [Teleport] to [platform type v]\nadd ((x1) * (100)) to [teleport x v]\nadd ((y1) * (100)) to [teleport y v]\nadd ((z1) * (100)) to [teleport z v]\n\nLevel design [] [] [] []\n\nMoving platform [] [] [] to [] [] [] Speed [] Platform type []\n\nTeleport player from(CUBE POS) [] [] [] To [] [] []\n\nwhen [f v] key pressed\nset [fill on? v] to [Yes]\n\nwhen [g v] key pressed\nset [fill on? v] to [No]\n\nwhen [p v] key pressed\nchange [level v] by (1)\n\nfill ((FOV) * ((x1) / (z1))) ((FOV) * ((y1) / (z1))) ((FOV) * ((x2) / (z2))) ((FOV) * ((y2) / (z2))) ((FOV) * ((X3) / (Z3))) ((FOV) * ((Y3) / (Z3))) resolution: (1)\n\n@Screenshot_2020-07-10 Scratch - 3D Platformer\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\n