Escape ( 3D Platformer ) V1.0 

Instructions: <<<Escape --3D Platformer>>>\nThis is my first 3D platformer, with about 2000 blocks!\nTry to pass all the 5 levels and enjoy the game!\n\n!!! To reduce lag, please make sure to play on Turbowarp: https://turbowarp.org/550543923?hqpen\n===================================\nIntroduction: in the project.\nwhat's more, press [1] and [3] to switch between1st-person perspective and 3rd-person perspective. 3rd person is recommended, but they both worth a try!\n===================================

@Stage\n\nwhen flag clicked\nset volume to (70) %\nforever\n    play sound [Avem v] until done\nend\n\n@blank\n\n@pen\n\ndefine setup\nset pen color to (#25a7db)\nset pen size to (3)\nset pen (transparency v) to (30)\nset [_view factor v] to [300]\nset [near plane v] to [20]\n\ndefine position (x) (y)\nswitch costume to (pen v)\nshow\nset size to (1000000000) %\ngo to x: (x) y: (y)\nhide\n\ndefine render\ndraw moon\nset [i v] to [0]\nrepeat (length of [x v])\n    change [i v] by (1)\n    draw cube (item (i) of [x v]) (item (i) of [y v]) (item (i) of [z v]) (item (i) of [lx v]) (item (i) of [ly v]) (item (i) of [lz v]) (item (i) of [type v])\nend\nif <(_Personal) = [3]> then\n    collision\n    draw cube (item (1) of [player sides v]) (item (3) of [player sides v]) (item (5) of [player sides v]) [50] ((50) * (down)) [50] [1]\n    tail/ear generator\nend\ndraw cube [0] [100000] [0] [1] [1] [1] [moon]\n\ndefine set 3d point 1 (x1) (y1) (z1)\nset [x1 v] to (x1)\nset [y1 v] to (y1)\nset [z1 v] to (z1)\n\ndefine set screen point 1 (x1) (y1)\nset [x1 v] to (x1)\nset [y1 v] to (y1)\n\ndefine set 3d point 2 (x2) (y2) (z2)\nset [x2 v] to (x2)\nset [y2 v] to (y2)\nset [z2 v] to (z2)\n\ndefine set screen point 2 (x2) (y2)\nset [x2 v] to (x2)\nset [y2 v] to (y2)\n\ndefine draw line from (x1) (y1) (z1) to (x2) (y2) (z2)\nset 3d point 1 ((x1) - (_Cam X)) ((y1) - (_Cam Y)) ((z1) - (_Cam Z))\nset 3d point 2 ((x2) - (_Cam X)) ((y2) - (_Cam Y)) ((z2) - (_Cam Z))\nset 3d point 1 (((z1) * (sin Xz)) + ((x1) * (cos Xz))) (y1) (((z1) * (cos Xz)) - ((x1) * (sin Xz)))\nset 3d point 2 (((z2) * (sin Xz)) + ((x2) * (cos Xz))) (y2) (((z2) * (cos Xz)) - ((x2) * (sin Xz)))\nset 3d point 1 (x1) (((z1) * (sin Yz)) + ((y1) * (cos Yz))) (((z1) * (cos Yz)) - ((y1) * (sin Yz)))\nset 3d point 2 (x2) (((z2) * (sin Yz)) + ((y2) * (cos Yz))) (((z2) * (cos Yz)) - ((y2) * (sin Yz)))\nif <not <<(z1) < (near plane)> and <(z2) < (near plane)>>> then\n    set [draw line? v] to [1]\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    if <(draw line?) = [1]> then\n        set pen size/ghost (x1) (x2) (y1) (y2) (z1) (z2)\n        pen up\n        position (x1) (y1)\n        pen down\n        position (x2) (y2)\n        pen up\n    end\nend\n\ndefine --- (label)\n\ndefine z clipping\nif <<(z1) < (near plane)> or <(z2) < (near plane)>> then\n    set [percent v] to (((near plane) - (z1)) / ((z2) - (z1)))\n    if <(z1) < (near plane)> then\n        set 3d point 1 ((x1) + ((percent) * ((x2) - (x1)))) ((y1) + ((percent) * ((y2) - (y1)))) (near plane)\n    else\n        if <(z2) < (near plane)> then\n            set 3d point 2 ((x1) + ((percent) * ((x2) - (x1)))) ((y1) + ((percent) * ((y2) - (y1)))) (near plane)\n        end\n    end\nend\n\ndefine xy clipping\nset [k v] to (((y2) - (y1)) / ((x2) - (x1)))\nif <(x1) > [240]> then\n    if <(x2) > [240]> then\n        set [draw line? v] to [0]\n        stop [this script v]\n    else\n        set screen point 1 [240] ((y1) + ((k) * ((240) - (x1))))\n    end\nend\nif <(y1) > [180]> then\n    if <(y2) > [180]> then\n        set [draw line? v] to [0]\n        stop [this script v]\n    else\n        set screen point 1 ((x1) + (((180) - (y1)) / (k))) [180]\n    end\nend\nif <(x1) < [-240]> then\n    if <(x2) < [-240]> then\n        set [draw line? v] to [0]\n        stop [this script v]\n    else\n        set screen point 1 [-240] ((y1) + ((k) * ((-240) - (x1))))\n    end\nend\nif <(y1) < [-180]> then\n    if <(y2) < [-180]> then\n        set [draw line? v] to [0]\n        stop [this script v]\n    else\n        set screen point 1 ((x1) + (((-180) - (y1)) / (k))) [-180]\n    end\nend\nif <(x2) > [240]> then\n    set screen point 2 [240] ((y1) + ((k) * ((240) - (x1))))\nend\nif <(y2) > [180]> then\n    set screen point 2 ((x1) + (((180) - (y1)) / (k))) [180]\nend\nif <(x2) < [-240]> then\n    set screen point 2 [-240] ((y1) + ((k) * ((-240) - (x1))))\nend\nif <(y2) < [-180]> then\n    set screen point 2 ((x1) + (((-180) - (y1)) / (k))) [-180]\nend\n\ndefine Trig values\nset [sin xz v] to ([sin v] of (rot X) )\nset [cos xz v] to ([cos v] of (rot X) )\nset [sin yz v] to ([sin v] of (rot Y) )\nset [cos yz v] to ([cos v] of (rot Y) )\n\ndefine __init__ (arg)\nset [rot x v] to [0]\nset [rot y v] to [25]\nset [_player x v] to [0]\nset [_player y v] to [0]\nset [_player z v] to [0]\nset [_cam x v] to (_player x)\nset [_cam y v] to (_player y)\nset [_cam z v] to (_player z)\nset [camera distance v] to [300]\nset [player size v] to [25]\nset [vel y v] to [0]\nset [down v] to [1]\nset [_key collected v] to [0]\nset [level timer v] to [0]\ndelete all of [x history v]\ndelete all of [y history v]\ndelete all of [z history v]\nstart sound [传送瞬移音效_耳聆网_\[声音ID：17976\] v]\nif <(arg) = [0]> then\n    set [__level v] to [1]\nend\n\ndefine draw cube (x) (y) (z) (lx) (ly) (lz) (type)\nset color (type)\n--- [front]\ndraw line from (x) (y) (z) to ((x) + (lx)) (y) (z)\ndraw line from ((x) + (lx)) (y) (z) to ((x) + (lx)) ((y) + (ly)) (z)\ndraw line from ((x) + (lx)) ((y) + (ly)) (z) to (x) ((y) + (ly)) (z)\ndraw line from (x) ((y) + (ly)) (z) to (x) (y) (z)\n--- [back]\ndraw line from (x) (y) ((z) + (lz)) to ((x) + (lx)) (y) ((z) + (lz))\ndraw line from ((x) + (lx)) (y) ((z) + (lz)) to ((x) + (lx)) ((y) + (ly)) ((z) + (lz))\ndraw line from ((x) + (lx)) ((y) + (ly)) ((z) + (lz)) to (x) ((y) + (ly)) ((z) + (lz))\ndraw line from (x) ((y) + (ly)) ((z) + (lz)) to (x) (y) ((z) + (lz))\n--- [horizon line]\ndraw line from (x) (y) (z) to (x) (y) ((z) + (lz))\ndraw line from ((x) + (lx)) ((y) + (ly)) (z) to ((x) + (lx)) ((y) + (ly)) ((z) + (lz))\ndraw line from ((x) + (lx)) (y) (z) to ((x) + (lx)) (y) ((z) + (lz))\ndraw line from (x) ((y) + (ly)) (z) to (x) ((y) + (ly)) ((z) + (lz))\n\ndefine tick\nchange [level timer v] by (1)\nerase all\nphysics\nif <(_Personal) = [3]> then\n    change [_cam x v] by ((((camera distance) * ((sin Xz) * (cos Yz))) + ((_player x) - (_Cam X))) / (2))\n    change [_cam z v] by ((((camera distance) * (() - ((cos Xz) * (cos Yz)))) + ((_player z) - (_Cam Z))) / (2))\n    change [_cam y v] by ((((camera distance) * (sin Yz)) + ((_player y) - (_Cam Y))) / (2))\nelse\n    set [_cam x v] to (_player x)\n    set [_cam y v] to (_player y)\n    set [_cam z v] to (_player z)\nend\ntail/ear generator\nrender\ndie\n\ndefine physics\nif <key (right arrow v) pressed?> then\n    change [speed rot x v] by (-1)\nend\nif <key (left arrow v) pressed?> then\n    change [speed rot x v] by (1)\nend\nset [speed rot x v] to ((speed rot x) * (0.82))\nchange [rot x v] by (speed rot x)\nif <key (up arrow v) pressed?> then\n    change [speed rot y v] by (-1)\nend\nif <key (down arrow v) pressed?> then\n    change [speed rot y v] by (1)\nend\nset [speed rot y v] to ((speed rot y) * (0.8))\nchange [rot y v] by (speed rot y)\nif <(rot Y) > [90]> then\n    set [rot y v] to [90]\nend\nif <(rot Y) < [-90]> then\n    set [rot y v] to [-90]\nend\nTrig values\nset [velocity v] to [1.3]\nif <key (w v) pressed?> then\n    change [vel x v] by ((() - (velocity)) * (sin Xz))\n    change [vel z v] by ((velocity) * (cos Xz))\n    change [speed cam distance v] by (2)\nend\nif <key (s v) pressed?> then\n    change [vel x v] by ((velocity) * (sin Xz))\n    change [vel z v] by ((() - (velocity)) * (cos Xz))\n    change [speed cam distance v] by (-2)\nend\nif <key (a v) pressed?> then\n    change [vel x v] by ((() - (velocity)) * (cos Xz))\n    change [vel z v] by ((() - (velocity)) * (sin Xz))\nend\nif <key (d v) pressed?> then\n    change [vel x v] by ((velocity) * (cos Xz))\n    change [vel z v] by ((velocity) * (sin Xz))\nend\nif <key (z v) pressed?> then\n    change [down v] by (((0.5) - (down)) / (3))\nelse\n    change [down v] by (((1) - (down)) / (3))\nend\ncollision\nif <(collision) = [1]> then\n    set [down v] to (last height)\nend\nset [last height v] to (down)\nset [speed cam distance v] to ((speed cam distance) * (0.8))\nchange [camera distance v] by (speed cam distance)\nchange [camera distance v] by (((300) - (camera distance)) / (5))\nchange [vel y v] by (-1)\nchange y by (round (vel y))\nchange y by (delta sy)\nif <key (space v) pressed?> then\n    if <<(jumpable) < [4]> or <(_Username) = [biggboss01]>> then\n        set [vel y v] to [15]\n    end\nend\ncollision\nchange x by ((round (vel x)) + (delta sx))\nchange z by ((round (vel z)) + (delta sz))\nset [vel x v] to ((vel x) * (0.8))\nset [vel z v] to ((vel z) * (0.8))\n\ndefine collision\ndelete all of [player sides v]\nadd ((_player x) - (player size)) to [player sides v]\nadd ((_player x) + (player size)) to [player sides v]\nadd ((_player y) - (player size)) to [player sides v]\nadd ((_player y) + ((player size) * (((2) * (down)) - (1)))) to [player sides v]\nadd ((_player z) - (player size)) to [player sides v]\nadd ((_player z) + (player size)) to [player sides v]\nset [delta sx v] to [0]\nset [delta sy v] to [0]\nset [delta sz v] to [0]\nset [collision v] to [0]\nset [_description v] to [blank]\nfor each [i v] in (length of [x v])\n    touching test\nend\n\ndefine change y by (sy)\nif <not <(sy) = [0]>> then\n    change [_player y v] by (sy)\n    change [jumpable v] by (1)\n    collision\n    set [loop i v] to [0]\n    while <<(collision) = [1]> and <(loop i) < [800]>>\n        if <((sy) - ()) > [0]> then\n            change [_player y v] by (-1)\n        else\n            change [_player y v] by (1)\n            set [jumpable v] to [0]\n        end\n        set [vel y v] to [0]\n        collision\n        change [loop i v] by (1)\n    end\n    if <(loop i) > [798]> then\n        die\n    end\nend\n\ndefine change x by (sx)\nif <not <(sx) = [0]>> then\n    change [_player x v] by (sx)\n    collision\n    while <(collision) = [1]>\n        if <((sx) - ((delta sx) + ([abs v] of (delta sx) ))) > [0]> then\n            change [_player x v] by (-1)\n        else\n            change [_player x v] by (1)\n        end\n        set [vel x v] to [0]\n        collision\n    end\nend\n\ndefine change z by (sz)\nif <not <(sz) = [0]>> then\n    change [_player z v] by (sz)\n    collision\n    while <(collision) = [1]>\n        if <((sz) - ((delta sz) + ([abs v] of (delta sz) ))) > [0]> then\n            change [_player z v] by (-1)\n        else\n            change [_player z v] by (1)\n        end\n        set [vel z v] to [0]\n        collision\n    end\nend\n\ndefine set color (type)\nset [type v] to (type)\nif <(type) = []> then\n    set pen color to (#25a7db)\n    stop [this script v]\nend\nif < (type) contains [#]?> then\n    set pen color to (#2457ff)\n    stop [this script v]\nend\nif <(type) = [b]> then\n    set pen color to (#252bdb)\n    stop [this script v]\nend\nif <(type) = [1]> then\n    set pen color to (#db7325)\nelse\n    if <(type) = [2]> then\n        set pen color to (#db2525)\n    else\n        if <(type) = [3]> then\n            set pen color to (#ffc91a)\n        else\n            if <(type) = [k]> then\n                set pen color to (#ff19a3)\n            else\n                if <(type) = [k2]> then\n                    set pen color to (#a218ff)\n                else\n                    if <(type) = [4]> then\n                        set pen color to (#37ff00)\n                    else\n                        set pen color to (#25a7db)\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine die\nif <(_player y) < [-1000]> then\n    __init__ []\nend\n\nstop [this script v]\n\ndefine dist (ax) (ay) (az) (bx) (by) (bz)\nset [distance v] to ([sqrt v] of ((((ax) - (bx)) * ((ax) - (bx))) + ((((ay) - (by)) * ((ay) - (by))) + (((az) - (bz)) * ((az) - (bz))))) )\n\ndefine move with Mv\nif <(item (1) of [player sides v]) < (((item (i) of [x v]) + (item (i) of [lx v])) + (0))> then\n    if <(item (2) of [player sides v]) > ((item (i) of [x v]) - (0))> then\n        if <(item (3) of [player sides v]) < (((item (i) of [y v]) + (item (i) of [ly v])) + (20))> then\n            if <(item (4) of [player sides v]) > ((item (i) of [y v]) - (0))> then\n                if <(item (5) of [player sides v]) < (((item (i) of [z v]) + (item (i) of [lz v])) + (0))> then\n                    if <(item (6) of [player sides v]) > ((item (i) of [z v]) - (0))> then\n                        set [delta sx v] to (item (i) of [sx v])\n                        set [delta sy v] to (item (i) of [sy v])\n                        set [delta sz v] to (item (i) of [sz v])\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine touching test\ndist (_player x) (_player y) (_player z) (item (i) of [x v]) (item (i) of [y v]) (item (i) of [z v])\nif <(distance) > ((item (i) of [lx v]) + ((item (i) of [ly v]) + ((item (i) of [lz v]) + (83))))> then\n    stop [this script v]\nend\nif <(item (1) of [player sides v]) < ((item (i) of [x v]) + (item (i) of [lx v]))> then\n    if <(item (2) of [player sides v]) > (item (i) of [x v])> then\n        if <(item (4) of [player sides v]) > (item (i) of [y v])> then\n            if <(item (5) of [player sides v]) < ((item (i) of [z v]) + (item (i) of [lz v]))> then\n                if <(item (6) of [player sides v]) > (item (i) of [z v])> then\n                    if <(item (3) of [player sides v]) < (((item (i) of [y v]) + (item (i) of [ly v])) + (20))> then\n                        set [delta sx v] to (item (i) of [sx v])\n                        set [delta sy v] to (item (i) of [sy v])\n                        set [delta sz v] to (item (i) of [sz v])\n                        if <(item (3) of [player sides v]) < ((item (i) of [y v]) + (item (i) of [ly v]))> then\n                            if <<(item (i) of [type v]) = []> or <(item (i) of [type v]) = [b]>> then\n                                set [collision v] to [1]\n                            end\n                            if <(item (i) of [type v]) = [2]> then\n                                __init__ []\n                            end\n                            if <(item (i) of [type v]) = [3]> then\n                                set [vel y v] to [30]\n                            end\n                            if <(item (i) of [type v]) = [k]> then\n                                set [_key collected v] to [1]\n                            end\n                            if <(item (i) of [type v]) = [k2]> then\n                                set [_key collected v] to [2]\n                            end\n                            if < (item (i) of [type v]) contains [#]?> then\n                                set [_description v] to (item (i) of [type v])\n                            end\n                            if <<(item (i) of [type v]) = [4]> or <<key (v v) pressed?> and <(level timer) > [100]>>> then\n                                change [__level v] by (1)\n                                __init__ []\n                                if <(__Level) = [6]> then\n                                    broadcast (End v)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine set pen size/ghost (x1) (x2) (y1) (y2) (z1) (z2)\ndist (((x1) + (x2)) / (2)) (((y1) + (y2)) / (2)) (((z1) + (z2)) / (2)) (_Cam X) (_Cam Y) (_Cam Z)\nif <(distance) > [500]> then\n    set pen (transparency v) to ((30) + (((distance) - (500)) / (15)))\n    set pen size to ((4) - (((distance) - (500)) / (400)))\n    if <((30) + (((distance) - (500)) / (15))) > [98]> then\n        set pen (transparency v) to (98)\n    end\n    if <((4) - (((distance) - (500)) / (400))) < [1]> then\n        set pen size to (1)\n    end\nelse\n    set pen (transparency v) to (30)\n    set pen size to (4)\nend\nif <<<(type) = [k]> or <(type) = [k2]>> or <(type) = [4]>> then\n    set pen (transparency v) to (30)\nend\nif <(type) = [moon]> then\n    set pen color to (#ffffff)\n    set pen (transparency v) to (60)\n    set pen size to (4)\nend\nif <(type) = [tail]> then\n    set pen color to (#ff7b00)\n    set pen (transparency v) to (85)\nend\n\ndraw line from (x) ((y) + (ly)) (z) to ((x) + (lx)) ((y) + (ly)) ((z) + (lz))\ndraw line from ((x) + (lx)) (y) (z) to (x) (y) ((z) + (lz))\n\ndefine tail/ear generator\nif <<((rot X) mod (360)) < [45]> or <((rot X) mod (360)) > [315]>> then\n    draw cube ((_player x) - (5)) ((_player y) - (20)) ((_player z) - (40)) [10] [10] [10] [tail]\nelse\n    if <<((rot X) mod (360)) < [225]> and <((rot X) mod (360)) > [135]>> then\n        draw cube ((_player x) - (5)) ((_player y) - (20)) ((_player z) + (30)) [10] [10] [10] [tail]\n    else\n        if <<((rot X) mod (360)) < [135]> and <((rot X) mod (360)) > [45]>> then\n            draw cube ((_player x) + (30)) ((_player y) - (20)) ((_player z) + (-5)) [10] [10] [10] [tail]\n        else\n            draw cube ((_player x) + (-40)) ((_player y) - (20)) ((_player z) + (-5)) [10] [10] [10] [tail]\n        end\n    end\nend\nif <(down) > [.9]> then\n    if <<<((rot X) mod (360)) < [45]> or <((rot X) mod (360)) > [315]>> or <<((rot X) mod (360)) < [225]> and <((rot X) mod (360)) > [135]>>> then\n        draw cube ((_player x) - (15)) ((_player y) + (35)) ((_player z) - (5)) [10] [25] [10] [tail]\n        draw cube ((_player x) + (5)) ((_player y) + (35)) ((_player z) - (5)) [10] [25] [10] [tail]\n    else\n        draw cube ((_player x) - (5)) ((_player y) + (35)) ((_player z) - (15)) [10] [25] [10] [tail]\n        draw cube ((_player x) - (5)) ((_player y) + (35)) ((_player z) - (-5)) [10] [25] [10] [tail]\n    end\nend\n\ndefine set moon point with rot (x1) (y1) (z1)\nset 3d point 1 ((x1) - (_Cam X)) ((y1) - (_Cam Y)) ((z1) - (_Cam Z))\nset 3d point 1 (((z1) * (sin Xz)) + ((x1) * (cos Xz))) (y1) (((z1) * (cos Xz)) - ((x1) * (sin Xz)))\nset 3d point 1 (x1) (((z1) * (sin Yz)) + ((y1) * (cos Yz))) (((z1) * (cos Yz)) - ((y1) * (sin Yz)))\nif <not <(z1) < (near plane)>> then\n    set screen point 1 ((_VIEW FACTOR) * ((x1) / (z1))) ((_VIEW FACTOR) * ((y1) / (z1)))\nend\nset [moon x v] to (x1)\nset [moon y v] to (y1)\n\ndefine draw moon\nset moon point with rot [-100000] [100000] [250000]\nposition (Moon x) (Moon y)\nset size to (100) %\nset [ghost v] effect to (30)\nswitch costume to (moon v)\nstamp\nrepeat (0)\n    set moon point with rot (([sin v] of (rot X) ) * (-100000)) [-50000] (([cos v] of (rot X) ) * (100000))\n    position (Moon x) (Moon y)\n    set size to (100) %\n    set [brightness v] effect to (10)\n    set [ghost v] effect to (20)\n    switch costume to (star v)\n    stamp\nend\n\nwhen I receive [game on v]\n__init__ [0]\nsetup\nforever\n    broadcast (tick v)\n    tick\nend\n\n@generator\n\ndefine add plat (x) (y) (z) (lx) (ly) (lz) (type)\nadd (x) to [x v]\nadd (y) to [y v]\nadd (z) to [z v]\nadd (lx) to [lx v]\nadd (ly) to [ly v]\nadd (lz) to [lz v]\nadd (type) to [type v]\nadd [0] to [sx v]\nadd [0] to [sy v]\nadd [0] to [sz v]\nadd (Index) to [index v]\nchange [index v] by (1)\n\ndefine tick\ndelete all of [x v]\ndelete all of [y v]\ndelete all of [z v]\ndelete all of [lx v]\ndelete all of [ly v]\ndelete all of [lz v]\ndelete all of [type v]\ndelete all of [sx v]\ndelete all of [sy v]\ndelete all of [sz v]\ndelete all of [index v]\nset [index v] to [1]\nif <not <(__Level) = [6]>> then\n    repeat (4)\n        add plat [-10000] [-10000] [-10000] [20000] [20000] [20000] [none]\n    end\nend\nif <(__Level) = [1]> then\n    level 1\nelse\n    if <(__Level) = [2]> then\n        level 2\n    else\n        if <(__Level) = [3]> then\n            level 3\n        else\n            if <(__Level) = [4]> then\n                level 4\n            else\n                if <(__Level) = [5]> then\n                    level 5\n                else\n                    level.final\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [tick v]\nchange [timer v] by (2)\ntick\n\ndefine level 1\nadd plat [-100] [-100] [-100] [200] [30] [200] []\nadd plat [-50] [-50] [200] [100] [50] [100] []\nadd plat [-50] [30] [400] [100] [50] [100] []\nadd plat [-150] [0] [600] [300] [30] [300] []\nadd plat [-25] ((75) + ((20) * ([sin v] of (TIMER) ))) [725] [50] [50] [50] [4]\n\ndefine level 2\nadd plat [-100] [-100] [-100] [200] [30] [200] []\nadd plat [-100] [-100] [100] [200] [100] [200] []\nadd plat [-100] [-100] [300] [200] [170] [50] [2]\nadd plat [-100] [-100] [350] [200] [100] [200] []\nadd plat [-100] [-100] [550] [200] [170] [50] [2]\nadd plat [-100] [-100] [600] [200] [100] [200] []\nadd plat [200] [-20] [900] [200] [100] [200] []\nadd plat [500] [60] [1200] [200] [100] [200] []\nadd plat [700] [60] [1200] [220] [200] [220] []\nadd plat [920] [60] [1200] [240] [300] [240] []\nadd plat [500] [60] [1420] [340] [500] [340] []\nadd plat [840] [60] [1440] [320] [400] [320] []\nadd board [0] [-70] [40] [#1]\nadd plat [650] ((600) + ((20) * ([sin v] of (TIMER) ))) [1575] [50] [50] [50] [4]\n\nlevel 2\nlevel 1\n\ndefine add Mv plat (x) (y) (z) (lx) (ly) (lz) type: (type) speed (sx) (sy) (sz)\nadd plat (x) (y) (z) (lx) (ly) (lz) (type)\nreplace item (length of [sx v]) of [sx v] with (sx)\nreplace item (length of [sy v]) of [sy v] with (sy)\nreplace item (length of [sz v]) of [sz v] with (sz)\n\nwhen flag clicked\nset [_key collected v] to [0]\nset [timer v] to [0]\nset [pi v] to [3.141592653589793]\n\nlevel 2\n\ndefine level 4\nadd plat [-100] [-300] [-100] [200] [250] [200] []\nadd plat [-100] [-300] [125] [200] [250] [200] []\nadd plat [-400] [-200] [-400] [200] [250] [200] []\nadd Mv plat ((-800) + ((250) * ([sin v] of (TIMER) ))) [0] [-350] [100] [50] [100] type: [] speed (((250) * ([cos v] of (TIMER) )) * ((Pi) / (90))) [] []\nadd plat [-800] [50] ((-325) + ((250) * ([tan v] of (TIMER) ))) [50] [50] [50] [2]\nadd plat [-1400] [-200] [-400] [200] [250] [200] []\nadd Mv plat ((-1900) + ((250) * ([sin v] of (TIMER) ))) [-200] ((-400) + ((250) * ([cos v] of (TIMER) ))) [200] [250] [200] type: [] speed (((250) * ([cos v] of (TIMER) )) * ((Pi) / (90))) [] (((-250) * ([sin v] of (TIMER) )) * ((Pi) / (90)))\nif <(_Key collected) = [0]> then\n    add key [-2100] ((80) + ((20) * ([cos v] of (TIMER) ))) [-320]\n    add plat [-200] [-300] [100] [400] [500] [25] [b]\n    add board [-5] [-50] [40] [#4]\nend\nadd plat [-25] ((0) + ((20) * ([sin v] of (TIMER) ))) [200] [50] [50] [50] [4]\n\nlevel 3\nlevel 1\nlevel 2\nlevel 4\nlevel 3\n\ndefine add key (x) (y) (z)\nadd plat (x) (y) (z) [15] [40] [15] [k]\n\ndefine level 5\nadd plat [-100] [-250] [-100] [200] [200] [200] []\nadd plat [-100] [-250] [100] [200] [200] [200] []\nadd plat [-100] [50] [100] [100] [100] [100] []\nadd plat [0] [-50] [200] [100] [100] [100] []\nadd plat [-75] [150] [125] [50] [10] [50] [3]\nadd plat [0] [-50] [100] [100] [100] [100] [2]\nadd plat [-100] [400] [200] [200] [100] [100] []\nadd plat [0] [400] [100] [100] [100] [100] [2]\nadd plat [0] [500] [100] [100] [100] [100] []\nadd plat [-100] [600] [200] [100] [100] [100] []\nadd plat [-100] [850] [100] [200] [100] [200] []\nadd Mv plat [-100] [650] ((650) + ((300) * ([sin v] of (TIMER) ))) [200] [100] [200] type: [] speed [0] [0] (((300) * ([cos v] of (TIMER) )) * ((Pi) / (90)))\nif <not <(_Key collected) = [2]>> then\n    add plat [-50] [950] [150] [100] [200] [100] [2]\nend\nif <(_Key collected) = [0]> then\n    add key [-8] ((900) + ((20) * ([cos v] of ((2) * (TIMER)) ))) [650]\n    add board [-5] [-50] [10] [#5]\nend\nif <(_Key collected) = [1]> then\n    add plat [-100] [600] [1200] [200] [200] [200] [b]\n    add plat [-100] ((300) + ((10) * ([cos v] of (TIMER) ))) [1200] [200] [100] [200] [b]\n    add Mv plat ((400) + ((300) * ([sin v] of (TIMER) ))) ((300) * ([cos v] of (TIMER) )) [1200] [200] [100] [200] type: [] speed (((300) * ([cos v] of (TIMER) )) * ((Pi) / (90))) (((-300) * ([sin v] of (TIMER) )) * ((Pi) / (90))) []\n    add plat [400] [448] [1200] [200] [100] [200] [2]\n    add plat [900] ((100) + ((20) * ([cos v] of (TIMER) ))) [1200] [200] [100] [200] [b]\n    add plat [1300] ((200) + ((20) * ([sin v] of (TIMER) ))) [1200] [200] [100] [200] [b]\n    add plat [1150] ((150) + ((100) * ([sin v] of (TIMER) ))) [1250] [100] [100] [100] [2]\n    add plat [1550] ((150) + ((100) * ([cos v] of (TIMER) ))) [1250] [100] [100] [100] [2]\n    add plat [1700] ((100) + ((20) * ([sin v] of (TIMER) ))) [1200] [200] [100] [200] [b]\n    add k2 [1800] [300] [-300]\nend\nadd plat [1700] [100] ((600) + ((300) * ([sin v] of (TIMER) ))) [200] [100] [200] []\nadd plat [1700] [100] ((0) + ((300) * ([cos v] of (TIMER) ))) [200] [100] [200] []\nadd Mv plat [1700] [100] ((600) + ((300) * ([sin v] of (TIMER) ))) [200] [100] [200] type: [] speed [0] [0] (((300) * ([cos v] of (TIMER) )) * ((Pi) / (90)))\nadd Mv plat [1700] [100] ((300) * ([cos v] of (TIMER) )) [200] [100] [200] type: [] speed [0] [0] (((-300) * ([sin v] of (TIMER) )) * ((Pi) / (90)))\nadd plat [1700] [200] [400] [200] [50] [50] [2]\nif <(_Key collected) = [2]> then\n    add plat [1700] [100] [-600] [200] [100] [200] [b]\n    add Mv plat ((750) + ((600) * ([cos v] of (TIMER) ))) [0] ((-300) + ((-150) * ([cos v] of (TIMER) ))) [200] [100] [200] type: [b] speed (((-600) * ([sin v] of (TIMER) )) * ((Pi) / (90))) [0] (((150) * ([sin v] of (TIMER) )) * ((Pi) / (90)))\n    add plat [-25] [-50] [-25] [50] [10] [50] [3]\n    add plat [-25] [250] [-25] [50] [10] [50] [3]\n    add plat [-25] [550] [-25] [50] [10] [50] [3]\n    add plat [-25] ((1000) + ((20) * ([sin v] of (TIMER) ))) [175] [50] [50] [50] [4]\nend\n\nlevel 5\n\ndefine add k2 (x) (y) (z)\nadd plat (x) (y) (z) [15] [40] [15] [k2]\n\ndefine add board (x) (y) (z) (type)\nadd plat (x) (y) (z) [10] [20] [10] (type)\nadd plat ((x) - (20)) ((y) + (20)) ((z) - (10)) [50] [30] [30] (type)\n\nlevel 4\n\nlevel 2\n\ndefine level 3\nadd plat [-100] [-300] [-100] [200] [230] [200] []\nadd Mv plat [-100] [-300] ((500) + ((300) * ([sin v] of (TIMER) ))) [200] [230] [200] type: [] speed [0] [0] (((300) * ([cos v] of (TIMER) )) * ((Pi) / (90)))\nadd plat [-100] [-300] [1100] [200] [230] [200] []\nadd Mv plat ((-600) + ((200) * ([cos v] of (TIMER) ))) [-300] [1100] [200] [230] [200] type: [] speed (((-200) * ([sin v] of (TIMER) )) * ((Pi) / (90))) [0] [0]\nadd plat [-300] [-70] [1100] [30] [50] [80] [2]\nadd plat [-500] [-70] [1220] [30] [50] [80] [2]\nadd plat [-700] [-70] [1100] [30] [50] [80] [2]\nadd plat [-1100] [-300] [1100] [200] [230] [200] []\nadd plat [-1100] [-300] [900] [200] [300] [200] []\nadd plat [-1025] [0] [900] [50] [20] [50] [3]\nadd plat [-1100] [-300] [700] [200] [600] [200] []\nadd plat [-1100] [250] [200] [200] [50] [500] []\nadd plat [-1100] [333] [200] [200] [300] [500] []\nadd plat [-1025] [-10000] [500] [50] [8000] [50] []\nadd plat [-1025] [-2000] [500] [50] [2250] [50] []\nadd plat [-1025] [-10000] [300] [50] [8000] [50] []\nadd plat [-1025] [-2000] [300] [50] [2250] [50] []\nadd plat [-1100] [-300] [-200] [200] [100] [200] []\nadd Mv plat [-1100] [-300] [0] [200] ((350) + ((250) * ([sin v] of (TIMER) ))) [200] type: [] speed [0] (((250) * ([cos v] of (TIMER) )) * ((Pi) / (90))) [0]\nadd Mv plat ((-700) + ((400) * ([cos v] of (TIMER) ))) ((100) + ((400) * ([cos v] of (TIMER) ))) ((-400) + ((100) * ([cos v] of (TIMER) ))) [200] [100] [200] type: [] speed (((-400) * ([sin v] of (TIMER) )) * ((Pi) / (90))) (((-400) * ([sin v] of (TIMER) )) * ((Pi) / (90))) (((-100) * ([sin v] of (TIMER) )) * ((Pi) / (90)))\nadd plat [0] [400] [-300] [200] [200] [200] []\nadd board [0] [-70] [50] [#2]\nadd board [-1000] [300] [800] [#3]\nadd plat [75] ((650) + ((20) * ([sin v] of (TIMER) ))) [-225] [50] [50] [50] [4]\n\ndefine level.final\nadd plat [-100] [-70] [-100] [200] [20] [200] [b]\nadd plat [-200] [-150] [-200] [400] [100] [400] []\n\n@controller\n\nwhen flag clicked\nset [_username v] to [0]\nset [_personal v] to [3]\n\nwhen [p v] key pressed\nset [_username v] to [biggboss01]\n\nwhen [o v] key pressed\nset [_username v] to [0]\n\nwhen [3 v] key pressed\nset [_personal v] to [3]\n\nwhen [1 v] key pressed\nset [_personal v] to [1]\n\nwhen flag clicked\nset [counter v] to [0]\nset [fps v] to [--]\nforever\n    reset timer\n    while <(timer) < [1]>\n        change [counter v] by (1)\n    end\n    set [fps v] to (counter)\n    set [counter v] to [0]\nend\n\n@board\n\nwhen I receive [tick v]\nif << (_Description) contains [#]?> or <(Board tsp) = [100]>> then\n    switch costume to (_Description)\nend\nif < (_Description) contains [#]?> then\n    if <(Board tsp) > [20]> then\n        change [board tsp v] by (-20)\n    end\nelse\n    if <(Board tsp) < [100]> then\n        change [board tsp v] by (20)\n    end\nend\nset [ghost v] effect to (Board tsp)\n\nwhen flag clicked\nset [board tsp v] to [100]\nset [ghost v] effect to (Board tsp)\nset [_description v] to [blank]\n\n@story\n\nwhen flag clicked\nswitch costume to (1 v)\nshow slowly\ngo to x: (0) y: (0)\nrepeat (3)\n    wait until <key (space v) pressed?>\n    next costume\n    wait until <not <key (space v) pressed?>>\nend\nwait until <key (space v) pressed?>\nbroadcast (game on v)\nhide\n\nwhen I receive [end v]\nhide\nwait (3) seconds\nswitch costume to (3 v)\nshow slowly\ngo to x: (0) y: (0)\nwait (4) seconds\nnext costume\nwait (4) seconds\nswitch next\n\ndefine switch next\nrepeat (5)\n    change [brightness v] effect by (-20)\nend\nnext costume\nrepeat (5)\n    change [brightness v] effect by (20)\nend\n\ndefine show slowly\nset [ghost v] effect to (100)\nshow\nrepeat (5)\n    change [ghost v] effect by (-20)\nend\n\n@thb\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\n\n