Minecraft Platformer v1.1 | #all #games #trending

Instructions: 普通の操作すっよ。\n\n↑ここ手抜きなの許してください。

@Stage\n\nwhen I receive [level select v]\n\nset volume to (0) %\nstop [other scripts in sprite v]\n\nstop all sounds\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen flag clicked\nset volume to (50) %\nforever\n    play sound [Space_theme v] until done\nend\n\nwhen flag clicked\nforever\n    if < [PlayTestCustomEndless] contains (MODE)?> then\n        set volume to (100) %\n    else\n        if <(MODE) = [Pause]> then\n            set volume to (0) %\n        else\n            set volume to (50) %\n        end\n    end\nend\n\n@Editor\n\ndefine edit tick\nerase all\nset [render scan y v] to [0]\nset [tile being rendered v] to ((SCROLL) * (16))\nclear graphic effects\nset [color v] effect to ((Edit Color) * (2))\nset [level color v] to (Edit Color)\nshow\nrepeat (10)\n    change [render scan y v] by (1)\n    set [render scan x v] to [0]\n    repeat (16)\n        change [tile being rendered v] by (1)\n        change [render scan x v] by (1)\n        go to x: (((-230) + ((render scan x) * (26))) + ((round (((render scan x) + (1)) / (4))) * (4))) y: ((-135) + ((render scan y) * (26)))\n        if <touching (mouse-pointer v)?> then\n            if <<mouse down?> and <not <<[tiles edited v] contains (Tile being rendered)?> or <[tiles edited v] contains [-1]?>>>> then\n                if <(length of [tiles v]) < (Tile being rendered)> then\n                    repeat ((([ceiling v] of ((Tile being rendered) / (16)) ) * (16)) - (length of [tiles v]))\n                        add [0] to [tiles v]\n                    end\n                end\n                replace item (Tile being rendered) of [tiles v] with (((item (Tile being rendered) of [tiles v]) * (-1)) + (1))\n                add (Tile being rendered) to [tiles edited v]\n            end\n        end\n        if <(item (Tile being rendered) of [tiles v]) = [1]> then\n            stamp\n        else\n            if <(Tile being rendered) > [0]> then\n                if <(length of [tiles v]) < (Tile being rendered)> then\n                    if <touching (mouse-pointer v)?> then\n                        set [ghost v] effect to (85)\n                        stamp\n                        set [ghost v] effect to (0)\n                    end\n                else\n                    if <touching (mouse-pointer v)?> then\n                        set [ghost v] effect to (75)\n                        stamp\n                        set [ghost v] effect to (0)\n                    else\n                        set [ghost v] effect to (90)\n                        stamp\n                        set [ghost v] effect to (0)\n                    end\n                end\n            end\n        end\n    end\n    change [brightness v] effect by (-4)\nend\nhide\nif <not <mouse down?>> then\n    delete all of [tiles edited v]\nend\nbroadcast (edit gui v)\n\nwhen [up arrow v] key pressed\nif <(MODE) = [Edit]> then\n    change [scroll v] by (1)\nend\n\nwhen [down arrow v] key pressed\nif <(MODE) = [Edit]> then\n    if <(SCROLL) > [0]> then\n        change [scroll v] by (-1)\n    end\nend\n\ndefine Save\ninsert (join (Level Color) [;]) at (1) of [savecode v] \nset [save scan v] to [0]\nrepeat (length of [tiles v])\n    change [save scan v] by (1)\n    replace item (1) of [savecode v] with (join (item (1) of [savecode v]) (item (save scan) of [tiles v]))\nend\nhide list [savecode v]\n\ndefine Load (code)\nset [save scan v] to [0]\nif < (code) contains [;]?> then\n    set [save scan color v] to []\n    repeat until <(letter (save scan) of (code)) = [;]>\n        set [save scan color v] to (join (save scan color) (letter (save scan) of (code)))\n        change [save scan v] by (1)\n    end\nelse\n    set [save scan color v] to [55]\nend\nset [level color v] to (save scan color)\nset [edit color v] to (save scan color)\ndelete all of [tiles v]\nrepeat until <(save scan) > (length of (code))>\n    change [save scan v] by (1)\n    add (letter (save scan) of (code)) to [tiles v]\nend\n\nwhen I receive [edit v]\ninit edit\n\nwhen flag clicked\nshow list [savecode v]\n\nwhen I receive [edit tick v]\nedit tick\n\ndefine init edit\nset [scroll v] to [0]\ndelete all of [tiles v]\nrepeat (4)\n    repeat (16)\n        add [0] to [tiles v]\n    end\nend\nset [mode v] to [Edit]\nshow list [savecode v]\nset [scroll v] to [0]\ndelete all of [tiles edited v]\nadd [-1] to [tiles edited v]\n\nset [mode v] to [Edit]\n\nset [rotation v] to [0]\nset [player xv v] to [0]\nset [player yv v] to [0]\nset [player x v] to [0]\nset [player y v] to [-175]\nset [player z v] to [0]\nset [mode v] to [Test]\n\nLoad [30;11111111111111111111111111111111000000000000000011111111111111111111111111111111100110011001100110011001100110011001100110011001111111111111111111111111111111110000111100001111000011110000111111111111111111111111000011110000111100001111000011111111111111111111111111111111000000000000000001100110011001100110011001100110011001100110011000000000000000001111111111111111]\n\nset [ghost v] effect to (90)\nstamp\nset [ghost v] effect to (0)\n\nchange [ghost v] effect by (-10)\n\nif  then\n    change [ghost v] effect by (10)\nend\n\nset [edit color v] to (save scan color)\n\nwhen I receive [save level v]\ndelete all of [savecode v]\nSave\n\nwhen I receive [load v]\nask [Enter level code. \(Leave blank to cancel.\)] and wait\nif <(answer) = []> then\n    set [mode v] to [Menu2]\nelse\n    set [mode v] to [Edit]\n    set [scroll v] to [0]\n    Load (answer)\nend\n\n@brooksd's Text Engine\n\ndefine type (text) at (x) (y)\nif <(am i a clone?) = [0]> then\n    if <<(y) > [-180]> and <[180] > (y)>> then\n        set size to ((text size) * (6.25)) %\n        go to x: (x) y: (y)\n        if <(text alignment) = [center]> then\n            change x by (((length of (text)) * ((text size) * (-0.5))) + ((text size) * (0.5)))\n        else\n            if <(text alignment) = [right]> then\n                change x by (((length of (text)) * ((text size) * (-1))) + ((text size) * (1)))\n            end\n        end\n        set [scan v] to [0]\n        show\n        repeat (length of (text))\n            change [scan v] by (1)\n            if <(letter (scan) of (text)) = [ ]> then\n                change x by (text size)\n            else\n                switch costume to (letter (scan) of (text))\n                if <(text clone?) = [1]> then\n                    create clone of (_myself_ v)\n                else\n                    stamp\n                end\n                change x by (text size)\n            end\n        end\n        hide\n        switch costume to (costume1 v)\n    end\nend\n\nclear graphic effects\n\nwhen I receive [display level select text v]\ndisp level select text\n\ndefine disp level select text\nclear graphic effects\nset [text alignment v] to [center]\nset [text size v] to [50]\nset [text clone? v] to [0]\ntype (LEVEL) at (0) (0)\n\nwhen I receive [next level text v]\nclear graphic effects\nset [text alignment v] to [center]\nset [text size v] to [20]\nset [text clone? v] to [1]\ntype [level complete] at (0) (15)\nwait (0.5) seconds\ntype (join [level ] (LEVEL)) at (0) (-15)\n\nwhen I start as a clone\nset [am i a clone? v] to [1]\nshow\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen flag clicked\nset [am i a clone? v] to [0]\n\nwhen I receive [pausetext v]\nif <(am i a clone?) = [0]> then\n    clear graphic effects\n    set [text alignment v] to [left]\n    set [text size v] to [32]\n    set [text clone? v] to [0]\n    type [paused] at (-220) (0)\n    set [text size v] to [16]\n    type (join [level ] (LEVEL)) at (-220) (-30)\n    set [text size v] to [16]\n    if <<(mouse y) < [-57]> and <(mouse y) > [-83]>> then\n        type [>resume] at (-220) (-70)\n        if <mouse down?> then\n            set [mode v] to [Play]\n        end\n    else\n        type [resume] at (-220) (-70)\n    end\n    if <<(mouse y) < [-82]> and <(mouse y) > [-108]>> then\n        type [>level select] at (-220) (-95)\n        if <mouse down?> then\n            broadcast (Level Select v)\n        end\n    else\n        type [level select] at (-220) (-95)\n    end\n    if <<(mouse y) < [-107]> and <(mouse y) > [-133]>> then\n        type [>main menu] at (-220) (-120)\n        if <mouse down?> then\n            set [mdlt v] to [1]\n            set [camera x v] to [0]\n            set [camera y v] to [0]\n            set [vanishing pt x v] to ((mouse x) * (0.5))\n            set [vanishing pt y v] to ((mouse y) * (0.5))\n            set [mode v] to [Menu]\n            set [level color v] to [55]\n            delete all of [tiles v]\n        end\n    else\n        type [main menu] at (-220) (-120)\n    end\nelse\n    delete this clone\nend\n\nwhen I receive [edit gui v]\nclear graphic effects\nset [text alignment v] to [center]\nset [text size v] to [12]\nset [text clone? v] to [0]\ntype [floor] at (((-230) + ((2.5) * (26))) + ((round (((2.5) + (1)) / (4))) * (4))) (160)\ntype [r wall] at (((-230) + ((6.5) * (26))) + ((round (((6.5) + (1)) / (4))) * (4))) (160)\ntype [ceiling] at (((-230) + ((10.5) * (26))) + ((round (((10.5) + (1)) / (4))) * (4))) (160)\ntype [l wall] at (((-230) + ((14.5) * (26))) + ((round (((14.5) + (1)) / (4))) * (4))) (160)\ntype [level color] at (100) (-140)\nset [text size v] to [16]\nset [ghost v] effect to (25)\nif <<<(mouse x) > [-195]> and <(mouse x) < [-125]>> and <<(mouse y) > [-165]> and <(mouse y) < [-135]>>> then\n    set [ghost v] effect to (0)\n    if <<mouse down?> and <(mouse down last tick) = [0]>> then\n        set [mode v] to [Save]\n        broadcast (Save Level v)\n    end\nend\ntype [save] at (-160) (-150)\nif <mouse down?> then\n    set [mouse down last tick v] to [1]\nelse\n    set [mouse down last tick v] to [0]\nend\n\nwhen I receive [custom levels menu tick v]\nupdate level previews\n\nbroadcast (update level previews v)\n\ndefine update level previews\nclear graphic effects\nset [text clone? v] to [0]\nset [text alignment v] to [left]\nset [text size v] to [22]\ntype [custom] at (-224) (125)\ntype [levels] at (-224) (95)\nset [text size v] to [12]\nif <(mouse x) < [-97]> then\n    if <<(mouse y) > [37]> and <(mouse y) < [63]>> then\n        type [>new level] at (-228) (50)\n        if <mouse down?> then\n            broadcast (Edit v)\n        end\n    else\n        type [new level] at (-228) (50)\n    end\n    if <<(mouse y) > [12]> and <(mouse y) < [38]>> then\n        type [>load level] at (-228) (25)\n        if <mouse down?> then\n            set [mode v] to [Load]\n            broadcast (Load v)\n        end\n    else\n        type [load level] at (-228) (25)\n    end\nelse\n    type [new level] at (-228) (50)\n    type [load level] at (-228) (25)\nend\nset [text size v] to [16]\ntype [featured levels] at (-65) (140)\nset [text alignment v] to [center]\nset [text size v] to [12]\nset [ghost v] effect to (60)\ntype [want your level to] at (72) (-35)\ntype [be featured?] at (72) (-55)\nset [text alignment v] to [center]\nset [text size v] to [10]\ntype [submit your level code on the] at (72) (-80)\ntype [forums page! the link is in the] at (72) (-100)\ntype [description of this project.] at (72) (-120)\nclear graphic effects\nset [preview x v] to [-25]\nset [feature scan v] to (Featured Scroll)\nrepeat (3)\n    change [feature scan v] by (1)\n    set [text size v] to [8]\n    set [text alignment v] to [center]\n    set [text clone? v] to [0]\n    set [ghost v] effect to (0)\n    type (item (feature scan) of [featured level names v]) at (preview x) (32)\n    set [ghost v] effect to (50)\n    type (join [] (item (feature scan) of [featured level authors v])) at (preview x) (18)\n    change [preview x v] by (95)\nend\n\nwhen I receive [custompausetext v]\nclear graphic effects\nset [text alignment v] to [left]\nset [text size v] to [32]\nset [text clone? v] to [0]\ntype [paused] at (-220) (0)\nset [text size v] to [16]\ntype (join (item (LEVEL) of [featured level names v]) (join [ by ] (item (LEVEL) of [featured level authors v]))) at (-220) (-30)\nif <<(mouse y) < [-57]> and <(mouse y) > [-83]>> then\n    type [>resume] at (-220) (-70)\n    if <mouse down?> then\n        set [mode v] to [Custom]\n    end\nelse\n    type [resume] at (-220) (-70)\nend\nif <<(mouse y) < [-82]> and <(mouse y) > [-108]>> then\n    type [>edit this level] at (-220) (-95)\n    if <mouse down?> then\n        set [scroll v] to [0]\n        set [mode v] to [Edit]\n    end\nelse\n    type [edit this level] at (-220) (-95)\nend\nif <<(mouse y) < [-107]> and <(mouse y) > [-133]>> then\n    type [>exit level] at (-220) (-120)\n    if <mouse down?> then\n        set [mdlt v] to [1]\n        set [camera x v] to [0]\n        set [camera y v] to [0]\n        set [vanishing pt x v] to ((mouse x) * (0.5))\n        set [vanishing pt y v] to ((mouse y) * (0.5))\n        set [mode v] to [Menu]\n        set [level color v] to [55]\n        delete all of [tiles v]\n    end\nelse\n    type [exit level] at (-220) (-120)\nend\n\ntype [level author] at (0) (18)\n\nwhen I receive [save tick v]\nset [text alignment v] to [center]\nset [text clone? v] to [0]\nset [text size v] to [20]\ntype [save your level] at (0) (140)\nset [text size v] to [12]\ntype [copy this level code to your] at (0) (100)\ntype [clipboard so that you can] at (0) (80)\ntype [load your level later.] at (0) (60)\nset [text size v] to [12]\ntype [or post your level on the] at (0) (30)\ntype [forums page for others to] at (0) (10)\ntype [play it.] at (0) (-10)\n\nwhen I receive [load tick v]\nset [text alignment v] to [center]\nset [text clone? v] to [0]\nset [text size v] to [20]\ntype [load a level] at (0) (140)\nset [text size v] to [12]\ntype [paste a level code into the] at (0) (100)\ntype [field below to edit and play] at (0) (80)\ntype [it.] at (0) (60)\nset [text size v] to [12]\ntype [level codes made by other] at (0) (30)\ntype [scratchers can be found on] at (0) (10)\ntype [the forums page.] at (0) (-10)\n\nwhen I receive [endlessgui v]\nset [text alignment v] to [center]\nset [text clone? v] to [0]\nset [text size v] to [24]\ntype (join (round (Endless Distance)) [m]) at (0) (140)\n\nwhen I receive [endlesspausetext v]\nif <(am i a clone?) = [0]> then\n    clear graphic effects\n    set [text alignment v] to [left]\n    set [text size v] to [32]\n    set [text clone? v] to [0]\n    type [paused] at (-220) (0)\n    set [text size v] to [16]\n    type (join [endless - ] (join (round (Endless Distance)) [m])) at (-220) (-30)\n    set [text size v] to [16]\n    if <<(mouse y) < [-57]> and <(mouse y) > [-83]>> then\n        type [>resume] at (-220) (-70)\n        if <mouse down?> then\n            set [mode v] to [Endless]\n        end\n    else\n        type [resume] at (-220) (-70)\n    end\n    if <<(mouse y) < [-82]> and <(mouse y) > [-108]>> then\n        type [>main menu] at (-220) (-95)\n        if <mouse down?> then\n            set [mdlt v] to [1]\n            set [camera x v] to [0]\n            set [camera y v] to [0]\n            set [vanishing pt x v] to ((mouse x) * (0.5))\n            set [vanishing pt y v] to ((mouse y) * (0.5))\n            set [mode v] to [Menu]\n            set [level color v] to [55]\n            delete all of [tiles v]\n        end\n    else\n        type [main menu] at (-220) (-95)\n    end\nelse\n    delete this clone\nend\n\nwhen I receive [endlesslosegui v]\nendlessloseGUI\n\nset [text size v] to [24]\ntype (join (round (Endless Distance)) [m]) at (0) (140)\n\ndefine endlessloseGUI\nset [text alignment v] to [center]\nset [text clone? v] to [0]\nset [text size v] to [20]\ntype [you fell!] at (4) (120)\nset [text size v] to [12]\ntype [distance:] at (2) (85)\nset [text size v] to [24]\ntype (join (round (Endless Distance)) [m]) at (0) (60)\nset [text size v] to [12]\ntype [high scores] at (0) (22)\nset [ghost v] effect to (35)\nset [leaderboard scan v] to [1]\nrepeat (5)\n    set [text size v] to [10]\n    set [text alignment v] to [left]\n    if <(item (leaderboard scan) of [leaderboard players v]) = (username)> then\n        set [ghost v] effect to (0)\n    else\n        set [ghost v] effect to (35)\n    end\n    type (item (leaderboard scan) of [leaderboard players v]) at (-105) (((leaderboard scan) * (-14)) + (16))\n    set [text alignment v] to [right]\n    type (join (item (leaderboard scan) of [leaderboard scores v]) [m]) at (105) (((leaderboard scan) * (-14)) + (16))\n    change [leaderboard scan v] by (1)\nend\nset [ghost v] effect to (0)\n\nwhen I receive [endlessmenu v]\nendlessMenu\n\ndefine endlessMenu\nset [text alignment v] to [center]\nset [text clone? v] to [0]\nset [text size v] to [20]\ntype [endless mode] at (0) (120)\nset [text size v] to [12]\ntype [run through randomly generated] at (0) (85)\ntype [rooms of increasing difficulty] at (0) (65)\nset [text size v] to [16]\ntype [high scores] at (0) (35)\nset [ghost v] effect to (35)\nset [leaderboard scan v] to [1]\nrepeat (5)\n    set [text size v] to [12]\n    set [text alignment v] to [left]\n    if <(item (leaderboard scan) of [leaderboard players v]) = (username)> then\n        set [ghost v] effect to (0)\n    else\n        set [ghost v] effect to (35)\n    end\n    type (item (leaderboard scan) of [leaderboard players v]) at (-115) (((leaderboard scan) * (-20)) + (28))\n    set [text alignment v] to [right]\n    type (join (item (leaderboard scan) of [leaderboard scores v]) [m]) at (115) (((leaderboard scan) * (-20)) + (28))\n    change [leaderboard scan v] by (1)\nend\nset [ghost v] effect to (0)\n\nwhen I receive [stop all v]\nset [text alignment v] to [center]\nset [text clone? v] to [0]\nset [text size v] to [24]\ntype [3d platformer] at (0) (-30)\n\nwhen I receive [end v]\nif <(am i a clone?) = [0]> then\n    if <(End Tick) = [1]> then\n        set [text alignment v] to [center]\n        set [text clone? v] to [1]\n        set [text size v] to [16]\n        type [hold space to skip] at (0) (120)\n    end\n    clear graphic effects\n    set [text alignment v] to [center]\n    set [text clone? v] to [0]\n    set [text size v] to [20]\n    type [congratulations] at (0) ((End Tick) + (-180))\n    set [text size v] to [12]\n    type [you have completed every level] at (0) ((End Tick) + (-210))\n    type [currently in the game.] at (0) ((End Tick) + (-230))\n    type [but there is still more to do!] at (0) ((End Tick) + (-270))\n    type [try to compete for the high score] at (0) ((End Tick) + (-290))\n    type [in endless mode or create] at (0) ((End Tick) + (-310))\n    type [your own levels to share with] at (0) ((End Tick) + (-330))\n    type [the world.] at (0) ((End Tick) + (-350))\n    set [text alignment v] to [center]\n    set [text clone? v] to [0]\n    set [text size v] to [20]\n    type [credits] at (0) ((End Tick) + (-450))\n    set [text size v] to [12]\n    type [based on the flash game] at (0) ((End Tick) + (-480))\n    set [text size v] to [16]\n    type [run] at (0) ((End Tick) + (-500))\n    set [text size v] to [12]\n    type [by joseph cloutier] at (0) ((End Tick) + (-520))\n    type [programming and art by] at (0) ((End Tick) + (-560))\n    set [text size v] to [16]\n    type [brooksd] at (0) ((End Tick) + (-580))\n    set [text size v] to [12]\n    type [traingle fill] at (0) ((End Tick) + (-620))\n    set [text size v] to [16]\n    type [thelogfather] at (0) ((End Tick) + (-640))\n    set [text size v] to [12]\n    type [music] at (0) ((End Tick) + (-680))\n    set [text size v] to [16]\n    type [space theme] at (0) ((End Tick) + (-700))\n    set [text size v] to [12]\n    type [author unknown] at (0) ((End Tick) + (-720))\n    if <(End Tick) < [800]> then\n        type [thank you for playing!] at (0) ((End Tick) + (-800))\n    else\n        type [thank you for playing!] at (0) (0)\n    end\nelse\nend\n\ntype [credits] at (0) ((End Tick) + (-450))\nset [text size v] to [12]\ntype [based on the flash game] at (0) ((End Tick) + (-480))\nset [text size v] to [16]\ntype [run] at (0) ((End Tick) + (-500))\nset [text size v] to [12]\ntype [by joseph cloutier] at (0) ((End Tick) + (-520))\ntype [all programming done by] at (0) ((End Tick) + (-560))\nset [text size v] to [16]\ntype [brooksd] at (0) ((End Tick) + (-580))\nset [text size v] to [12]\ntype [music] at (0) ((End Tick) + (-620))\nset [text size v] to [16]\ntype [space theme] at (0) ((End Tick) + (-640))\nset [text size v] to [12]\ntype [author unknown] at (0) ((End Tick) + (-660))\nset [text size v] to [16]\n\nset [mode v] to [End]\nset [end tick v] to [0]\n\nwhen I receive [credits v]\nclear graphic effects\nset [text alignment v] to [center]\nset [end tick v] to [585]\nset [text size v] to [20]\ntype [credits] at (0) ((End Tick) + (-450))\nset [text size v] to [12]\ntype [based on the flash game] at (0) ((End Tick) + (-480))\nset [text size v] to [16]\ntype [run] at (0) ((End Tick) + (-500))\nset [text size v] to [12]\ntype [by joseph cloutier] at (0) ((End Tick) + (-520))\ntype [programming and art by] at (0) ((End Tick) + (-560))\nset [text size v] to [16]\ntype [brooksd] at (0) ((End Tick) + (-580))\nset [text size v] to [12]\ntype [traingle fill] at (0) ((End Tick) + (-620))\nset [text size v] to [16]\ntype [thelogfather] at (0) ((End Tick) + (-640))\nset [text size v] to [12]\ntype [music] at (0) ((End Tick) + (-680))\nset [text size v] to [16]\ntype [space theme] at (0) ((End Tick) + (-700))\nset [text size v] to [12]\ntype [author unknown] at (0) ((End Tick) + (-720))\n\nset [text size v] to [20]\n\n@Menu Icons\n\nwhen I receive [playgui v]\nPlayGUI\n\ndefine PlayGUI\ngo to x: (-220) y: (160)\nswitch costume to (pause v)\nset size to (100) %\nset [ghost v] effect to (50)\nif <(distance to [mouse-pointer v]) < [20]> then\n    set [ghost v] effect to (0)\n    set size to (125) %\nend\nstamp\nif <<key (p v) pressed?> or <<(distance to [mouse-pointer v]) < [20]> and <mouse down?>>> then\n    if <(mouse down last tick?) = [0]> then\n        set [mode v] to [Pause]\n    end\nend\nif <<key (p v) pressed?> or <mouse down?>> then\n    set [mouse down last tick? v] to [1]\nelse\n    set [mouse down last tick? v] to [0]\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [pausegui v]\nPauseGUI\n\ndefine PauseGUI\nset size to (100) %\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\nset [ghost v] effect to (60)\nstamp\nclear graphic effects\nswitch costume to (play v)\ngo to x: (-220) y: (160)\nif <(distance to [mouse-pointer v]) < [20]> then\n    set size to (125) %\nend\nstamp\nif <<key (p v) pressed?> or <<(distance to [mouse-pointer v]) < [20]> and <mouse down?>>> then\n    if <(mouse down last tick?) = [0]> then\n        set [mode v] to [Play]\n    end\nend\nif <<key (p v) pressed?> or <mouse down?>> then\n    set [mouse down last tick? v] to [1]\nelse\n    set [mouse down last tick? v] to [0]\nend\nbroadcast (PauseText v)\n\nwhen I receive [edit gui v]\nEditGUI\n\ndefine EditGUI\ngo to x: (210) y: (-150)\nswitch costume to (play v)\nset size to (150) %\nset [ghost v] effect to (25)\nif <(distance to [mouse-pointer v]) < [20]> then\n    set [ghost v] effect to (0)\n    set size to (175) %\nend\nstamp\nif <<key (p v) pressed?> or <<(distance to [mouse-pointer v]) < [20]> and <mouse down?>>> then\n    if <(mouse down last tick?) = [0]> then\n        set [rotation v] to [0]\n        set [player xv v] to [0]\n        set [player yv v] to [0]\n        set [player x v] to [0]\n        set [player y v] to [-175]\n        set [player z v] to [0]\n        set [mode v] to [Test]\n    end\nend\ngo to x: (50) y: (-160)\nset pen (color v) to (0)\nset pen size to (5)\npen down\nrepeat (19)\n    set pen size to (5)\n    if <(distance to [mouse-pointer v]) < [4]> then\n        set y to (-159)\n        set y to (-161)\n        set y to (-160)\n        if <mouse down?> then\n            set [edit color v] to ((mouse x) + (-47))\n        end\n    end\n    if <([abs v] of ((Edit Color) - ((x position) + (-47))) ) < [3]> then\n        set pen size to (5)\n        set y to (-158)\n        set y to (-162)\n        set y to (-160)\n    end\n    change x by (5)\n    change pen (color v) by (5)\nend\nif <(distance to [mouse-pointer v]) < [4]> then\n    set y to (-159)\n    set y to (-161)\n    set y to (-160)\n    if <mouse down?> then\n        set [edit color v] to ((mouse x) + (-47))\n    end\nend\nif <([abs v] of ((Edit Color) - ((x position) + (-47))) ) < [3]> then\n    set pen size to (5)\n    set y to (-158)\n    set y to (-162)\n    set y to (-160)\nend\npen up\ngo to x: (-220) y: (160)\nswitch costume to (home v)\nset size to (100) %\nset [ghost v] effect to (50)\nif <(distance to [mouse-pointer v]) < [20]> then\n    set [ghost v] effect to (0)\n    set size to (125) %\nend\nstamp\nif <<(distance to [mouse-pointer v]) < [20]> and <mouse down?>> then\n    if <(mouse down last tick?) = [0]> then\n        set [camera x v] to [0]\n        set [camera y v] to [0]\n        set [vanishing pt x v] to ((mouse x) * (0.5))\n        set [vanishing pt y v] to ((mouse y) * (0.5))\n        set [mode v] to [Menu]\n        set [level color v] to [55]\n        delete all of [tiles v]\n    end\nend\nif <<key (p v) pressed?> or <mouse down?>> then\n    set [mouse down last tick? v] to [1]\nelse\n    set [mouse down last tick? v] to [0]\nend\n\nwhen I receive [testgui v]\nTestGUI\n\ndefine TestGUI\ngo to x: (210) y: (-150)\nswitch costume to (pause v)\nset size to (150) %\nset [ghost v] effect to (50)\nif <(distance to [mouse-pointer v]) < [20]> then\n    set [ghost v] effect to (0)\n    set size to (175) %\nend\nstamp\nif <<key (p v) pressed?> or <<(distance to [mouse-pointer v]) < [20]> and <mouse down?>>> then\n    if <(mouse down last tick?) = [0]> then\n        set [mode v] to [Edit]\n    end\nend\nif <<key (p v) pressed?> or <mouse down?>> then\n    set [mouse down last tick? v] to [1]\nelse\n    set [mouse down last tick? v] to [0]\nend\n\nset pen color to (#fb6a36)\n\nwhen I receive [custom levels menu tick v]\ncustomLevelsGUI\n\ndefine customLevelsGUI\ngo to x: (-220) y: (160)\nswitch costume to (home v)\nset size to (100) %\nset [ghost v] effect to (50)\nif <(distance to [mouse-pointer v]) < [20]> then\n    set [ghost v] effect to (0)\n    set size to (125) %\nend\nstamp\nif <<(distance to [mouse-pointer v]) < [20]> and <mouse down?>> then\n    if <(mouse down last tick?) = [0]> then\n        set [camera x v] to [0]\n        set [camera y v] to [0]\n        set [vanishing pt x v] to ((mouse x) * (0.5))\n        set [vanishing pt y v] to ((mouse y) * (0.5))\n        set [mode v] to [Menu]\n        set [level color v] to [55]\n        delete all of [tiles v]\n    end\nend\nset [preview x v] to [-25]\nset [preview scan v] to (Featured Scroll)\nrepeat (3)\n    change [preview scan v] by (1)\n    set size to (100) %\n    set [ghost v] effect to (50)\n    switch costume to (costume5 v)\n    go to x: ((preview x) + (-12)) y: (-2)\n    if <(distance to [mouse-pointer v]) < [9]> then\n        set [ghost v] effect to (0)\n        set size to (125) %\n        if <mouse down?> then\n            set [player x v] to [0]\n            set [player y v] to [-175]\n            set [player z v] to [0]\n            set [level v] to (preview scan)\n            broadcast (load LEVEL v)\n            set [mode v] to [Custom]\n        end\n    end\n    stamp\n    set size to (100) %\n    set [ghost v] effect to (50)\n    switch costume to (costume6 v)\n    go to x: ((preview x) + (12)) y: (-2)\n    if <(distance to [mouse-pointer v]) < [9]> then\n        set [ghost v] effect to (0)\n        set size to (125) %\n        if <mouse down?> then\n            set [level v] to (preview scan)\n            broadcast (load LEVEL v)\n            set [scroll v] to [0]\n            set [mode v] to [Edit]\n        end\n    end\n    stamp\n    change [preview x v] by (95)\nend\nif <(Featured Scroll) > [0]> then\n    set [ghost v] effect to (40)\n    switch costume to (leftarrow v)\n    go to x: (-82) y: (60)\n    if <touching (mouse-pointer v)?> then\n        set [ghost v] effect to (15)\n        if <<mouse down?> and <(mouse down last tick?) = [0]>> then\n            change [featured scroll v] by (-1)\n        end\n    end\n    stamp\nend\nif <((Featured Scroll) + (3)) < (length of [featured levels v])> then\n    set [ghost v] effect to (40)\n    switch costume to (rightarrow v)\n    go to x: (222) y: (60)\n    if <touching (mouse-pointer v)?> then\n        set [ghost v] effect to (15)\n        if <<mouse down?> and <(mouse down last tick?) = [0]>> then\n            change [featured scroll v] by (1)\n        end\n    end\n    stamp\nend\nif <mouse down?> then\n    set [mouse down last tick? v] to [1]\nelse\n    set [mouse down last tick? v] to [0]\nend\n\nset [player z v] to [0]\n\ngo to x: (-220) y: (160)\nswitch costume to (home v)\nset size to (100) %\nset [ghost v] effect to (50)\nif <(distance to [mouse-pointer v]) < [20]> then\n    set [ghost v] effect to (0)\n    set size to (125) %\nend\nstamp\nif <<(distance to [mouse-pointer v]) < [20]> and <mouse down?>> then\n    if <(mouse down last tick?) = [0]> then\n        set [camera x v] to [0]\n        set [camera y v] to [0]\n        set [vanishing pt x v] to ((mouse x) * (0.5))\n        set [vanishing pt y v] to ((mouse y) * (0.5))\n        set [mode v] to [Menu]\n        set [level color v] to [55]\n        delete all of [tiles v]\n    end\nend\n\nwhen I receive [display level select text v]\nSelectGUI\n\ndefine SelectGUI\ngo to x: (-220) y: (160)\npoint in direction (90)\nswitch costume to (home v)\nset size to (100) %\nset [ghost v] effect to (50)\nif <(distance to [mouse-pointer v]) < [20]> then\n    set [ghost v] effect to (0)\n    set size to (125) %\nend\nstamp\nif <<(distance to [mouse-pointer v]) < [20]> and <mouse down?>> then\n    if <(mouse down last tick?) = [0]> then\n        set [camera x v] to [0]\n        set [camera y v] to [0]\n        set [vanishing pt x v] to ((mouse x) * (0.5))\n        set [vanishing pt y v] to ((mouse y) * (0.5))\n        set [mode v] to [Menu]\n        set [level color v] to [55]\n        delete all of [tiles v]\n    end\nend\nif <mouse down?> then\n    set [mouse down last tick? v] to [1]\nelse\n    set [mouse down last tick? v] to [0]\nend\n\nif <mouse down?> then\n    set [level v] to (preview scan)\n    broadcast (load LEVEL v)\n    set [scroll v] to [0]\n    set [mode v] to [Edit]\nend\n\nset [scroll v] to [0]\n\nwhen I receive [customgui v]\nCustomGUI\n\ndefine CustomGUI\ngo to x: (-220) y: (160)\nswitch costume to (pause v)\nset size to (100) %\nset [ghost v] effect to (50)\nif <(distance to [mouse-pointer v]) < [20]> then\n    set [ghost v] effect to (0)\n    set size to (175) %\nend\nstamp\nif <<key (p v) pressed?> or <<(distance to [mouse-pointer v]) < [20]> and <mouse down?>>> then\n    if <(mouse down last tick?) = [0]> then\n        set [mode v] to [CustomPause]\n    end\nend\nif <<key (p v) pressed?> or <mouse down?>> then\n    set [mouse down last tick? v] to [1]\nelse\n    set [mouse down last tick? v] to [0]\nend\n\nwhen I receive [custompausegui v]\nCustomPauseGUI\n\ndefine CustomPauseGUI\nset size to (100) %\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\nset [ghost v] effect to (60)\nstamp\nclear graphic effects\nswitch costume to (play v)\ngo to x: (-220) y: (160)\nif <(distance to [mouse-pointer v]) < [20]> then\n    set size to (125) %\nend\nstamp\nif <<key (p v) pressed?> or <<(distance to [mouse-pointer v]) < [20]> and <mouse down?>>> then\n    if <(mouse down last tick?) = [0]> then\n        set [mode v] to [Custom]\n    end\nend\nif <<key (p v) pressed?> or <mouse down?>> then\n    set [mouse down last tick? v] to [1]\nelse\n    set [mouse down last tick? v] to [0]\nend\nbroadcast (CustomPauseText v)\n\nwhen I receive [save tick v]\nset size to (100) %\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\nset [ghost v] effect to (40)\nstamp\nclear graphic effects\nswitch costume to (back v)\ngo to x: (-220) y: (160)\nif <(distance to [mouse-pointer v]) < [20]> then\n    set size to (125) %\nend\nstamp\nif <<(distance to [mouse-pointer v]) < [20]> and <mouse down?>> then\n    if <(mouse down last tick?) = [0]> then\n        show list [savecode v]\n        set [mode v] to [Edit]\n    end\nend\nif <mouse down?> then\n    set [mouse down last tick? v] to [1]\nelse\n    set [mouse down last tick? v] to [0]\nend\n\nwhen I receive [endlessgui v]\nEndlessGUI\n\nwhen I receive [endlesspause v]\nEndlessPauseGUI\n\ndefine EndlessGUI\ngo to x: (-220) y: (160)\nswitch costume to (pause v)\nset size to (100) %\nset [ghost v] effect to (50)\nif <(distance to [mouse-pointer v]) < [20]> then\n    set [ghost v] effect to (0)\n    set size to (125) %\nend\nstamp\nif <<key (p v) pressed?> or <<(distance to [mouse-pointer v]) < [20]> and <mouse down?>>> then\n    if <(mouse down last tick?) = [0]> then\n        set [mode v] to [EndlessPause]\n    end\nend\nif <<key (p v) pressed?> or <mouse down?>> then\n    set [mouse down last tick? v] to [1]\nelse\n    set [mouse down last tick? v] to [0]\nend\n\ndefine EndlessPauseGUI\nset size to (100) %\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\nset [ghost v] effect to (60)\nstamp\nclear graphic effects\nswitch costume to (play v)\ngo to x: (-220) y: (160)\nif <(distance to [mouse-pointer v]) < [20]> then\n    set size to (125) %\nend\nstamp\nif <<key (p v) pressed?> or <<(distance to [mouse-pointer v]) < [20]> and <mouse down?>>> then\n    if <(mouse down last tick?) = [0]> then\n        set [mode v] to [Endless]\n    end\nend\nif <<key (p v) pressed?> or <mouse down?>> then\n    set [mouse down last tick? v] to [1]\nelse\n    set [mouse down last tick? v] to [0]\nend\nbroadcast (EndlessPauseText v)\n\nwhen I receive [endlesslosegui v]\nset size to (100) %\nclear graphic effects\nswitch costume to (costume2 v)\nset [ghost v] effect to (10)\ngo to x: (-40) y: (-100)\nif <(distance to [mouse-pointer v]) < [20]> then\n    set size to (110) %\nend\nstamp\nif <<(distance to [mouse-pointer v]) < [20]> and <mouse down?>> then\n    if <(mouse down last tick?) = [0]> then\n        set [mode v] to [Endless]\n        set [endless difficulty v] to [20]\n        set [endless distance v] to [0]\n        set [player x v] to [0]\n        set [player y v] to [-175]\n        set [player z v] to [0]\n        set [current color v] to [55]\n        set [level color v] to [55]\n        broadcast (Next Endless Level v)\n    end\nend\nset size to (100) %\nclear graphic effects\nswitch costume to (costume3 v)\nset [ghost v] effect to (10)\ngo to x: (40) y: (-100)\nif <(distance to [mouse-pointer v]) < [20]> then\n    set size to (110) %\nend\nstamp\nif <<(distance to [mouse-pointer v]) < [20]> and <mouse down?>> then\n    if <(mouse down last tick?) = [0]> then\n        set [camera x v] to [0]\n        set [camera y v] to [0]\n        set [vanishing pt x v] to ((mouse x) * (0.5))\n        set [vanishing pt y v] to ((mouse y) * (0.5))\n        set [mode v] to [Menu]\n        set [level color v] to [55]\n        delete all of [tiles v]\n    end\nend\nif <mouse down?> then\n    set [mouse down last tick? v] to [1]\nelse\n    set [mouse down last tick? v] to [0]\nend\n\nwhen I receive [endlessmenu v]\ngo to x: (-220) y: (160)\nswitch costume to (home v)\nset size to (100) %\nset [ghost v] effect to (50)\nif <(distance to [mouse-pointer v]) < [20]> then\n    set [ghost v] effect to (0)\n    set size to (125) %\nend\nstamp\nif <<(distance to [mouse-pointer v]) < [20]> and <mouse down?>> then\n    if <(mouse down last tick?) = [0]> then\n        set [camera x v] to [0]\n        set [camera y v] to [0]\n        set [vanishing pt x v] to ((mouse x) * (0.5))\n        set [vanishing pt y v] to ((mouse y) * (0.5))\n        set [mode v] to [Menu]\n        set [level color v] to [55]\n        delete all of [tiles v]\n    end\nend\nif <mouse down?> then\n    set [mouse down last tick? v] to [1]\nelse\n    set [mouse down last tick? v] to [0]\nend\n\nset [ghost v] effect to (15)\n\nwhen I receive [credits v]\ngo to x: (-220) y: (160)\nswitch costume to (home v)\nset size to (100) %\nset [ghost v] effect to (50)\nif <(distance to [mouse-pointer v]) < [20]> then\n    set [ghost v] effect to (0)\n    set size to (125) %\nend\nstamp\nif <<(distance to [mouse-pointer v]) < [20]> and <mouse down?>> then\n    if <(mouse down last tick?) = [0]> then\n        set [camera x v] to [0]\n        set [camera y v] to [0]\n        set [vanishing pt x v] to ((mouse x) * (0.5))\n        set [vanishing pt y v] to ((mouse y) * (0.5))\n        set [mode v] to [Menu]\n        set [level color v] to [55]\n        delete all of [tiles v]\n    end\nend\nif <mouse down?> then\n    set [mouse down last tick? v] to [1]\nelse\n    set [mouse down last tick? v] to [0]\nend\n\n@Cloud\n\nwhen flag clicked\nget encoded characters\nInitialize\nhide\n\ndefine Read Leaderboard\nbegin decode (☁ LEADERBOARD)\nset [lb scan v] to [0]\nrepeat (5)\n    change [lb scan v] by (1)\n    read encoded\n    replace item (lb scan) of [leaderboard players v] with (decoded)\n    read encoded\n    replace item (lb scan) of [leaderboard scores v] with (decoded)\nend\n\ndefine get encoded characters\ndelete all of [encoded characters v]\nrepeat (9)\n    add [] to [encoded characters v]\nend\nadd [a] to [encoded characters v]\nadd [b] to [encoded characters v]\nadd [c] to [encoded characters v]\nadd [d] to [encoded characters v]\nadd [e] to [encoded characters v]\nadd [f] to [encoded characters v]\nadd [g] to [encoded characters v]\nadd [h] to [encoded characters v]\nadd [i] to [encoded characters v]\nadd [j] to [encoded characters v]\nadd [k] to [encoded characters v]\nadd [l] to [encoded characters v]\nadd [m] to [encoded characters v]\nadd [n] to [encoded characters v]\nadd [o] to [encoded characters v]\nadd [p] to [encoded characters v]\nadd [q] to [encoded characters v]\nadd [r] to [encoded characters v]\nadd [s] to [encoded characters v]\nadd [t] to [encoded characters v]\nadd [u] to [encoded characters v]\nadd [v] to [encoded characters v]\nadd [w] to [encoded characters v]\nadd [x] to [encoded characters v]\nadd [y] to [encoded characters v]\nadd [z] to [encoded characters v]\nadd [0] to [encoded characters v]\nadd [1] to [encoded characters v]\nadd [2] to [encoded characters v]\nadd [3] to [encoded characters v]\nadd [4] to [encoded characters v]\nadd [5] to [encoded characters v]\nadd [6] to [encoded characters v]\nadd [7] to [encoded characters v]\nadd [8] to [encoded characters v]\nadd [9] to [encoded characters v]\nadd [+] to [encoded characters v]\nadd [-] to [encoded characters v]\nadd [.] to [encoded characters v]\nadd [ ] to [encoded characters v]\nadd [_] to [encoded characters v]\n\nadd [A] to [encoded characters v]\nadd [B] to [encoded characters v]\nadd [C] to [encoded characters v]\nadd [D] to [encoded characters v]\nadd [E] to [encoded characters v]\nadd [F] to [encoded characters v]\nadd [G] to [encoded characters v]\nadd [H] to [encoded characters v]\nadd [I] to [encoded characters v]\nadd [J] to [encoded characters v]\nadd [K] to [encoded characters v]\nadd [L] to [encoded characters v]\nadd [M] to [encoded characters v]\nadd [N] to [encoded characters v]\nadd [O] to [encoded characters v]\nadd [P] to [encoded characters v]\nadd [Q] to [encoded characters v]\nadd [R] to [encoded characters v]\nadd [S] to [encoded characters v]\nadd [T] to [encoded characters v]\nadd [U] to [encoded characters v]\nadd [V] to [encoded characters v]\nadd [W] to [encoded characters v]\nadd [X] to [encoded characters v]\nadd [Y] to [encoded characters v]\nadd [Z] to [encoded characters v]\n\ndefine encode (val)\nset [encode scan v] to [1]\nrepeat (length of (val))\n    set [encoded v] to (join (encoded) (item # of (letter (encode scan) of (val)) in [encoded characters v]))\n    change [encode scan v] by (1)\nend\nset [encoded v] to (join (encoded) [00])\n\ndefine begin decode (val)\nset [encoded v] to (val)\nset [encode scan v] to [1]\n\ndefine read encoded\nset [decoded v] to []\nforever\n    set [idx v] to (join (letter (encode scan) of (encoded)) (letter ((encode scan) + (1)) of (encoded)))\n    change [encode scan v] by (2)\n    set [decoded v] to (join (decoded) (item (idx) of [encoded characters v]))\n    if <(idx) < [1]> then\n        stop [this script v]\n    end\nend\n\nread encoded\n\ndefine Write Leaderboard\nset [encoded v] to []\nset [lb scan v] to [0]\nrepeat (5)\n    change [lb scan v] by (1)\n    encode (item (lb scan) of [leaderboard players v])\n    encode (item (lb scan) of [leaderboard scores v])\nend\nset [☁ leaderboard v] to (encoded)\n\nWrite Leaderboard\n\ndefine Initialize\ndelete all of [leaderboard players v]\ndelete all of [leaderboard scores v]\nrepeat (5)\n    add [-] to [leaderboard players v]\n    add [0] to [leaderboard scores v]\nend\n\ndefine Update Leaderboard\nRead Leaderboard\nCompare Leaderboard Scores\nWrite Leaderboard\n\ndefine Compare Leaderboard Scores\nif <[leaderboard players v] contains (username)?> then\n    if <(Endless Distance) > (item (item # of (username) in [leaderboard players v]) of [leaderboard scores v])> then\n        delete (item # of (username) in [leaderboard players v]) of [leaderboard scores v]\n        delete (item # of (username) in [leaderboard players v]) of [leaderboard players v]\n        set [lb scan v] to [0]\n        repeat (5)\n            change [lb scan v] by (1)\n            if <(Endless Distance) > (item (lb scan) of [leaderboard scores v])> then\n                insert (username) at (lb scan) of [leaderboard players v] \n                insert (round (Endless Distance)) at (lb scan) of [leaderboard scores v] \n                delete (6) of [leaderboard players v]\n                delete (6) of [leaderboard scores v]\n                stop [this script v]\n            end\n        end\n    end\nelse\n    set [lb scan v] to [0]\n    repeat (5)\n        change [lb scan v] by (1)\n        if <(Endless Distance) > (item (lb scan) of [leaderboard scores v])> then\n            insert (username) at (lb scan) of [leaderboard players v] \n            insert (round (Endless Distance)) at (lb scan) of [leaderboard scores v] \n            delete (6) of [leaderboard players v]\n            delete (6) of [leaderboard scores v]\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [update leaderboard v]\nUpdate Leaderboard\n\nwhen I receive [read leaderboard v]\nRead Leaderboard\n\n@Thumbnail\n\nwhen flag clicked\nhide\nforever\n    reset timer\nend\n\nwhen [timer v] > (0.25)\nshow list [savecode v]\ndraw thumbnail\nbroadcast (stop all v)\nforever\n    reset timer\nend\n\ndefine draw thumbnail\nset size to (100) %\nerase all\nset [size v] to [20]\nset pen color to (#00a9ff)\nset pen (color v) to (55)\nset pen (brightness v) to (2)\nset pen size to (5)\nswitch costume to (costume1 v)\nrepeat (55)\n    change [size v] by (4)\n    go to x: ((size) * (1)) y: ((size) * (1))\n    pen down\n    go to x: ((size) * (1)) y: ((size) * (-1))\n    go to x: ((size) * (-1)) y: ((size) * (-1))\n    go to x: ((size) * (-1)) y: ((size) * (1))\n    go to x: ((size) * (1)) y: ((size) * (1))\n    pen up\n    change pen (brightness v) by (2)\nend\nset pen size to (8)\nset pen color to (#000000)\ngo to x: (-240) y: (180)\npen down\ngo to x: (240) y: (180)\ngo to x: (240) y: (-180)\ngo to x: (-240) y: (-180)\ngo to x: (-240) y: (180)\npen up\nset [brightness v] effect to (-40)\nswitch costume to (costume2 v)\nset size to (500) %\ngo to x: (0) y: (30)\nrepeat (5)\n    stamp\n    change [brightness v] effect by (10)\n    change size by (15)\n    change y by (3)\nend\nclear graphic effects\nset size to (150) %\nswitch costume to (costume3 v)\ngo to x: (-150) y: (-155)\nstamp\n\nset pen size to (100)\nset pen color to (#000000)\ngo to x: (-240) y: (-180)\npen down\nset x to (-90)\npen up\n\n@Game\n\ndefine fill (ax) (ay) (bx) (by) (cx) (cy) resolution: (res)\nset [lena v] to ([sqrt v] of ((((bx) - (cx)) * ((bx) - (cx))) + (((by) - (cy)) * ((by) - (cy)))) )\nset [lenb v] to ([sqrt v] of ((((ax) - (cx)) * ((ax) - (cx))) + (((ay) - (cy)) * ((ay) - (cy)))) )\nset [lenc v] to ([sqrt v] of ((((ax) - (bx)) * ((ax) - (bx))) + (((ay) - (by)) * ((ay) - (by)))) )\nset [peri v] to ((1) / (((lena) + (lenb)) + (lenc)))\nset [incx v] to (((((lena) * (ax)) + ((lenb) * (bx))) + ((lenc) * (cx))) * (peri))\nset [incy v] to (((((lena) * (ay)) + ((lenb) * (by))) + ((lenc) * (cy))) * (peri))\nset [ind v] to ([sqrt v] of ((((((lenb) + (lenc)) - (lena)) * (((lenc) + (lena)) - (lenb))) * (((lena) + (lenb)) - (lenc))) * (peri)) )\nset [aox v] to ((incx) - (ax))\nset [aoy v] to ((incy) - (ay))\nset [box v] to ((incx) - (bx))\nset [boy v] to ((incy) - (by))\nset [cox v] to ((incx) - (cx))\nset [coy v] to ((incy) - (cy))\nif <<(lena) < (lenb)> and <(lena) < (lenc)>> then\n    set [td v] to ([sqrt v] of (((Aox) * (Aox)) + ((Aoy) * (Aoy))) )\nelse\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\nend\nset [rate v] to ((((td) * (2)) - (ind)) / ((td) * (4)))\nset [td v] to ((1) + (0))\ngo to x: (round (incx)) y: (round (incy))\nset pen size to (ind)\npen down\nrepeat ([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))\nend\nset pen size to (res)\ngo to x: (ax) y: (ay)\ngo to x: (bx) y: (by)\ngo to x: (cx) y: (cy)\ngo to x: (ax) y: (ay)\npen up\n\n\n\nline [] [] to (plane x2) (plane y2)\nline (plane x3) (plane y3) to (plane x1) (plane y1)\nline (plane x4) (plane y4) to (plane x2) (plane y2)\nline (plane x4) (plane y4) to (plane x3) (plane y3)\nline (plane x4) (plane y4) to (plane x1) (plane y1)\nline (plane x3) (plane y3) to (plane x2) (plane y2)\n\nif <touching (_edge_ v)?> then\n    go to x: (pos x 2) y: (pos y 2)\n    if <not <touching (_edge_ v)?>> then\n        point towards x: (pos x 1) y: (pos y 1)\n        pen down\n        repeat until <touching (_edge_ v)?>\n            move (5) steps\n        end\n        pen up\n    end\nelse\n    go to x: (pos x 1) y: (pos y 1)\nend\n\ngo to x: (x2) y: (y2)\n\nif <touching (_edge_ v)?> then\n    go to x: (x1) y: (y1)\n    if <not <touching (_edge_ v)?>> then\n        point towards x: (x2) y: (y2)\n        pen down\n        repeat until <touching (_edge_ v)?>\n            move (5) steps\n        end\n        pen up\n    end\nend\n\nif <touching (_edge_ v)?> then\n    go to x: (pos x 2) y: (pos y 2)\n    if <not <touching (_edge_ v)?>> then\n        point towards x: (pos x 1) y: (pos y 1)\n        pen down\n        repeat until <touching (_edge_ v)?>\n            move (5) steps\n        end\n        pen up\n    end\nend\n\ndefine line (x1) (y1) to (x2) (y2)\ngo to x: (x2) y: (y2)\npen down\ngo to x: (x1) y: (y1)\npen up\n\ndefine line from (x1) (y1) (z1) to (x2) (y2) (z2)\nset [pos x 1 v] to ((vanishing pt x) + (((x1) - (vanishing pt x)) * ((d) / ((z1) + (d)))))\nset [pos y 1 v] to ((vanishing pt y) + (((y1) - (vanishing pt y)) * ((d) / ((z1) + (d)))))\nset [pos x 2 v] to ((vanishing pt x) + (((x2) - (vanishing pt x)) * ((d) / ((z2) + (d)))))\nset [pos y 2 v] to ((vanishing pt y) + (((y2) - (vanishing pt y)) * ((d) / ((z2) + (d)))))\ngo to x: (pos x 1) y: (pos y 1)\npen down\ngo to x: (pos x 2) y: (pos y 2)\npen up\n\ndefine point towards x: (x) y: (y)\nif <((y) - (y position)) = [0]> then\n    if <((x) - (x position)) < [0]> then\n        point in direction (-90)\n    else\n        point in direction (90)\n    end\nelse\n    if <((y) - (y position)) < [0]> then\n        point in direction ((180) + ([atan v] of (((x) - (x position)) / ((y) - (y position))) ))\n    else\n        point in direction ([atan v] of (((x) - (x position)) / ((y) - (y position))) )\n    end\nend\n\nwhen flag clicked\nset [mode v] to [Menu]\nset [animation frame v] to [0]\nset [level v] to [1]\nload levels\nload featured levels\nlevel (LEVEL)\nset [level unlocked v] to [1]\nset [rotation v] to [0]\nset [player z v] to [0]\nset [camera y v] to [0]\nset [camera x v] to [0]\nset [player y v] to [0]\nset [player x v] to [0]\nset [player xv v] to [0]\nset [player yv v] to [0]\nset [d v] to ((240) * ([tan v] of ((fov) / (2)) ))\nset [current color v] to [55]\nforever\n    if <(MODE) = [Play]> then\n        erase all\n        controls\n        render stars\n        set [camera x v] to ((Player X) * (-1))\n        set [camera y v] to (((Player Y) * (-1)) + (-100))\n        draw player\n        set pen size to (4)\n        render floor scale: [100]\n        if <(Player Y) > [-200]> then\n            draw player\n        end\n        broadcast (PlayGUI v)\n    else\n        if <(MODE) = [Menu]> then\n            erase all\n            render stars\n            set pen size to (4)\n            set [level color v] to [55]\n            render floor scale: [100]\n            Draw Title\n            set [player z v] to (((Player Z) + (-5)) mod (100))\n        else\n            if <(MODE) = [Level]> then\n                erase all\n                Level Select\n            else\n                if <(MODE) = [Pause]> then\n                    erase all\n                    display stars\n                    set pen size to (4)\n                    render floor scale: [100]\n                    draw player\n                    broadcast (PauseGUI v)\n                else\n                    if <(MODE) = [Edit]> then\n                        erase all\n                        broadcast (Edit Tick v)\n                    else\n                        if <(MODE) = [Test]> then\n                            erase all\n                            controls\n                            render stars\n                            set [camera x v] to ((Player X) * (-1))\n                            set [camera y v] to (((Player Y) * (-1)) + (-100))\n                            draw player\n                            set pen size to (4)\n                            render floor scale: [100]\n                            if <(Player Y) > [-200]> then\n                                draw player\n                            end\n                            broadcast (TestGUI v)\n                        else\n                            if <(MODE) = [Menu2]> then\n                                broadcast (update level previews v)\n                            else\n                                if <(MODE) = [Custom]> then\n                                    erase all\n                                    controls\n                                    render stars\n                                    set [camera x v] to ((Player X) * (-1))\n                                    set [camera y v] to (((Player Y) * (-1)) + (-100))\n                                    draw player\n                                    set pen size to (4)\n                                    render floor scale: [100]\n                                    if <(Player Y) > [-200]> then\n                                        draw player\n                                    end\n                                    broadcast (CustomGUI v)\n                                else\n                                    if <(MODE) = [CustomPause]> then\n                                        erase all\n                                        display stars\n                                        set pen size to (4)\n                                        render floor scale: [100]\n                                        draw player\n                                        broadcast (CustomPauseGUI v)\n                                    else\n                                        if <(MODE) = [Save]> then\n                                            erase all\n                                            set [camera x v] to []\n                                            set [camera y v] to [0]\n                                            set [player z v] to [-50]\n                                            set [vanishing pt x v] to [0]\n                                            set [vanishing pt y v] to [0]\n                                            set pen size to (4)\n                                            render floor scale: [200]\n                                            broadcast (Save Tick v)\n                                        else\n                                            if <(MODE) = [Load]> then\n                                                erase all\n                                                broadcast (Load Tick v)\n                                            else\n                                                if <(MODE) = [Endless]> then\n                                                    erase all\n                                                    controls\n                                                    render stars\n                                                    set [camera x v] to ((Player X) * (-1))\n                                                    if <(Player Y) < [-200]> then\n                                                        set [camera y v] to (((-200) * (-1)) + (-100))\n                                                    else\n                                                        set [camera y v] to (((Player Y) * (-1)) + (-100))\n                                                    end\n                                                    draw player\n                                                    set pen size to (4)\n                                                    render floor scale: [100]\n                                                    if <(Player Y) > [-200]> then\n                                                        draw player\n                                                    end\n                                                    broadcast (EndlessGUI v)\n                                                else\n                                                    if <(MODE) = [EndlessPause]> then\n                                                        erase all\n                                                        display stars\n                                                        set pen size to (4)\n                                                        render floor scale: [100]\n                                                        draw player\n                                                        broadcast (EndlessPause v)\n                                                    else\n                                                        if <(MODE) = [EndlessLose]> then\n                                                            clear graphic effects\n                                                            erase all\n                                                            change [player z v] by (speed)\n                                                            render stars\n                                                            set [camera x v] to ((Player X) * (-1))\n                                                            set [camera y v] to (((-200) * (-1)) + (-100))\n                                                            set pen size to (4)\n                                                            render floor scale: [100]\n                                                            set [speed v] to ((speed) * (0.85))\n                                                            set [ghost v] effect to (75)\n                                                            switch costume to (costume10 v)\n                                                            point in direction (90)\n                                                            go to x: (0) y: (0)\n                                                            stamp\n                                                            set [ghost v] effect to (40)\n                                                            switch costume to (costume9 v)\n                                                            point in direction (90)\n                                                            go to x: (0) y: (0)\n                                                            stamp\n                                                            broadcast (EndlessLoseGUI v)\n                                                        else\n                                                            if <(MODE) = [EndlessMenu]> then\n                                                                erase all\n                                                                clear graphic effects\n                                                                set [vanishing pt x v] to [0]\n                                                                set [vanishing pt y v] to [0]\n                                                                set [camera x v] to []\n                                                                set [camera y v] to [0]\n                                                                set [player z v] to (((Player Z) + (-5)) mod (100))\n                                                                render stars\n                                                                set pen size to (4)\n                                                                set [level color v] to [55]\n                                                                render floor scale: [100]\n                                                                set [ghost v] effect to (40)\n                                                                switch costume to (costume10 v)\n                                                                point in direction (90)\n                                                                go to x: (0) y: (0)\n                                                                stamp\n                                                                switch costume to (costume3 v)\n                                                                set [brightness v] effect to (100)\n                                                                point in direction (90)\n                                                                go to x: (0) y: (-120)\n                                                                if <(distance to [mouse-pointer v]) < [35]> then\n                                                                    set [ghost v] effect to (0)\n                                                                    if <<mouse down?> and <(mdlt) = [0]>> then\n                                                                        set [mode v] to [Endless]\n                                                                        set [endless difficulty v] to [20]\n                                                                        set [endless distance v] to [0]\n                                                                        set [player x v] to [0]\n                                                                        set [player y v] to [-175]\n                                                                        set [player z v] to [0]\n                                                                        set [current color v] to [55]\n                                                                        set [level color v] to [55]\n                                                                        Next Endless Level\n                                                                    end\n                                                                else\n                                                                    set [ghost v] effect to (25)\n                                                                end\n                                                                stamp\n                                                                if <mouse down?> then\n                                                                    set [mdlt v] to [1]\n                                                                else\n                                                                    set [mdlt v] to [0]\n                                                                end\n                                                                broadcast (EndlessMenu v)\n                                                            else\n                                                                if <(MODE) = [End]> then\n                                                                    clear graphic effects\n                                                                    change [end tick v] by (1)\n                                                                    if <key (space v) pressed?> then\n                                                                        change [end tick v] by (9)\n                                                                    end\n                                                                    set [level v] to [26]\n                                                                    set [vanishing pt x v] to [0]\n                                                                    set [vanishing pt y v] to [0]\n                                                                    erase all\n                                                                    controls\n                                                                    render stars\n                                                                    set [camera x v] to ((Player X) * (-1))\n                                                                    set [camera y v] to (((Player Y) * (-1)) + (-100))\n                                                                    set pen size to (4)\n                                                                    set [level color v] to [55]\n                                                                    render floor scale: [100]\n                                                                    draw player\n                                                                    set [player z v] to ((Player Z) mod (100))\n                                                                    if <(End Tick) < [25]> then\n                                                                        set [ghost v] effect to ((100) - ((End Tick) * (2)))\n                                                                    else\n                                                                        set [ghost v] effect to (50)\n                                                                    end\n                                                                    switch costume to (costume10 v)\n                                                                    point in direction (90)\n                                                                    go to x: (0) y: (0)\n                                                                    stamp\n                                                                    broadcast (End v)\n                                                                    if <(End Tick) > [950]> then\n                                                                        set [camera x v] to [0]\n                                                                        set [camera y v] to [0]\n                                                                        set [vanishing pt x v] to ((mouse x) * (0.5))\n                                                                        set [vanishing pt y v] to ((mouse y) * (0.5))\n                                                                        set [mode v] to [Menu]\n                                                                        set [level color v] to [55]\n                                                                        delete all of [tiles v]\n                                                                    end\n                                                                else\n                                                                    if <(MODE) = [Credits]> then\n                                                                        erase all\n                                                                        broadcast (Credits v)\n                                                                    end\n                                                                end\n                                                            end\n                                                        end\n                                                    end\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 plot point x: (x) y: (y) z: (z)\nswitch costume to (costume1 v)\nset size to (100) %\ngo to x: ((vanishing pt x) + (((x) - (vanishing pt x)) * ((d) / ((z) + (d))))) y: ((vanishing pt y) + (((y) - (vanishing pt y)) * ((d) / ((z) + (d)))))\nif <not <touching (_edge_ v)?>> then\n    pen down\n    pen up\nend\n\ndefine horizontal plane from (x1) (y1) (z1) to (x2) (y2) (z2)\nset [plane x1 v] to ((vanishing pt x) + (((x1) - (vanishing pt x)) * ((d) / ((z1) + (d)))))\nset [plane y1 v] to ((vanishing pt y) + (((y1) - (vanishing pt y)) * ((d) / ((z1) + (d)))))\nset [plane x2 v] to ((vanishing pt x) + (((x2) - (vanishing pt x)) * ((d) / ((z1) + (d)))))\nset [plane y2 v] to (plane y1)\nset [plane x3 v] to ((vanishing pt x) + (((x1) - (vanishing pt x)) * ((d) / ((z2) + (d)))))\nset [plane y3 v] to ((vanishing pt y) + (((y1) - (vanishing pt y)) * ((d) / ((z2) + (d)))))\nset [plane x4 v] to ((vanishing pt x) + (((x2) - (vanishing pt x)) * ((d) / ((z2) + (d)))))\nset [plane y4 v] to (plane y3)\n\n    line (plane x1) (plane y1) to (plane x2) (plane y2)\n    line (plane x2) (plane y2) to (plane x3) (plane y3)\n    line (plane x4) (plane y4) to (plane x3) (plane y3)\n    line (plane x4) (plane y4) to (plane x1) (plane y1)\n    line (plane x4) (plane y4) to (plane x2) (plane y2)\n    line (plane x1) (plane y1) to (plane x3) (plane y3)\nelse\n    fill (plane x1) (plane y1) (plane x2) (plane y2) (plane x3) (plane y3) resolution: (4)\n    fill (plane x4) (plane y4) (plane x2) (plane y2) (plane x3) (plane y3) resolution: (4)\nend\n\ndefine // (comment)\n\ndefine render floor scale: (#)\nset size to (500) %\nswitch costume to (costume12 v)\nset [render scan y v] to [0]\nset pen color to (#00bfff)\nset pen (brightness v) to ((((Player Z) mod (#)) * (-0.08)) + (10))\nif < [PlayEndless] contains (MODE)?> then\n    set pen (color v) to (Current Color)\n    if <(Current Color) > ((Level Color) + (2))> then\n        change [current color v] by (-2)\n    else\n        if <(Current Color) < ((Level Color) + (-2))> then\n            change [current color v] by (2)\n        else\n            set [current color v] to (Level Color)\n        end\n    end\nelse\n    set pen (color v) to (Level Color)\nend\nrepeat (render distance)\n    change [render scan y v] by (1)\n    set [render scan x v] to [0]\n    repeat (4)\n        change [render scan x v] by (1)\n        if <not <(item ((0) + (((((8) - (render scan y)) * (16)) + (((((render scan x) + ((ROTATION) * (4))) - (1)) mod (16)) + (1))) + (([ceiling v] of (([abs v] of (Player Z) ) / (#)) ) * (16)))) of [tiles v]) = [0]>> then\n            horizontal plane from ((CAMERA X) + (((render scan x) - (3)) * (#))) ((CAMERA Y) + ((#) * (-2))) (((((render distance) - (1)) - (render scan y)) * (#)) + ((Player Z) mod (#))) to ((CAMERA X) + (((render scan x) - (2)) * (#))) ((CAMERA Y) + ((#) * (-2))) ((((render distance) - (render scan y)) * (#)) + ((Player Z) mod (#)))\n        end\n    end\n    repeat (4)\n        change [render scan x v] by (1)\n        if <not <(item ((0) + (((((8) - (render scan y)) * (16)) + (((((render scan x) + ((ROTATION) * (4))) - (1)) mod (16)) + (1))) + (([ceiling v] of (([abs v] of (Player Z) ) / (#)) ) * (16)))) of [tiles v]) = [0]>> then\n            vertical plane from ((CAMERA X) + ((#) * (2))) ((CAMERA Y) + (((render scan x) - (7)) * (#))) (((((render distance) - (1)) - (render scan y)) * (#)) + ((Player Z) mod (#))) to ((CAMERA X) + ((#) * (2))) ((CAMERA Y) + (((render scan x) - (6)) * (#))) ((((render distance) - (render scan y)) * (#)) + ((Player Z) mod (#)))\n        end\n    end\n    repeat (4)\n        change [render scan x v] by (1)\n        if <not <(item ((0) + (((((8) - (render scan y)) * (16)) + (((((render scan x) + ((ROTATION) * (4))) - (1)) mod (16)) + (1))) + (([ceiling v] of (([abs v] of (Player Z) ) / (#)) ) * (16)))) of [tiles v]) = [0]>> then\n            horizontal plane from ((CAMERA X) + (((11) - (render scan x)) * (#))) ((CAMERA Y) + ((#) * (2))) (((((render distance) - (1)) - (render scan y)) * (#)) + ((Player Z) mod (#))) to ((CAMERA X) + (((10) - (render scan x)) * (#))) ((CAMERA Y) + ((#) * (2))) ((((render distance) - (render scan y)) * (#)) + ((Player Z) mod (#)))\n        end\n    end\n    repeat (4)\n        change [render scan x v] by (1)\n        if <not <(item ((0) + (((((8) - (render scan y)) * (16)) + (((((render scan x) + ((ROTATION) * (4))) - (1)) mod (16)) + (1))) + (([ceiling v] of (([abs v] of (Player Z) ) / (#)) ) * (16)))) of [tiles v]) = [0]>> then\n            vertical plane from ((CAMERA X) + ((#) * (-2))) ((CAMERA Y) + (((15) - (render scan x)) * (#))) (((((render distance) - (1)) - (render scan y)) * (#)) + ((Player Z) mod (#))) to ((CAMERA X) + ((#) * (-2))) ((CAMERA Y) + (((14) - (render scan x)) * (#))) ((((render distance) - (render scan y)) * (#)) + ((Player Z) mod (#)))\n        end\n    end\n    change pen (brightness v) by (10)\nend\nset size to (100) %\n\ndefine change x by (xv)\nchange [player x v] by (xv)\nif <(Player Y) > [-176]> then\n    if <(Player X) > ((200) + (-25))> then\n        set [player x v] to (Player Y)\n        set [player y v] to [-175]\n        set [player yv v] to [0]\n        set [player xv v] to [0]\n        set [rotation v] to (((ROTATION) + (1)) mod (4))\n    end\n    if <(Player X) < ((-200) + (25))> then\n        set [player x v] to ((Player Y) * (-1))\n        set [player y v] to [-175]\n        set [player yv v] to [0]\n        set [player xv v] to [0]\n        set [rotation v] to (((ROTATION) + (-1)) mod (4))\n    end\nend\n\ndefine change y by (yv)\nset [tile underneath v] to (item (((([ceiling v] of ((Player X) / (100)) ) + (2)) + ((ROTATION) * (4))) + (([ceiling v] of (([abs v] of ((Player Z) + (-50)) ) / (100)) ) * (16))) of [tiles v])\nif <((Player Y) + (yv)) > ((-200) + (25))> then\n    change [player y v] by (yv)\nelse\n    if <((Player Y) + (yv)) > ((-200) + (-25))> then\n        if <(Tile Underneath) = [0]> then\n            change [player y v] by (yv)\n        else\n            set [player y v] to [-175]\n            set [player yv v] to [0]\n            if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <key (space v) pressed?>>> then\n                set [player yv v] to [16.5]\n            end\n        end\n    else\n        change [player y v] by (yv)\n    end\nend\n\ndefine controls\nset [vanishing pt x v] to ([floor v] of ((vanishing pt x) * (0.5)) )\nset [vanishing pt y v] to ([floor v] of ((vanishing pt y) * (0.5)) )\nchange [player z v] by (-10)\nif <(MODE) = [Endless]> then\n    change [endless distance v] by (0.1)\nend\nif <([abs v] of ([floor v] of ((Player Z) / (100)) ) ) > ((length of [tiles v]) / (16))> then\n    if <(MODE) = [Test]> then\n        set [mode v] to [Edit]\n    else\n        if <(MODE) = [Custom]> then\n            set [mode v] to [Menu2]\n        else\n            if <(MODE) = [Endless]> then\n                set [level color v] to ((Level Color) - (5))\n                if <(Endless Difficulty) < [30]> then\n                    change [endless difficulty v] by (8)\n                else\n                    if <(Endless Difficulty) < [40]> then\n                        change [endless difficulty v] by (4)\n                    else\n                        if <(Endless Difficulty) < [50]> then\n                            change [endless difficulty v] by (1.5)\n                        else\n                            if <(Endless Difficulty) < [60]> then\n                                change [endless difficulty v] by (0.5)\n                            else\n                                if <(Endless Difficulty) < [70]> then\n                                    change [endless difficulty v] by (0.25)\n                                else\n                                    set [endless difficulty v] to [70]\n                                end\n                            end\n                        end\n                    end\n                end\n                Next Endless Level\n            else\n                change [level v] by (1)\n                if <(LEVEL) > [25]> then\n                    set [mode v] to [End]\n                    set [end tick v] to [0]\n                else\n                    if <(LEVEL) > (level unlocked)> then\n                        set [level unlocked v] to (LEVEL)\n                    end\n                    level (LEVEL)\n                    set [player z v] to ((Player Z) mod (100))\n                    set [rotation v] to [0]\n                    broadcast (Next Level Text v)\n                end\n            end\n        end\n    end\nend\nchange y by (Player yv)\nchange x by (Player xv)\nchange [player yv v] by (-0.9)\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [player xv v] by (1.8)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [player xv v] by (-1.8)\nend\nset [player xv v] to ((Player xv) * (0.85))\nif <(Player Y) < [-450]> then\n    if <(MODE) = [Endless]> then\n        set [speed v] to [-10]\n        set [mode v] to [EndlessLose]\n        broadcast (Update Leaderboard v)\n    else\n        set [player x v] to [0]\n        set [player y v] to [-175]\n        set [player z v] to [0]\n        set [player yv v] to [0]\n        set [player xv v] to [0]\n        set [rotation v] to [0]\n    end\nend\n\ndefine vertical plane from (x1) (y1) (z1) to (x2) (y2) (z2)\nset [plane x1 v] to ((vanishing pt x) + (((x1) - (vanishing pt x)) * ((d) / ((z1) + (d)))))\nset [plane y1 v] to ((vanishing pt y) + (((y1) - (vanishing pt y)) * ((d) / ((z1) + (d)))))\nset [plane x2 v] to (plane x1)\nset [plane y2 v] to ((vanishing pt y) + (((y2) - (vanishing pt y)) * ((d) / ((z1) + (d)))))\nset [plane x3 v] to ((vanishing pt x) + (((x1) - (vanishing pt x)) * ((d) / ((z2) + (d)))))\nset [plane y3 v] to ((vanishing pt y) + (((y2) - (vanishing pt y)) * ((d) / ((z2) + (d)))))\nset [plane x4 v] to (plane x3)\nset [plane y4 v] to ((vanishing pt y) + (((y1) - (vanishing pt y)) * ((d) / ((z2) + (d)))))\n\n    line (plane x1) (plane y1) to (plane x2) (plane y2)\n    line (plane x2) (plane y2) to (plane x3) (plane y3)\n    line (plane x4) (plane y4) to (plane x3) (plane y3)\n    line (plane x4) (plane y4) to (plane x1) (plane y1)\n    line (plane x4) (plane y4) to (plane x2) (plane y2)\n    line (plane x1) (plane y1) to (plane x3) (plane y3)\nelse\n    fill (plane x1) (plane y1) (plane x2) (plane y2) (plane x3) (plane y3) resolution: (4)\n    fill (plane x4) (plane y4) (plane x1) (plane y1) (plane x3) (plane y3) resolution: (4)\nend\n\n// [box]\nline from (x1) (y1) (z1) to (x1) (y1) (z2)\nline from (x1) (y2) (z1) to (x1) (y2) (z2)\nline from (x1) (y1) (z1) to (x1) (y2) (z1)\nline from (x1) (y1) (z2) to (x1) (y2) (z2)\n// ["fill"]\nline from (x1) (y1) (z1) to (x1) (y2) (z2)\nline from (x1) (y2) (z1) to (x1) (y1) (z2)\n\n\n\ndefine level (level)\nload level (item (level) of [level codes v])\n\ndefine draw player\nif <(Player Y) > [-180]> then\n    set pen color to (#000000)\n    set pen (transparency v) to (50)\n    set pen size to ((5) - ((Player Y) * (0.1)))\n    shadow from (((CAMERA X) + (Player X)) + (-15)) ((CAMERA Y) + (-200)) [50] to (((CAMERA X) + (Player X)) + (15)) ((CAMERA Y) + (-200)) [50]\nend\nset pen size to (41.3)\nset pen color to (#505050)\nplot point x: ((CAMERA X) + (Player X)) y: ((CAMERA Y) + (Player Y)) z: [50]\nchange pen size by (-12)\nchange pen (brightness v) by (10)\npen down\npen up\n\ndefine tiles (1) (2) (3) (4)\nadd (1) to [tiles v]\nadd (2) to [tiles v]\nadd (3) to [tiles v]\nadd (4) to [tiles v]\n\ndefine load levels\ndelete all of [level codes v]\nadd [11111111111111111111111111111111000000000000000011111111111111111111111111111111100110011001100110011001100110011001100110011001111111111111111111111111111111110000111100001111000011110000111111111111111111111111000011110000111100001111000011111111111111111111111111111111000000000000000001100110011001100110011001100110011001100110011000000000000000001111111111111111] to [level codes v]\nadd [111100000000000011110000000000001111100000000001111111000000001111011000000000111001110000000111101111000000011010011110000001110000111000001111000001100000111000000111000011000000001100001110000001111001110000000011100111000000000111111100000000011111100000000001111110000000000011111000000000001111000000000000111100000000000001100000] to [level codes v]\nadd [1110001111111101001111100011110100111111100111010011110111111111101001011000011111100100111111101110010010101010001001111110111101111100111010011111100000111001101011110011100111101111111111110100100111000110010010011100011001111001111111000011111111111100111101110110010011000101011111110100011101000011011111111110000111001110011111110111110001010010001111000111111001000111111011101111111111101111110000110011110010000011111111111111111011100001101011111111111110101000010011001011110001101100] to [level codes v]\nadd [0110000000000000011000000000000001100000000000000000000000000000000011000000001100001100000000110000110000000011000000000000000000000011000011000000001100001100000000110000110000000000000000000000000001100000000000000110000000000000011000000000000000000000000000110000110000000011000011000000001100001100000000000000000000001100000000110000110000000011000011000000001100000000000000000110000000000000011000000000000001100000000000000000000000000000] to [level codes v]\nadd [11110000000000000111100000000000001111000000000000011110000000000000111100000000000001111000000000000011110000000000000111100000000000001111000000000000011110000000000000111100000000000001111000000000000011111000000000000111110000000000001111100000000000011111000000000000] to [level codes v]\nadd [011000000000000001100000000000000110000000000000111100000000000010010110000001101001011000000110100101100000011011110000000000000110000000000000011011110000111101101001000010010000100100001001000010010000100100001111000011110000000000000000000001100000011000000110000001100000011000000110000000000000000010011001100110011001100110011001100110011001100100000000000000000110000001100000011000000110000001100000011000000000000000000000100100001001000010010000100100001001000010010000000000000000000000000110000001100000011000000110000001100000011000000000000000000000011000000110000011110000111110011111100111111111111111111111] to [level codes v]\nadd [010100010001001001010101000100100100010100000000000001000100010000010100010001000101010001010000010100000101000101010010000100010100001000000001000010101000100000101010101010000010100010101010001000000010001010000010000000101000001000000000101000100100000010101000010001000010100001000100001010000000010000001000000000010000000000010001010000100001000101000010000100010100001000010000000000001000000000000000100000000000100010000010010010000000001001001000010000100100000001000010000000000101000000000010000100000010001000010100001000100000010000100000010001000000000001000000] to [level codes v]\nadd [11111111100110010011111110011001001110011111100100111001110011111111100111001111110011111100111111001111111111110100111001111110011111100110011001110010011001101111001111100111100100110011111110011111001110011001111100111001111110011111100111111001110011110111100111001110011111111100111001001111111111101100111001111111110011100111100111111110011110011111111111111001111001111001111101100100100111100110010010010010011111001111001011111111111100111001111111111111100111100111100110010010010010011111001001001001] to [level codes v]\nadd [00000000000000000110000001100000011100000111000000111000001110000001110000011100000011100000111000000111000001111000001110000011110000011100000111100000111000000111000001110000001110000011100000011100000111000000111000001110000001110000011110000011100000111100000111000001111000001110000001100000011000000000000000000000] to [level codes v]\nadd [101110100110111111111011111011110110011111111110101011110101110011101110111110111101100111110110110100100111111110101011111011010101001001100000100001101110001111101010000111000110100011001101010010100100100001011110100010110111101001100001001000110011001011010111001111000110100110000101010111000100000110000000010010010000010010000011000001001100100111011010001100110010000000010001] to [level codes v]\nadd [111100001111000011110000111100000000000000000000000011110000111100001111000011110000000000000000111100001111000011110000111100000000000000000000000011110000111100001111000011110000000000000000111100001111000011110000111100000000000000000000000011110000111100001111000011110000000000000000111100001111000011110000111100000000000000000000] to [level codes v]\nadd [111111111111111111111111100011111110001110001111111000111000111101100011111111000111111111111100010001111100010011000100010001111100010001000111111111000111111100111111111111100011000110001110001100011000111011110001100011111111111111111111100011111110001110001111111000111000110001100011111111000111111101111100011111000111111111000100011000111100010011100011110001111110001111111111] to [level codes v]\nadd [01101001011010010110100101101001011010010110100100001111000011111001011010010110100101101001011010010110100101101111000011110000011010010110100101101001011010010110100101101001000011110000111110010110100101101001011010010110100101101001011011110000111100000110100101101001011010010110100101101001011010010000111100001111100101101001011010010110100101101001011010010110] to [level codes v]\nadd [011010001010011101111001000111110011100110111110000110001001110000001110011111111000111010101110101110001010111011100000100011101101000000100110111111011110111101110000011001110011110010000110111010010011111100111111001100010001111111000001100010111101010110000000011100111100000000100110010100011011010001111001111101001110011110001101010110000111110101100000000110010011110110010011001111110111000101111101001100110100110001111111110101000011011111110001101100100001000100110000100100110111111011100010111001111101100000110011011001100000011000100110111100101011011101101000] to [level codes v]\nadd [0110011001100110011001100110011001100110011001101111111111111111001011000010001100101100001000110010110000100011111111111111111101000100000001000100010000000100010001000110010011111111111111110000100100011000000010010001100000001001000110001111111111111111001000001100001000100100110000100010010011000010111111111111111110000010000000001000001000011000100000100001100011111111111111110001000001000110000100001100011000010000100000001111111111111111] to [level codes v]\nadd [1111101111111111111110111111111100000011100011001111111110101101111111111010110111000000100000011101111011101111000111101110110011111110000011010000111111111100111011000011111100101101101000001010110110101111101000000010000110111101111111011011110100000001101111010111111100001100010000001010111111011111101010000001111110001011111100011111101000010101000010101101000011101000000111011000111011111101101111101000110110000000101000011111111110111111] to [level codes v]\nadd [01100001100000000110000011000011000011000000011000110100000000000110010001011110000000000100000010010011011001001001101100000110100010000000001010000000001100000011011001100000001001100000000100100000011011010000001100101101001100011010000101100100000000000000010110110111110001001011000111000100100000000000000000000110001000101111001000100110000000100110010000110000000000000011010011001000000001101100111001000010000000001100100011110000100011100000000000000000] to [level codes v]\nadd [0110000001111110011000000111111001100011111001100111001111100110001100110000011100111111000000110011111100000011000000000001111100000000001111110000011111110000111001111110011111100110000001110111111000000110011111100111111000000000011111100000000001100000011111000110000011111110011001111100011101100111000000110110011000000011011001100011111101111110001111110111111000110000000000000011000000000000001111110011111100111111001111110000001100110011111000111111001111100011111100110110000000000000011000011111110001100001111111000110000110001100011111111000110001111111100011000000000000001100000000001111110000000001111111001111111110000001111111110000001110000000000001110000000000000110] to [level codes v]\nadd [1111111111111111111111111111111111111111000011110000111111111111111111110000000011110000111111111111111111110000000011111111111111110000000011110000111111111111111111110000000011110000111111110000000011110000111111111111111111110000000011110000111111110000111100001111111111111111000000000000111111111111111100001111000011111111111100000000111100001111111111111111111111110000111111110000111111110000111111111111111111111111000011110000000011111111] to [level codes v]\nadd [11101010101110111111111111000110111011001100111011011100010101111111011111111111111001110111111001100111101101111101111110101111010100111001111110110001011000011100100101100001101010010001010011111110110001101110000010101110000110011110000101111100101001101110010000000001111100001001110010101000111101010000100000100001001101000010001111111001000001101101100111101000010101101010011100001001110000000000010000001100010010000000010001000010000010000100000000100000001000111011010011000000000000000000000001000010] to [level codes v]\nadd [1111111111111111111111000000011110001101111101111010110000010000101011111101111010001000010000001111101101111111000000110010000101111111101011010000000000101101111111111110000110000111111111111011011111000000101100001001111010111110101100001000000010010111111111111101000111111000010111011111101101000001000010110111111101101011000111110110101111010000111010000001011111101111111101110000100000110110111110111011011011111011101100001111100000111111] to [level codes v]\nadd [0110000000111100011100111001110001111001100000000011100110011110000000011001111010000011100111111011101110000111101110000000011100111000001100000000000001110000000000100111110000011110011111001101111000000000110001110000000100000000011101110000000001110110001001111110011001110111110000000111000000000000011000000001111001100011001111100000011100000000100001110000000111100000011110011111000001111100011100000000000000000011100000000000011110011110000001110001111011100000001111001110000000010001110001110000000100001111000000000000110000001100110011000111110011000000011110010000000000000000] to [level codes v]\nadd [010000000010000001000000001000000100000000111110011000000000001000111110000000100000001000000010000000100000011000000010000011000000011000111000000011000010000011111000001001110000000000100100000000000110010000000000010001000000000001000110110000000100001101000000011000000011111000110000000000110001000000000001001100000000011100100000110011000110011101111000010011000000000001001000000000000100100000000000010011000011111111000100011000000000010001000000000011000100000000111000010000000110000001000000010000000111110001000000000001000110000000000100001111100000010000000010000011000000001001111000001111100100000000100000] to [level codes v]\nadd [011000000000000001100000000000000111000000000000001110000000000000011000000000000000110000000000000011000000000000001110000000000000011110000000000000111100000000000000111100000000000000110000000000000011000000000000001100000000000011100000001111111100000001111111000000001110000000000000111000000000000001100000000000000111110000000000001111100000000000000111110000000000001111100000000000000111000000000000001110000000000000011100000000000001110000000000001111000000000000111000000000000111000000000000011000000000000001110000000000000011100000000000000111001100000000001111110000000000011111100000000000000111000000000000001110000000000000011110000000000000111100000000000001110000000000000011000000000000001100000000000000110000000000000111000000000000111000000000000011000000000000001100000000000000110000000000] to [level codes v]\nadd [011111111111111011111110111111001101111111011011111111011111111111111111111110111111111111111010100010111111101111111111110111101111111111011111110111101111111101111110111101111111111111011000011101011001111011111101011110110101111110111111000100110111101110011101110111111111110110101100010110000100110001010000011111011111011000111011111111111100111010101011101111110110110101011101010000110010001110001000011010010011100110110100000101000101111110111101101001000100010111000011000010001100110011110001111001010010100010110000000101000011101000010010001100000000001010010001000010111000010000011000110001110010101100001100100000000001001010110100001011011000001001010000010010000000000000000000001000001000000000000001001000011000010000000110000000010000000000001010] to [level codes v]\n\ndefine load level (code)\ndelete all of [tiles v]\nrepeat (8)\n    repeat (16)\n        add [1] to [tiles v]\n    end\nend\nset [save scan v] to [0]\nif < (code) contains [;]?> then\n    set [save scan color v] to []\n    repeat until <(letter (save scan) of (code)) = [;]>\n        set [save scan color v] to (join (save scan color) (letter (save scan) of (code)))\n        change [save scan v] by (1)\n    end\nelse\n    set [save scan color v] to [55]\nend\nset [level color v] to (save scan color)\nrepeat until <(save scan) > (length of (code))>\n    change [save scan v] by (1)\n    add (letter (save scan) of (code)) to [tiles v]\nend\nset [edit color v] to (save scan color)\n\ndelete all of [tiles v]\nset [load scan v] to [0]\nrepeat (length of (code))\n    change [load scan v] by (1)\n    add (letter (load scan) of (code)) to [tiles v]\nend\n\ndefine shadow from (x1) (y1) (z1) to (x2) (y2) (z2)\nset [d v] to ((240) * ([tan v] of ((fov) / (2)) ))\nset [pos x 1 v] to ((0) + (((x1) - (0)) * ((d) / ((z1) + (d)))))\nset [pos y 1 v] to ((vanishing pt y) + (((y1) - (vanishing pt y)) * ((d) / ((z1) + (d)))))\nset [pos x 2 v] to ((0) + (((x2) - (0)) * ((d) / ((z2) + (d)))))\nset [pos y 2 v] to ((vanishing pt y) + (((y2) - (vanishing pt y)) * ((d) / ((z2) + (d)))))\ngo to x: (pos x 1) y: (pos y 1)\nset pen (transparency v) to (100)\npen down\nset pen (transparency v) to (70)\ngo to x: (pos x 2) y: (pos y 2)\npen up\n\nset [mode v] to [Play]\n\ndefine Draw Title\nset pen color to (#efefef)\nset pen size to (16)\nset [camera x v] to ([floor v] of ((CAMERA X) * (0.5)) )\nset [camera y v] to ([floor v] of ((CAMERA Y) * (0.5)) )\nset [vanishing pt x v] to ((mouse x) / (2))\nset [vanishing pt y v] to ((mouse y) / (2))\nrepeat (2)\n    line from [-125] [25] [45] to [-125] [100] [50]\n    line from [-125] [100] [50] to [-75] [100] [50]\n    line from [-25] [25] [45] to [-25] [100] [50]\n    line from [-25] [25] [45] to [25] [25] [45]\n    line from [25] [25] [45] to [25] [100] [50]\n    line from [125] [25] [45] to [125] [100] [50]\n    line from [75] [100] [50] to [125] [100] [50]\n    line from [75] [25] [45] to [75] [100] [50]\n    change pen size by (-8)\n    change pen (brightness v) by (10)\nend\nset pen size to (8)\nswitch costume to (costume2 v)\nset size to (100) %\nset [brightness v] effect to (100)\nset [ghost v] effect to (30)\npoint in direction (90)\ngo to x: ((vanishing pt x) + (((0) - (vanishing pt x)) * ((d) / ((30) + (d))))) y: ((vanishing pt y) + (((-10) - (vanishing pt y)) * ((d) / ((30) + (d)))))\nstamp\nswitch costume to (costume3 v)\ngo to x: ((vanishing pt x) + (((0) - (vanishing pt x)) * ((d) / ((15) + (d))))) y: ((vanishing pt y) + (((-60) - (vanishing pt y)) * ((d) / ((15) + (d)))))\nset [ghost v] effect to (25)\nset size to (100) %\nif <<(mouse y) < ((y position) + (10))> and <(mouse y) > ((y position) + (-10))>> then\n    set [ghost v] effect to (0)\n    if <<mouse down?> and <(mdlt) = [0]>> then\n        if <(level unlocked) = [1]> then\n            set [level v] to [1]\n            set [player z v] to [0]\n            broadcast (Play v)\n        else\n            broadcast (Level Select v)\n        end\n    end\nend\nstamp\nset size to (100) %\nswitch costume to (costume4 v)\ngo to x: ((vanishing pt x) + (((0) - (vanishing pt x)) * ((d) / ((15) + (d))))) y: ((vanishing pt y) + (((-95) - (vanishing pt y)) * ((d) / ((15) + (d)))))\nset [ghost v] effect to (25)\nif <<(mouse y) < ((y position) + (10))> and <(mouse y) > ((y position) + (-10))>> then\n    set [ghost v] effect to (0)\n    if <<mouse down?> and <(mdlt) = [0]>> then\n        broadcast (Read Leaderboard v)\n        set [mode v] to [EndlessMenu]\n    end\nend\nstamp\nswitch costume to (costume5 v)\ngo to x: ((vanishing pt x) + (((0) - (vanishing pt x)) * ((d) / ((15) + (d))))) y: ((vanishing pt y) + (((-130) - (vanishing pt y)) * ((d) / ((15) + (d)))))\nset [ghost v] effect to (25)\nset size to (100) %\nif <<(mouse y) < ((y position) + (10))> and <(mouse y) > ((y position) + (-10))>> then\n    set [ghost v] effect to (0)\n    if <<mouse down?> and <(mdlt) = [0]>> then\n        set [mode v] to [Menu2]\n        broadcast (update level previews v)\n    end\nend\nstamp\nswitch costume to (costume11 v)\ngo to x: (-180) y: (160)\nset [ghost v] effect to (40)\nset size to (100) %\nif <<<(mouse y) < ((y position) + (10))> and <(mouse y) > ((y position) + (-10))>> and <(mouse x) < [-120]>> then\n    set [ghost v] effect to (0)\n    if <<mouse down?> and <(mdlt) = [0]>> then\n        set [mode v] to [Credits]\n    end\nend\nstamp\nset size to (100) %\nclear graphic effects\nif <mouse down?> then\n    set [mdlt v] to [1]\nelse\n    set [mdlt v] to [0]\nend\n\ndefine render stars\nswitch costume to (costume1 v)\nif <(pick random (1) to (3)) = [1]> then\n    if <(pick random (1) to (2)) = [2]> then\n        add (pick random (-1000) to (1000)) to [star x v]\n        if <(pick random (1) to (2)) = [2]> then\n            add (pick random (-1000) to (-225)) to [star y v]\n        else\n            add (pick random (225) to (1000)) to [star y v]\n        end\n    else\n        add (pick random (-1000) to (1000)) to [star y v]\n        if <(pick random (1) to (2)) = [2]> then\n            add (pick random (-1000) to (-225)) to [star x v]\n        else\n            add (pick random (225) to (1000)) to [star x v]\n        end\n    end\n    add [1000] to [star z v]\nend\nset pen size to (5)\nset pen color to (#ffffff)\nset [star scan v] to [0]\nrepeat (length of [star x v])\n    change [star scan v] by (1)\n    plot point x: (item (star scan) of [star x v]) y: (item (star scan) of [star y v]) z: (item (star scan) of [star z v])\n    replace item (star scan) of [star z v] with ((item (star scan) of [star z v]) - (3))\n    if <(item (star scan) of [star z v]) < [0]> then\n        delete (star scan) of [star x v]\n        delete (star scan) of [star y v]\n        delete (star scan) of [star z v]\n        change [star scan v] by (-1)\n    end\nend\n\ndelete all of [star x v]\ndelete all of [star y v]\ndelete all of [star z v]\nadd (pick random (-400) to (400)) to [star x v]\n\nwhen I receive [play v]\nset [mode v] to [Play]\nset [player x v] to [0]\nset [player y v] to [-175]\nset [player z v] to [0]\nlevel (LEVEL)\n\nwhen I receive [level select v]\nrecieve level select\n\ndefine Level Select\nif <(LEVEL) > [25]> then\n    set [level v] to [25]\nend\nset [rotation v] to [0]\nset [player z v] to [0]\nset [camera x v] to [0]\nset [camera y v] to [0]\nset [vanishing pt x v] to [0]\nset [vanishing pt y v] to [0]\nset pen size to (4)\nrender floor scale: [100]\nswitch costume to (costume6 v)\nclear graphic effects\nset size to (100) %\ngo to x: (0) y: (0)\npoint in direction (90)\nstamp\nswitch costume to (arrow r v)\nset size to (300) %\nchange [key cooldown v] by (-1)\nif <(LEVEL) < (level unlocked)> then\n    point in direction (90)\n    go to x: (210) y: (0)\n    set [ghost v] effect to (25)\n    if <touching (mouse-pointer v)?> then\n        set [ghost v] effect to (0)\n    end\n    stamp\n    if <(key cooldown) < [1]> then\n        if <<key (right arrow v) pressed?> or <<touching (mouse-pointer v)?> and <mouse down?>>> then\n            change [level v] by (1)\n            level (LEVEL)\n            repeat (8)\n                repeat (16)\n                    delete (1) of [tiles v]\n                end\n            end\n            set [mode v] to [Level]\n            set [key cooldown v] to [7]\n        end\n    end\nend\nswitch costume to (arrow l v)\nset size to (300) %\nif <(LEVEL) > [1]> then\n    point in direction (90)\n    go to x: (-210) y: (0)\n    set [ghost v] effect to (25)\n    if <touching (mouse-pointer v)?> then\n        set [ghost v] effect to (0)\n    end\n    stamp\n    if <(key cooldown) < [1]> then\n        if <<key (left arrow v) pressed?> or <<touching (mouse-pointer v)?> and <mouse down?>>> then\n            change [level v] by (-1)\n            level (LEVEL)\n            repeat (8)\n                repeat (16)\n                    delete (1) of [tiles v]\n                end\n            end\n            set [mode v] to [Level]\n            set [key cooldown v] to [7]\n        end\n    end\nend\nset size to (150) %\nswitch costume to (costume3 v)\nset [ghost v] effect to (15)\nset [brightness v] effect to (100)\ngo to x: (0) y: (-150)\nif <<<(mouse x) > ((x position) + (-50))> and <(mouse x) < ((x position) + (50))>> and <<(mouse y) > ((y position) + (-16))> and <(mouse y) < ((y position) + (16))>>> then\n    set [ghost v] effect to (0)\n    if <mouse down?> then\n        broadcast (Play v)\n    end\nend\nstamp\nbroadcast (display level select text v)\n\ndefine recieve level select\nlevel (LEVEL)\nrepeat (8)\n    repeat (16)\n        delete (1) of [tiles v]\n    end\nend\nset [mode v] to [Level]\n\nset [level v] to [1]\n\nif <key (left arrow v) pressed?> then\n    change [level v] by (-1)\n    level (LEVEL)\n    repeat (8)\n        repeat (16)\n            delete (1) of [tiles v]\n        end\n    end\n    set [mode v] to [Level]\n    set [key cooldown v] to [7]\nend\n\nbroadcast (display level select text v)\nset size to (100) %\n\ndefine display stars\nswitch costume to (costume1 v)\nset pen size to (5)\nset pen color to (#ffffff)\nset [star scan v] to [0]\nrepeat (length of [star x v])\n    change [star scan v] by (1)\n    plot point x: (item (star scan) of [star x v]) y: (item (star scan) of [star y v]) z: (item (star scan) of [star z v])\nend\n\nchange [save scan v] by (-1)\n\nbroadcast (Edit v)\n\ndefine show level previews\nerase all\ngo to x: (0) y: (0)\nset [ghost v] effect to (90)\nswitch costume to (costume8 v)\nstamp\nset [featured level scan v] to ((1) + (Featured Scroll))\nset [preview x v] to [-25]\nset [preview y v] to [80]\nset [preview touching mouse v] to [0]\nset [rotation v] to [0]\nrepeat (3)\n    set [player z v] to ((-8) * (16))\n    set pen size to (2)\n    go to x: (preview x) y: (preview y)\n    point in direction (90)\n    switch costume to (costume7 v)\n    set [ghost v] effect to (92)\n    if <touching (mouse-pointer v)?> then\n        set [preview touching mouse v] to (featured level scan)\n        set [ghost v] effect to (85)\n    end\n    stamp\n    switch costume to (costume1 v)\n    load level (item (featured level scan) of [featured levels v])\n    set [camera x v] to (preview x)\n    set [camera y v] to (preview y)\n    set [vanishing pt x v] to (preview x)\n    set [vanishing pt y v] to (preview y)\n    if <(preview touching mouse) = (featured level scan)> then\n        change [preview z v] by (1)\n        if <(preview z) > ((length of [tiles v]) / (16))> then\n            set [preview z v] to [0]\n        end\n        if <(preview touching mouse) = (preview touching mouse last)> then\n            set [player z v] to ((preview z) * (-16))\n        end\n    end\n    render floor scale: [16]\n    change [preview x v] by (95)\n    change [featured level scan v] by (1)\nend\nif <not <(preview touching mouse) = (preview touching mouse last)>> then\n    set [preview z v] to [8]\nend\nset [preview z2 v] to (preview z)\nset [preview touching mouse last v] to (preview touching mouse)\nbroadcast (custom levels menu tick v)\n\nrepeat (9)\n\nrepeat (16)\n    delete (1) of [tiles v]\nend\n\nwhen I receive [update level previews v]\nshow level previews\n\nlevel []\n\nrender stars\n\n\n\ndefine load featured levels\ndelete all of [featured levels v]\ndelete all of [featured level authors v]\ndelete all of [featured level names v]\nlevel [multi path] [3011226] [69;111100000000000011110000000000000110000000000000011000000000000000100000000000001011000000000000101111000000000000001110000000000000001100000000110000110000001111000000001100111100000000110000000000000011000000000001101100110000011110000011000011111011001100001100001100000000110110000000011000011000000001100001100000001100000110000000110000011000000011000001100000001100000010000000]\nlevel [nevred] [ggenije] [1;0000000000000000011000000000000001100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000100000000000000000000000000000000000000000001000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000011000000000000001100000000000000110000000000000]\nlevel [helix] [brooksd] [22;01100000000000000110000000000000011000000000000001100000000000001111000000000000100110000000000100001100000000110000011000000110000000110000110000000001100110000000000011110000000000000110000000000000111100000000000110011000000000110000110000000110000001100000110000000011100110000000000111110000000000000110000000000000111100000000000010011000000000010000110000000011000001100000011000000110000001100000011000000110]\nlevel [delta] [brooksd] [57;1111100000000001111101000000001001100010000001000000000100001000000010001001000100001100011000110000011000000110000000110000110000000001000010000000000000000000000000000110000000000000011000000000000000000000000000010000100000000011000011000000011000000110000011000000001100001000000000010000000000000000011000000000000001100000000000000000000000000000000000000000000000000100000000100000010000000010000000000000000000000000000000000000001000000100000000100000010000000000000000000000000001100000000000000110000000000000011000000000000000000000000001100000011000000000000000000000000000000000011000000110000000000000000000000000000000000000000001100000011000000000000000000000000000000000011000000110000000000000000000000000000000000000000001100000011000000110000001100000111100001111000010010000100110011001100110011111100111111001]\nlevel [kaizo] [brooksd] [1;0110000001100000011000000110000001100110011001100000000000000000000000000000000000010110100001100000000000000000000000000000000000000110000001100100000000100000000000000000000000000110000001100000000000000000001000000100000000000110000001100000000000000000000000000000000010000110000101100000000000000000000000000000000000000110000001100110000001100000011000000110000000000110000001100000000000000000000000000000000000000110000001100000000000000000000000000000000000000000000000000110000001100000000000000000000000000000000000000000000000000000000001100000011000000000000000000000000000000000000000000000000001100000011000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000000111111111111111111111111111111110000000000000000000000000000000000000000000000000110000001100000000000000000000000000000000000000000000000000000000010000000100000000000000000000000000000000000000000000000000010000000100000000000000000000000000000000000000000000000000000000000100000001000000000000000000000000000000000000000000000000000100000001000000000000000000000000000000000000000000000000000000001100000011000000000000000000000000000000000000000000000000000000000000000000000]\n\ndefine level (name) (author) (code)\nadd (name) to [featured level names v]\nadd (author) to [featured level authors v]\nadd (code) to [featured levels v]\n\nwhen I receive [load level v]\nrecieve load LEVEL\n\ndefine recieve load LEVEL\nload level (item (LEVEL) of [featured levels v])\nrepeat (8)\n    repeat (16)\n        delete (1) of [tiles v]\n    end\nend\ndelete (length of [tiles v]) of [tiles v]\n\ndefine Next Endless Level\nset [player z v] to [0]\ndelete all of [tiles v]\nrepeat (8)\n    repeat (16)\n        add [1] to [tiles v]\n    end\nend\nrepeat (32)\n    repeat (16)\n        if <(pick random (1) to (100)) > (Endless Difficulty)> then\n            add [1] to [tiles v]\n        else\n            add [0] to [tiles v]\n        end\n    end\nend\n\nwhen I receive [next endless level v]\nNext Endless Level\n\nset [mode v] to [End]\nset [end tick v] to [0]\n\nset [camera x v] to []\nset [camera y v] to [0]\n\ndraw player\nset pen size to (4)\nrender floor scale: [100]\nif <(Player Y) > [-200]> then\n    draw player\nend\n\ndefine go to (x) (y) (z)\ngo to x: ((vanishing pt x) + (((x) - (vanishing pt x)) * ((d) / ((z) + (d))))) y: ((vanishing pt y) + (((y) - (vanishing pt y)) * ((d) / ((z) + (d)))))\n\n// [box]\nline from (x1) (y1) (z1) to (x1) (y1) (z2)\nline from (x2) (y1) (z1) to (x2) (y1) (z2)\nline from (x1) (y1) (z1) to (x2) (y1) (z1)\nline from (x1) (y1) (z2) to (x2) (y1) (z2)\n// ["fill"]\nline from (x1) (y1) (z1) to (x2) (y1) (z2)\nline from (x2) (y1) (z1) to (x1) (y1) (z2)\n\nline (plane x1) (plane y1) to (plane x2) (plane y2)\n\nline (plane x3) (plane y3) to (plane x1) (plane y1)\n\nline (plane x4) (plane y4) to (plane x1) (plane y1)\nline (plane x3) (plane y3) to (plane x2) (plane y2)\n\nif <[] > [1]> then\n\n