||Doria 100% pen||Platformer Creator||  #Games
@Stage\n\nwhen stage clicked\nbroadcast (Click v)\n\n@blank\n\nbroadcast (Thumbnail v)\n\n@Game\n\ndefine Distance to x: (x) y: (y)\nset [-calculated distance v] to ([sqrt v] of ((((x position) - (x)) * ((x position) - (x))) + (((y position) - (y)) * ((y position) - (y)))) )\n\ndefine Draw line from (x) (y) to (x2) (y2)\ngo to x: (x) y: (y)\npen down\ngo to x: (x2) y: (y2)\npen up\n\ndefine Draw perfect square at (x) (y) w (q)\ngo to x: (x) y: (y)\nset pen size to (q)\npen down\npen up\nset pen size to ((q) / (8))\nDraw line from ((x) + ((q) / (2.5))) ((y) - ((q) / (2.5))) to ((x) - ((q) / (2.5))) ((y) - ((q) / (2.5)))\nDraw line from ((x) + ((q) / (2.5))) ((y) - ((q) / (2.5))) to ((x) + ((q) / (2.5))) ((y) + ((q) / (2.5)))\nDraw line from ((x) - ((q) / (2.5))) ((y) - ((q) / (2.5))) to ((x) - ((q) / (2.5))) ((y) + ((q) / (2.5)))\nDraw line from ((x) - ((q) / (2.5))) ((y) + ((q) / (2.5))) to ((x) + ((q) / (2.5))) ((y) + ((q) / (2.5)))\nrepeat (4)\n    Draw line from ((x) + ((q) / (2))) ((y) - ((q) / (2))) to ((x) - ((q) / (2))) ((y) - ((q) / (2)))\n    Draw line from ((x) + ((q) / (2))) ((y) - ((q) / (2))) to ((x) + ((q) / (2))) ((y) + ((q) / (2)))\n    Draw line from ((x) - ((q) / (2))) ((y) - ((q) / (2))) to ((x) - ((q) / (2))) ((y) + ((q) / (2)))\n    Draw line from ((x) - ((q) / (2))) ((y) + ((q) / (2))) to ((x) + ((q) / (2))) ((y) + ((q) / (2)))\nend\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\ndefine Phrase (p) starting at (x) (y) size: (s) Boldness? (b)\nset [x3 v] to (x)\nset [y3 v] to (y)\nset [letter v] to [0]\nrepeat (length of (p))\n    change [letter v] by (1)\n    Draw letter (letter (Letter) of (p)) at x (X3) y (Y3) Size (s) Boldness? (b)\n    pen up\n    change [x3 v] by ((15) * (s))\nend\n\ndefine Draw letter (letter) at x (x) y (y) Size (s) Boldness? (b)\ngo to x: (x) y: (y)\nset pen size to ((b) + ((2) * (s)))\nif <[.] = (letter)> then\n    pen down\n    pen up\nend\nif <[%] = (letter)> then\n    pen down\n    go to x: (((10) * (s)) + (x position)) y: (((20) * (s)) + (y position))\n    pen up\n    change y by ((-20) * (s))\n    pen down\n    pen up\n    go to x: (((-10) * (s)) + (x position)) y: (((20) * (s)) + (y position))\n    pen down\n    pen up\nend\nif <[a] = (letter)> then\n    pen down\n    go to x: (((5) * (s)) + (x position)) y: (((20) * (s)) + (y position))\n    go to x: (((5) * (s)) + (x position)) y: ((y position) - ((20) * (s)))\n    go to x: (((-2) * (s)) + (x position)) y: (((7) * (s)) + (y position))\n    change x by ((-5) * (s))\n    pen up\nend\nif <[b] = (letter)> then\n    pen down\n    change y by ((20) * (s))\n    change y by ((-20) * (s))\n    change x by ((10) * (s))\n    change y by ((9) * (s))\n    change x by ((-10) * (s))\n    change y by ((2) * (s))\n    change x by ((7) * (s))\n    change y by ((9) * (s))\n    change x by ((-7) * (s))\n    pen up\nend\nif <[c] = (letter)> then\n    pen down\n    change y by ((20) * (s))\n    change y by ((-20) * (s))\n    change x by ((10) * (s))\n    change x by ((-10) * (s))\n    change y by ((20) * (s))\n    change x by ((10) * (s))\n    pen up\nend\nif <[d] = (letter)> then\n    pen down\n    change y by ((20) * (s))\n    change x by ((8) * (s))\n    go to x: (((2) * (s)) + (x position)) y: (((-5) * (s)) + (y position))\n    change y by ((-10) * (s))\n    go to x: (((-2) * (s)) + (x position)) y: (((-5) * (s)) + (y position))\n    change x by ((-8) * (s))\n    pen up\nend\nif <[e] = (letter)> then\n    pen down\n    change y by ((20) * (s))\n    change y by ((-20) * (s))\n    change x by ((10) * (s))\n    change x by ((-10) * (s))\n    change y by ((10) * (s))\n    change x by ((10) * (s))\n    change x by ((-10) * (s))\n    change y by ((10) * (s))\n    change x by ((10) * (s))\n    change x by ((-10) * (s))\n    pen up\nend\nif <[f] = (letter)> then\n    pen down\n    change y by ((20) * (s))\n    change y by ((-20) * (s))\n    change y by ((10) * (s))\n    change x by ((10) * (s))\n    change x by ((-10) * (s))\n    change y by ((10) * (s))\n    change x by ((10) * (s))\n    change x by ((-10) * (s))\n    pen up\nend\nif <[g] = (letter)> then\n    pen down\n    change y by ((20) * (s))\n    change y by ((-20) * (s))\n    change x by ((7) * (s))\n    change y by ((5) * (s))\n    change x by ((-2) * (s))\n    change x by ((4) * (s))\n    change x by ((-2) * (s))\n    change y by ((-5) * (s))\n    change x by ((-7) * (s))\n    change y by ((20) * (s))\n    change x by ((7) * (s))\n    pen up\nend\nif <[h] = (letter)> then\n    pen down\n    change y by ((20) * (s))\n    change y by ((-10) * (s))\n    change x by ((10) * (s))\n    change y by ((10) * (s))\n    change y by ((-20) * (s))\n    pen up\nend\nif <[i] = (letter)> then\n    change x by ((5) * (s))\n    pen down\n    change y by ((20) * (s))\n    change x by ((5) * (s))\n    change x by ((-10) * (s))\n    change x by ((5) * (s))\n    change y by ((-20) * (s))\n    change x by ((5) * (s))\n    change x by ((-10) * (s))\n    change x by ((5) * (s))\n    pen up\nend\nif <[j] = (letter)> then\n    pen down\n    change y by ((10) * (s))\n    change y by ((-10) * (s))\n    change x by ((5) * (s))\n    change y by ((20) * (s))\n    change x by ((-5) * (s))\n    change x by ((10) * (s))\n    pen up\nend\nif <[k] = (letter)> then\n    pen down\n    change y by ((20) * (s))\n    change y by ((-10) * (s))\n    go to x: (((10) * (s)) + (x position)) y: (((-10) * (s)) + (y position))\n    go to x: (((-10) * (s)) + (x position)) y: (((10) * (s)) + (y position))\n    go to x: (((10) * (s)) + (x position)) y: (((10) * (s)) + (y position))\n    pen up\nend\nif <[l] = (letter)> then\n    pen down\n    change y by ((20) * (s))\n    change y by ((-20) * (s))\n    change x by ((10) * (s))\n    pen up\nend\nif <[m] = (letter)> then\n    pen down\n    change y by ((20) * (s))\n    go to x: (((5) * (s)) + (x position)) y: (((-10) * (s)) + (y position))\n    go to x: (((5) * (s)) + (x position)) y: (((10) * (s)) + (y position))\n    change y by ((-20) * (s))\n    pen up\nend\nif <[n] = (letter)> then\n    pen down\n    change y by ((20) * (s))\n    go to x: (((10) * (s)) + (x position)) y: (((-20) * (s)) + (y position))\n    change y by ((20) * (s))\n    pen up\nend\nif <[o] = (letter)> then\n    set [z-letter drawer variable v] to [180]\n    repeat (359)\n        change [z-letter drawer variable v] by (-1)\n        go to x: (x) y: (y)\n        change x by ((5) * (s))\n        change y by ((10) * (s))\n        set [z-letter drawer variable 2 v] to (((5) * (s)) * ([sin v] of (z-Letter drawer variable) ))\n        change x by (z-Letter drawer variable 2)\n        set [z-letter drawer variable 2 v] to (((10) * (s)) * ([cos v] of (z-Letter drawer variable) ))\n        change y by (z-Letter drawer variable 2)\n        pen down\n        pen up\n    end\nend\nif <[p] = (letter)> then\n    pen down\n    change y by ((15) * (s))\n    go to x: (((2) * (s)) + (x position)) y: (((5) * (s)) + (y position))\n    change x by ((6) * (s))\n    go to x: (((2) * (s)) + (x position)) y: (((-5) * (s)) + (y position))\n    change y by ((-1) * (s))\n    go to x: (((-2) * (s)) + (x position)) y: (((-5) * (s)) + (y position))\n    change x by ((-6) * (s))\n    go to x: (((-2) * (s)) + (x position)) y: (((5) * (s)) + (y position))\n    pen up\nend\nif <[q] = (letter)> then\n    change y by ((5) * (s))\n    pen down\n    change y by ((10) * (s))\n    go to x: ((2) + (x position)) y: (((5) * (s)) + (y position))\n    change x by ((6) * (s))\n    go to x: ((2) + (x position)) y: (((-5) * (s)) + (y position))\n    change y by ((-10) * (s))\n    go to x: ((-2) + (x position)) y: ((-5) + (y position))\n    change x by ((-6) * (s))\n    go to x: ((-2) + (x position)) y: (((5) * (s)) + (y position))\n    pen up\n    change x by ((6) * (s))\n    pen down\n    go to x: (((5) * (s)) + (x position)) y: (((-5) * (s)) + (y position))\n    pen up\nend\nif <[r] = (letter)> then\n    pen down\n    change y by ((15) * (s))\n    change y by ((-4) * (s))\n    go to x: (((10) * (s)) + (x position)) y: (((-11) * (s)) + (y position))\n    pen up\n    set [z-letter drawer variable v] to [180]\n    repeat (359)\n        change [z-letter drawer variable v] by (-1)\n        go to x: (x) y: (y)\n        change x by ((5) * (s))\n        change y by ((15) * (s))\n        set [z-letter drawer variable 2 v] to (((5) * (s)) * ([sin v] of (z-Letter drawer variable) ))\n        change x by (z-Letter drawer variable 2)\n        set [z-letter drawer variable 2 v] to (((5) * (s)) * ([cos v] of (z-Letter drawer variable) ))\n        change y by (z-Letter drawer variable 2)\n        pen down\n        pen up\n    end\nend\nif <[s] = (letter)> then\n    pen down\n    change y by ((2) * (s))\n    change y by ((-2) * (s))\n    change x by ((10) * (s))\n    change y by ((10) * (s))\n    change x by ((-10) * (s))\n    change y by ((10) * (s))\n    change x by ((10) * (s))\n    change y by ((-2) * (s))\n    change y by ((2) * (s))\n    pen up\nend\nif <[t] = (letter)> then\n    change x by ((5) * (s))\n    pen down\n    change y by ((20) * (s))\n    change x by ((5) * (s))\n    change x by ((-10) * (s))\n    pen up\nend\nif <[u] = (letter)> then\n    change y by ((5) * (s))\n    pen down\n    change y by ((15) * (s))\n    pen up\n    change x by ((10) * (s))\n    pen down\n    change y by ((-15) * (s))\n    go to x: (((-2) * (s)) + (x position)) y: (((-5) * (s)) + (y position))\n    change x by ((-6) * (s))\n    go to x: (((-2) * (s)) + (x position)) y: (((5) * (s)) + (y position))\n    pen up\n    change x by ((10) * (s))\n    pen down\n    change y by ((-5) * (s))\n    pen up\nend\nif <[v] = (letter)> then\n    change y by ((20) * (s))\n    pen down\n    go to x: (((5) * (s)) + (x position)) y: (((-20) * (s)) + (y position))\n    go to x: (((5) * (s)) + (x position)) y: (((20) * (s)) + (y position))\n    pen up\nend\nif <[w] = (letter)> then\n    change y by ((20) * (s))\n    pen down\n    go to x: (((2.5) * (s)) + (x position)) y: (((-20) * (s)) + (y position))\n    go to x: (((2.5) * (s)) + (x position)) y: (((20) * (s)) + (y position))\n    go to x: (((2.5) * (s)) + (x position)) y: (((-20) * (s)) + (y position))\n    go to x: (((2.5) * (s)) + (x position)) y: (((20) * (s)) + (y position))\n    pen up\nend\nif <[x] = (letter)> then\n    change y by ((20) * (s))\n    pen down\n    go to x: (((10) * (s)) + (x position)) y: (((-20) * (s)) + (y position))\n    pen up\n    change x by ((-10) * (s))\n    pen down\n    go to x: (((10) * (s)) + (x position)) y: (((20) * (s)) + (y position))\n    pen up\nend\nif <[y] = (letter)> then\n    change x by ((5) * (s))\n    pen down\n    change y by ((10) * (s))\n    go to x: (((5) * (s)) + (x position)) y: (((10) * (s)) + (y position))\n    go to x: (((-5) * (s)) + (x position)) y: (((-10) * (s)) + (y position))\n    go to x: (((-5) * (s)) + (x position)) y: (((10) * (s)) + (y position))\n    pen up\nend\nif <[z] = (letter)> then\n    pen down\n    change x by ((10) * (s))\n    go to x: (((-10) * (s)) + (x position)) y: (((20) * (s)) + (y position))\n    change x by ((10) * (s))\n    pen up\nend\nif <[:] = (letter)> then\n    change x by ((5) * (s))\n    change y by ((5) * (s))\n    pen down\n    pen up\n    change y by ((10) * (s))\n    pen down\n    pen up\nend\nif <[1] = (letter)> then\n    change x by ((5) * (s))\n    pen down\n    change y by ((20) * (s))\n    go to x: (((-5) * (s)) + (x position)) y: (((-5) * (s)) + (y position))\n    pen up\nend\nif <[2] = (letter)> then\n    pen down\n    change x by ((10) * (s))\n    change x by ((-10) * (s))\n    change y by ((10) * (s))\n    change x by ((10) * (s))\n    change y by ((10) * (s))\n    change x by ((-10) * (s))\n    pen up\nend\nif <[3] = (letter)> then\n    pen down\n    change x by ((10) * (s))\n    change y by ((10) * (s))\n    change x by ((-10) * (s))\n    change x by ((10) * (s))\n    change y by ((10) * (s))\n    change x by ((-10) * (s))\n    pen up\nend\nif <[4] = (letter)> then\n    change x by ((10) * (s))\n    pen down\n    change y by ((10) * (s))\n    change x by ((-10) * (s))\n    change y by ((10) * (s))\n    change y by ((-10) * (s))\n    change x by ((10) * (s))\n    change y by ((10) * (s))\n    pen up\nend\nif <[5] = (letter)> then\n    pen down\n    change x by ((10) * (s))\n    change y by ((10) * (s))\n    change x by ((-10) * (s))\n    change y by ((10) * (s))\n    change x by ((10) * (s))\n    pen up\nend\nif <[6] = (letter)> then\n    pen down\n    change x by ((10) * (s))\n    change y by ((10) * (s))\n    change x by ((-10) * (s))\n    change y by ((-10) * (s))\n    change y by ((20) * (s))\n    pen up\nend\nif <[7] = (letter)> then\n    change y by ((20) * (s))\n    pen down\n    change x by ((10) * (s))\n    change y by ((-20) * (s))\n    pen up\nend\nif <[8] = (letter)> then\n    pen down\n    change x by ((10) * (s))\n    change y by ((10) * (s))\n    change x by ((-10) * (s))\n    change y by ((-10) * (s))\n    change y by ((20) * (s))\n    change x by ((10) * (s))\n    change y by ((-10) * (s))\n    pen up\nend\nif <[9] = (letter)> then\n    change x by ((10) * (s))\n    pen down\n    change y by ((20) * (s))\n    change x by ((-10) * (s))\n    change y by ((-10) * (s))\n    change x by ((10) * (s))\n    pen up\nend\nif <[0] = (letter)> then\n    pen down\n    change y by ((20) * (s))\n    change x by ((10) * (s))\n    change y by ((-20) * (s))\n    change x by ((-10) * (s))\n    pen up\nend\nif <[/] = (letter)> then\n    pen down\n    go to x: (((10) * (s)) + (x position)) y: (((20) * (s)) + (y position))\n    pen up\nend\nif <[?] = (letter)> then\n    pen down\n    pen up\n    change y by ((5) * (s))\n    pen down\n    change y by ((7) * (s))\n    change x by ((5) * (s))\n    change y by ((8) * (s))\n    change x by ((-5) * (s))\n    pen up\nend\n\nwhen I receive [home screen v]\nerase all\nforever\n    set [~current screen v] to [Home]\n    go to x: (0) y: (0)\n    set pen size to (600)\n    set pen color to (#72ff00)\n    set pen (color v) to ((58) + (round ((4) * ([cos v] of ((timer) * (150)) ))))\n    pen down\n    pen up\n    set pen color to (#000000)\n    Phrase [Doria] starting at [-125] [80] size: [4] Boldness? [5]\n    set pen color to (#59ff00)\n    if <<<(mouse x) < [70]> and <[-65] < (mouse x)>> and <<(mouse y) < [50]> and <[-15] < (mouse y)>>> then\n        fill (-65) (50) (70) (50) (70) (-15) resolution: (20)\n        fill (-65) (50) (-65) (-15) (70) (-15) resolution: (20)\n    else\n        fill (-65) (50) (70) (50) (70) (-15) resolution: (10)\n        fill (-65) (50) (-65) (-15) (70) (-15) resolution: (10)\n    end\n    set pen color to (#000000)\n    Phrase [build] starting at [-50] [0] size: [1.6] Boldness? [2]\nend\n\nset pen color to (#59ff00)\nif <<<(mouse x) < [190]> and <[50] < (mouse x)>> and <<(mouse y) < [50]> and <[-15] < (mouse y)>>> then\n    fill (50) (50) (190) (50) (190) (-15) resolution: (20)\n    fill (50) (50) (50) (-15) (190) (-15) resolution: (20)\nelse\n    fill (50) (50) (190) (50) (190) (-15) resolution: (10)\n    fill (50) (50) (50) (-15) (190) (-15) resolution: (10)\nend\nset pen color to (#000000)\nPhrase [Games] starting at [65] [0] size: [1.6] Boldness? [2]\n\nwhen flag clicked\nshow list [save? v]\nbroadcast (Home Screen v)\n\nchange x by (10)\n\nwhen I receive [click v]\nif <[Home] = (~Current screen)> then\n    if <<<(mouse x) < [70]> and <[-65] < (mouse x)>> and <<(mouse y) < [50]> and <[-15] < (mouse y)>>> then\n        stop [other scripts in sprite v]\n        wait until <not <mouse down?>>\n        set [~theme~ v] to [1]\n        broadcast (Build v)\n        stop [this script v]\n    end\nend\nif <[Win] = (~Current screen)> then\n    if <<<(mouse x) < [-50]> and <[-100] < (mouse x)>> and <<(mouse y) < [165]> and <[145] < (mouse y)>>> then\n        stop [other scripts in sprite v]\n        wait until <not <mouse down?>>\n        broadcast (Build v)\n        stop [this script v]\n    end\nend\nif <[play] = (~Current screen)> then\n    if <<<(mouse x) < [-45]> and <[-105] < (mouse x)>> and <<(mouse y) < [170]> and <[140] < (mouse y)>>> then\n        stop [other scripts in sprite v]\n        wait until <not <mouse down?>>\n        broadcast (Build v)\n        stop [this script v]\n    end\nend\nif <[Build] = (~Current screen)> then\n    if <<<(mouse x) < [-45]> and <[-105] < (mouse x)>> and <<(mouse y) < [170]> and <[140] < (mouse y)>>> then\n        stop [other scripts in sprite v]\n        wait until <not <mouse down?>>\n        broadcast (Play v)\n        stop [this script v]\n    end\n    if <<<(mouse x) < [55]> and <[-5] < (mouse x)>> and <<(mouse y) < [170]> and <[140] < (mouse y)>>> then\n        wait until <not <mouse down?>>\n        set [~current screen v] to [Load]\n        stop [this script v]\n    end\n    if <<<(mouse x) < [155]> and <[95] < (mouse x)>> and <<(mouse y) < [170]> and <[140] < (mouse y)>>> then\n        wait until <not <mouse down?>>\n        set [~current screen v] to [Save]\n        stop [this script v]\n    end\n    go to x: (-220) y: (160)\n    Distance to x: (mouse x) y: (mouse y)\n    if <(-Calculated Distance) < [15]> then\n        wait until <not <mouse down?>>\n        set [~current screen v] to [Settings]\n        stop [this script v]\n    end\nend\nif <[Settings] = (~Current screen)> then\n    go to x: (125) y: (75)\n    Distance to x: (mouse x) y: (mouse y)\n    if <(-Calculated Distance) < [15]> then\n        wait until <not <mouse down?>>\n        set [~current screen v] to [Build]\n        stop [this script v]\n    end\nend\n\nwhen I receive [build v]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [~screen open? v] to [0]\nerase all\nset [~time v] to [Day]\nset [~current screen v] to [Build]\nset [~current place v] to [1]\nforever\n    go to x: (0) y: (0)\n    set pen size to (600)\n    if <(~Theme~) = [1]> then\n        set pen color to (#00c1ff)\n    end\n    if <(~Theme~) = [2]> then\n        set pen color to (#73ddff)\n    end\n    if <(~Theme~) = [3]> then\n        set pen color to (#5269ff)\n    end\n    pen down\n    pen up\n    if <(~Theme~) = [1]> then\n        set [~theme v] to [Grass]\n    end\n    if <(~Theme~) = [2]> then\n        set [~theme v] to [Desert]\n    end\n    if <(~Theme~) = [3]> then\n        set [~theme v] to [Winter]\n    end\n    Draw blocks\n    Menu\n    if <(~Current screen) = [Build]> then\n        Place block\n        if <key (up arrow v) pressed?> then\n            change [scroll y v] by (3)\n        end\n        if <key (down arrow v) pressed?> then\n            change [scroll y v] by (-3)\n        end\n        if <key (right arrow v) pressed?> then\n            change [scroll x v] by (3)\n        end\n        if <key (left arrow v) pressed?> then\n            change [scroll x v] by (-3)\n        end\n    end\n    hide variable [~music v]\n    hide variable [~volume v]\n    hide variable [~theme v]\n    hide variable [~theme~ v]\n    if <(~Current screen) = [Settings]> then\n        show variable [~volume v]\n        show variable [~theme v]\n        show variable [~music v]\n        show variable [~theme~ v]\n        Settings screen\n    end\n    if <(~Current screen) = [Load]> then\n        ask [Give Code Below] and wait\n        Load (answer)\n        set [~current screen v] to [Build]\n    end\n    if <(~Current screen) = [Save]> then\n        delete all of [save? v]\n        add [Save code below:] to [save? v]\n        add [Double click on the code] to [save? v]\n        add [Then press Ctrl-C and press Cntrl-V to put it somewhere else] to [save? v]\n        Save\n        add (_Encoded) to [save? v]\n        hide list [save? v]\n        repeat until <(answer) = (item (4) of [save? v])>\n            ask [Give Code Below] and wait\n        end\n        set [~current screen v] to [Build]\n        show list [save? v]\n    end\nend\n\nset [~theme~ v] to [1]\n\ndefine Place block\nif <<(((round (((mouse y) + (Scroll Y)) / (34))) * (34)) - (Scroll Y)) < [110]> and <[-90] < (((round (((mouse y) + (Scroll Y)) / (34))) * (34)) - (Scroll Y))>> then\n    Draw Block at x: (((round (((mouse x) + (Scroll X)) / (34))) * (34)) - (Scroll X)) y: (((round (((mouse y) + (Scroll Y)) / (34))) * (34)) - (Scroll Y)) Type: (~Current Place) Not selected? <>\nend\n\ndefine Draw Block at x: (x) y: (y) Type: (t) Not selected? <??>\ngo to x: (x) y: (y)\nset pen color to (#ac2c4e)\nset pen size to (20)\nif <??> then\n    set pen (saturation v) to (80)\nend\nif <[grass] = (~Theme)> then\n    if <[11] = (t)> then\n        set pen color to (#ffffff)\n        set pen size to (10)\n        Draw line from ((x) + (-5)) ((y) + (-10)) to ((x) + (5)) ((y) + (10))\n        set pen color to (#ffb7b7)\n        set pen size to (10)\n        go to x: ((x) + (5)) y: ((y) + (10))\n        pen down\n        pen up\n    end\n    if <<[9] = (t)> or <[10] = (t)>> then\n        if <[10] = (t)> then\n            set pen color to (#ff0000)\n        end\n        if <[9] = (t)> then\n            set pen color to (#00f2ff)\n        end\n        Draw perfect square at ((x) - (2)) ((y) + (3)) w [26]\n        Draw perfect square at ((x) - (2)) ((y) + (-3)) w [26]\n        Draw perfect square at ((x) - (-2)) ((y) + (3)) w [26]\n        Draw perfect square at ((x) - (-2)) ((y) + (-3)) w [26]\n    end\n    if <[0] = (t)> then\n        set pen color to (#ac4100)\n        Draw perfect square at (x) (y) w [30]\n    end\n    if <[1] = (t)> then\n        set pen color to (#ac4100)\n        Draw perfect square at (x) (y) w [29.5]\n        set pen color to (#00ff21)\n        fill ((x) + (-15)) ((y) + (15)) ((x) + (-7)) ((y) + (15)) ((x) + (-11.5)) ((y) + (10)) resolution: (4)\n        fill ((x) + (15)) ((y) + (15)) ((x) + (7)) ((y) + (15)) ((x) + (11.5)) ((y) + (10)) resolution: (4)\n        fill ((x) + (-5)) ((y) + (15)) ((x) + (5)) ((y) + (15)) ((x) + (0)) ((y) + (10)) resolution: (4)\n    end\n    if <[2] = (t)> then\n        set pen color to (#00f2ff)\n        set [~loop2 v] to ((x) + (-15.5))\n        repeat (11)\n            set pen size to (3)\n            Draw line from (~loop2) ((y) + (-15)) to (~loop2) (((y) + (10)) + (round ((4) * ([cos v] of ((((~loop2) - (15)) + (round ((50) * (timer)))) * (7)) ))))\n            change [~loop2 v] by (3)\n        end\n    end\n    if <[3] = (t)> then\n        set pen color to (#ff0000)\n        set [~loop2 v] to ((x) + (-15.5))\n        repeat (11)\n            set pen size to (3)\n            Draw line from (~loop2) ((y) + (-15)) to (~loop2) (((y) + (10)) + (round ((4) * ([cos v] of ((((~loop2) - ((11) + (round ((50) * (timer))))) + ()) * (5)) ))))\n            change [~loop2 v] by (3)\n        end\n    end\n    if <[4] = (t)> then\n        set pen size to (4)\n        set pen color to (#000000)\n        point in direction ((100) * (timer))\n        repeat (8)\n            turn right (45) degrees\n            pen down\n            move (15) steps\n            move (-15) steps\n            pen up\n        end\n        go to x: (x) y: (y)\n        set pen size to (25)\n        set pen color to (#6d6d6d)\n        pen down\n        pen up\n        set pen size to (15)\n        set pen color to (#b9b9b9)\n        pen down\n        pen up\n    end\n    if <[5] = (t)> then\n        set pen color to (#9c4b00)\n        set pen size to (6)\n        Draw line from (x) ((y) + (15)) to (x) ((y) + (-15))\n        set pen color to (#1000ff)\n        if <<(item (~loop) of [x v]) = (~Checkpoint x)> and <(item (~loop) of [y v]) = (~Checkpoint y)>> then\n            set pen color to (#776eff)\n        end\n        fill (x) ((y) + (15)) (x) ((y) + (5)) ((x) + (15)) ((y) + (10)) resolution: (6)\n    end\n    if <[6] = (t)> then\n        set pen color to (#9c4b00)\n        set pen size to (6)\n        Draw line from (x) ((y) + (15)) to (x) ((y) + (-15))\n        set pen color to (#44e400)\n        fill (x) ((y) + (15)) (x) ((y) + (5)) ((x) + (15)) ((y) + (10)) resolution: (6)\n    end\n    if <[7] = (t)> then\n        set pen color to (#9e9e9e)\n        set pen size to (6)\n        Draw line from ((x) + (10)) ((y) + (15)) to ((x) + (-10)) ((y) + (0))\n        Draw line from ((x) + (-10)) ((y) + (15)) to ((x) + (10)) ((y) + (0))\n        Draw line from ((x) + (10)) ((y) + (-15)) to ((x) + (-10)) ((y) + (0))\n        Draw line from ((x) + (-10)) ((y) + (-15)) to ((x) + (10)) ((y) + (0))\n        set pen color to (#fff600)\n        set pen size to (10)\n        Draw line from ((x) + (15)) ((y) + (13)) to ((x) + (-15)) ((y) + (13))\n    end\n    if <[8] = (t)> then\n        set pen color to (#9e9e9e)\n        set pen size to (6)\n        Draw line from ((x) + (10)) ((y) + (15)) to ((x) + (-10)) ((y) + (0))\n        Draw line from ((x) + (-10)) ((y) + (15)) to ((x) + (10)) ((y) + (0))\n        Draw line from ((x) + (10)) ((y) + (-15)) to ((x) + (-10)) ((y) + (0))\n        Draw line from ((x) + (-10)) ((y) + (-15)) to ((x) + (10)) ((y) + (0))\n    end\nend\nif <[Desert] = (~Theme)> then\n    if <[11] = (t)> then\n        set pen color to (#ffffff)\n        set pen size to (10)\n        Draw line from ((x) + (-5)) ((y) + (-10)) to ((x) + (5)) ((y) + (10))\n        set pen color to (#ffb7b7)\n        set pen size to (10)\n        go to x: ((x) + (5)) y: ((y) + (10))\n        pen down\n        pen up\n    end\n    if <<[9] = (t)> or <[10] = (t)>> then\n        if <[10] = (t)> then\n            set pen color to (#bf3636)\n        end\n        if <[9] = (t)> then\n            set pen color to (#006aff)\n        end\n        Draw perfect square at ((x) - (2)) ((y) + (3)) w [26]\n        Draw perfect square at ((x) - (2)) ((y) + (-3)) w [26]\n        Draw perfect square at ((x) - (-2)) ((y) + (3)) w [26]\n        Draw perfect square at ((x) - (-2)) ((y) + (-3)) w [26]\n    end\n    if <[0] = (t)> then\n        set pen color to (#aebd00)\n        Draw perfect square at (x) (y) w [30]\n    end\n    if <[1] = (t)> then\n        set pen color to (#aebd00)\n        Draw perfect square at (x) (y) w [30]\n        set pen color to (#e0ff00)\n        fill ((x) + (-15)) ((y) + (15)) ((x) + (-7)) ((y) + (15)) ((x) + (-11.5)) ((y) + (10)) resolution: (4)\n        fill ((x) + (15)) ((y) + (15)) ((x) + (7)) ((y) + (15)) ((x) + (11.5)) ((y) + (10)) resolution: (4)\n        fill ((x) + (-5)) ((y) + (15)) ((x) + (5)) ((y) + (15)) ((x) + (0)) ((y) + (10)) resolution: (4)\n    end\n    if <[2] = (t)> then\n        set pen color to (#006aff)\n        set [~loop2 v] to ((x) + (-15.5))\n        repeat (11)\n            set pen size to (3)\n            Draw line from (~loop2) ((y) + (-15)) to (~loop2) (((y) + (10)) + (round ((4) * ([cos v] of ((((~loop2) - (15)) + (round ((50) * (timer)))) * (7)) ))))\n            change [~loop2 v] by (3)\n        end\n    end\n    if <[3] = (t)> then\n        set pen color to (#b70000)\n        set [~loop2 v] to ((x) + (-15.5))\n        repeat (11)\n            set pen size to (3)\n            Draw line from (~loop2) ((y) + (-15)) to (~loop2) (((y) + (10)) + (round ((4) * ([cos v] of ((((~loop2) - ((11) + (round ((50) * (timer))))) + ()) * (5)) ))))\n            change [~loop2 v] by (3)\n        end\n    end\n    if <[4] = (t)> then\n        set pen size to (4)\n        set pen color to (#ffffff)\n        point in direction ((100) * (timer))\n        repeat (8)\n            turn right (45) degrees\n            pen down\n            move (15) steps\n            move (-15) steps\n            pen up\n        end\n        go to x: (x) y: (y)\n        set pen size to (25)\n        set pen color to (#006d13)\n        pen down\n        pen up\n        set pen size to (15)\n        set pen color to (#2eb900)\n        pen down\n        pen up\n    end\n    if <[5] = (t)> then\n        set pen color to (#9c4b00)\n        set pen size to (6)\n        Draw line from (x) ((y) + (15)) to (x) ((y) + (-15))\n        set pen color to (#1000ff)\n        if <<(item (~loop) of [x v]) = (~Checkpoint x)> and <(item (~loop) of [y v]) = (~Checkpoint y)>> then\n            set pen color to (#776eff)\n        end\n        fill (x) ((y) + (15)) (x) ((y) + (5)) ((x) + (15)) ((y) + (10)) resolution: (6)\n    end\n    if <[6] = (t)> then\n        set pen color to (#9c4b00)\n        set pen size to (6)\n        Draw line from (x) ((y) + (15)) to (x) ((y) + (-15))\n        set pen color to (#44e400)\n        fill (x) ((y) + (15)) (x) ((y) + (5)) ((x) + (15)) ((y) + (10)) resolution: (6)\n    end\n    if <[7] = (t)> then\n        set pen color to (#9e9e9e)\n        set pen size to (6)\n        Draw line from ((x) + (10)) ((y) + (15)) to ((x) + (-10)) ((y) + (0))\n        Draw line from ((x) + (-10)) ((y) + (15)) to ((x) + (10)) ((y) + (0))\n        Draw line from ((x) + (10)) ((y) + (-15)) to ((x) + (-10)) ((y) + (0))\n        Draw line from ((x) + (-10)) ((y) + (-15)) to ((x) + (10)) ((y) + (0))\n        set pen color to (#fff600)\n        set pen size to (10)\n        Draw line from ((x) + (15)) ((y) + (13)) to ((x) + (-15)) ((y) + (13))\n    end\n    if <[8] = (t)> then\n        set pen color to (#9e9e9e)\n        set pen size to (6)\n        Draw line from ((x) + (10)) ((y) + (15)) to ((x) + (-10)) ((y) + (0))\n        Draw line from ((x) + (-10)) ((y) + (15)) to ((x) + (10)) ((y) + (0))\n        Draw line from ((x) + (10)) ((y) + (-15)) to ((x) + (-10)) ((y) + (0))\n        Draw line from ((x) + (-10)) ((y) + (-15)) to ((x) + (10)) ((y) + (0))\n    end\nend\nif <[Winter] = (~Theme)> then\n    if <[11] = (t)> then\n        set pen color to (#ffffff)\n        set pen size to (10)\n        Draw line from ((x) + (-5)) ((y) + (-10)) to ((x) + (5)) ((y) + (10))\n        set pen color to (#ffb7b7)\n        set pen size to (10)\n        go to x: ((x) + (5)) y: ((y) + (10))\n        pen down\n        pen up\n    end\n    if <<[9] = (t)> or <[10] = (t)>> then\n        if <[10] = (t)> then\n            set pen color to (#ff6e00)\n        end\n        if <[9] = (t)> then\n            set pen color to (#388bff)\n        end\n        Draw perfect square at ((x) - (2)) ((y) + (3)) w [26]\n        Draw perfect square at ((x) - (2)) ((y) + (-3)) w [26]\n        Draw perfect square at ((x) - (-2)) ((y) + (3)) w [26]\n        Draw perfect square at ((x) - (-2)) ((y) + (-3)) w [26]\n    end\n    if <[0] = (t)> then\n        set pen color to (#009cff)\n        Draw perfect square at (x) (y) w [30]\n    end\n    if <[1] = (t)> then\n        set pen color to (#009cff)\n        Draw perfect square at (x) (y) w [30]\n        set pen color to (#cdf2ff)\n        fill ((x) + (-15)) ((y) + (15)) ((x) + (-7)) ((y) + (15)) ((x) + (-11.5)) ((y) + (10)) resolution: (4)\n        fill ((x) + (15)) ((y) + (15)) ((x) + (7)) ((y) + (15)) ((x) + (11.5)) ((y) + (10)) resolution: (4)\n        fill ((x) + (-5)) ((y) + (15)) ((x) + (5)) ((y) + (15)) ((x) + (0)) ((y) + (10)) resolution: (4)\n    end\n    if <[2] = (t)> then\n        set pen color to (#398bff)\n        set [~loop2 v] to ((x) + (-15.5))\n        repeat (11)\n            set pen size to (3)\n            Draw line from (~loop2) ((y) + (-15)) to (~loop2) (((y) + (10)) + (round ((4) * ([cos v] of ((((~loop2) - (15)) + (round ((50) * (timer)))) * (1)) ))))\n            change [~loop2 v] by (3)\n        end\n    end\n    if <[3] = (t)> then\n        set pen color to (#ff6e00)\n        set [~loop2 v] to ((x) + (-15.5))\n        repeat (11)\n            set pen size to (3)\n            Draw line from (~loop2) ((y) + (-15)) to (~loop2) (((y) + (10)) + (round ((4) * ([cos v] of ((((~loop2) - ((11) + (round ((50) * (timer))))) + ()) * (9)) ))))\n            change [~loop2 v] by (3)\n        end\n    end\n    if <[4] = (t)> then\n        set pen size to (4)\n        set pen color to (#c7e9ff)\n        point in direction ((100) * (timer))\n        repeat (8)\n            turn right (45) degrees\n            pen down\n            move (15) steps\n            move (-15) steps\n            pen up\n        end\n        go to x: (x) y: (y)\n        set pen size to (25)\n        set pen color to (#17006d)\n        pen down\n        pen up\n        set pen size to (15)\n        set pen color to (#00aeda)\n        pen down\n        pen up\n    end\n    if <[5] = (t)> then\n        set pen color to (#9c4b00)\n        set pen size to (6)\n        Draw line from (x) ((y) + (15)) to (x) ((y) + (-15))\n        set pen color to (#1000ff)\n        if <<(item (~loop) of [x v]) = (~Checkpoint x)> and <(item (~loop) of [y v]) = (~Checkpoint y)>> then\n            set pen color to (#776eff)\n        end\n        fill (x) ((y) + (15)) (x) ((y) + (5)) ((x) + (15)) ((y) + (10)) resolution: (6)\n    end\n    if <[6] = (t)> then\n        set pen color to (#9c4b00)\n        set pen size to (6)\n        Draw line from (x) ((y) + (15)) to (x) ((y) + (-15))\n        set pen color to (#44e400)\n        fill (x) ((y) + (15)) (x) ((y) + (5)) ((x) + (15)) ((y) + (10)) resolution: (6)\n    end\n    if <[7] = (t)> then\n        set pen color to (#9e9e9e)\n        set pen size to (6)\n        Draw line from ((x) + (10)) ((y) + (15)) to ((x) + (-10)) ((y) + (0))\n        Draw line from ((x) + (-10)) ((y) + (15)) to ((x) + (10)) ((y) + (0))\n        Draw line from ((x) + (10)) ((y) + (-15)) to ((x) + (-10)) ((y) + (0))\n        Draw line from ((x) + (-10)) ((y) + (-15)) to ((x) + (10)) ((y) + (0))\n        set pen color to (#fff600)\n        set pen size to (10)\n        Draw line from ((x) + (15)) ((y) + (13)) to ((x) + (-15)) ((y) + (13))\n    end\n    if <[8] = (t)> then\n        set pen color to (#9e9e9e)\n        set pen size to (6)\n        Draw line from ((x) + (10)) ((y) + (15)) to ((x) + (-10)) ((y) + (0))\n        Draw line from ((x) + (-10)) ((y) + (15)) to ((x) + (10)) ((y) + (0))\n        Draw line from ((x) + (10)) ((y) + (-15)) to ((x) + (-10)) ((y) + (0))\n        Draw line from ((x) + (-10)) ((y) + (-15)) to ((x) + (10)) ((y) + (0))\n    end\nend\n\ndefine Draw blocks\nset [~loop v] to [0]\nrepeat (length of [type v])\n    change [~loop v] by (1)\n    if <<<[-280] < ((item (~loop) of [x v]) - (Scroll X))> and <((item (~loop) of [x v]) - (Scroll X)) < [280]>> and <<((item (~loop) of [y v]) - (Scroll Y)) < [210]> and <[-210] < ((item (~loop) of [y v]) - (Scroll Y))>>> then\n        if <(item (~loop) of [type v]) = [1]> then\n            Grass block\n        else\n            if <(item (~loop) of [type v]) = [7]> then\n                Bounce blocks\n            else\n                if <<(item (~loop) of [type v]) = [3]> or <(item (~loop) of [type v]) = [2]>> then\n                    Liquid blocks (item (~loop) of [type v])\n                else\n                    Draw Block at x: ((item (~loop) of [x v]) - (Scroll X)) y: ((item (~loop) of [y v]) - (Scroll Y)) Type: (item (~loop) of [type v]) Not selected? <>\n                end\n            end\n        end\n    end\nend\n\ndefine Menu\nif <<(~Current screen) = [Win]> or <(~Current screen) = [Play]>> then\n    set pen color to (#ffffff)\n    fill (-240) (180) (240) (180) (240) (130) resolution: (4)\n    fill (-240) (180) (-240) (130) (240) (130) resolution: (4)\n    set pen color to (#2aff00)\n    fill (-100) (165) (-50) (165) (-50) (145) resolution: (7)\n    fill (-100) (165) (-100) (145) (-50) (145) resolution: (7)\n    set pen color to (#000000)\n    Phrase [edit] starting at [-95] [150] size: [0.7] Boldness? [1]\nelse\n    if <(~Current screen) = [Build]> then\n        set pen color to (#ffffff)\n        fill (-240) (180) (240) (180) (240) (130) resolution: (4)\n        fill (-240) (180) (-240) (130) (240) (130) resolution: (4)\n        set pen color to (#d6d6d6)\n        fill (-240) (-180) (240) (-180) (240) (-120) resolution: (4)\n        fill (-240) (-180) (-240) (-120) (240) (-120) resolution: (4)\n        set [~loop v] to [1]\n        set [~loop extra 1 v] to [-175]\n        repeat (7)\n            if <(~Current Place) = (~loop)> then\n                set pen color to (#000000)\n                Draw perfect square at (~loop extra 1) [-140] w [39]\n                set pen color to (#d6d6d6)\n                Draw perfect square at (~loop extra 1) [-140] w [34]\n            end\n            Draw Block at x: (~loop extra 1) y: [-140] Type: (~loop) Not selected? <not <(~Current Place) = (~loop)>>\n            if <<<(mouse x) < ((~loop extra 1) + (15))> and <((~loop extra 1) + (-15)) < (mouse x)>> and <<[-155] < (mouse y)> and <(mouse y) < [-125]>>> then\n                if <mouse down?> then\n                    set [~current place v] to (~loop)\n                end\n            end\n            change [~loop extra 1 v] by (50)\n            change [~loop v] by (1)\n        end\n        if <(~Current Place) = [11]> then\n            set pen color to (#000000)\n            Draw perfect square at (~loop extra 1) [-140] w [39]\n            set pen color to (#d6d6d6)\n            Draw perfect square at (~loop extra 1) [-140] w [34]\n        end\n        if <<<(mouse x) < ((~loop extra 1) + (15))> and <((~loop extra 1) + (-15)) < (mouse x)>> and <<[-155] < (mouse y)> and <(mouse y) < [-125]>>> then\n            if <mouse down?> then\n                set [~current place v] to [11]\n            end\n        end\n        Draw Block at x: (~loop extra 1) y: [-140] Type: [11] Not selected? <not <(~Current Place) = (~loop)>>\n        if <[Build] = (~Current screen)> then\n            go to x: (-220) y: (160)\n            set pen color to (#000000)\n            set pen size to (8)\n            point in direction (90)\n            pen down\n            repeat (8)\n                move (15) steps\n                move (-15) steps\n                turn right (45) degrees\n            end\n            pen up\n            go to x: (-220) y: (160)\n            set pen size to (25)\n            set pen color to (#b9b9b9)\n            pen down\n            pen up\n        end\n        set pen color to (#2aff00)\n        fill (-100) (165) (-50) (165) (-50) (145) resolution: (7)\n        fill (-100) (165) (-100) (145) (-50) (145) resolution: (7)\n        set pen color to (#000000)\n        Phrase [Play] starting at [-95] [150] size: [0.7] Boldness? [1]\n        set pen color to (#2aff00)\n        fill (0) (165) (50) (165) (50) (145) resolution: (7)\n        fill (0) (165) (0) (145) (50) (145) resolution: (7)\n        set pen color to (#000000)\n        Phrase [load] starting at [5] [150] size: [0.7] Boldness? [1]\n        set pen color to (#2aff00)\n        fill (100) (165) (150) (165) (150) (145) resolution: (7)\n        fill (100) (165) (100) (145) (150) (145) resolution: (7)\n        set pen color to (#000000)\n        Phrase [save] starting at [105] [150] size: [0.7] Boldness? [1]\n    end\nend\n\ndefine add (x) (y) (t)\nif <<not <<(x) = [0]> and <(y) = [34]>>> and <not <<(x) = [0]> and <(y) = [0]>>>> then\n    if <[11] = (t)> then\n        set [~loop v] to [0]\n        repeat (length of [type v])\n            change [~loop v] by (1)\n            if <<(item (~loop) of [x v]) = (x)> and <(item (~loop) of [y v]) = (y)>> then\n                delete (~loop) of [type v]\n                delete (~loop) of [x v]\n                delete (~loop) of [y v]\n                stop [this script v]\n            end\n        end\n    else\n        set [~loop v] to [0]\n        repeat (length of [type v])\n            change [~loop v] by (1)\n            if <<(item (~loop) of [x v]) = (x)> and <(item (~loop) of [y v]) = (y)>> then\n                stop [this script v]\n            end\n        end\n        add (t) to [type v]\n        add (x) to [x v]\n        add (y) to [y v]\n    end\nend\n\nwhen I receive [click v]\n\ndefine Grass block\nset [~loop2 v] to [0]\nrepeat (length of [type v])\n    change [~loop2 v] by (1)\n    if <<(item (~loop2) of [x v]) = (item (~loop) of [x v])> and <<(item (~loop2) of [y v]) = ((item (~loop) of [y v]) + (34))> and <(item (~loop2) of [type v]) = (item (~loop) of [type v])>>> then\n        Draw Block at x: ((item (~loop) of [x v]) - (Scroll X)) y: ((item (~loop) of [y v]) - (Scroll Y)) Type: [0] Not selected? <>\n        stop [this script v]\n    end\nend\nDraw Block at x: ((item (~loop) of [x v]) - (Scroll X)) y: ((item (~loop) of [y v]) - (Scroll Y)) Type: [1] Not selected? <>\n\nwhen I receive [build v]\nforever\n    if <[build] = (~Current screen)> then\n        if <mouse down?> then\n            if <<(((round (((mouse y) + (Scroll Y)) / (34))) * (34)) - (Scroll Y)) < [110]> and <[-90] < (((round (((mouse y) + (Scroll Y)) / (34))) * (34)) - (Scroll Y))>> then\n                add ((((round (((mouse x) + (Scroll X)) / (34))) * (34)) - (Scroll X)) + (Scroll X)) ((((round (((mouse y) + (Scroll Y)) / (34))) * (34)) - (Scroll Y)) + (Scroll Y)) (~Current Place)\n            end\n        end\n        Switch inventory\n    end\nend\n\ndefine Switch inventory\nset [~loop v] to [0]\nrepeat (7)\n    change [~loop v] by (1)\n    if <key ((~loop) v) pressed?> then\n        set [~current place v] to (~loop)\n    end\nend\nif <key (8 v) pressed?> then\n    set [~current place v] to [11]\nend\n\ndefine Bounce blocks\nset [~loop2 v] to [0]\nrepeat (length of [type v])\n    change [~loop2 v] by (1)\n    if <<(item (~loop2) of [x v]) = (item (~loop) of [x v])> and <<(item (~loop2) of [y v]) = ((item (~loop) of [y v]) + (34))> and <(item (~loop2) of [type v]) = (item (~loop) of [type v])>>> then\n        Draw Block at x: ((item (~loop) of [x v]) - (Scroll X)) y: ((item (~loop) of [y v]) - (Scroll Y)) Type: [8] Not selected? <>\n        stop [this script v]\n    end\nend\nDraw Block at x: ((item (~loop) of [x v]) - (Scroll X)) y: ((item (~loop) of [y v]) - (Scroll Y)) Type: [7] Not selected? <>\n\ndefine Liquid blocks ()\nif <[2] = ()> then\n    set [~loop2 v] to [0]\n    repeat (length of [type v])\n        change [~loop2 v] by (1)\n        if <<(item (~loop2) of [x v]) = (item (~loop) of [x v])> and <<(item (~loop2) of [y v]) = ((item (~loop) of [y v]) + (34))> and <(item (~loop2) of [type v]) = (item (~loop) of [type v])>>> then\n            Draw Block at x: ((item (~loop) of [x v]) - (Scroll X)) y: ((item (~loop) of [y v]) - (Scroll Y)) Type: [9] Not selected? <>\n            stop [this script v]\n        end\n    end\n    Draw Block at x: ((item (~loop) of [x v]) - (Scroll X)) y: ((item (~loop) of [y v]) - (Scroll Y)) Type: [2] Not selected? <>\nelse\n    set [~loop2 v] to [0]\n    repeat (length of [type v])\n        change [~loop2 v] by (1)\n        if <<(item (~loop2) of [x v]) = (item (~loop) of [x v])> and <<(item (~loop2) of [y v]) = ((item (~loop) of [y v]) + (34))> and <(item (~loop2) of [type v]) = (item (~loop) of [type v])>>> then\n            Draw Block at x: ((item (~loop) of [x v]) - (Scroll X)) y: ((item (~loop) of [y v]) - (Scroll Y)) Type: [10] Not selected? <>\n            stop [this script v]\n        end\n    end\n    Draw Block at x: ((item (~loop) of [x v]) - (Scroll X)) y: ((item (~loop) of [y v]) - (Scroll Y)) Type: [3] Not selected? <>\nend\n\ndefine Settings screen\nset pen color to (#c0c0c0)\nDraw perfect square at [-50] [0] w [150]\nDraw perfect square at [50] [0] w [150]\nset pen color to (#000000)\nPhrase [Settings] starting at [-55] [50] size: [1] Boldness? [1]\nPhrase [Settings] starting at [-55] [50] size: [1] Boldness? [1]\ngo to x: (125) y: (75)\nset pen color to (#ff0000)\nset pen size to (35)\npen down\npen up\nset pen color to (#ffffff)\nset pen size to (10)\npen down\npoint in direction (45)\nmove (10) steps\nmove (-20) steps\nmove (10) steps\npoint in direction (-45)\nmove (10) steps\nmove (-20) steps\nmove (10) steps\npen up\n\nwhen I receive [play v]\nset [~checkpoint x v] to [0]\nset [~checkpoint y v] to [0]\nRespawn\nset [~current screen v] to [Play]\nforever\n    go to x: (0) y: (0)\n    set pen size to (600)\n    set pen color to (#00c1ff)\n    pen down\n    pen up\n    Draw blocks\n    Draw Player at ((Player X) - (Scroll X)) ((Player Y) - (Scroll Y))\n    Menu\n    if <not <[Win] = (~Current screen)>> then\n        Settings\n    end\n    if <[Win] = (~Current screen)> then\n        set pen color to (#ffffff)\n        Draw perfect square at [-50] [0] w [100]\n        Draw perfect square at [50] [0] w [100]\n        set pen color to (#000000)\n        Phrase [you win] starting at [-100] [-15] size: [2] Boldness? []\n    end\nend\n\ndefine Draw Player at (x) (y)\nset pen color to (#000000)\nDraw perfect square at (x) (y) w [25]\nset pen color to (#ffffff)\nDraw perfect square at (x) (y) w [15]\ngo to x: (x) y: (y)\nchange x by ((<key (right arrow v) pressed?> - <key (left arrow v) pressed?>) * (5))\nchange y by ((<key (up arrow v) pressed?> - <key (down arrow v) pressed?>) * (5))\nset pen color to (#000000)\nset pen size to (10)\npen down\npen up\n\ndefine Settings\nDetect\nchange [~~xv v] by (<not <mouse down?>> * (<key (right arrow v) pressed?> - <key (left arrow v) pressed?>))\nchange [~~xv v] by (<mouse down?> * (<[0] < (mouse x)> - <(mouse x) < [0]>))\nset [~~xv v] to ((0.9) * (~~Xv))\nif <[touching? v] contains [2]?> then\n    set [~~xv v] to ((0.9) * (~~Xv))\nend\nchange [player x v] by (~~Xv)\nrepeat (5)\n    Detect\n    if <[touching? v] contains [1]?> then\n        change [player y v] by (1)\n    end\nend\nDetect\nif <[touching? v] contains [1]?> then\n    change [player y v] by (-5)\n    change [player x v] by ((-1) * (~~Xv))\n    set [~~xv v] to [0]\nend\nDetect\nif <[touching? v] contains [2]?> then\n    if <not <(~~Yv) < [-5]>> then\n        change [~~yv v] by (-0.1)\n    end\n    if <(~~Yv) < [-5]> then\n        set [~~yv v] to [-5]\n    end\nelse\n    if <not <(~~Yv) < [-20]>> then\n        change [~~yv v] by (-2)\n    end\nend\nchange [player y v] by (~~Yv)\nDetect\nif <[touching? v] contains [1]?> then\n    change [player y v] by ((-1) * (~~Yv))\n    set [~~yv v] to [0]\nend\nDetect\nif <[touching? v] contains [2]?> then\n    if <key (up arrow v) pressed?> then\n        if <(~~Yv) < [5]> then\n            change [~~yv v] by (1.5)\n        end\n    end\n    if <[0] < (mouse y)> then\n        if <(~~Yv) < [5]> then\n            change [~~yv v] by (1.5)\n        end\n    end\nend\nchange [player y v] by (-2)\nDetect\nif <[touching? v] contains [1]?> then\n    if <key (up arrow v) pressed?> then\n        set [~~yv v] to [18]\n    end\nend\nchange [player y v] by (2)\nif <(Player Y) < [-500]> then\n    Respawn\nend\nset [scroll x v] to (Player X)\nset [scroll y v] to (Player Y)\nDetect\nif <[touching? v] contains [3]?> then\n    Respawn\nend\nDetect\nif <[touching? v] contains [4]?> then\n    Respawn\nend\nDetect\nif <[touching? v] contains [7]?> then\n    set [~~yv v] to [30]\nend\nDetect\nif <[touching? v] contains [6]?> then\n    set [~current screen v] to [Win]\nend\n\ndefine Detect\ndelete all of [touching? v]\nset [~loop v] to [0]\nrepeat (length of [type v])\n    change [~loop v] by (1)\n    if <<<((item (~loop) of [x v]) + (-15)) < ((Player X) + (12.5))> and <((Player X) + (-12.5)) < ((item (~loop) of [x v]) + (15))>> and <<((item (~loop) of [y v]) + (-15)) < ((Player Y) + (12.5))> and <((Player Y) + (-12.5)) < ((item (~loop) of [y v]) + (15))>>> then\n        if <(item (~loop) of [type v]) = [5]> then\n            add (item (~loop) of [type v]) to [touching? v]\n            set [~checkpoint x v] to (item (~loop) of [x v])\n            set [~checkpoint y v] to (item (~loop) of [y v])\n        else\n            add (item (~loop) of [type v]) to [touching? v]\n        end\n    end\nend\n\ndefine Respawn\nset [~~xv v] to [0]\nset [~~yv v] to [0]\nset [player x v] to (~Checkpoint x)\nset [player y v] to (~Checkpoint y)\nset [scroll x v] to (~Checkpoint x)\nset [scroll y v] to (~Checkpoint y)\n\nwhen I receive [reset v]\ndelete all of [y v]\ndelete all of [x v]\ndelete all of [type v]\nadd [5] to [type v]\nadd [0] to [x v]\nadd [0] to [y v]\nadd [1] to [type v]\nadd [0] to [x v]\nadd [-34] to [y v]\n\ndefine Load ()\ndelete all of [type v]\ndelete all of [x v]\ndelete all of [y v]\nset [_letter # v] to [1]\nset [_encoded v] to ()\nset [_add v] to (join (join (letter (_letter #) of (_Encoded)) (letter ((_letter #) + (1)) of (_Encoded))) (join (letter ((_letter #) + (2)) of (_Encoded)) (letter ((_letter #) + (3)) of (_Encoded))))\nchange [_letter # v] by (4)\nrepeat (_add)\n    Get (join (letter (_letter #) of (_Encoded)) (letter ((_letter #) + (1)) of (_Encoded)))\n    add (_add) to [type v]\n    Get (join (join (letter (_letter #) of (_Encoded)) (letter ((_letter #) + (1)) of (_Encoded))) (join (letter ((_letter #) + (2)) of (_Encoded)) (letter ((_letter #) + (3)) of (_Encoded))))\n    add ((_add) - (5000)) to [x v]\n    Get (join (join (letter (_letter #) of (_Encoded)) (letter ((_letter #) + (1)) of (_Encoded))) (join (letter ((_letter #) + (2)) of (_Encoded)) (letter ((_letter #) + (3)) of (_Encoded))))\n    add ((_add) - (5000)) to [y v]\nend\nset [~theme~ v] to (letter (_letter #) of (_Encoded))\nchange [_letter # v] by (1)\nif <not <<(~Theme~) = [1]> or <<(~Theme~) = [2]> or <(~Theme~) = [3]>>>> then\n    broadcast (Reset v)\n    set [~theme~ v] to [1]\nend\n\ndefine Save\nset [_encoded v] to []\nAdd (length of [type v]) to encoded [4]\nset [~loop v] to [0]\nrepeat (length of [type v])\n    change [~loop v] by (1)\n    Add (item (~loop) of [type v]) to encoded [2]\n    Add ((item (~loop) of [x v]) + (5000)) to encoded [4]\n    Add ((item (~loop) of [y v]) + (5000)) to encoded [4]\nend\nset [_encoded v] to (join (_Encoded) (~Theme~))\n\nset [_add v] to [0]\n\ndefine Add () to encoded (a)\nset [_add v] to []\nset [_add v] to ()\nrepeat until <(length of (_add)) = (a)>\n    set [_add v] to (join [0] (_add))\nend\nset [_encoded v] to (join (_Encoded) (_add))\n\ndefine Get ()\nchange [_letter # v] by (length of ())\nset [_add v] to (() + ())\n\nwhen I receive [thumbnail v]\nerase all\nset [~theme v] to [Grass]\ngo to x: (0) y: (0)\nset pen size to (600)\nset pen color to (#00b2ff)\npen down\npen up\nset pen color to (#000000)\nPhrase [Doria] starting at [-125] [80] size: [4] Boldness? [5]\nDraw Block at x: [0] y: [-75] Type: [0] Not selected? <>\nDraw Block at x: [34] y: [-75] Type: [0] Not selected? <>\nDraw Block at x: [-34] y: [-75] Type: [0] Not selected? <>\nDraw Block at x: [68] y: [-75] Type: [0] Not selected? <>\nDraw Block at x: [-68] y: [-75] Type: [0] Not selected? <>\nDraw Block at x: [0] y: [-41] Type: [1] Not selected? <>\nDraw Block at x: [34] y: [-41] Type: [1] Not selected? <>\nDraw Block at x: [-34] y: [-41] Type: [1] Not selected? <>\nDraw Block at x: [68] y: [-41] Type: [1] Not selected? <>\nDraw Block at x: [-68] y: [-41] Type: [1] Not selected? <>\nDraw Block at x: [68] y: [-7] Type: [4] Not selected? <>\nDraw Block at x: [68] y: [27] Type: [4] Not selected? <>\nDraw Block at x: [0] y: [-7] Type: [5] Not selected? <>\nDraw Player at [35] [40]\nset pen color to (#000000)\nPhrase [Platformer creator] starting at [-200] [-150] size: [1.5] Boldness? [1]\n\nDraw perfect square at [0] [0] w [100]\n\nwhen I receive [home screen v]\nbroadcast (Reset v)\n\n@Sound\n\nwhen flag clicked\nforever\n    play sound (join (~Music) []) until done\nend\n\nwhen flag clicked\nforever\n    set volume to (join (~Volume) []) %\nend\n\nwhen flag clicked\nforever\n    if <not <(_) = (~Music)>> then\n        stop all sounds\n    end\n    set [_ v] to (~Music)\nend\n\n
My entry\nSave Codes here!\nhttps://scratch.mit.edu/discuss/topic/434889/?page=1#post-4367927\nAdded Mobile\nFollow for More!!!!!!!!!!!!!!!\nHit the settings button to change the theme\n(different themes: Grass, Desert, Winter)\nThe Different themes change it and can make it AWESOME with different color schemes\n\nTo start go to Build and you can build a scrolling platformer. Press number keys 1=8 to get your selection\n\nBlue flag is checkpoint\nGreen flag is end/win portal\n\n\nInspriation from @TimMcCool and @StradfordJames\nAll code 100% by me\nBesides @TheLogFather for trifill\n(as a note, I did all of this code from nothing, I did not use any of my previous engines for this)