<snapdata remixID="15112700"><project name="Physics engine v1.0" app="Snap! 11.0.8, https://snap.berkeley.edu" version="2"><notes>I am currently adding rotation and more object physics.&#xD;Enjoy!</notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAoKADAAQAAAABAAAAeAAAAAAeaS0RAAAFBElEQVR4Ae2cOU/sMBRGzSJ2EKJgh4atpeP/l0hUdBRQsSNWsYn1caM3KDOaBIc71vfe5FhCShzbd+b46MaZJPRsbW19BgoERAR6RXEJC4GMAAIigpQAAkrxExwBcUBKAAGl+AmOgDggJYCAUvwER0AckBJAQCl+giMgDkgJIKAUP8EREAekBBBQip/gCIgDUgIIKMVPcATEASkBBJTiJzgC4oCUAAJK8RMcAXFASgABpfgJjoA4ICWAgFL8BEdAHJASQEApfoIjIA5ICSCgFD/BERAHpAQQUIqf4AiIA1ICCCjFT3AExAEpAQSU4ic4AuKAlAACSvETHAFxQEoAAaX4CY6AOCAlgIBS/ARHQByQEkBAKX6CIyAOSAkgoBQ/wREQB6QEEFCKn+AIiANSAggoxU9wBMQBKQEElOInOALigJQAAkrxExwBcUBKAAGl+AmOgDggJYCAUvwER0AckBJAQCl+giMgDkgJIKAUP8EREAekBBBQip/gCIgDUgIIKMVPcATEASkBBKyIf3x8PExPT1fsRfMiAv1FB6hvJtDb2xsWFxfD6OhoduD+/j48Pj42N2KvMgEyYAQyy3obGxvf8lmXubm50NPTE9GbJmUEELCEjmW95eXlLPO1NhsYGAizs7Ot1exXJMApuACYZb2FhYXSLDc5ORnu7u7Cw8NDwShU/0SADNhCqK+vLywtLWVZL+YUOz8/Xyppy/DsthBAwByQiYmJsLq6GsbGxnK15Zv9/f3BJKT8jgCn4C9ulvVMoiri5XGbuLe3t8GujCnVCNQ+A9par2rWa4fY1ouDg4PtDlFXQqC2AtoVbmOtZ9veYmNwVVydop989Zj/RI+Pj4+OZ6yRkZEwNTX1T3y//+VD1FZAm6DDw8OOz9PMzEwYHh7u+LjdOmCtBXx+fg6Xl5cdn1uuiuOR1lpAw3R+fh6enp7iiUW0tLskdquO8jOB2gtoiI6Pj8Pn5+fPtCJaXF1dhZ2dnab7xhHdatsEAb+m/uXlJZyenrokMIF3d3fDxcVFWFlZCQcHB67x6tIZAf/O9M3Nza/v6VrW297ezm7f2W+BJrNdZVN+JoCAOUZ2Kq4iTiPr2TpybW0tyXoy9/G6chMBc9P69vYWTk5OcjXFm42sZ1e8Q0NDmXydWkcWR+2+I9wLbplTe7zKbs/Z/d2iYms9O9XaQ6pnZ2cdu4ApitfN9WTANrNrazjLhq3l+vo6W+vZLbzGWo+s10qp2j4CtuH1/v4ejo6Omo5Y1rO13vr6epb1Ov3bYVOwGu1wCi6YbHvhyK6MLcPt7e1l4tnp2ftzTUG42laTAUum3mSzt+DIeiWQnIfIgCUALfvt7++XtOCQlwAZ0EuQ/i4CCOjCR2cvAQT0EqS/iwACuvDR2UsAAb0E6e8igIAufHT2EkBAL0H6uwggoAsfnb0EENBLkP4uAgjowkdnLwEE9BKkv4sAArrw0dlLgIcRvAS7vL/9uxH7iymN/6eYf0i3UWdvC7YrCNiOCnXfBOxxtNfXV/eL9kUCcgr+Rs1GOwKWzey9l1QFAVORZdwoAggYham+jRpruFQEEDAVWcaNIoCAUZholIoAAqYi2yXj5n9SSfGVEDAFVcaMJoCA0ahomIIAAqagypjRBBAwGhUNUxBAwBRUGTOaAAJGo6JhCgIImIIqY0YTQMBoVDRMQQABU1BlzGgCCBiNqr4NNzc3k335P2iM40SeUxAkAAAAAElFTkSuQmCC</thumbnail><scenes select="1"><scene name="Physics engine v1.0"><notes>I am currently adding rotation and more object physics.&#xD;Enjoy!</notes><palette><category name="Ace’s blocks" color="255,0,48,1"/><category name="Editor Tools" color="220,220,220,1"/></palette><hidden></hidden><headers></headers><code></code><blocks><block-definition s="$gears = WIP $nl $gearPartial = not for use outside of custom blocks $nl $file = tools $nl $gearBig = not very useful $nl Block update 1.5" type="reporter" category="Ace’s blocks"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doApplyExtension"><l>err_error(msg)</l><list><l>Enjoy the tools and the blocks!</l></list></block></script></block-definition><block-definition s="[] Movement blocks $arrowDown" type="command" category="Ace’s blocks" space="true"><header></header><code></code><translations></translations><inputs></inputs></block-definition><block-definition s="move by %&apos;xy&apos;" type="command" category="Ace’s blocks" space="true"><header></header><code></code><translations></translations><inputs><input type="%l" initial="1"></input></inputs><script><block s="doGotoObject"><block s="reportVariadicSum"><list><block s="getPosition"></block><block var="xy"/></list></block></block></script></block-definition><block-definition s="Collision physics against %&apos;Collider&apos; with %&apos;Friction&apos; friction" type="command" category="Ace’s blocks"><variables><list struct="atomic" id="24">yv,xv</list></variables><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true" irreplaceable="true" initial="1"><options>§_objectsMenu</options></input><input type="%n" initial="1">0.01</input></inputs><script><block s="doDeclareVariables"><list><l>Error</l></list><comment w="90" collapsed="false">This is rather buggy and only really works with circles with a specific size.</comment></block><block s="doSetVar"><l>Error</l><block s="reportNewList"><list><l></l></list></block></block><block s="doIf"><block s="reportVariadicGreaterThanOrEquals"><list><block s="reportMonadic"><l><option>abs</option></l><block var="Friction"/></block><l>1</l></list></block><script><block s="doShowVar"><l>Error</l></block><block s="doAddToList"><l>friction too high, must be lower than the absolute of 1</l><block var="Error"/></block></script><list></list></block><block s="doWaitUntil"><block s="reportVariadicLessThan"><list><block s="reportMonadic"><l><option>abs</option></l><block var="Friction"/></block><l>1</l></list></block></block><block s="doHideVar"><l>Error</l></block><block s="doDeleteFromList"><l><option>all</option></l><block var="Error"/></block><block s="changeXPosition"><block var="xv"/></block><block s="changeYPosition"><block var="yv"/></block><block s="doIf"><block s="reportVariadicGreaterThan"><list><l>45</l><block s="reportRelationTo"><l><option>distance</option></l><block var="Collider"/></block></list></block><script><block s="doFaceTowards"><block var="Collider"/></block><block s="doChangeVar"><l>xv</l><block s="reportVariadicProduct"><list><block s="reportMonadic"><l><option>sin</option></l><block s="reportRelationTo"><l><option>direction</option></l><block var="Collider"/></block></block><block s="reportDifference"><block s="reportRelationTo"><l><option>distance</option></l><block var="Collider"/></block><l>45</l></block></list></block></block><block s="doChangeVar"><l>yv</l><block s="reportVariadicProduct"><list><block s="reportMonadic"><l><option>cos</option></l><block s="reportRelationTo"><l><option>direction</option></l><block var="Collider"/></block></block><block s="reportDifference"><block s="reportRelationTo"><l><option>distance</option></l><block var="Collider"/></block><l>45</l></block></list></block></block></script><list></list></block><block s="doIf"><block s="reportVariadicGreaterThanOrEquals"><list><block s="reportAttributeOf"><l><option>left</option></l><l>Stage</l></block><block s="xPosition"></block></list></block><script><block s="doSetVar"><l>xv</l><block s="reportMonadic"><l><option>neg</option></l><block var="xv"/></block></block></script><list></list></block><block s="doIf"><block s="reportVariadicGreaterThanOrEquals"><list><block s="xPosition"></block><block s="reportAttributeOf"><l><option>right</option></l><l>Stage</l></block></list></block><script><block s="doSetVar"><l>xv</l><block s="reportMonadic"><l><option>neg</option></l><block var="xv"/></block></block></script><list></list></block><block s="doIf"><block s="reportVariadicGreaterThanOrEquals"><list><block s="reportAttributeOf"><l><option>bottom</option></l><l>Stage</l></block><block s="yPosition"></block></list></block><script><block s="doSetVar"><l>yv</l><block s="reportMonadic"><l><option>neg</option></l><block var="yv"/></block></block></script><list></list></block><block s="doIf"><block s="reportVariadicGreaterThanOrEquals"><list><block s="yPosition"></block><block s="reportAttributeOf"><l><option>top</option></l><l>Stage</l></block></list></block><script><block s="doSetVar"><l>yv</l><block s="reportMonadic"><l><option>neg</option></l><block var="yv"/></block></block></script><list></list></block><block s="doChangeVar"><l>xv</l><block s="reportVariadicProduct"><list><block var="xv"/><block s="reportMonadic"><l><option>neg</option></l><block s="reportMonadic"><l><option>abs</option></l><block var="Friction"/></block></block></list></block></block><block s="doChangeVar"><l>yv</l><block s="reportVariadicProduct"><list><block var="yv"/><block s="reportMonadic"><l><option>neg</option></l><block s="reportMonadic"><l><option>abs</option></l><block var="Friction"/></block></block></list></block></block><block s="doHideVar"><l></l></block></script></block-definition><block-definition s="go to edge of stage from current direction" type="command" category="Ace’s blocks"><comment x="0" y="0" w="112.08333333333334" collapsed="false">This can be a bit buggy but does work most of the time. I recommend using a “if on edge bounce” block in a forever loop for this to work better.</comment><header></header><code></code><translations></translations><inputs></inputs><script><block s="doWarp"><script><block s="doUntil"><block s="reportNot"><custom-block s="$gearPartial in stage?"></custom-block></block><script><block s="forward"><l>0.1</l></block></script></block><block s="forward"><l>-0.1</l></block></script></block></script></block-definition><block-definition s="$gearPartial find the GCF of %&apos;#1&apos; and %&apos;#2&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n" initial="1">4</input><input type="%n" initial="1">14</input></inputs><script><block s="doIfElse"><block s="reportVariadicEquals"><list><block var="#2"/><l>0</l></list></block><script><block s="doReport"><block var="#1"/></block></script><script><block s="doReport"><custom-block s="$gearPartial find the GCF of %n and %n"><block var="#2"/><block s="reportModulus"><block var="#1"/><block var="#2"/></block></custom-block></block></script></block></script><scripts><comment x="137.59082031250006" y="58.83333333333332" w="579.5" collapsed="true">This is a block for another custom block</comment></scripts></block-definition><block-definition s="apply gravity to %&apos;Object&apos; $nl gravity strength %&apos;numb&apos; $nl collision against %&apos;collider&apos;" type="command" category="Ace’s blocks"><comment x="0" y="0" w="158.33333333333334" collapsed="false">Makes a simple but buggy gravity physics engine</comment><variables><list struct="atomic" id="285">Airborne,Y velocity</list></variables><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true" irreplaceable="true" initial="1"><options>§_clonablesMenu</options></input><input type="%n" initial="1">1</input><input type="%s" readonly="true" irreplaceable="true" initial="1"><options>§_collidablesMenu</options></input></inputs><script><block s="doTellTo"><block var="Object"/><block s="reifyScript"><script><block s="doIfElse"><block s="reportNot"><block s="reportTouchingObject"><block var="collider"/></block></block><script><block s="doSetVar"><l>Airborne</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><block s="fork"><block s="reifyScript"><script><block s="doIfElse"><block s="reportTouchingObject"><block var="collider"/></block><script><block s="doSetVar"><l>Airborne</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><block s="doSetVar"><l>Y velocity</l><block var="numb"/></block></script><script><block s="doSetVar"><l>Airborne</l><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block></script><list></list></block><list></list></block><block s="fork"><block s="reifyScript"><script><block s="doChangeVar"><l>Y velocity</l><block s="reportMonadic"><l><option>neg</option></l><block var="numb"/></block></block><block s="doIf"><block var="Airborne"/><script><block s="changeYPosition"><block var="Y velocity"/></block></script><list></list></block><block s="doIf"><block s="reportTouchingObject"><block var="collider"/></block><script><block s="doUntil"><block s="reportNot"><block s="reportTouchingObject"><block var="collider"/></block></block><script><block s="changeYPosition"><l>0.10</l></block></script></block></script><list></list></block></script><list></list></block><list></list></block></script><script><block s="doSetVar"><l>Y velocity</l><l>0.1</l></block></script></block></script><list></list></block><list></list></block></script></block-definition><block-definition s="[] Control Blocks $arrowDown" type="command" category="Ace’s blocks" space="true"><header></header><code></code><translations></translations><inputs></inputs></block-definition><block-definition s="$gears when %&apos;Input&apos; are %&apos;slot&apos;" type="hat" category="Ace’s blocks" space="true"><header></header><code></code><translations></translations><inputs><input type="%mult%b" separator="and" initial="1" min="1"></input><input type="%s" readonly="true" irreplaceable="true" initial="1">All true at once<options>§_inputSlotsMenu&#xD;All true at once&#xD;True in order</options></input></inputs><script><block s="doIf"><block s="reportVariadicEquals"><list><block var="slot"/><l>All true at once</l></list></block><script><block s="doIfElse"><block s="reportListContainsItem"><block var="Input"/><block s="reportBoolean"><l><bool>false</bool></l></block></block><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block></script><list><block s="reportVariadicEquals"><list><block var="slot"/><l>True in order</l></list></block><script><block s="doIfElse"><l/><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script><script><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block></script><l><bool>true</bool></l><script></script></list></block></script></block-definition><block-definition s="$file How many Objects are there?" type="reporter" category="Editor Tools"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doDeclareVariables"><list><l>List</l><l>1</l></list><comment w="95.5" collapsed="true">Self explanatory    </comment></block><block s="doSetVar"><l>1</l><block s="reportNewList"><list><block s="reportObject"><l><option>myself</option></l></block></list></block></block><block s="doSetVar"><l>List</l><block s="reportGet"><l><option>other sprites</option></l></block></block><block s="doAddToList"><block s="reportNewList"><list><l>1</l></list></block><block var="List"/></block><block s="doReport"><block s="reportListAttribute"><l><option>length</option></l><block var="List"/></block></block></script></block-definition><block-definition s="$file $gears what’s my current FPS?" type="reporter" category="Editor Tools"><comment x="0" y="0" w="90" collapsed="true">WIP</comment><variables><list struct="atomic" id="477">Tick,Fps</list></variables><header></header><code></code><translations></translations><inputs></inputs><script><block s="doIf"><block s="reportVariadicEquals"><list><block var="Tick"/><l>0</l></list></block><script><block s="doSetVar"><l>Tick</l><block s="reportDate"><l><option>time in milliseconds</option></l></block></block><block s="doReport"><l>0</l></block></script><list></list></block><block s="doSetVar"><l>Fps</l><block s="reportQuotient"><l>1000</l><block s="reportDifference"><block s="reportDate"><l><option>time in milliseconds</option></l></block><block var="Tick"/></block></block></block><block s="doSetVar"><l>Tick</l><block s="reportDate"><l><option>time in milliseconds</option></l></block></block><block s="doReport"><block s="reportMonadic"><l><option>abs</option></l><block s="reportRound"><block var="Fps"/></block></block></block></script></block-definition><block-definition s="$file how fast is %&apos;Obj&apos; going in steps" type="reporter" category="Editor Tools"><comment x="0" y="0" w="132.08333333333334" collapsed="false">Measures how many steps an object is moving. The first answer will always be 0</comment><variables><list struct="atomic" id="521">Last X,Last Y,Last time A</list></variables><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true" irreplaceable="true" initial="1"><options>§_clonablesMenu</options></input></inputs><script><block s="doWait"><l>0.5</l></block><block s="doDeclareVariables"><list><l>Dist</l><l>Speed</l><l>Time</l></list></block><block s="doSetVar"><l>Dist</l><block s="reportMonadic"><l><option>sqrt</option></l><block s="reportVariadicSum"><list><block s="reportVariadicProduct"><list><block s="reportDifference"><block s="reportAttributeOf"><l><option>x position</option></l><block var="Obj"/></block><block var="Last X"/></block><block s="reportDifference"><block s="reportAttributeOf"><l><option>x position</option></l><block var="Obj"/></block><block var="Last X"/></block></list></block><block s="reportVariadicProduct"><list><block s="reportDifference"><block s="reportAttributeOf"><l><option>y position</option></l><block var="Obj"/></block><block var="Last Y"/></block><block s="reportDifference"><block s="reportAttributeOf"><l><option>y position</option></l><block var="Obj"/></block><block var="Last Y"/></block></list></block></list></block></block></block><block s="doSetVar"><l>Time</l><block s="reportDifference"><block s="getTimer"></block><block var="Last time A"/></block></block><block s="doSetVar"><l>Last X</l><block s="reportAttributeOf"><l><option>x position</option></l><block var="Obj"/></block></block><block s="doSetVar"><l>Last Y</l><block s="reportAttributeOf"><l><option>y position</option></l><block var="Obj"/></block></block><block s="doSetVar"><l>Last time A</l><block s="getTimer"></block></block><block s="doReport"><block s="reportRound"><block s="reportQuotient"><block s="reportDifference"><block s="reportQuotient"><block var="Dist"/><block var="Time"/></block><l>0.1</l></block><l>50</l></block></block></block></script></block-definition><block-definition s="$file %&apos;Obj 1&apos; distance to %&apos;Obj 2&apos; rounded? %&apos;T/F&apos;" type="reporter" category="Editor Tools"><comment x="0" y="0" w="90" collapsed="false">Tells how far one object is to another</comment><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true" initial="1"><options>§_collidablesMenu</options></input><input type="%s" readonly="true" irreplaceable="true" initial="1"><options>§_objectsMenu</options></input><input type="%b" initial="1">false</input></inputs><script><block s="doIfElse"><block var="T/F"/><script><block s="doReport"><block s="reportRound"><block s="reportMonadic"><l><option>abs</option></l><block s="reportDifference"><block s="reportVariadicSum"><list><block s="reportAttributeOf"><l><option>x position</option></l><block var="Obj 1"/></block><block s="reportAttributeOf"><l><option>y position</option></l><block var="Obj 1"/></block></list></block><block s="reportVariadicSum"><list><block s="reportAttributeOf"><l><option>x position</option></l><block var="Obj 2"/></block><block s="reportAttributeOf"><l><option>y position</option></l><block var="Obj 2"/></block></list></block></block></block></block></block></script><script><block s="doReport"><block s="reportMonadic"><l><option>abs</option></l><block s="reportDifference"><block s="reportVariadicSum"><list><block s="reportAttributeOf"><l><option>x position</option></l><block var="Obj 1"/></block><block s="reportAttributeOf"><l><option>y position</option></l><block var="Obj 1"/></block></list></block><block s="reportVariadicSum"><list><block s="reportAttributeOf"><l><option>x position</option></l><block var="Obj 2"/></block><block s="reportAttributeOf"><l><option>y position</option></l><block var="Obj 2"/></block></list></block></block></block></block></script></block></script></block-definition><block-definition s="$file Is JavaScript on?" type="predicate" category="Editor Tools" space="true"><comment x="0" y="0" w="95.5" collapsed="true">Self explanatory    </comment><header></header><code></code><translations></translations><inputs></inputs><script><custom-block s="safely try %cs then if %upvar %cs"><script><block s="doRun"><block s="reifyReporter"><autolambda><block s="reportJSFunction"><list></list><l>return true;</l></block></autolambda><list></list></block><list></list></block></script><l>error</l><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script></custom-block><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block-definition><block-definition s="safely try %&apos;action&apos; then if %&apos;error&apos; %&apos;handler&apos;" type="command" category="control"><comment x="0" y="0" w="276" collapsed="false">Catch errors.&#xD;&#xD;Runs the first script.  If it succeeds, nothing else happens.&#xD;But if it has an error (something that would otherwise result&#xD;in a red halo around the block), then the second script is run,&#xD;with the text of the error message that would have been shown in the variable ERROR.</comment><header></header><code></code><translations>pt:tenta executar _ e, em caso de erro _ , executa _&#xD;ca:prova de forma segura _ i si _ _&#xD;pl:bezpiecznie spróbuj _ a jeśli _ _&#xD;</translations><inputs><input type="%cs"></input><input type="%upvar"></input><input type="%cs"></input></inputs><script><block s="doApplyExtension"><l>err_try(cmd, catch, err)</l><list><block var="action"/><block var="handler"/><block var="error"/></list></block><block s="doApplyExtension"><l>err_reset</l><list></list></block></script></block-definition><block-definition s="error %&apos;msg&apos;" type="command" category="control"><comment x="0" y="0" w="268.6666666666667" collapsed="false">Throw an error.&#xD;&#xD;Makes a red halo appear around the script that runs it,&#xD;with the input text shown in a speech balloon next to&#xD;the script, just like any Snap! error.&#xD;&#xD;This is useful to put in the second script of SAFELY TRY&#xD;after some other instructions to undo the partial work of&#xD;the first script.</comment><header></header><code></code><translations>pt:lança o erro _&#xD;pl:błąd _&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doApplyExtension"><l>err_error(msg)</l><list><block var="msg"/></list></block></script></block-definition><block-definition s="safely try reporting %&apos;this&apos; then if %&apos;error&apos; report %&apos;that&apos;" type="reporter" category="control"><comment x="0" y="0" w="316.6666666666667" collapsed="false">Catch errors in a reporter.&#xD;&#xD;Evaluates its first input.  If that expression successfully reports a value, this block reports that value.  If the expression causes a Snap! error,&#xD;then the final input slot is evaluated with the text of what would have&#xD;been the error message in variable ERROR.  SAFELY TRY then reports the value of that final expression.&#xD;&#xD;Sometimes you&apos;ll want to throw an error in the final expression.  You&#xD;can put an ERROR block inside a CALL block to do that.</comment><header></header><code></code><translations>ca:prova de forma segura reportant _ i si _ reportant _&#xD;pl:bezpiecznie spróbuj zgłosić _ a jeśli _ zgłoś _&#xD;</translations><inputs><input type="%anyUE"></input><input type="%upvar"></input><input type="%anyUE"></input></inputs><script><block s="doDeclareVariables"><list><l>value</l></list></block><custom-block s="safely try %cs then if %upvar %cs"><script><block s="doSetVar"><l>value</l><block s="evaluate"><block var="this"/><list></list></block></block></script><l>err</l><script><block s="doSetVar"><l>error</l><block var="err"/></block><block s="doSetVar"><l>value</l><block s="evaluate"><block var="that"/><list></list></block></block></script></custom-block><block s="doReport"><block var="value"/></block></script></block-definition><block-definition s="$file wait a tick" type="command" category="Editor Tools" space="true"><comment x="0" y="0" w="95.5" collapsed="true">Self explanatory    </comment><header></header><code></code><translations></translations><inputs></inputs><script><block s="forward"><l>0</l></block></script></block-definition><block-definition s="set draggability to %&apos;Boolean&apos;" type="command" category="Ace’s blocks"><header></header><code></code><translations></translations><inputs><input type="%b" initial="1">true</input></inputs><script><block s="doSetVar"><l><option>my draggable?</option></l><block var="Boolean"/><comment w="95.5" collapsed="true">Self explanatory    </comment></block></script></block-definition><block-definition s="$file rotate %&apos;Object&apos; ‘s current costume" type="command" category="Editor Tools"><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true" irreplaceable="true" initial="1"><options>§_objectsMenu</options></input></inputs><script><block s="doTellTo"><block var="Object"/><block s="reifyScript"><script><block s="doSwitchToCostume"><block s="reportNewCostume"><block s="reportListAttribute"><l><option>flatten</option></l><block s="reportListAttribute"><l><option>reverse</option></l><block s="reportListAttribute"><l><option>columns</option></l><block s="reportGetImageAttribute"><l><option>colors</option></l><l><option>current</option></l></block></block></block></block><block s="reportGetImageAttribute"><l><option>height</option></l><l><option>current</option></l></block><block s="reportGetImageAttribute"><l><option>width</option></l><l><option>current</option></l></block></block></block></script><list></list></block><list></list></block></script><scripts><comment x="297.8365885416664" y="10.499999999999996" w="202.91666666666669" collapsed="false">This rotates the costume, NOT THE SPRITE this don’t work with turtle sprites</comment></scripts></block-definition><block-definition s="run with %&apos;Numb&apos; % chance %&apos;Input 1&apos; else %&apos;Input 2&apos;" type="command" category="Ace’s blocks"><header></header><code></code><translations></translations><inputs><input type="%n" initial="1">50</input><input type="%cs" initial="1"></input><input type="%cs" initial="1"></input></inputs><script><block s="doIfElse"><block s="reportVariadicOr"><list><block s="reportVariadicLessThan"><list><block var="Numb"/><l>0</l></list></block><block s="reportVariadicGreaterThan"><list><block var="Numb"/><l>100</l></list></block></list><comment w="66.66666666666667" collapsed="false">Runs a script with the set chance.</comment></block><script><custom-block s="error %txt"><l>invalid chance (0-100)</l></custom-block></script><script><block s="doDeclareVariables"><list><l>List</l><l>Rnumb</l></list></block><block s="doSetVar"><l>Rnumb</l><block s="reportRound"><block var="Numb"/></block></block><block s="doSetVar"><l>List</l><block s="reportNewList"><list></list></block></block><block s="doDeleteFromList"><l><option>all</option></l><block var="List"/></block><block s="doRepeat"><block var="Rnumb"/><script><block s="doAddToList"><block var="Input 1"/><block var="List"/></block></script></block><block s="doRepeat"><block s="reportMonadic"><l><option>neg</option></l><block s="reportDifference"><block s="reportListAttribute"><l><option>length</option></l><block var="List"/></block><l>100</l></block></block><script><block s="doAddToList"><block var="Input 2"/><block var="List"/></block></script></block></script></block><block s="doRun"><block s="reportListItem"><l><option>random</option></l><block var="List"/></block><list></list></block></script></block-definition><block-definition s="wait until I receive %&apos;Received IMP&apos;" type="command" category="Ace’s blocks"><comment x="0" y="0" w="90" collapsed="false">Thanks to @askofep1 for help with this block</comment><header></header><code></code><translations></translations><inputs><input type="%txt" readonly="true" irreplaceable="true" initial="1"><options>§_messagesMenu</options></input></inputs><script><block s="doDeclareVariables"><list><l>sig</l></list></block><block s="doSetVar"><l>sig</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><custom-block s="$gearPartial when message recieved %cmdRing"><block s="reifyScript"><script><block s="doIf"><block s="reportVariadicAnd"><list><block s="reportListContainsItem"><block s="reportConcatenatedLists"><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><block s="reportGet"><l><option>self</option></l></block></block><block s="reportVariadicEquals"><list><block s="reportJoinWords"><list><block var="message"/></list></block><block s="reportJoinWords"><list><block var="Received IMP"/></list></block></list></block></list></block><script><block s="doSetVar"><l>sig</l><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><list></list></block></script><list><l>message</l><l>data</l></list></block></custom-block><block s="doWaitUntil"><block var="sig"/></block></script></block-definition><block-definition s="[] Looks Blocks $arrowDown" type="command" category="Ace’s blocks" space="true"><header></header><code></code><translations></translations><inputs></inputs></block-definition><block-definition s="center %&apos;object&apos; costume" type="command" category="Ace’s blocks" space="true"><comment x="0" y="0" w="90" collapsed="false">Centers a costume</comment><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true" irreplaceable="true" initial="1"><options>§_objectsMenu</options></input></inputs><script><block s="doTellTo"><block var="object"/><block s="reifyScript"><script><block s="doSetVar"><l><option>my rotation y</option></l><block s="reportGet"><l><option>center y</option></l></block></block><block s="doSetVar"><l><option>my rotation x</option></l><block s="reportGet"><l><option>center x</option></l></block></block></script><list></list></block><list></list></block></script></block-definition><block-definition s="go to layer %&apos;Layer&apos;" type="command" category="Ace’s blocks"><header></header><code></code><translations></translations><inputs><input type="%n" initial="1">1</input></inputs><script><block s="goBack"><block s="reportDifference"><block var="Layer"/><l>1</l></block><comment w="95.5" collapsed="true">Self explanatory    </comment></block></script></block-definition><block-definition s="catch %&apos;tag&apos; %&apos;action&apos;" type="command" category="control"><header></header><code></code><translations>de:fange _ _&#xD;ca:agafa _ _&#xD;es:atrapar _ _&#xD;fr:attrape _ _&#xD;pt:captura _ _&#xD;pl:przechwyć _ _&#xD;</translations><inputs><input type="%upvar"></input><input type="%cs"></input></inputs><script><custom-block s="run %cmdRing with continuation"><block s="reifyScript"><script><block s="doSetVar"><l>tag</l><block var="cont"/></block><block s="doRun"><block var="action"/><list></list></block></script><list><l>cont</l></list></block></custom-block></script></block-definition><block-definition s="throw %&apos;cont&apos;" type="command" category="control"><header></header><code></code><translations>de:wirf _&#xD;ca:llança _&#xD;es:lanzar _&#xD;fr:lance _&#xD;pt:lança _&#xD;pl:wyrzuć _&#xD;</translations><inputs><input type="%s">catchtag</input></inputs><script><block s="doRun"><block var="cont"/><list></list></block></script></block-definition><block-definition s="catch %&apos;tag&apos; %&apos;value&apos;" type="reporter" category="control"><header></header><code></code><translations>de:fange _ _&#xD;ca:agafa _ _&#xD;es:atrapar _ _&#xD;fr:attrape _ _&#xD;pt:captura _ _&#xD;pl:przechwyć _ _&#xD;</translations><inputs><input type="%upvar"></input><input type="%anyUE"></input></inputs><script><custom-block s="run %cmdRing with continuation"><block s="reifyScript"><script><block s="doSetVar"><l>tag</l><block var="cont"/></block><block s="doReport"><block s="evaluate"><block var="value"/><list></list></block></block></script><list><l>cont</l></list></block></custom-block></script></block-definition><block-definition s="throw %&apos;tag&apos; %&apos;value&apos;" type="command" category="control"><header></header><code></code><translations>de:wirf _ _&#xD;ca:llança _ _&#xD;es:lanzar _ _&#xD;fr:lance _ _&#xD;pt:lança _ _&#xD;pl:wyrzuć _ _&#xD;</translations><inputs><input type="%s">catchtag</input><input type="%s"></input></inputs><script><block s="doRun"><block var="tag"/><list><block var="value"/></list></block></script></block-definition><block-definition s="if %&apos;test&apos; do %&apos;action&apos; and pause all $pause-1-255-220-0" type="command" category="control"><comment x="0" y="0" w="263.3333333333333" collapsed="false">This is a breakpoint block, to be used in debugging.&#xD;The Boolean input specifies the condition under which&#xD;the program should pause.  (Use True for an unconditional breakpoint.)  The intent is that the script should have&#xD;SHOW VARIABLE blocks for the process&apos;s local variables.&#xD;After the pause, this block automatically hides all temporary variables.</comment><header></header><code></code><translations>de:falls _ dann _ und pause $pause-1-255-220-0&#xD;ca:si _ fes _ i atura-ho tot $pause-1-255-220-0&#xD;es:si _ haz _ y páralo todo $pause-1-255-220-0&#xD;fr:si _ faire _ et mettre tout en pause $pause-1-255-220-0&#xD;pt:se _ , então _ e faz pausa em tudo $pause-1-255-220-0&#xD;pl:jeżeli _ wykonaj _ i pauzuj wszystko $pause-1-255-220-0&#xD;</translations><inputs><input type="%boolUE"></input><input type="%cs"></input></inputs><script><block s="doDeclareVariables"><list><l>breakpoint</l></list></block><block s="doIf"><block s="evaluate"><block var="test"/><list></list></block><script><block s="doSetVar"><l>breakpoint</l><block var="test"/></block><block s="doShowVar"><l>breakpoint</l></block><block s="doRun"><block var="action"/><list></list></block><block s="doPauseAll"></block><block s="doHideVar"><l></l></block></script><list></list></block></script></block-definition><block-definition s="ignore %&apos;x&apos;" type="command" category="control"><comment x="0" y="0" w="206.66666666666666" collapsed="false">This block does nothing.&#xD;Use it when you are calling a reporter&#xD;for its side effect and don&apos;t care about&#xD;its return value.</comment><header></header><code></code><translations>de:ignoriere _&#xD;ca:ignora _&#xD;es:ignorar _&#xD;fr:ignore _&#xD;pt:ignora _&#xD;pl:ignoruj _&#xD;</translations><inputs><input type="%s"></input></inputs></block-definition><block-definition s="cascade %&apos;num&apos; times %&apos;function&apos; %&apos;init&apos; %&apos;#&apos;" type="reporter" category="control"><comment x="0" y="0" w="138" collapsed="false">Call f(f(f(...(f(x))))) n times where the three input slots are n, f, and x from left to right.  The # variable can be used inside f to represent how many times f has been called.</comment><header></header><code></code><translations>pt:o resultado de _ invocações em cascata de _ com argumento inicial _ _&#xD;ca:en cascada _ vegades _ _ _&#xD;pl:kaskada _ razy _ _ _&#xD;</translations><inputs><input type="%n"></input><input type="%repRing"></input><input type="%s"></input><input type="%upvar"></input></inputs><script><block s="doDeclareVariables"><list><l>result</l></list></block><block s="doSetVar"><l>result</l><block var="init"/></block><block s="doSetVar"><l>#</l><l>0</l></block><block s="doRepeat"><block var="num"/><script><block s="doChangeVar"><l>#</l><l>1</l></block><block s="doSetVar"><l>result</l><block s="evaluate"><block var="function"/><list><block var="result"/></list></block></block></script></block><block s="doReport"><block var="result"/></block></script></block-definition><block-definition s="cascade until %&apos;pred&apos; %&apos;function&apos; %&apos;init&apos; %&apos;#&apos;" type="reporter" category="control"><comment x="0" y="0" w="210.47493489583334" collapsed="false">Call f(f(f(...(f(x))))) until condition is true, where the three input slots are condition, f, and x from left to right.  The # variable can be used inside f or condition to indicate how many times f has been called.</comment><header></header><code></code><translations>pt:o resultado da invocação em cascata até que _ de _ com argumento inicial _ _&#xD;ca:en cascada fins _ _ _ _&#xD;pl:kaskada aż _ _ _ _&#xD;</translations><inputs><input type="%predRing"></input><input type="%repRing"></input><input type="%s"></input><input type="%upvar"></input></inputs><script><block s="doDeclareVariables"><list><l>result</l></list></block><block s="doSetVar"><l>result</l><block var="init"/></block><block s="doSetVar"><l>#</l><l>0</l></block><block s="doUntil"><block s="evaluate"><block var="pred"/><list><block var="result"/></list></block><script><block s="doChangeVar"><l>#</l><l>1</l></block><block s="doSetVar"><l>result</l><block s="evaluate"><block var="function"/><list><block var="result"/></list></block></block></script></block><block s="doReport"><block var="result"/></block></script></block-definition><block-definition s="compose %&apos;f&apos; %&apos;g&apos;" type="reporter" category="control"><comment x="0" y="0" w="151.33333333333334" collapsed="false">Returns the function x↦f(g(x)) where f and g are the two inputs.</comment><header></header><code></code><translations>pt:a composição de _ com _&#xD;ca:composa _ _&#xD;pl:skomponuj _ _&#xD;</translations><inputs><input type="%repRing"></input><input type="%repRing"></input></inputs><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="evaluate"><block var="f"/><list><block s="evaluate"><block var="g"/><list><l></l></list></block></list></block></autolambda><list></list></block></block></script></block-definition><block-definition s="repeat %&apos;action&apos; until %&apos;pred&apos;" type="command" category="control"><comment x="0" y="0" w="202.66666666666666" collapsed="false">Like the built-in REPEAT UNTIL block, except that the ending condition is not tested until the script has been run the first time.  So the script is run at least once.</comment><header></header><code></code><translations>pt:repete _ até que _ $loop-0.7&#xD;ca:repeteix _ fins _&#xD;pl:powtarzaj _ aż _&#xD;</translations><inputs><input type="%cs"></input><input type="%boolUE"></input></inputs><script><block s="doRun"><block var="action"/><list></list></block><block s="doUntil"><block s="evaluate"><block var="pred"/><list></list></block><script><block s="doRun"><block var="action"/><list></list></block></script></block></script></block-definition><block-definition s="repeat %&apos;action&apos; while %&apos;pred&apos;" type="command" category="control"><comment x="0" y="0" w="287.3333333333333" collapsed="false">Run the script repeatedly, as long as the given condition is true.  Runs the script at least once before testing the condition.</comment><header></header><code></code><translations>pt:repete _ enquanto _ $loop-0.7&#xD;ca:repeteix _ mentre _&#xD;pl:powtarzaj _ gdy _&#xD;</translations><inputs><input type="%cs"></input><input type="%boolUE"></input></inputs><script><block s="doRun"><block var="action"/><list></list></block><block s="doUntil"><block s="reportNot"><block s="evaluate"><block var="pred"/><list></list></block></block><script><block s="doRun"><block var="action"/><list></list></block></script></block></script></block-definition><block-definition s="repeat while %&apos;pred&apos; %&apos;action&apos;" type="command" category="control"><comment x="0" y="0" w="264" collapsed="false">Runs the script repeatedly, as long as the condition is true. Tests the condition before the first time the script is run.  Like the built in REPEAT UNTIL except that in this block the condition must be true, not false.</comment><header></header><code></code><translations>pt:enquanto _ , repete _ $loop-0.7&#xD;pl:powtarzaj gdy _ _&#xD;</translations><inputs><input type="%boolUE"></input><input type="%cs"></input></inputs><script><block s="doUntil"><block s="reportNot"><block s="evaluate"><block var="pred"/><list></list></block></block><script><block s="doRun"><block var="action"/><list></list></block></script></block></script></block-definition><block-definition s="repeat %&apos;num&apos; %&apos;#&apos; %&apos;action&apos;" type="command" category="control"><comment x="0" y="0" w="171" collapsed="false">Runs the script the specified number of times, like the built-in REPEAT block, but this one provides the # variable that can be used inside the script.  Try&#xD;REPEAT (200)&#xD;                MOVE (#) STEPS&#xD;   RIGHT 92&#xD;with the pen down.</comment><header></header><code></code><translations>pt:repete _ vezes _ _ $loop-0.7&#xD;ca:repeteix _ _ _&#xD;pl:powtórz _ _ _&#xD;</translations><inputs><input type="%n"></input><input type="%upvar"></input><input type="%cs"></input></inputs><script><block s="doSetVar"><l>#</l><l>0</l></block><block s="doRepeat"><block var="num"/><script><block s="doChangeVar"><l>#</l><l>1</l></block><block s="doRun"><block var="action"/><list></list></block></script></block></script></block-definition><block-definition s="for %&apos;i&apos; = %&apos;start&apos; step %&apos;step&apos; to %&apos;end&apos; %&apos;action&apos;" type="command" category="control"><comment x="0" y="0" w="247.33333333333334" collapsed="false">The primitive FOR block uses an implicit step of ±1 depending on which of the starting and ending values is larger.  This version allows you to provide an explicit step value.  If the sign of the step input is incompatible with the ordering of the starting and ending values, the script will not be run at all.</comment><header></header><code></code><translations>pt:para _ de _ com passo _ a _ _ $loop-0.7&#xD;ca:per _ = _ incrementant _ fins _ _&#xD;pl:dla _ = _ co _ do _ _&#xD;</translations><inputs><input type="%upvar"></input><input type="%n">1</input><input type="%n">1</input><input type="%n">10</input><input type="%cs"></input></inputs><script><block s="doDeclareVariables"><list><l>test</l></list></block><block s="doSetVar"><l>i</l><block var="start"/></block><block s="doIfElse"><block s="reportVariadicLessThan"><list><block var="step"/><l>0</l></list></block><script><block s="doSetVar"><l>test</l><block s="reifyPredicate"><autolambda><block s="reportVariadicLessThan"><list><block var="i"/><block var="end"/></list></block></autolambda><list></list></block></block></script><script><block s="doSetVar"><l>test</l><block s="reifyPredicate"><autolambda><block s="reportVariadicGreaterThan"><list><block var="i"/><block var="end"/></list></block></autolambda><list></list></block></block></script></block><block s="doUntil"><block s="evaluate"><block var="test"/><list></list></block><script><block s="doRun"><block var="action"/><list></list></block><block s="doChangeVar"><l>i</l><block var="step"/></block></script></block></script></block-definition><block-definition s="let %&apos;a&apos; be %&apos;val&apos; in %&apos;loop&apos; %&apos;body&apos;" type="command" category="control"><comment x="0" y="0" w="238.66666666666666" collapsed="false">Provides LOOP as a function of one input that runs&#xD;the body of the LET with A set to the function input,&#xD;so the body can run itself recursively.&#xD;See COPY block in Variables for an example of use.</comment><header></header><code></code><translations>pt:tendo _ o valor inicial _ , executa _ definido como _&#xD;ca:fes que _ sigui _ al _ _&#xD;pl:ustaw _ na _ w _ _&#xD;</translations><inputs><input type="%upvar"></input><input type="%s"></input><input type="%upvar"></input><input type="%cs"></input></inputs><script><block s="doSetVar"><l>a</l><block var="val"/></block><block s="doSetVar"><l>loop</l><block s="reifyScript"><script><block s="doSetVar"><l>a</l><block var="new value"/></block><block s="doRun"><block var="body"/><list><block var="a"/></list></block></script><list><l>new value</l></list></block></block><block s="doRun"><block var="loop"/><list><block var="a"/></list></block></script></block-definition><block-definition s="run %&apos;action&apos; with continuation" type="command" category="control"><header></header><code></code><translations>de:führe _ mit Continuation aus&#xD;</translations><inputs><input type="%cmdRing" initial="1"></input></inputs><script><block s="doRun"><block var="action"/><list><block s="reportEnvironment"><l><option>continuation</option></l></block></list></block></script></block-definition><block-definition s="call %&apos;action&apos; with continuation" type="reporter" category="control"><header></header><code></code><translations>de:rufe _ mit Continuation auf&#xD;</translations><inputs><input type="%cmdRing" initial="1"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reifyReporter"><script><custom-block s="run %cmdRing with continuation"><block var="action"/></custom-block></script><list></list></block><list></list></block></block></script></block-definition><block-definition s="[] Sensing Blocks $arrowDown" type="command" category="Ace’s blocks" space="true"><header></header><code></code><translations></translations><inputs></inputs></block-definition><block-definition s="%&apos;Object&apos; in stage?" type="predicate" category="Ace’s blocks" space="true"><comment x="0" y="0" w="95.5" collapsed="true">Self explanatory    </comment><header></header><code></code><translations></translations><inputs><input type="%txt" initial="1">Sprite<options>§_objectsMenu</options></input></inputs><script><block s="doDeclareVariables"><list><l>a</l><l>b</l></list></block><block s="doSetVar"><l>a</l><block s="reportAttributeOf"><l><option>y position</option></l><block var="Object"/></block></block><block s="doSetVar"><l>b</l><block s="reportAttributeOf"><l><option>x position</option></l><block var="Object"/></block></block><block s="doReport"><block s="reportVariadicAnd"><list><block s="reportVariadicGreaterThan"><list><block var="b"/><block s="reportAttributeOf"><l><option>left</option></l><l>Stage</l></block></list></block><block s="reportVariadicLessThan"><list><block var="b"/><block s="reportAttributeOf"><l><option>right</option></l><l>Stage</l></block></list></block><block s="reportVariadicGreaterThan"><list><block var="a"/><block s="reportAttributeOf"><l><option>bottom</option></l><l>Stage</l></block></list></block><block s="reportVariadicLessThan"><list><block var="a"/><block s="reportAttributeOf"><l><option>top</option></l><l>Stage</l></block></list></block></list></block></block></script></block-definition><block-definition s="II" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doReport"><l>3.1415926535897932384626433832795028841971</l></block></script></block-definition><block-definition s="mouse in stage?" type="predicate" category="Ace’s blocks"><comment x="0" y="0" w="95.5" collapsed="true">Self explanatory    </comment><header></header><code></code><translations></translations><inputs></inputs><script><block s="doReport"><block s="reportVariadicAnd"><list><block s="reportVariadicGreaterThan"><list><block s="reportMouseX"></block><block s="reportAttributeOf"><l><option>left</option></l><l>Stage</l></block></list></block><block s="reportVariadicLessThan"><list><block s="reportMouseX"></block><block s="reportAttributeOf"><l><option>right</option></l><l>Stage</l></block></list></block><block s="reportVariadicGreaterThan"><list><block s="reportMouseY"></block><block s="reportAttributeOf"><l><option>bottom</option></l><l>Stage</l></block></list></block><block s="reportVariadicLessThan"><list><block s="reportMouseY"></block><block s="reportAttributeOf"><l><option>top</option></l><l>Stage</l></block></list></block></list></block></block></script></block-definition><block-definition s="$gearPartial in stage?" type="predicate" category="Ace’s blocks"><comment x="0" y="0" w="95.5" collapsed="true">Self explanatory    </comment><header></header><code></code><translations></translations><inputs></inputs><script><block s="doDeclareVariables"><list><l>Xv</l><l>Yv</l></list></block><block s="doSetVar"><l>Yv</l><block s="reportAttributeOf"><l><option>y position</option></l><block s="reportGet"><l><option>self</option></l></block></block></block><block s="doSetVar"><l>Xv</l><block s="reportAttributeOf"><l><option>x position</option></l><block s="reportGet"><l><option>self</option></l></block></block></block><block s="doReport"><block s="reportVariadicAnd"><list><block s="reportVariadicGreaterThan"><list><block var="Xv"/><block s="reportAttributeOf"><l><option>left</option></l><l>Stage</l></block></list></block><block s="reportVariadicLessThan"><list><block var="Xv"/><block s="reportAttributeOf"><l><option>right</option></l><l>Stage</l></block></list></block><block s="reportVariadicGreaterThan"><list><block var="Yv"/><block s="reportAttributeOf"><l><option>bottom</option></l><l>Stage</l></block></list></block><block s="reportVariadicLessThan"><list><block var="Yv"/><block s="reportAttributeOf"><l><option>top</option></l><l>Stage</l></block></list></block></list></block></block></script></block-definition><block-definition s="[] Sound Blocks $arrowDown" type="command" category="Ace’s blocks" space="true"><header></header><code></code><translations></translations><inputs></inputs></block-definition><block-definition s="[] Operator Blocks $arrowDown" type="command" category="Ace’s blocks" space="true"><header></header><code></code><translations></translations><inputs></inputs></block-definition><block-definition s="all of %&apos;List—&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l" initial="1"></input></inputs><script><block s="doReport"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="List—"/></block><block s="reportCDR"><block var="List—"/></block></block></block></script></block-definition><block-definition s="$gears Sort costumes by number" type="command" category="Editor Tools"><header></header><code></code><translations></translations><inputs></inputs></block-definition><block-definition s="common factors of %&apos;Numb&apos; In text %&apos;T/F&apos;" type="reporter" category="Ace’s blocks" space="true"><comment x="0" y="0" w="90" collapsed="false">Lists all the similar factors up the the GCF of the inputted numbers</comment><header></header><code></code><translations></translations><inputs><input type="%mult%n" initial="3">12&#xD;18&#xD;24</input><input type="%b" initial="1">false</input></inputs><script><block s="doDeclareVariables"><list><l>Factors</l></list></block><block s="doSetVar"><l>Factors</l><block s="reportNewList"><list></list></block></block><block s="doIfElse"><block var="T/F"/><script><block s="doFor"><l>i</l><l>1</l><block s="reportVariadicMin"><block var="Numb"/></block><script><block s="doIf"><block s="reportNot"><block s="reportListContainsItem"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportVariadicEquals"><list><block s="reportModulus"><block var="value"/><block var="i"/></block><l>0</l></list></block></autolambda><list><l>value</l></list></block><block var="Numb"/></block><block s="reportBoolean"><l><bool>false</bool></l></block></block></block><script><block s="doAddToList"><block var="i"/><block var="Factors"/></block></script><list></list></block></script></block><block s="doReport"><block s="reportListAttribute"><l><option>text</option></l><block var="Factors"/></block></block></script><script><block s="doFor"><l>i</l><l>1</l><block s="reportVariadicMin"><block var="Numb"/></block><script><block s="doIf"><block s="reportNot"><block s="reportListContainsItem"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportVariadicEquals"><list><block s="reportModulus"><block var="value"/><block var="i"/></block><l>0</l></list></block></autolambda><list><l>value</l></list></block><block var="Numb"/></block><block s="reportBoolean"><l><bool>false</bool></l></block></block></block><script><block s="doAddToList"><block var="i"/><block var="Factors"/></block></script><list></list></block></script></block><block s="doReport"><block var="Factors"/></block></script></block></script></block-definition><block-definition s="GCF of %&apos;Numb&apos;" type="reporter" category="Ace’s blocks"><comment x="0" y="0" w="90" collapsed="false">Finds the greatest common factor of the inputted numbers</comment><header></header><code></code><translations></translations><inputs><input type="%mult%n" initial="3">12&#xD;18&#xD;24</input></inputs><script><block s="doDeclareVariables"><list><l>List</l></list></block><block s="doSetVar"><l>List</l><block s="reportNewList"><list><block var="Numb"/></list></block></block><block s="doIfElse"><block s="reportVariadicEquals"><list><block s="reportListAttribute"><l><option>length</option></l><block var="Numb"/></block><l>1</l></list></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="Numb"/></block></block></script><script><block s="doIfElse"><block s="reportVariadicEquals"><list><block s="reportListAttribute"><l><option>length</option></l><block var="Numb"/></block><l>2</l></list></block><script><block s="doReport"><custom-block s="$gearPartial find the GCF of %n and %n"><block s="reportListItem"><l>1</l><block var="Numb"/></block><block s="reportListItem"><l>2</l><block var="Numb"/></block></custom-block></block></script><script><block s="doReport"><block s="reportCombine"><block var="Numb"/><block s="reifyReporter"><autolambda><custom-block s="$gearPartial find the GCF of %n and %n"><l></l><l></l></custom-block></autolambda><list></list></block></block></block></script></block></script></block></script></block-definition><block-definition s="$gearPartial message queue" type="reporter" category="control"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doDeclareVariables"><list><l>var</l></list></block><block s="doSetVar"><l>var</l><custom-block s="$gears hiddenVars"><variables><variable name="a"><l>0</l></variable></variables></custom-block></block><block s="doIf"><block s="reportNot"><block s="reportIsA"><block s="evaluate"><block var="var"/><list></list></block><l><option>list</option></l></block></block><script><block s="doRun"><block s="reifyScript"><script><block s="doSetVar"><l></l><block s="reportNewList"><list></list></block></block></script><list></list></block><list><block var="var"/></list></block></script><list></list></block><block s="doReport"><block var="var"/></block></script></block-definition><block-definition s="$gears hiddenVars" type="reporter" category="variables"><variables><list struct="atomic" id="1730">a</list></variables><header></header><code></code><translations></translations><inputs></inputs><script><block s="doReport"><block s="reifyReporter"><autolambda><block var="a"/></autolambda><list></list></block></block></script></block-definition><block-definition s="doBrodcast: broadcast %&apos;#1&apos; %&apos;#2&apos;" type="command" category="other" primitive="doBroadcast"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%l" readonly="true" expand="to&#xD;with data" max="2"></input></inputs><script><block s="doPrimitive"><l><bool>true</bool></l><l>doBroadcast</l></block></script></block-definition><block-definition s="doBrodcastAndWait: broadcast %&apos;#1&apos; %&apos;#2&apos; and wait" type="command" category="other" primitive="doBroadcastAndWait"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%l" readonly="true" expand="to&#xD;with data" max="2"></input></inputs><script><block s="doPrimitive"><l><bool>true</bool></l><l>doBroadcastAndWait</l></block></script></block-definition><block-definition s="$gearPartial when message recieved %&apos;callback&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%cmdRing" initial="1"></input></inputs><script><block s="doAddToList"><block var="callback"/><block s="evaluate"><custom-block s="$gearPartial message queue"></custom-block><list></list></block></block></script></block-definition><block-definition s="$gears Round %&apos;Numb&apos; to the nearest %&apos;Input&apos;" type="reporter" category="Ace’s blocks"><header></header><code></code><translations></translations><inputs><input type="%n" initial="1">333.33333</input><input type="%s" readonly="true" irreplaceable="true" initial="1">Tenth<options>§_inputSlotsMenu&#xD;Millions&#xD;Hundred thousands&#xD;Ten thousands&#xD;Thousands&#xD;Hundreds&#xD;Tens&#xD;Ones&#xD;Tenth&#xD;Hundredth&#xD;Thousandth&#xD;Ten thousandth&#xD;Hundred thousandth&#xD;Millionth</options></input></inputs><script><block s="doIf"><block s="reportVariadicEquals"><list><block var="Input"/><l>Millions</l></list></block><script></script><list><block s="reportVariadicEquals"><list><block var="Input"/><l>Hundred thousands</l></list></block><script></script><block s="reportVariadicEquals"><list><block var="Input"/><l>Ten thousands</l></list></block><script></script><block s="reportVariadicEquals"><list><block var="Input"/><l>Thousands</l></list></block><script></script><block s="reportVariadicEquals"><list><block var="Input"/><l>Hundreds</l></list></block><script></script><block s="reportVariadicEquals"><list><block var="Input"/><l>Tens</l></list></block><script></script><block s="reportVariadicEquals"><list><block var="Input"/><l>Ones</l></list></block><script><block s="doReport"><block s="reportRound"><block var="Numb"/></block></block></script><block s="reportVariadicEquals"><list><block var="Input"/><l>Tenth</l></list></block><script></script><block s="reportVariadicEquals"><list><block var="Input"/><l>Hundredth</l></list></block><script></script><block s="reportVariadicEquals"><list><block var="Input"/><l>Thousandth</l></list></block><script></script><block s="reportVariadicEquals"><list><block var="Input"/><l>Ten thousandth</l></list></block><script></script><block s="reportVariadicEquals"><list><block var="Input"/><l>Hundred thousandth</l></list></block><script></script><block s="reportVariadicEquals"><list><block var="Input"/><l>Millionth</l></list></block><script></script><block s="reportVariadicEquals"><list><block var="Input"/><l></l></list></block><script><block s="doReport"><block var="Numb"/></block></script></list><comment w="204.16666666666669" collapsed="true">Rounds numbers to the nearest input</comment></block></script></block-definition><block-definition s="$file personal library" type="command" category="Editor Tools"><header></header><code></code><translations></translations><inputs></inputs><script><custom-block s="PL Mod v1.1_b"><comment w="90" collapsed="false">Block by someone else!</comment></custom-block></script></block-definition><block-definition s="PL Mod v1.1_b" type="command" category="control"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doRun"><block s="reportJSFunction"><list></list><l>// expecting some silly dev comments? okay then&#xD;&#xD;if (typeof mods != &apos;array&apos;) mods = [];&#xD;&#xD;if (!mods.includes(&apos;tethrarxitet.plmod&apos;)) // there was something i couldve leaked here but didnt because im smatt&#xD;    (function () {&#xD;        mods.push(&apos;tethrarxitet.plmod&apos;)&#xD;        let combineObjects = (object, newKeys) =&gt; {&#xD;            for (let key in newKeys) object[key] = newKeys[key]; return object&#xD;        }, doInOrder = (object, actions) =&gt; {&#xD;            for (let key in actions) {&#xD;                object[key].call(object, actions[key])&#xD;            }&#xD;        }, bodyText = contents =&gt; (new DialogBoxMorph()).inform(0, contents || &apos;make text&apos;).body.copy();&#xD;&#xD;        let texture = new Image(),&#xD;            IDE = world.childThatIsA(IDE_Morph),&#xD;            init = () =&gt; {&#xD;                let lib = localStorage.getItem(&apos;--teth-plib--&apos;);&#xD;                if (lib) return JSON.parse(lib);&#xD;                localStorage.setItem(&apos;--teth-plib--&apos;, &apos;[]&apos;);&#xD;                return [];&#xD;            },&#xD;            snapMenu = IDE_Morph.prototype.snapMenu,&#xD;            projectMenu = IDE_Morph.prototype.projectMenu,&#xD;            plver = &apos;1.1_b&apos;;&#xD;&#xD;        texture.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEEAAAA" + // ugly base64 (like how snap stores their icon)&#xD;            "qCAMAAADbGsbuAAAACXBIWXMAAA7DAAAOwwHHb6hkAAACKFBMVEUAAACAAGSAAGOAAG" +&#xD;            "SAAGN9AGG9AJT8AMZ3AF23AI/2AMH2AMBxAFixAIrwALzwAL1xAFlxAFixAItqAFPqA" +&#xD;            "LfpALdlAE/kALP////ygNleAEneAK7dAK3OgL1eAErugNbvgNdZAEXYAKmYAHesgKJS" + // i couldve used cross-origin: anonymous but NAH&#xD;            "AEDRAKTIgLlMADzMAKDMAJ+mgJ7mgM9NADxGADbFAJvFAJqjgJuFAGnCgLRGADdAADL" +&#xD;            "AAJbAgLI5AC25AJE6AC00ACi0AI2zAI2zAIw0ACmagJTagMYtACOtAIitAIcuACSWgJ" +&#xD;            "FtAFW2gKqXgJJtAFYoAB+oAIOnAINoAFFnAFEhABlhAEyhAH4cABVbAEecAHqbAHmbA" +&#xD;            "HpcAEgVABBVAEOVAHSVAHUMICkPAAwQAAxPAD6PAHCQAHBQAD4QAAwAfHwAvLwA/PwH" +&#xD;            "LzRJADmJAGsAd3cAtrYA9/cA9vYCLTBDADSDAGeDAGZDADUCLS8AcHAAsLAA8PAALCw" +&#xD;            "AAAAAamoA6+sAY2MA5OQA5eWA8vIAXl4A39+Az8+A7+8AV1cA2dkAWFgAmJgAUlIA1N" +&#xD;            "QA09MAS0sAzc2ApaWA5uYARkYAyMiAo6MAh4eAw8MAPz8AwsIAwcEAgIAAOjoAvb0AM" +&#xD;            "zOAmZkALS0AsbEALi6Al5cAb28AJycAqqoAq6sAaGgAISEAZGQApaUAGxsAXV0An58A" +&#xD;            "FRUAmZkAmpoADw8ADw8AUVEAk5MACQkATEwAjo4AAwMARUUAAAB1GmjSAAAAuHRSTlM" +&#xD;            "Av///v7///7////+///////////////////////////////////////////////////" +&#xD;            "///////////////////////////////////////7///7///////7//////////////v" +&#xD;            "7///////7////////////+/////////////////////////////////////////////" +&#xD;            "//////////////////+///+///+///+/////v///v/+/x1brzwAAA1FJREFUeJylVAt" +&#xD;            "bTFEUPYxSVOS5K69BTEkvJlGJmTxHyCPKI6EJ5c0gJiJp8ohUakyhlCJJqf6evc+ee+" +&#xD;            "dMkilr33XWWfvss77b901XCCGmTTcYDDOEDukD4jS+EBQ8ExEcpAWwDwh8KSR01myq0" +&#xD;            "BAO0HxARZfCwiPmREQQw+dGRkbOjdR9QJwXJuYvWPhfNV8sWowARBQLgOYWR0lHIs+Y" +&#xD;            "PsdYJKJjlsQskTeXxnDCMq9bLjV6hXa2jKg7eQ8rWhhXIgCMRoBVJEbajetW05jvbCX" +&#xD;            "DKGLXIABiiSR/d7DW2/SdIWKFKS4+Ll6+7zoTrT6XgGsCORNyPf+FJl3kPSyTSExKTk" +&#xD;            "qmbkpiKkkiO0hJTd6AsgHdRiJ26JQTNso5WYnCnIYAMJvNBhZ2AIa0NAMJOurgs4nFz" +&#xD;            "JLGMIv0zQiALSy683W8js78HSNdZGRmZW4FyN6Kyq+YhY4ozbaM7VLQZWfKpu8M6E6G" +&#xD;            "sFhzrDkAO3C1ct9CDkn7nTt2WXcD7LHsxb7V/4w6OVaLsO3LxbLZaM21SUiHpP1+7O6" +&#xD;            "32Q7QmaRyRp19NnEw79D/IO+gEIePHM0/lj9FHj9MH4SCwhMnp1iFBfxNOXW66HTRme" +&#xD;            "Lis8XMc+QDqvMcUGIvRVy4eMmLixdKJ4a9RPihrPzyFaqr167foLp5i/0EVV6mBtx23" +&#xD;            "PHi7j2Ju3f+DcdtJaHi/lRQoSQ8cDornQCVTlQAJ/3UHjpZsPeQXKXeZGL/gZLwqAoB" +&#xD;            "oIn8tT6u8soTP0dT3slHSkL1UwRADUs17pDPcFcjZYzTJquVhFqXy1UHUFuHioKPv9T" +&#xD;            "90cR5V62S8PwFAkAT+cIv/URvvmKhyedKQv1rBIAmcvhNgyp68/VbXOsbaLJeSWhsam" +&#xD;            "pqBmhsRkXBB/nOT7SmnHtH802NSkKL3d5qB0Cxt6LQbjyhM33O3tqiJLjLEfy2KG65e" +&#xD;            "Y/iZqdKOS8Et5LgaXO0OTihHcBD+sHzEXdt0rU7uE+O5todNN/mURI+dXR0dnR8kkDp" +&#xD;            "JP1MDUldOiWll/NKQlf3l8mju0v95+zp/TpZ9PYIP3yr6evr+z4J1nwTY9D/AzHwU8f" +&#xD;            "Aj4nRPzaAMTj0y4uhwfEn/onhkQaJkeEpBggxyl+50Ule+w1osKYTW7+9+AAAAABJRU" +&#xD;            "5ErkJggg==";&#xD;&#xD;        if (SnapVersion.split(&apos;.&apos;)[0] &lt; 10) {&#xD;            new DialogBoxMorph().inform(&apos;PL Mod | Update!&apos;, `Your version of Snap! is out of date. Please&#xD;upgrade it or move online to use this mod.&#xD;            &#xD;Your version: ${SnapVersion}&#xD;Required: v10.x.x`, world, texture)&#xD;            return;&#xD;        }&#xD;        texture.onload = () =&gt; { // to prevent empty dialog&#xD;            let lines = new AlignmentMorph(&apos;column&apos;, 0),&#xD;                line1 = bodyText(&apos;Thank you for using Personal Library! A new option&apos;),&#xD;                line2 = new AlignmentMorph(&apos;row&apos;),&#xD;                line2_1 = bodyText(&apos;has been added to your project menu (&apos;),&#xD;                line2_2 = new SymbolMorph(&apos;file&apos;, line1.fontSize, WHITE, line1.shadowOffset, line1.shadowColor),&#xD;                line2_3 = bodyText(&apos; ). Enjoy!&apos;),&#xD;                line3 = bodyText(&apos;- Tethrarxitet&apos;)&#xD;&#xD;            line2_2.fixLayout();&#xD;&#xD;            line2.add(line2_1);&#xD;            line2.add(line2_2);&#xD;            line2.add(line2_3);&#xD;            line2.fixLayout();&#xD;&#xD;            lines.add(line1);&#xD;            lines.add(line2);&#xD;            lines.add(line3);&#xD;            lines.fixLayout();&#xD;&#xD;            line3.setLeft(line3.left() + 60)&#xD;&#xD;            let a = new DialogBoxMorph().inform("PL Mod | Thanks!", null, world, texture)&#xD;            a.addBody(lines);&#xD;            a.fixLayout();&#xD;            a.popUp(world)&#xD;        };&#xD;&#xD;        IDE_Morph.prototype.snapMenu = function () {&#xD;            snapMenu.call(this)&#xD;&#xD;            let menuItemText = () =&gt; {&#xD;                let aligner = new AlignmentMorph(&apos;row&apos;),&#xD;                    textTemp = new StringMorph(null, MenuItemMorph.prototype.fontSize, MenuItemMorph.prototype.fontStyle, true),&#xD;                    texts = [];&#xD;                for (let i = 0; i &lt; 3; i++) {&#xD;                    texts[i] = textTemp.copy();&#xD;                    texts[i].text = i == 0 ? &apos;About &apos; : i == 1 ? &apos;Personal &apos; : &apos;Library&apos;&#xD;                    if (!i) texts[i].isBold = false;&#xD;                    texts[i].fixLayout();&#xD;                    aligner.add(texts[i]);&#xD;                    texts[i].color = [&apos;#000&apos;, new Color(192, 0, 192), new Color(0, 192, 192)][i]&#xD;                }&#xD;&#xD;                texts[1].color = new Color(192, 0, 192);&#xD;                texts[2].color = new Color(0, 192, 192);&#xD;&#xD;                aligner.fixLayout();&#xD;&#xD;                return aligner;&#xD;            }&#xD;            let menu = world.activeMenu;&#xD;            menu.addLine();&#xD;            menu.addItem(menuItemText(), () =&gt; {&#xD;                a = new DialogBoxMorph().inform("PL Mod | About", `PL mod v${plver}&#xD;&#xD;Copyleft 2024 Tethrarxitet&#xD;tethrarxitet@gmail.com&#xD;&#xD;Mod idea by @qw23.&#xD;${this.world().currentKey === 16 ?&#xD;                        &apos;Thanks to all who supported:\n@mobility212 for the first words of positivity,\n@blockpointstudios for the separator and sorting idea,\n&apos; +&#xD;                        &apos;many other beautiful members of the Snap! forum...\nand YOU for using this mod and supporting\nmy projects. :)\n&apos;&#xD;                        :&#xD;                        ``&#xD;                    }&#xD;For more mods by Tethrarxitet, check out&#xD;https://tethrxt.neocities.org/snap/mods`, world, texture)&#xD;            }, null, new Color(Math.random() * 255, Math.random() * 255, Math.random() * 255), true);&#xD;&#xD;            menu.popup(world, this.logo.bottomLeft());&#xD;        };&#xD;&#xD;        IDE_Morph.prototype.projectMenu = function () {&#xD;            projectMenu.call(this);&#xD;            let menu = world.activeMenu;&#xD;&#xD;            let pl = new MenuMorph(this, "PL Mod by Tethrarxitet");&#xD;&#xD;            pl.addItem("Personal libraries...", () =&gt; {&#xD;                try {&#xD;                    let a = init();&#xD;                    if (JSON.stringify(a) == &apos;[]&apos;) {&#xD;                        new DialogBoxMorph().inform("Library is empty",&#xD;                            &apos;Your personal library is empty!\n&apos; +&#xD;                            &apos;Create and save some custom blocks to\n&apos; +&#xD;                            &apos;open it.&apos;, world);&#xD;                        return;&#xD;                    }&#xD;&#xD;                    let b = new LibraryImportDialogMorph(IDE, a);&#xD;                    b.labelString = &apos;Import personal library&apos;;&#xD;                    b.createLabel();&#xD;                    b.fixLayout();&#xD;&#xD;                    b.listField.action = ({ name, xml, description }) =&gt; {&#xD;                        if (isNil(name) || isNil(xml)) { return; }&#xD;                        b.notesText.text = localize(description) || &apos;&apos;;&#xD;                        b.notesText.rerender();&#xD;                        b.notesField.contents.adjustBounds();&#xD;                        if (b.hasCached(xml)) {&#xD;                            b.displayBlocks(xml);&#xD;                        } else {&#xD;                            b.showMessage(`${localize(&apos;Loading&apos;)}\n${localize(name)}`);&#xD;                            let serializer = b.ide.serializer,&#xD;                                palette = serializer.parse(xml).childNamed(&apos;palette&apos;);&#xD;                            b.cacheLibrary(xml,&#xD;                                serializer.loadBlocks(xml, null, true),&#xD;                                palette ? serializer.loadPalette(palette) : {}&#xD;                            );&#xD;                            b.displayBlocks(xml);&#xD;                        }&#xD;                    };&#xD;&#xD;                    b.importLibrary = function () {&#xD;                        if (!this.listField.selected) { return; }&#xD;                        let xml = this.listField.selected.xml,&#xD;                            libraryName = this.listField.selected.name;&#xD;&#xD;                        SpriteMorph.prototype.customCategories = this.originalCategories;&#xD;&#xD;                        IDE.showMessage(`${localize(&apos;Loading&apos;)} ${libraryName}`);&#xD;                        IDE.droppedText(xml, libraryName);&#xD;                    }&#xD;                    b.popUp();&#xD;                } catch (e) {&#xD;                    let errorDialog = new DialogBoxMorph().inform("Error while opening library",&#xD;                        e.message + "\nTry reporting this error to Tethrarxitet.\n\nTo make it easier to fix, try copying your personal\nlibrary data with the button above.", world),&#xD;                        copyLibrary = new PushButtonMorph(errorDialog, () =&gt; {&#xD;                            navigator.clipboard.writeText(&apos;Library contents: \&apos;&apos; + localStorage.getItem(&apos;--teth-plib--&apos;) + &apos;\&apos;&apos;);&#xD;                            IDE.showMessage(&apos;copied to clipboard&apos;, 2)&#xD;                        }, &apos;Copy data&apos;, null);&#xD;&#xD;                    let barcolor = DialogBoxMorph.prototype.titleBarColor;&#xD;                    combineObjects(copyLibrary, {&#xD;                        fontSize: 6,&#xD;                        padding: 1,&#xD;                        color: barcolor.darker(25),&#xD;                        labelShadowColor: barcolor.darker(10)&#xD;                    });&#xD;                    doInOrder(copyLibrary, {&#xD;                        createLabel: [],&#xD;                        fixLayout: []&#xD;                    });&#xD;                    errorDialog.add(copyLibrary);&#xD;                    doInOrder(copyLibrary, {&#xD;                        setLeft: [errorDialog.right() - copyLibrary.width() - errorDialog.padding / 2],&#xD;                        setTop: [errorDialog.top() + errorDialog.titleFontSize - errorDialog.padding / 2]&#xD;                    });&#xD;                }&#xD;            }, "select a library from your personal\n" +&#xD;            "libraries");&#xD;            pl.addItem("Edit libraries...", () =&gt; {&#xD;                new DialogBoxMorph().inform("Soon\u2122", "Reordering/deleting is not yet ready.", world);&#xD;            }, "change the order of how every\n" +&#xD;            "library appears in the list");&#xD;            pl.addLine();&#xD;            pl.addItem("Import .spl file...", () =&gt; {&#xD;                //  new DialogBoxMorph().inform("Soon\u2122", "SPL file import support is not\n" +&#xD;                //      "yet ready, but soon enough it will be!", world);&#xD;                function parse(target) {&#xD;                    function splitOnce(s, on) {&#xD;                        [first, ...rest] = s.split(on)&#xD;                        return [first, rest.length &gt; 0 ? rest.join(on) : null]&#xD;                    }&#xD;&#xD;                    return Object.fromEntries(target.split(&apos;\n&apos;).map(a =&gt; splitOnce(a, &apos;=&apos;)));&#xD;                }&#xD;&#xD;                let fileImport = document.createElement(&apos;input&apos;);&#xD;                fileImport.type = &apos;file&apos;;&#xD;                fileImport.accept = &apos;.text, .txt, .spl&apos;;&#xD;                fileImport.click();&#xD;                fileImport.onchange = ev =&gt; {&#xD;                    let fileReader = new FileReader();&#xD;&#xD;                    fileReader.readAsText(fileImport.files[0])&#xD;                    fileReader.onload = function (ev2) {&#xD;                        try {&#xD;                            let libs = init(),&#xD;                                parsed = parse(ev2.target.result),&#xD;                                parsedTrim = Object.fromEntries(Object.entries(parsed).map(a =&gt; [a[0], a[1].trim()])), // an absolute monstrosity&#xD;                                anyCopy = libs.find(a =&gt; a.name == parsedTrim.name),&#xD;                                ogPt = copy(parsedTrim),&#xD;                                copyInfo = anyCopy ? &apos;\n\nA library with the same name has been found, so\na "- Copy" will be added.&apos; : &apos;&apos;&#xD;                                &#xD;&#xD;                            while (anyCopy) {&#xD;                                parsedTrim.name += &apos; - Copy&apos; // to prevent duplicate names&#xD;                                anyCopy = libs.find(a =&gt; a.name == parsedTrim.name)&#xD;                            }&#xD;&#xD;                            let confirm = new DialogBoxMorph().inform("Import blocks",&#xD;                                &apos;Are you sure you want to import\n"&apos; +&#xD;                                    ogPt.name +&#xD;                                    &apos;"?\n\nLibrary description:\n&apos; +&#xD;                                    ogPt.description + copyInfo, world);&#xD;                            confirm.createButtons();&#xD;                            confirm.addButton(&apos;ok&apos;, &apos;Yes&apos;);&#xD;                            confirm.addButton(&apos;cancel&apos;, &apos;No&apos;);&#xD;                            confirm.fixLayout();&#xD;&#xD;                            confirm.ok = () =&gt; {&#xD;                                libs.push(parsedTrim);&#xD;                                localStorage.setItem(&apos;--teth-plib--&apos;, JSON.stringify(libs));&#xD;                                IDE.showMessage(&apos;imported successfully!&apos;, 2);&#xD;&#xD;                                confirm.destroy();&#xD;                            }&#xD;                        } catch (e) {&#xD;                            IDE.showMessage(&apos;an error has occurred while importing:\n&apos; + e + &apos;\n\nthe library was not added to your list.&apos;, 5)&#xD;                        }&#xD;                    }&#xD;                }&#xD;                fileImport.remove();&#xD;            }, "EXPERIMENTAL! import a personal\n" +&#xD;            "library made by another person");&#xD;            pl.addItem("Export .spl file...", () =&gt; {&#xD;                var exportDialog = new DialogBoxMorph();&#xD;&#xD;                exportDialog.listField = new ListMorph(init().map(obj =&gt; obj.name));&#xD;                let listField = exportDialog.listField;&#xD;&#xD;                combineObjects(listField, {&#xD;                    edge: InputFieldMorph.prototype.edge,&#xD;                    fontSize: InputFieldMorph.prototype.fontSize,&#xD;                    typeInPadding: InputFieldMorph.prototype.typeInPadding,&#xD;                    contrast: InputFieldMorph.prototype.contrast,&#xD;                    render: InputFieldMorph.prototype.render,&#xD;                    drawRectBorder: InputFieldMorph.prototype.drawRectBorder,&#xD;                });&#xD;&#xD;                listField.setWidth(200)&#xD;                listField.setHeight(250)&#xD;&#xD;                ProjectDialogMorph.prototype.fixListFieldItemColors.call(exportDialog);&#xD;&#xD;                exportDialog.labelString = "Export blocks"&#xD;                exportDialog.createLabel();&#xD;                exportDialog.addBody(listField);&#xD;                exportDialog.addButton(() =&gt; {&#xD;                    exportDialog.ok();&#xD;&#xD;                    let targetLib = init().find(a =&gt; a.name == listField.selected);&#xD;                    let fileContents = `name=${targetLib.name}&#xD;description=${targetLib.description}&#xD;xml=${targetLib.xml}`;&#xD;                    let blob = new Blob([fileContents], { type: "text/plain" });&#xD;                    saveAs(blob, `${targetLib.name}.spl`);&#xD;                }, "Export");&#xD;                exportDialog.addButton(&apos;cancel&apos;, "cancel");&#xD;                exportDialog.fixLayout();&#xD;                exportDialog.popUp(world);&#xD;&#xD;            }, "EXPERIMENTAL! export a personal\n" +&#xD;            "library to share online");&#xD;            pl.addLine();&#xD;            pl.addItem("Save custom blocks...", () =&gt; {&#xD;                var blocks = SpriteMorph.prototype.bootstrappedBlocks().concat(&#xD;                    this.stage.globalBlocks);&#xD;                var bex = new BlockExportDialogMorph(IDE.serializer, blocks, IDE);&#xD;                bex.labelString = &apos;Save custom blocks&apos;;&#xD;                bex.createLabel();&#xD;                bex.fixLayout();&#xD;                pal = bex.childThatIsA(ScrollFrameMorph);&#xD;                bex.exportBlocks = function () {&#xD;                    if (this.blocks.length) {&#xD;                        let xml = IDE.blocksLibraryXML(&#xD;                            this.blocks, null, false,&#xD;                            this.globalData.fork(this.globalVarNames),&#xD;                            this.localData.fork(this.localVarNames)),&#xD;                            creator = new DialogBoxMorph(),&#xD;                            c = bodyText(0), // name unimportant, this won&apos;t be used anywhere else :3&#xD;                            textLine = contents =&gt; new StringMorph(contents, c.fontSize, c.fontStyle, 1, 0, 0, c.shadowOffset, WHITE),&#xD;                            editorSide = new AlignmentMorph(&apos;column&apos;, 4),&#xD;                            allContents = new AlignmentMorph(&apos;row&apos;, 4),&#xD;                            libTitle = textLine("Library title:"),&#xD;                            libDesc = textLine("Library description (multiline):"),&#xD;                            libTitleInput = new InputFieldMorph(&apos;Unnamed library&apos;),&#xD;                            libDescInput = new ScrollFrameMorph(),&#xD;                            inputText = new TextMorph(&apos;&apos;, 12),&#xD;                            palette = new ScrollFrameMorph(null, null, SpriteMorph.prototype.sliderColor);&#xD;&#xD;                        // CREATOR&#xD;                        creator.labelString = &apos;Create library&apos;;&#xD;                        creator.createLabel();&#xD;                        creator.key = &apos;createLibrary&apos;&#xD;                        creator.addButton(() =&gt; {&#xD;                            libraryData = init();&#xD;                            &#xD;                            console.log(libTitleInput.contents().text.text)&#xD;                            if (libraryData.find(a =&gt; a.name == libTitleInput.contents().text.text)) {&#xD;                                IDE.showMessage(&apos;a library with that name already exists!&apos;)&#xD;                            } else {&#xD;                                creator.ok();&#xD;                                libraryData.push({&#xD;                                    xml: xml,&#xD;                                    name: libTitleInput.contents().text.text || "Unnamed library",&#xD;                                    description: inputText.text || "(no description provided)"&#xD;                                });&#xD;                                localStorage.setItem(&apos;--teth-plib--&apos;, JSON.stringify(libraryData))&#xD;                                IDE.showMessage(&apos;blocks saved.&apos;, 2)&#xD;                            }&#xD;                        }, &apos;Save&apos;);&#xD;                        creator.addButton(&apos;cancel&apos;, &apos;Cancel&apos;);&#xD;                        creator.addBody(allContents);&#xD;&#xD;                        // LIBTITLEINPUT&#xD;                        libTitleInput.setWidth(250);&#xD;&#xD;                        // INPUTTEXT&#xD;                        inputText.setWidth(250 - 4);&#xD;                        inputText.setPosition(libDescInput.topLeft().add(4));&#xD;                        inputText.acceptsDrops = false;&#xD;                        inputText.enableSelecting();&#xD;                        inputText.isEditable = true;&#xD;                        inputText.fixLayout();&#xD;&#xD;                        // LIBDESCINPUT&#xD;                        libDescInput.setWidth(250);&#xD;                        libDescInput.setHeight(125);&#xD;                        combineObjects(libDescInput, {&#xD;                            acceptsDrops: false,&#xD;                            edge: InputFieldMorph.prototype.edge,&#xD;                            fontSize: InputFieldMorph.prototype.fontSize,&#xD;                            typeInPadding: InputFieldMorph.prototype.typeInPadding,&#xD;                            contrast: InputFieldMorph.prototype.contrast,&#xD;                            drawRectBorder: InputFieldMorph.prototype.drawRectBorder,&#xD;                            render: InputFieldMorph.prototype.render,&#xD;                            fixLayout: nop,&#xD;                        });&#xD;                        libDescInput.addContents(inputText);&#xD;&#xD;                        // EDITORSIDE&#xD;                        editorSide.alignment = &apos;left&apos;;&#xD;                        editorSide.color = creator.color;&#xD;                        editorSide.add(libTitle);&#xD;                        editorSide.add(libTitleInput);&#xD;                        editorSide.add(libDesc);&#xD;                        editorSide.add(libDescInput);&#xD;                        editorSide.fixLayout();&#xD;&#xD;                        // ALLCONTENTS&#xD;                        allContents = new AlignmentMorph(&apos;row&apos;, 4);&#xD;                        allContents.add(editorSide);&#xD;                        allContents.add(palette);&#xD;&#xD;                        // PALETTE&#xD;                        combineObjects(palette, {&#xD;                            color: SpriteMorph.prototype.paletteColor,&#xD;                            padding: 4,&#xD;                            isDraggable: false,&#xD;                            acceptsDrops: false,&#xD;                        })&#xD;&#xD;                        palette.contents.acceptsDrops = false;&#xD;                        palette.setWidth(editorSide.height());&#xD;                        palette.setHeight(palette.width());&#xD;&#xD;                        blockList = pal.children[0].children.filter(a =&gt; a.state).map(a =&gt; a.element)&#xD;                        paletteAlignment = new AlignmentMorph(&apos;column&apos;, 4);&#xD;                        paletteAlignment.alignment = &apos;left&apos;;&#xD;                        paletteAlignment.add(new StringMorph(&apos;Blocks to save:&apos;, 11, 0, 1, 0, 0, 0, 0, "#ddd"));&#xD;                        blockList.forEach(block =&gt; {&#xD;                            let inst = block.definition.blockInstance();&#xD;                            inst.isDraggable = false;&#xD;                            paletteAlignment.add(inst);&#xD;                        });&#xD;                        paletteAlignment.setPosition(paletteAlignment.position().add(4));&#xD;                        palette.setContents(paletteAlignment);&#xD;&#xD;                        // let&apos;s fix layouts :)&#xD;&#xD;                        paletteAlignment.fixLayout();&#xD;                        palette.fixLayout();&#xD;                        allContents.fixLayout();&#xD;&#xD;                        creator.addBody(allContents);&#xD;                        creator.fixLayout();&#xD;&#xD;                        creator.popUp(world);&#xD;                    } else { }&#xD;                };&#xD;                bex.popUp(this.world());&#xD;            }, "save some custom blocks in this\n" +&#xD;            "project to your personal libraries");&#xD;            if (this.world().currentKey === 16) {&#xD;                pl.addLine();&#xD;                pl.addItem("Delete all libraries", () =&gt; {&#xD;                    conf = new DialogBoxMorph()&#xD;                    var txt = bodyText(&#xD;                        &apos;Are you sure you want to delete all of your\npersonal library? &apos; +&#xD;                        &apos;This &gt;&gt;CANNOT&lt;&lt; be undone.\nOnly REALLY do this if your personal &apos; +&#xD;                        &apos;library is\nbroken or you\&apos;ve had issues with saving.&apos;);&#xD;                    conf.addBody(txt);&#xD;                    conf.addButton(() =&gt; {&#xD;                        conf.ok();&#xD;                        localStorage.setItem("--teth-plib--", &apos;[]&apos;);&#xD;                        IDE.showMessage(&apos;all blocks cleared.&apos;, 2);&#xD;                    }, &apos;Delete&apos;);&#xD;                    conf.addButton(&apos;cancel&apos;, &apos;Cancel&apos;);&#xD;                    conf.labelString = &apos;Delete all libraries&apos;;&#xD;                    conf.createLabel();&#xD;                    conf.fixLayout();&#xD;                    conf.popUp(world);&#xD;                }, null, new Color(100, 0, 0))&#xD;            }&#xD;&#xD;&#xD;            let array = menu.items;&#xD;            let idx = array.findIndex(item =&gt; item[0] == "Libraries...");&#xD;            if (idx == -1)&#xD;                console.warn(&apos;Library option couldn\&apos;t be found&apos;);&#xD;&#xD;            array.splice(idx, 0, [&apos;Personal libraries...&apos;, pl, 0, 0, 0, 0, 0, &apos;\u25ba&apos;]);&#xD;&#xD;            menu.popup(world, this.controlBar.projectButton.bottomLeft());&#xD;        };&#xD;    })();</l></block><list></list></block></script></block-definition><block-definition s="cipher text: %&apos;TXT&apos; $nl offset %&apos;Numb&apos; $nl" type="reporter" category="Ace’s blocks"><header></header><code></code><translations></translations><inputs><input type="%txt" initial="1">BCD</input><input type="%n" initial="1">-1</input></inputs><script><block s="doReport"><block s="reportJoinWords"><list><block s="reportUnicodeAsLetter"><block s="reportVariadicSum"><list><block s="reportUnicode"><block var="TXT"/></block><block var="Numb"/></list></block></block></list></block></block></script><scripts><comment x="8.333333333333334" y="93.30555555555554" w="270.83333333333337" collapsed="true">Ciphers letters along the alphabet in an offset</comment></scripts></block-definition><block-definition s="decipher text: %&apos;TXT&apos; $nl from offset %&apos;Numb&apos;" type="reporter" category="Ace’s blocks"><header></header><code></code><translations></translations><inputs><input type="%txt" initial="1">ABC</input><input type="%n" initial="1">-1</input></inputs><script><block s="doReport"><block s="reportJoinWords"><list><block s="reportUnicodeAsLetter"><block s="reportDifference"><block s="reportUnicode"><block var="TXT"/></block><block var="Numb"/></block></block></list></block></block></script><scripts><comment x="8.333333333333334" y="95.47222222222194" w="215.41666666666686" collapsed="true">Deciphers letters along the alphabet</comment></scripts></block-definition><block-definition s="Tally %&apos;Numb&apos;" type="reporter" category="Ace’s blocks"><comment x="0" y="0" w="189.16666666666669" collapsed="false">Block design is by @redgeographysnap&#xD;It just says tally marks</comment><header></header><code></code><translations></translations><inputs><input type="%n" initial="1">5</input></inputs><script><block s="doIf"><block s="reportVariadicLessThanOrEquals"><list><block var="Numb"/><l>0</l></list></block><script><block s="doReport"><l></l></block></script><list><block s="reportVariadicLessThanOrEquals"><list><block var="Numb"/><l>4</l></list></block><script><block s="doReport"><block s="reportJoinWords"><list><l>|</l><custom-block s="Tally %n"><block s="reportDifference"><block var="Numb"/><l>1</l></block></custom-block></list></block></block></script></list></block><block s="doReport"><block s="reportJoinWords"><list><block s="reportUnicodeAsLetter"><l>119672</l></block><l> </l><custom-block s="Tally %n"><block s="reportDifference"><block var="Numb"/><l>5</l></block></custom-block></list></block></block></script></block-definition><block-definition s="[] Pen Blocks $arrowDown" type="command" category="Ace’s blocks" space="true"><header></header><code></code><translations></translations><inputs></inputs></block-definition><block-definition s="$gears Draw a %&apos;Shape&apos; at X %&apos;X&apos; Y %&apos;Y&apos; size %&apos;Numb&apos; on a rotation of %&apos;Rot&apos;" type="command" category="Ace’s blocks" space="true"><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true" irreplaceable="true" initial="1">Square hollow<options>§_inputSlotsMenu&#xD;Square hollow&#xD;Square filled&#xD;Hollow cube&#xD;Circle hollow&#xD;Circle filled&#xD;Triangle 1&#xD;Triangle 2&#xD;Triangle 3&#xD;Pyramid&#xD;Angle 1&#xD;Angle 2&#xD;Angle 3&#xD;My self</options></input><input type="%n" initial="1">0</input><input type="%n" initial="1">0</input><input type="%n" initial="1">15</input><input type="%n" initial="1">90<options>§_directionDialMenu</options></input></inputs><script><block s="doWarp"><script><block s="doDeclareVariables"><list><l>Last x</l><l>Last y</l><l>Last pen size</l><l>Last dir</l></list></block><block s="doSetVar"><l>Last dir</l><block s="direction"></block></block><block s="doSetVar"><l>Last y</l><block s="yPosition"></block></block><block s="doSetVar"><l>Last x</l><block s="xPosition"></block></block><block s="doSetVar"><l>Last pen size</l><block s="getPenAttribute"><l><option>size</option></l></block></block><block s="up"></block><block s="setSize"><block s="reportQuotient"><block var="Numb"/><l>4</l></block></block><block s="doIf"><block s="reportVariadicEquals"><list><block var="Shape"/><l>Square hollow</l></list></block><script><block s="gotoXY"><block var="X"/><block var="Y"/></block><block s="setHeading"><block var="Rot"/></block><block s="forward"><block s="reportMonadic"><l><option>neg</option></l><block var="Numb"/></block></block><block s="setHeading"><block s="reportVariadicSum"><list><block var="Rot"/><l>90</l></list></block></block><block s="forward"><block s="reportMonadic"><l><option>neg</option></l><block var="Numb"/></block></block><block s="down"></block><block s="setHeading"><block var="Rot"/></block><block s="forward"><block s="reportVariadicProduct"><list><block var="Numb"/><l>2</l></list></block></block><block s="setHeading"><block s="reportVariadicSum"><list><block var="Rot"/><l>90</l></list></block></block><block s="forward"><block s="reportVariadicProduct"><list><block var="Numb"/><l>2</l></list></block></block><block s="setHeading"><block s="reportVariadicSum"><list><block var="Rot"/><l>180</l></list></block></block><block s="forward"><block s="reportVariadicProduct"><list><block var="Numb"/><l>2</l></list></block></block><block s="setHeading"><block s="reportVariadicSum"><list><block var="Rot"/><l>270</l></list></block></block><block s="forward"><block s="reportVariadicProduct"><list><block var="Numb"/><l>2</l></list></block></block></script><list><block s="reportVariadicEquals"><list><block var="Shape"/><l>Square filled</l></list></block><script><custom-block s="$gears Draw a %s at X %n Y %n size %n on a rotation of %n"><l>Square hollow</l><block var="X"/><block var="Y"/><block var="Numb"/><block var="Rot"/></custom-block><block s="doDeclareVariables"><list><l>Numb decline</l></list></block><block s="doSetVar"><l>Numb decline</l><block var="Numb"/></block><block s="doRepeat"><block s="reportVariadicProduct"><list><block var="Numb"/><l>100</l></list></block><script><block s="doChangeVar"><l>Numb decline</l><l>-0.1</l></block><custom-block s="$gears Draw a %s at X %n Y %n size %n on a rotation of %n"><l>Square hollow</l><block var="X"/><block var="Y"/><block var="Numb decline"/><block var="Rot"/></custom-block></script></block><block s="gotoXY"><block var="X"/><block var="Y"/></block></script><block s="reportVariadicEquals"><list><block var="Shape"/><l>Circle hollow</l></list></block><script><block s="setSize"><block s="reportQuotient"><block var="Numb"/><custom-block s="II"></custom-block></block></block><block s="gotoXY"><block s="reportDifference"><block var="X"/><block s="reportVariadicProduct"><list><block var="Numb"/><l>7.1</l></list></block></block><block s="reportDifference"><block var="Y"/><block s="reportQuotient"><block var="Numb"/><l>1.9</l></block></block></block><block s="setHeading"><l>0</l></block><block s="doRepeat"><l>360</l><script><block s="down"></block><block s="forward"><block s="reportQuotient"><block var="Numb"/><l>8</l></block></block><block s="turn"><l>1</l></block></script></block></script><block s="reportVariadicEquals"><list><block var="Shape"/><l>Circle filled</l></list></block><script><block s="setSize"><block s="reportQuotient"><block var="Numb"/><custom-block s="II"></custom-block></block></block><block s="gotoXY"><block s="reportDifference"><block var="X"/><block s="reportVariadicProduct"><list><block var="Numb"/><l>7.1</l></list></block></block><block s="reportDifference"><block var="Y"/><block s="reportQuotient"><block var="Numb"/><l>1.9</l></block></block></block><block s="setHeading"><l>0</l></block><block s="doRepeat"><l>360</l><script><block s="down"></block><block s="forward"><block s="reportQuotient"><block var="Numb"/><l>8</l></block></block><block s="turn"><l>1</l></block></script></block><block s="doDeclareVariables"><list><l>Numb decline</l></list></block><block s="doSetVar"><l>Numb decline</l><block var="Numb"/></block><block s="doRepeat"><block s="reportVariadicProduct"><list><block var="Numb"/><l>100</l></list></block><script><block s="doChangeVar"><l>Numb decline</l><l>-0.1</l></block><custom-block s="$gears Draw a %s at X %n Y %n size %n on a rotation of %n"><l>Circle hollow</l><block var="X"/><block var="Y"/><block var="Numb decline"/><block var="Rot"/></custom-block></script></block></script><block s="reportVariadicEquals"><list><block var="Shape"/><l>Triangle 1</l></list></block><script><block s="gotoXY"><block var="X"/><block var="Y"/></block><block s="setHeading"><block s="reportVariadicSum"><list><block var="Rot"/><l>90</l></list></block></block><block s="forward"><block s="reportQuotient"><block var="Numb"/><l>2</l></block></block><block s="setSize"><block s="reportQuotient"><block var="Numb"/><l>8</l></block></block><block s="down"></block><block s="setHeading"><block var="Rot"/></block><block s="forward"><block s="reportMonadic"><l><option>neg</option></l><block var="Numb"/></block></block><block s="forward"><block s="reportVariadicSum"><list><block var="Numb"/><block var="Numb"/></list></block></block><block s="setHeading"><block s="reportDifference"><block var="Rot"/><l>135</l></block></block><block s="forward"><block s="reportVariadicSum"><list><block var="Numb"/><block s="reportQuotient"><block var="Numb"/><l>2</l></block></list></block></block><block s="setHeading"><block s="reportDifference"><block var="Rot"/><l>225</l></block></block><block s="forward"><block s="reportVariadicSum"><list><block var="Numb"/><block s="reportQuotient"><block var="Numb"/><l>2</l></block></list></block></block></script><block s="reportVariadicEquals"><list><block var="Shape"/><l>Triangle 2</l></list></block><script><block s="gotoXY"><block var="X"/><block var="Y"/></block><block s="setHeading"><block s="reportVariadicSum"><list><block var="Rot"/><l>90</l></list></block></block><block s="forward"><block s="reportQuotient"><block var="Numb"/><l>2</l></block></block><block s="setHeading"><block var="Rot"/></block><block s="forward"><block var="Numb"/></block><block s="forward"><block s="reportMonadic"><l><option>neg</option></l><block s="reportQuotient"><block var="Numb"/><l>2</l></block></block></block><block s="setSize"><block s="reportQuotient"><block var="Numb"/><l>8</l></block></block><block s="down"></block><block s="setHeading"><block var="Rot"/></block><block s="forward"><block var="Numb"/></block><block s="forward"><block s="reportMonadic"><l><option>neg</option></l><block s="reportVariadicSum"><list><block var="Numb"/><block var="Numb"/></list></block></block></block><block s="setHeading"><block s="reportDifference"><block var="Rot"/><l>90</l></block></block><block s="forward"><block s="reportVariadicSum"><list><block var="Numb"/><block var="Numb"/></list></block></block><block s="setHeading"><block s="reportVariadicSum"><list><block var="Rot"/><l>45</l></list></block></block><block s="forward"><block s="reportVariadicProduct"><list><block var="Numb"/><l>2.75</l></list></block></block></script><block s="reportVariadicEquals"><list><block var="Shape"/><l>Triangle 3</l></list></block><script><block s="gotoXY"><block s="reportDifference"><block var="X"/><block s="reportQuotient"><block var="Numb"/><l>4</l></block></block><block s="reportDifference"><block var="Y"/><block s="reportQuotient"><block var="Numb"/><l>2</l></block></block></block><block s="setSize"><block s="reportQuotient"><block var="Numb"/><l>8</l></block></block><block s="down"></block><block s="changeXPosition"><block s="reportQuotient"><block var="Numb"/><l>2</l></block></block><block s="changeXPosition"><block s="reportMonadic"><l><option>neg</option></l><block var="Numb"/></block></block><block s="setHeading"><l>15</l></block><block s="forward"><block s="reportVariadicProduct"><list><block var="Numb"/><l>3</l></list></block></block><block s="setHeading"><l>165</l></block><block s="forward"><block s="reportVariadicProduct"><list><block var="Numb"/><l>3</l></list></block></block><block s="setHeading"><l>270</l></block><block s="changeXPosition"><block s="reportMonadic"><l><option>neg</option></l><block var="Numb"/></block></block></script><block s="reportVariadicEquals"><list><block var="Shape"/><l>Angle 1</l></list></block><script><block s="gotoXY"><block var="X"/><block var="Y"/></block><block s="setHeading"><block var="Rot"/></block><block s="forward"><block s="reportMonadic"><l><option>neg</option></l><block s="reportQuotient"><block var="Numb"/><l>2</l></block></block></block><block s="setHeading"><block s="reportDifference"><block var="Rot"/><l>90</l></block></block><block s="forward"><block s="reportMonadic"><l><option>neg</option></l><block s="reportQuotient"><block var="Numb"/><l>2</l></block></block></block><block s="setSize"><block s="reportQuotient"><block var="Numb"/><l>8</l></block></block><block s="down"></block><block s="setHeading"><block s="reportDifference"><block var="Rot"/><l>90</l></block></block><block s="forward"><block var="Numb"/></block><block s="setHeading"><block s="reportVariadicSum"><list><block var="Rot"/><l>90</l></list></block></block><block s="forward"><block var="Numb"/></block><block s="setHeading"><block var="Rot"/></block><block s="forward"><block var="Numb"/></block></script><block s="reportVariadicEquals"><list><block var="Shape"/><l></l></list></block><script></script><block s="reportVariadicEquals"><list><block var="Shape"/><l></l></list></block><script></script><block s="reportVariadicEquals"><list><block var="Shape"/><l></l></list></block><script></script><block s="reportVariadicEquals"><list><block var="Shape"/><l></l></list></block><script></script><block s="reportVariadicEquals"><list><block var="Shape"/><l></l></list></block><script></script><block s="reportVariadicEquals"><list><block var="Shape"/><l></l></list></block><script></script><block s="reportVariadicEquals"><list><block var="Shape"/><l></l></list></block><script></script><block s="reportVariadicEquals"><list><block var="Shape"/><l>My self</l></list></block><script><block s="gotoXY"><block var="X"/><block var="Y"/></block><block s="doStamp"></block></script></list></block><block s="up"></block><block s="gotoXY"><block var="Last x"/><block var="Last y"/></block><block s="setSize"><block var="Last pen size"/></block><block s="setHeading"><block var="Last dir"/></block></script></block></script><scripts><comment x="197.08902994791669" y="122.74999999999926" w="90" collapsed="false">Draws an object along the XY graph</comment></scripts></block-definition><block-definition s="[] Variable/List Blocks $arrowDown" type="command" category="Ace’s blocks" space="true"><header></header><code></code><translations></translations><inputs></inputs></block-definition><block-definition s="create %&apos;list&apos; that contains %&apos;Input 2&apos;" type="command" category="Ace’s blocks" space="true"><header></header><code></code><translations></translations><inputs><input type="%upvar" initial="1"></input><input type="%mult%s" separator="and" initial="1" min="1"></input></inputs><script><block s="doIfElse"><block s="reportIsA"><block var="Input 2"/><l><option>list</option></l></block><script><block s="doSetVar"><l>list</l><block var="Input 2"/></block></script><script><block s="doSetVar"><l>list</l><block s="reportNewList"><list><block var="Input 2"/></list></block></block></script><comment w="90" collapsed="false">Creates a list with the selected inputs</comment></block></script></block-definition><block-definition s="[] Misc Blocks $arrowDown" type="command" category="Ace’s blocks" space="true"><header></header><code></code><translations></translations><inputs></inputs></block-definition><block-definition s=": %&apos;input&apos; %&apos;Script&apos;" type="command" category="Ace’s blocks"><header></header><code></code><translations></translations><inputs><input type="%txt" initial="1">This is a comment</input><input type="%cs" initial="1"></input></inputs><script><block s="doRun"><block var="Script"/><list></list></block></script></block-definition><block-definition s="Velocity and friction" type="command" category="Ace’s blocks"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doSwitchToCostume"><l><option>Turtle</option></l><comment w="118.33333333333334" collapsed="true">Movement controls</comment></block><block s="gotoXY"><l>0</l><l>0</l></block><block s="doSetVar"><l>Friction</l><l>0.8</l><comment w="149.40277777777786" collapsed="false">The closer this is to 1 the less friction there will be</comment></block><block s="doSetVar"><l>vel</l><block s="reportNewList"><list><l>0</l><l>0</l></list></block></block><block s="doForever"><script><block s="doChangeVar"><l>vel</l><custom-block s="unit of %s"><block s="reportNewList"><list><block s="reportDifference"><block s="reportKeyPressed"><l><option>d</option></l></block><block s="reportKeyPressed"><l><option>a</option></l></block></block><block s="reportDifference"><block s="reportKeyPressed"><l><option>w</option></l></block><block s="reportKeyPressed"><l><option>s</option></l></block></block></list></block></custom-block></block><block s="doSetVar"><l>vel</l><block s="reportVariadicProduct"><list><custom-block s="unit of %s"><block var="vel"/></custom-block><block s="reportVariadicMin"><list><custom-block s="magnitude of %s"><block var="vel"/></custom-block><l>10</l></list></block></list></block><comment w="90" collapsed="true">cap velocity</comment></block><block s="doSetVar"><l>vel</l><block s="reportVariadicProduct"><list><block var="vel"/><block var="Friction"/></list></block></block><custom-block s="move by %l"><block var="vel"/></custom-block><block s="bounceOffEdge"></block></script></block></script></block-definition><block-definition s="unit of %&apos;vec&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true" initial="1">vector</input></inputs><script><block s="doIf"><block s="reportVariadicEquals"><list><custom-block s="magnitude of %s"><block var="vec"/></custom-block><l>0</l></list></block><script><block s="doReport"><block var="vec"/></block></script><list></list></block><block s="doReport"><block s="reportQuotient"><block var="vec"/><custom-block s="magnitude of %s"><block var="vec"/></custom-block></block></block></script></block-definition><block-definition s="magnitude of %&apos;vec&apos;" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true" initial="1">vector</input></inputs><script><block s="doReport"><block s="reportPower"><block s="reportVariadicSum"><block s="reportPower"><block var="vec"/><l>2</l></block></block><l>.5</l></block></block></script></block-definition><block-definition s="$flash sort %&apos;data&apos; ordering with %&apos;function&apos;" type="reporter" category="lists"><comment x="0" y="0" w="161.14285714285708" collapsed="false">Reports a sorted version of the list in its first input slot, using the comparison function in the second input slot.  For a list of numbers, using &lt; as the comparison function will sort from low to high; using &gt; will sort from high to low.</comment><header></header><code></code><translations>ca:ordena _ segons criteri _&#xD;pl:$flash sortuj _ za pomocą _&#xD;</translations><inputs><input type="%l"></input><input type="%predRing"></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>lst_sort(list, fn)</l><list><block var="data"/><block var="function"/></list></block></block></script></block-definition><block-definition s="$flash assoc %&apos;key&apos; %&apos;a-list&apos;" type="reporter" category="lists"><comment x="0" y="0" w="289.3333333333333" collapsed="false">The second input is an &quot;association list,&quot; a list of two-item lists.  Each of those smaller lists has a &quot;key&quot; as its first item and a &quot;value&quot; as its second.  ASSOC reports the first key-value pair in the association list whose key matches the first input.</comment><header></header><code></code><translations>ca:associació _ _&#xD;pl:$flash skojarz _ _&#xD;</translations><inputs><input type="%s"></input><input type="%l"></input></inputs><script><block s="doReport"><block s="reportAtomicFindFirst"><block s="reifyPredicate"><autolambda><block s="reportVariadicEquals"><list><block var="key"/><block s="reportListItem"><l>1</l><l/></block></list></block></autolambda><list></list></block><block var="a-list"/></block></block></script></block-definition><block-definition s="%&apos;#&apos; for each %&apos;item&apos; of %&apos;data&apos; %&apos;action&apos;" type="command" category="lists"><comment x="0" y="0" w="228.57142857142858" collapsed="false">This block carries out the given script for each item of the given list, like the primitive FOR EACH.&#xD;&#xD;What&apos;s different is that it provides the # variable, which will contain the item number in the list of each item in turn, 1 while processing item 1, and so on.</comment><header></header><code></code><translations>ca:_ per cada _ de _ _&#xD;pl:_ dla każdego _ z _ _&#xD;</translations><inputs><input type="%upvar"></input><input type="%upvar"></input><input type="%l"></input><input type="%ca"></input></inputs><script><block s="doForEach"><l>inner item</l><block var="data"/><script><block s="doSetVar"><l>item</l><block var="inner item"/></block><block s="doChangeVar"><l>#</l><l>1</l></block><block s="doRun"><block var="action"/><list></list></block></script></block></script></block-definition><block-definition s="☠︎ linked? %&apos;data&apos;" type="predicate" category="lists" helper="true"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>lst_linked(list)</l><list><block var="data"/></list></block></block></script></block-definition><block-definition s="☠︎ link %&apos;data&apos;" type="reporter" category="lists" helper="true"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doIf"><block s="reportListIsEmpty"><block var="data"/></block><script><block s="doReport"><block var="data"/></block></script><list></list></block><block s="doReport"><block s="reportCONS"><block s="reportListItem"><l>1</l><block var="data"/></block><block s="reportCDR"><block var="data"/></block></block></block></script></block-definition><block-definition s="printable %&apos;data&apos;" type="reporter" category="lists"><comment x="0" y="0" w="188.66666666666666" collapsed="false">Takes a (possibly deep) list as input,&#xD;and reports a human-readable text form &#xD;of the list (namely, Lisp notation).&#xD;&#xD;Will not work on circular lists.</comment><header></header><code></code><translations>ca:notació textual de _&#xD;pl:tekstowa _&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="data"/><l><option>list</option></l></block></block><script><block s="doReport"><block var="data"/></block></script><list></list></block><block s="doIf"><block s="reportListIsEmpty"><block var="data"/></block><script><block s="doReport"><l>()</l></block></script><list></list></block><block s="doReport"><block s="reportJoinWords"><list><l>(</l><block s="reportAtomicCombine"><block s="reportMap"><block s="reifyReporter"><autolambda><custom-block s="printable %l"><l/></custom-block></autolambda><list></list></block><block var="data"/></block><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l></l><l> </l><l></l></list></block></autolambda><list></list></block></block><l>)</l></list></block></block></script></block-definition><block-definition s="sentence %&apos;phrase&apos;" type="reporter" category="lists"><comment x="0" y="0" w="302.6666666666667" collapsed="false">SENTENCE is the main constructor for sentences, represented&#xD;as lists of words.  It takes zero or more inputs, each of which can&#xD;be either a list or a text string.  If a list, the input is assumed to be&#xD;a list of words.  If a text string, it is converted to a list of words using&#xD;SENTENCE→LIST.  Then all the lists of words are appended to form a new list of words.&#xD;&#xD;If the inputs are lists of lists rather than lists of words, SENTENCE,&#xD;like APPEND, does only one level of flattening, reporting a list of&#xD;all the items of all the input lists.</comment><header></header><code></code><translations>ca:frase _&#xD;pl:zdanie _&#xD;</translations><inputs><input type="%mult%s"></input></inputs><script><block s="doReport"><block s="reportConcatenatedLists"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportIsA"><l></l><l><option>list</option></l></block><l></l><custom-block s="sentence $arrowRight list %txt"><l></l></custom-block></block></autolambda><list></list></block><block var="phrase"/></block></block></block></script></block-definition><block-definition s="$flash zip %&apos;lists&apos;" type="reporter" category="lists"><comment x="0" y="0" w="192" collapsed="false">ZIP takes any number of lists as inputs.  The lists should all be the same length.  ZIP reports a list of lists in which the first item is a list of all the first items, the second item is a list of all the second items, etc.&#xD;Viewing the inputs as the rows of a matrix, ZIP reports its transpose.</comment><header></header><code></code><translations>pl:$flash spakuj _&#xD;</translations><inputs><input type="%mult%l"></input></inputs><script><block s="doReport"><block s="reportListAttribute"><l><option>columns</option></l><block var="lists"/></block></block></script></block-definition><block-definition s="%&apos;x&apos;" type="reporter" category="lists"><comment x="0" y="0" w="105.33333333333333" collapsed="false">The identity function reports its input.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block var="x"/></block></script></block-definition><block-definition s="multimap %&apos;function&apos; over %&apos;lists&apos;" type="reporter" category="lists"><comment x="0" y="0" w="267.3333333333333" collapsed="false">Takes as input a function of N inputs and N lists.&#xD;The function is called with item 1 of all the lists as its inputs, with item 2 of all the lists as its inputs, and so on.  (The lists should all be the same length.)</comment><header></header><code></code><translations>ca:multi-mapeja _ sobre _&#xD;pl:mapuj wielokrotnie _ na _&#xD;</translations><inputs><input type="%repRing"></input><input type="%mult%l"></input></inputs><script><block s="doReport"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="evaluate"><block var="function"/><custom-block s="%s"><l></l></custom-block></block></autolambda><list></list></block><custom-block s="$flash zip %mult%l"><block var="lists"/></custom-block></block></block></script></block-definition><block-definition s="sentence $arrowRight list %&apos;text&apos;" type="reporter" category="operators"><comment x="0" y="0" w="196" collapsed="false">Takes a sentence in text string form and reports the sentence as a list of its words.</comment><header></header><code></code><translations>de:Satz $arrowRight Liste _&#xD;ca:frase $arrowRight llista _&#xD;es:frase $arrowRight lista _&#xD;fr:phrase $arrowRight liste _&#xD;pt:uma lista com as palavras da frase _&#xD;pl:zdanie $arrowRight lista _&#xD;</translations><inputs><input type="%txt"></input></inputs><script><block s="doReport"><block s="reportAtomicKeep"><block s="reifyPredicate"><autolambda><block s="reportNot"><block s="reportVariadicEquals"><list><block s="reportTextAttribute"><l><option>length</option></l><l></l></block><l>0</l></list></block></block></autolambda><list></list></block><block s="reportTextSplit"><block var="text"/><l><option>whitespace</option></l></block></block></block></script></block-definition><block-definition s="bounce off %&apos;object&apos;" type="command" category="motion"><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true" initial="1"><options>§_clonablesMenu</options></input></inputs><script><block s="doIf"><block s="reportTouchingObject"><block var="object"/></block><script><block s="doIfElse"><block s="reportVariadicGreaterThan"><list><block s="reportMonadic"><l><option>abs</option></l><block s="reportDifference"><block s="xPosition"></block><block s="reportAttributeOf"><l><option>x position</option></l><block var="object"/></block></block></block><block s="reportMonadic"><l><option>abs</option></l><block s="reportDifference"><block s="yPosition"></block><block s="reportAttributeOf"><l><option>y position</option></l><block var="object"/></block></block></block></list></block><script><block s="setHeading"><block s="reportVariadicProduct"><list><block s="direction"></block><l>-1</l></list></block></block></script><script><block s="setHeading"><block s="reportDifference"><l>180</l><block s="direction"></block></block></block></script></block></script><list></list></block></script></block-definition><block-definition s="%&apos;dot&apos; $nl" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%mult%n" separator="*" collapse="dot" initial="2"></input></inputs><script><block s="doReport"><block s="reportVariadicSum"><block s="reportVariadicProduct"><block var="dot"/></block></block></block></script></block-definition><block-definition s="Physics with: $nl Weight: %&apos;Weight&apos; $nl Elasticity: %&apos;elasticity&apos; $nl Friction: %&apos;friction&apos;" type="command" category="motion"><header></header><code></code><translations></translations><inputs><input type="%n" initial="1">0.25</input><input type="%n" initial="1">0.75</input><input type="%n" initial="1">0.9</input></inputs><script><block s="doSetVar"><l>Weight</l><block var="Weight"/><comment w="175.5" collapsed="true">This seems self explanatory…</comment></block><block s="doSetVar"><l>Elasticity</l><block var="elasticity"/><comment w="385" collapsed="true">Controls how bouncy an object is: 0 = no bounce. While 0.99 = high bounce</comment></block><block s="doSetVar"><l>friction</l><block var="friction"/><comment w="461.236328125" collapsed="true">The closer to 1 the less friction there is, although this sadly interferes with angular velocity.</comment></block><block s="doForever"><script><block s="doDeclareVariables"><list><l>Angled bounce</l></list></block><block s="doSetVar"><l>Angled bounce</l><block s="reportVariadicProduct"><list><block s="reportMonadic"><l><option>sin</option></l><block s="reportVariadicSum"><list><block s="direction"></block><l>90</l></list></block></block><block s="reportMonadic"><l><option>abs</option></l><block var="Yvel"/></block></list></block><comment w="139.10097656250014" collapsed="false">Angled bouncing, duh… (this also creates the “rocking” motion when the objects are stabilizing.)</comment></block><block s="doSetVar"><l>Target angle</l><block s="reportVariadicProduct"><list><block s="reportRound"><block s="reportQuotient"><block s="direction"></block><l>90</l></block></block><l>90</l></list></block></block><block s="turn"><block var="Angular velocity"/><comment w="139.10097656250014" collapsed="false">These three movement blocks are just for execution from the big brain scripts.</comment></block><block s="changeYPosition"><block var="Yvel"/></block><block s="changeXPosition"><block var="Xvel"/></block><block s="doIf"><block s="reportVariadicLessThanOrEquals"><list><block s="yPosition"></block><block s="reportVariadicSum"><list><block s="reportAttributeOf"><l><option>bottom</option></l><l>Stage</l></block><block s="reportQuotient"><block s="reportAttributeOf"><l><option>height</option></l><block s="reportObject"><l><option>myself</option></l></block></block><l>2</l></block></list></block></list></block><script><block s="doChangeVar"><l>Angular velocity</l><block s="reportVariadicProduct"><list><block s="reportMonadic"><l><option>sin</option></l><block s="reportDifference"><block var="Target angle"/><block s="direction"></block></block></block><l>0.45</l></list></block><comment w="122" collapsed="false">Change my rotation, yes that’s literally it…</comment></block></script><list></list><comment w="144.5" collapsed="false">“If touching the bottom of the canvas” do the following:</comment></block><block s="doSetVar"><l>Angular velocity</l><block s="reportQuotient"><block var="Angular velocity"/><block var="Air resistance"/></block><comment w="183.5" collapsed="true">Slow down from atmospheric drag.</comment></block><block s="doSetVar"><l>Xvel</l><block s="reportQuotient"><block var="Xvel"/><block var="Air resistance"/></block><comment w="183.5" collapsed="true">Slow down from atmospheric drag.</comment></block><block s="doSetVar"><l>Yvel</l><block s="reportQuotient"><block var="Yvel"/><block var="Air resistance"/></block><comment w="183.5" collapsed="true">Slow down from atmospheric drag.</comment></block><block s="doIf"><block s="reportNot"><custom-block s="%txt in stage?"><block s="reportObject"><l><option>myself</option></l></block><comment w="80" collapsed="false">If an object somehow bugs out of the stage. This brings the object back.</comment></custom-block></block><script><block s="bounceOffEdge"></block><block s="doSetVar"><l>Xvel</l><block s="reportVariadicProduct"><list><block s="reportMonadic"><l><option>neg</option></l><block var="Xvel"/></block><block var="Elasticity"/></list></block></block><block s="doSetVar"><l>Yvel</l><block s="reportVariadicProduct"><list><block var="Yvel"/><block var="Friction"/></list></block></block></script><list></list></block><block s="doIf"><block s="reportVariadicGreaterThanOrEquals"><list><block s="yPosition"></block><block s="reportDifference"><block s="reportAttributeOf"><l><option>top</option></l><l>Stage</l></block><block s="reportQuotient"><block s="reportAttributeOf"><l><option>height</option></l><block s="reportObject"><l><option>myself</option></l></block></block><l>2</l></block></block></list></block><script><block s="setYPosition"><block s="reportDifference"><block s="reportDifference"><block s="reportAttributeOf"><l><option>top</option></l><l>Stage</l></block><block s="reportQuotient"><block s="reportAttributeOf"><l><option>height</option></l><block s="reportObject"><l><option>myself</option></l></block></block><l>2</l></block></block><l>0.5</l></block><comment w="126" collapsed="true">Stay inside the stage</comment></block><block s="doSetVar"><l>Yvel</l><block s="reportVariadicProduct"><list><block s="reportMonadic"><l><option>neg</option></l><block var="Yvel"/></block><block var="Elasticity"/></list></block><comment w="80" collapsed="true">Bounce</comment></block><block s="doSetVar"><l>Xvel</l><block s="reportVariadicProduct"><list><block var="Xvel"/><block var="friction"/></list></block><comment w="148.5" collapsed="true">Slow down from friction</comment></block><block s="doChangeVar"><l>Angular velocity</l><block s="reportVariadicProduct"><list><block var="Angled bounce"/><l>0.8</l></list></block><comment w="150" collapsed="true">Bounce from current angle</comment></block><block s="doChangeVar"><l>Xvel</l><block s="reportVariadicProduct"><list><block var="Angled bounce"/><l>0.5</l></list></block><comment w="176.5" collapsed="true">Move along the “bounced angle”</comment></block></script><list><block s="reportVariadicLessThanOrEquals"><list><block s="yPosition"></block><block s="reportVariadicSum"><list><block s="reportAttributeOf"><l><option>bottom</option></l><l>Stage</l></block><block s="reportQuotient"><block s="reportAttributeOf"><l><option>height</option></l><block s="reportObject"><l><option>myself</option></l></block></block><l>2</l></block></list></block></list><comment w="252" collapsed="false">“If touching the bottom of the canvas” do the following: (this one is supposed to be separate)</comment></block><script><block s="setYPosition"><block s="reportVariadicSum"><list><block s="reportAttributeOf"><l><option>bottom</option></l><l>Stage</l></block><block s="reportQuotient"><block s="reportAttributeOf"><l><option>height</option></l><block s="reportObject"><l><option>myself</option></l></block></block><l>2</l></block></list></block><comment w="126" collapsed="true">Stay inside the stage</comment></block><block s="doIfElse"><block s="reportVariadicGreaterThan"><list><block s="reportMonadic"><l><option>abs</option></l><block var="Yvel"/></block><l>3.5</l></list></block><script><block s="doSetVar"><l>Yvel</l><block s="reportVariadicProduct"><list><block s="reportMonadic"><l><option>neg</option></l><block var="Yvel"/></block><block var="Elasticity"/></list></block></block><block s="doChangeVar"><l>Angular velocity</l><block s="reportVariadicProduct"><list><block var="Angled bounce"/><l>0.75</l></list></block></block><block s="doChangeVar"><l>Xvel</l><block s="reportVariadicProduct"><list><block var="Angled bounce"/><l>-0.5</l></list></block></block></script><script><block s="doSetVar"><l>Yvel</l><l>0</l></block></script><comment w="132" collapsed="true">Bounce, but don’t jitter</comment></block><block s="doChangeVar"><l>Xvel</l><block s="reportVariadicProduct"><list><block var="Angular velocity"/><l>0.1</l></list></block><comment w="176.5" collapsed="true">Move along the “bounced angle”</comment></block><block s="doSetVar"><l>Xvel</l><block s="reportVariadicProduct"><list><block var="Xvel"/><block var="friction"/></list></block><comment w="148.5" collapsed="true">Slow down from friction</comment></block></script><block s="reportVariadicLessThanOrEquals"><list><block s="xPosition"></block><block s="reportVariadicSum"><list><block s="reportAttributeOf"><l><option>left</option></l><l>Stage</l></block><block s="reportQuotient"><block s="reportAttributeOf"><l><option>width</option></l><block s="reportObject"><l><option>myself</option></l></block></block><l>2</l><comment w="94.5" collapsed="false">This basically just does the same thing for “left” and “right”</comment></block></list></block></list></block><script><block s="setXPosition"><block s="reportVariadicSum"><list><block s="reportAttributeOf"><l><option>left</option></l><l>Stage</l></block><block s="reportQuotient"><block s="reportAttributeOf"><l><option>height</option></l><block s="reportObject"><l><option>myself</option></l></block></block><l>2</l></block><l>0.5</l></list></block></block><block s="doSetVar"><l>Xvel</l><block s="reportVariadicProduct"><list><block s="reportMonadic"><l><option>neg</option></l><block var="Xvel"/></block><block var="Elasticity"/></list></block></block><block s="doSetVar"><l>Yvel</l><block s="reportVariadicProduct"><list><block var="Yvel"/><block var="Friction"/></list></block></block><block s="doSetVar"><l>Angular velocity</l><block s="reportVariadicProduct"><list><block s="reportVariadicProduct"><list><block var="Angular velocity"/><l>-1</l></list></block><block var="friction"/></list></block></block><block s="doChangeVar"><l>Angular velocity</l><block s="reportVariadicProduct"><list><block var="Angled bounce"/><l>0.8</l></list></block></block><block s="doChangeVar"><l>Yvel</l><block s="reportVariadicProduct"><list><block var="Angled bounce"/><l>0.5</l></list></block></block></script><block s="reportVariadicGreaterThanOrEquals"><list><block s="xPosition"></block><block s="reportDifference"><block s="reportAttributeOf"><l><option>right</option></l><l>Stage</l></block><block s="reportQuotient"><block s="reportAttributeOf"><l><option>width</option></l><block s="reportObject"><l><option>myself</option></l></block></block><l>2</l></block></block></list></block><script><block s="setXPosition"><block s="reportDifference"><block s="reportDifference"><block s="reportAttributeOf"><l><option>right</option></l><l>Stage</l></block><block s="reportQuotient"><block s="reportAttributeOf"><l><option>height</option></l><block s="reportObject"><l><option>myself</option></l></block></block><l>2</l></block></block><l>0.5</l></block></block><block s="doSetVar"><l>Xvel</l><block s="reportVariadicProduct"><list><block s="reportMonadic"><l><option>neg</option></l><block var="Xvel"/></block><block var="Elasticity"/></list></block></block><block s="doSetVar"><l>Yvel</l><block s="reportVariadicProduct"><list><block var="Yvel"/><block var="Friction"/></list></block></block><block s="doSetVar"><l>Angular velocity</l><block s="reportVariadicProduct"><list><block var="Angular velocity"/><l>-1</l></list></block></block><block s="doChangeVar"><l>Angular velocity</l><block s="reportVariadicProduct"><list><block var="Angled bounce"/><l>0.8</l></list></block></block><block s="doChangeVar"><l>Yvel</l><block s="reportVariadicProduct"><list><block var="Angled bounce"/><l>0.5</l></list></block></block></script><l><bool>true</bool></l><script><block s="doChangeVar"><l>Yvel</l><block s="reportVariadicProduct"><list><block var="Gravity"/><block var="Weight"/></list></block><comment w="230" collapsed="true">The gravity, simple enough to understand…</comment></block></script></list><comment w="126" collapsed="false">“If touching the top of the canvas” do the following:</comment></block></script><comment w="698.3025390624998" collapsed="true">PHYSICS! This controls everything from moving up and down to what angle a bounce may be caused from the inertia the object currently has.</comment></block></script></block-definition></blocks><primitives><block-definition s="broadcast %&apos;#1&apos; %&apos;#2&apos;" type="command" category="control" selector="doBroadcast"><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true"><options>§_messagesMenu</options></input><input type="%receive" readonly="true" irreplaceable="true" expand="to&#xD;with data" max="2"></input></inputs><script><custom-block s="doBrodcast: broadcast %s %l"><block var="#1"/><block var="#2"/></custom-block><block s="doWarp"><script><block s="doForEach"><l>item</l><block s="evaluate"><custom-block s="$gearPartial message queue"></custom-block><list></list></block><script><block s="fork"><block s="reifyScript"><script><block s="doRun"><block var="item"/><list><block var="#1"/><block s="reportNewList"><list><block s="reportIfElse"><block s="reportVariadicOr"><list><block s="reportVariadicEquals"><list><block s="reportJoinWords"><list><block s="reportListItem"><l>1</l><block var="#2"/></block></list></block><l>all</l></list></block><block s="reportVariadicEquals"><list><block s="reportListItem"><l>1</l><block var="#2"/></block><l></l></list></block></list></block><block s="reportCONS"><block s="reportGet"><l><option>stage</option></l></block><block s="reportAskFor"><block s="reportGet"><l><option>stage</option></l></block><block s="reifyReporter"><autolambda><block s="reportGet"><l><option>other sprites</option></l></block></autolambda><list></list></block><list></list></block></block><block s="reportObject"><block s="reportListItem"><l>1</l><block var="#2"/></block></block></block><block s="reportListItem"><l>2</l><block var="#2"/></block></list></block></list></block></script><list></list></block><list></list></block></script></block><block s="doDeleteFromList"><l><option>all</option></l><block s="evaluate"><custom-block s="$gearPartial message queue"></custom-block><list></list></block></block></script></block></script></block-definition><block-definition s="broadcast %&apos;#1&apos; %&apos;#2&apos; and wait" type="command" category="control" selector="doBroadcastAndWait"><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true"><options>§_messagesMenu</options></input><input type="%receive" readonly="true" irreplaceable="true" expand="to&#xD;with data" max="2"></input></inputs><script><custom-block s="doBrodcastAndWait: broadcast %s %l and wait"><block var="#1"/><block var="#2"/></custom-block><block s="doDeclareVariables"><list><l>sig</l></list></block><block s="doSetVar"><l>sig</l><block s="reportBoolean"><l><bool>false</bool></l></block></block><block s="doWarp"><script><block s="doForEach"><l>item</l><block s="evaluate"><custom-block s="$gearPartial message queue"></custom-block><list></list></block><script><block s="fork"><block s="reifyScript"><script><block s="doRun"><block var="item"/><list><block var="#1"/><block s="reportNewList"><list><block s="reportIfElse"><block s="reportVariadicOr"><list><block s="reportVariadicEquals"><list><block s="reportJoinWords"><list><block s="reportListItem"><l>1</l><block var="#2"/></block></list></block><l>all</l></list></block><block s="reportVariadicEquals"><list><block s="reportListItem"><l>1</l><block var="#2"/></block><l></l></list></block></list></block><block s="reportCONS"><block s="reportGet"><l><option>stage</option></l></block><block s="reportAskFor"><block s="reportGet"><l><option>stage</option></l></block><block s="reifyReporter"><autolambda><block s="reportGet"><l><option>other sprites</option></l></block></autolambda><list></list></block><list></list></block></block><block s="reportObject"><block s="reportListItem"><l>1</l><block var="#2"/></block></block></block><block s="reportListItem"><l>2</l><block var="#2"/></block></list></block></list></block><block s="doSetVar"><l>sig</l><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><list></list></block><list></list></block></script></block><block s="doDeleteFromList"><l><option>all</option></l><block s="evaluate"><custom-block s="$gearPartial message queue"></custom-block><list></list></block></block></script></block><block s="doWaitUntil"><block var="sig"/></block></script></block-definition><block-definition s="set %&apos;#1&apos; to %&apos;#2&apos;" type="command" category="variables" selector="doSetVar" primitive="doSetVar"><header></header><code></code><translations></translations><inputs><input type="%s" irreplaceable="true"><options>§_getVarNamesDict</options></input><input type="%s">0</input></inputs><script><block s="doPrimitive"><l><bool>true</bool></l><l>doSetVar</l></block></script></block-definition><block-definition s="change %&apos;#1&apos; by %&apos;#2&apos;" type="command" category="variables" selector="doChangeVar" primitive="doChangeVar"><header></header><code></code><translations></translations><inputs><input type="%s"><options>§_getVarNamesDict</options></input><input type="%n">1</input></inputs><script><block s="doPrimitive"><l><bool>true</bool></l><l>doChangeVar</l></block></script></block-definition></primitives><stage name="Stage" width="480" height="360" costume="1" color="255,255,255,1" tempo="60" threadsafe="false" penlog="false" volume="100" pan="0" lines="flat" ternary="false" hyperops="true" codify="false" inheritance="true" sublistIDs="false" id="3763"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAB4KADAAQAAAABAAABaAAAAAAHwbojAAAL30lEQVR4Ae3QMQEAAADCoPVPbQwfiEBhwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGPgMDI3+AAEeFvcCAAAAAElFTkSuQmCC</pentrails><costumes><list id="3764"><item><ref mediaID="Physics engine v1.0_Stage_cst_Untitled"></ref></item></list></costumes><sounds><list struct="atomic" id="3765"></list></sounds><variables></variables><blocks></blocks><scripts></scripts><sprites select="4"><sprite name="Obj magnet" idx="2" x="-803.5" y="126" heading="90" scale="1" volume="100" pan="0" rotation="1" draggable="false" costume="1" color="196,196,196,0.5" pen="tip" id="3770"><costumes><list id="3771"><item><ref mediaID="Physics engine v1.0_Obj magnet_cst_costume"></ref></item></list></costumes><sounds><list struct="atomic" id="3772"></list></sounds><blocks></blocks><variables><variable name="Last pos"><l>0</l></variable></variables><scripts><script x="20" y="10"><block s="receiveGo"></block><block s="goToLayer"><l><option>back</option></l><comment w="250.5" collapsed="true">For visual, and more important than you’d think.</comment></block><block s="setEffect"><l><option>ghost</option></l><l>85</l></block><block s="show"></block><block s="doSetGlobalFlag"><l><option>flat line ends</option></l><l><bool>true</bool></l><comment w="277.5" collapsed="true">This just makes the little “connect” lines look cleaner</comment></block><block s="doForever"><script><block s="doGotoObject"><l><option>mouse-pointer</option></l><comment w="106.5" collapsed="true">Self explanatory</comment></block><block s="clear"><comment w="542" collapsed="true">This little block prevents the “connected” lines from repeating over and over again when grabbing an object</comment></block><block s="doIf"><block s="reportMouseDown"></block><script><block s="doSetVar"><l>Grabbed objects</l><block s="reportGet"><l><option>neighbors</option></l></block><comment w="398.5" collapsed="true">This creates a list of the surrounding objects “the ones around the little magnet”</comment></block><block s="doWarp"><script><block s="setPenColorDimension"><l><option>transparency</option></l><l>50</l></block><block s="clear"><comment w="270" collapsed="true">Failsafe for when starting the script. (But unneeded)</comment></block><block s="doFor"><l>i</l><l>1</l><block s="reportListAttribute"><l><option>length</option></l><block s="reportGet"><l><option>neighbors</option></l></block></block><script><block s="doTellTo"><block s="reportListItem"><block var="i"/><block var="Grabbed objects"/></block><block s="reifyScript"><script><block s="doDeclareVariables"><list><l>Dist</l><l>Grab force</l></list></block><block s="turn"><l>1</l></block><block s="doSetVar"><l>Dist</l><block s="reportVariadicMax"><list><block s="reportRelationTo"><l><option>distance</option></l><block s="reportListItem"><block var="i"/><block var="Grabbed objects"/></block></block><l>10</l></list></block></block><block s="doSetVar"><l>Grab force</l><block s="reportQuotient"><l>400</l><block s="reportVariadicProduct"><list><block var="Dist"/><block var="Dist"/></list></block><comment w="80" collapsed="false">400 is highly recommended. The lower the better.</comment></block></block><block s="doChangeVar"><l>Xvel</l><block s="reportMonadic"><l><option>neg</option></l><block s="reportQuotient"><block s="reportDifference"><block s="reportAttributeOf"><l><option>x position</option></l><block s="reportListItem"><block var="i"/><block var="Grabbed objects"/></block></block><block s="reportMouseX"></block></block><block s="reportVariadicProduct"><list><block var="Dist"/><block var="Grab force"/></list></block></block></block></block><block s="doChangeVar"><l>Yvel</l><block s="reportMonadic"><l><option>neg</option></l><block s="reportQuotient"><block s="reportDifference"><block s="reportAttributeOf"><l><option>y position</option></l><block s="reportListItem"><block var="i"/><block var="Grabbed objects"/></block></block><block s="reportMouseY"></block></block><block s="reportVariadicProduct"><list><block var="Dist"/><block var="Grab force"/></list></block></block></block></block></script><list></list></block><list></list><comment w="92" collapsed="false">This tells the objects to start magneticly moving towards the mouse pointer</comment></block><block s="down"></block><block s="doGotoObject"><block s="reportListItem"><block var="i"/><block s="reportGet"><l><option>neighbors</option></l></block></block></block><block s="up"></block><block s="doGotoObject"><l><option>mouse-pointer</option></l></block></script><comment w="232" collapsed="true">Basically a “for each object near me, do this:”</comment></block></script><comment w="332" collapsed="true">This makes the lines instant, instead of lag inducing and jittery</comment></block></script><list></list><comment w="142.5" collapsed="true">Starts the grab script.</comment></block></script><comment w="195" collapsed="true">This is the pickup/magnet script</comment></block></script></scripts></sprite><sprite name="Engine" idx="1" x="0" y="750" heading="90" scale="1" volume="100" pan="0" rotation="1" draggable="false" hidden="true" costume="0" color="80,80,80,1" pen="tip" id="3926"><costumes><list struct="atomic" id="3927"></list></costumes><sounds><list struct="atomic" id="3928"></list></sounds><blocks></blocks><variables><variable name="vel"><list struct="atomic" id="3931">-3.646942099448209e-24,-3.646942099448209e-24</list></variable></variables><scripts><script x="20" y="20"><block s="receiveGo"><comment w="80" collapsed="false">This just creates the “rules” for other objects to follow</comment></block><block s="gotoXY"><l>0</l><l>750</l></block><block s="doSetVar"><l>Gravity</l><l>-1</l></block><block s="doSetVar"><l>Air resistance</l><l>1.005</l></block><block s="hide"></block></script><comment x="20" y="153.83333333333337" w="343.5" collapsed="false">This project is far from done, (But not too far!) and will likely take a while for the bug-less, enjoyable, and functional project I am planning to make. In the mean time I will continue to update this and build onto it day-by-day. I envision a physics sandbox style game with game mechanics and building. In the meantime this will be a basic little “magnetic boxes” project.</comment></scripts></sprite><sprite name="Object#(1)" idx="3" x="196.69570668992287" y="-153.72718425777032" heading="359.955241956407" scale="0.5" volume="100" pan="0" rotation="1" draggable="false" costume="1" color="0,91.8,80.78399999999999,1" pen="tip" id="3944"><costumes><list id="3945"><item><ref mediaID="Physics engine v1.0_Object#(1)_cst_Untitled"></ref></item></list></costumes><sounds><list struct="atomic" id="3946"></list></sounds><blocks></blocks><variables><variable name="Elasticity"><l>0.75</l></variable><variable name="Weight"><l>0.25</l></variable><variable name="friction"><l>0.9</l></variable><variable name="Yvel"><l>-0.25</l></variable><variable name="Xvel"><l>0.0005136085056911399</l></variable><variable name="Last X"><l>0</l></variable><variable name="Last Y"><l>0</l></variable><variable name="Friction"><l>0</l></variable><variable name="Dist"><l>10</l></variable><variable name="Angular velocity"><l>0.004570192823644719</l></variable><variable name="Target angle"><l>360</l></variable></variables><scripts><script x="30" y="30"><block s="receiveGo"></block><block s="setScale"><l>50</l></block><block s="doGotoObject"><l><option>random position</option></l><comment w="413" collapsed="true">These 2 blue movement blocks just control the start and where the object faces</comment></block><block s="setHeading"><l><option>random</option></l></block><block s="doSetVar"><l>Yvel</l><l>0</l><comment w="199" collapsed="true">Controls “up” and “down” movement</comment></block><block s="doSetVar"><l>Xvel</l><l>0</l><comment w="199" collapsed="true">Controls “left” and “right” movement</comment></block><block s="doSetVar"><l>Angular velocity</l><l>0</l><comment w="357.5" collapsed="true">Basically; just rotation. Complexly; the rotational inertia while moving</comment></block><custom-block s="Physics with: %br Weight: %n %br Elasticity: %n %br Friction: %n"><l>0.25</l><l>0.75</l><l>0.9</l></custom-block></script></scripts></sprite><sprite name="Object#(2)" idx="4" x="-15.480953037866584" y="-51.22477321459098" heading="235.7544693706468" scale="0.5" volume="100" pan="0" rotation="1" draggable="false" costume="1" color="0,91.8,80.78399999999999,1" pen="tip" id="3970"><costumes><list id="3971"><item><ref mediaID="Physics engine v1.0_Object#(2)_cst_Untitled"></ref></item></list></costumes><sounds><list struct="atomic" id="3972"></list></sounds><blocks></blocks><variables><variable name="Elasticity"><l>0.5</l></variable><variable name="Weight"><l>0.25</l></variable><variable name="friction"><l>0.9</l></variable><variable name="Yvel"><l>-1.4136620080951037</l></variable><variable name="Xvel"><l>0.6013770807508269</l></variable><variable name="Last X"><l>0</l></variable><variable name="Last Y"><l>0</l></variable><variable name="Friction"><l>0</l></variable><variable name="Dist"><l>10</l></variable><variable name="Angular velocity"><l>0.27831284585730726</l></variable><variable name="Target angle"><l>270</l></variable></variables><scripts><script x="30" y="30"><block s="receiveGo"></block><block s="setScale"><l>50</l></block><block s="doGotoObject"><l><option>random position</option></l><comment w="413" collapsed="true">These 2 blue movement blocks just control the start and where the object faces</comment></block><block s="setHeading"><l><option>random</option></l></block><block s="doSetVar"><l>Yvel</l><l>0</l><comment w="199" collapsed="true">Controls “up” and “down” movement</comment></block><block s="doSetVar"><l>Xvel</l><l>0</l><comment w="199" collapsed="true">Controls “left” and “right” movement</comment></block><block s="doSetVar"><l>Angular velocity</l><l>0</l><comment w="357.5" collapsed="true">Basically; just rotation. Complexly; the rotational inertia while moving</comment></block><custom-block s="Physics with: %br Weight: %n %br Elasticity: %n %br Friction: %n"><l>0.01</l><l>0.5</l><l>0.8</l><comment w="150" collapsed="false">This is inside a block to reduce lag while this is running</comment></custom-block></script></scripts></sprite><watcher var="Elasticity" style="normal" x="10.000000000003183" y="52.00000400000012" color="243,118,29" hidden="true"/><watcher var="Weight" style="normal" x="10.000000000003183" y="73.00000599999986" color="243,118,29" hidden="true"/><watcher var="friction" style="normal" x="10.000000000003183" y="94.00000799999998" color="243,118,29" hidden="true"/><watcher var="Yvel" style="normal" x="10.000000000003183" y="115.00000999999969" color="243,118,29" hidden="true"/><watcher var="Xvel" style="normal" x="10.000000000003183" y="136.00001199999986" color="243,118,29" hidden="true"/><watcher var="Last X" style="normal" x="10.000000000003183" y="157.00001400000016" color="243,118,29" hidden="true"/><watcher var="Last Y" style="normal" x="10.000000000003183" y="178.00001600000067" color="243,118,29" hidden="true"/><watcher scope="Obj magnet" var="Last pos" style="normal" x="10.000000000003183" y="199.0000180000002" color="243,118,29" hidden="true"/><watcher var="Grabbed objects" style="normal" x="10.000000000003183" y="220.00002000000006" color="243,118,29" hidden="true"/><watcher var="Friction" style="normal" x="10.000000000003183" y="262.0000239999999" color="243,118,29" hidden="true"/><watcher var="Air resistance" style="slider" min="1" max="100" x="101.99999999999534" y="6.000021999999966" color="243,118,29" hidden="true"/><watcher var="Gravity" style="slider" min="-1" max="1" x="-3.999999999994998" y="0.000002000000055346618" color="243,118,29" hidden="true"/><watcher var="Angular velocity" style="normal" x="1.000000000002501" y="37.5" color="243,118,29" hidden="true"/><watcher var="Target angle" style="normal" x="10.000000000000568" y="10.000000000000036" color="243,118,29" hidden="true"/></sprites></stage><variables><variable name="Gravity"><l>-1</l></variable><variable name="Grabbed objects"><list struct="atomic" id="4011"></list></variable><variable name="Air resistance"><l>1.005</l></variable></variables></scene></scenes></project><media name="Physics engine v1.0" app="Snap! 11.0.8, https://snap.berkeley.edu" version="2"><costume name="Untitled" center-x="240" center-y="180" image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAB4KADAAQAAAABAAABaAAAAAAHwbojAAAOjklEQVR4Ae3VUQkAMQwFweuZin9lLVRE92di4MEQ2DUz+3MECBAgQIDAU4H/6ZoxAgQIECBA4AoIsEcgQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQIDAAUP/BHR+KAxgAAAAAElFTkSuQmCC" mediaID="Physics engine v1.0_Stage_cst_Untitled"/><costume name="costume" center-x="29.5" center-y="29.5" image="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHNuYXA9Imh0dHA6Ly9zbmFwLmJlcmtlbGV5LmVkdS9ydW4iIHZlcnNpb249IjEuMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSBtZWV0IiB2aWV3Qm94PSI2MTguNSAyNzcgNTkgNTkiIHdpZHRoPSI1OSIgaGVpZ2h0PSI1OSI+PGVsbGlwc2Ugc3Ryb2tlPSJyZ2IoMjU1LDI1NSwyNTUpIiBzdHJva2UtbGluZWpvaW49Im1pdGVyIiBzdHJva2Utd2lkdGg9IjEwIiBmaWxsPSJyZ2IoMTk1LDE5NSwxOTUpIiBwcm90b3R5cGU9IlZlY3RvckVsbGlwc2UiIGN4PSI2NDgiIGN5PSIzMDYuNSIgcng9IjI0LjUiIHJ5PSIyNC41Ii8+PC9zdmc+" mediaID="Physics engine v1.0_Obj magnet_cst_costume"/><costume name="Untitled" center-x="52.49999999999995" center-y="53.00000000000001" image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGkAAABqCAYAAAC/Fn+UAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAaaADAAQAAAABAAAAagAAAACCNcMyAAACX0lEQVR4Ae3UwWnDQABE0VVwajC+uQOV5EJyCqSzNOAuZDVhQs7e/EOM4R++QBeN0Q7zsJbL5fIxuswLfB+WZfkyN6zb+HxrBP8CIfmNxmHWcd/3cbvdZlHPXrzAuq4PJ0yRtm0b1+v14cc9eP0CM6Q+d6/f/ekTpv+k4/E4ZqJPn9YL/rXAFOl0Oo3fu8uxQJ87hwO2CAnncYQhORywRUg4jyMMyeGALULCeRxhSA4HbBESzuMIQ3I4YIuQcB5HGJLDAVuEhPM4wpAcDtgiJJzHEYbkcMAWIeE8jjAkhwO2CAnncYQhORywRUg4jyMMyeGALULCeRxhSA4HbBESzuMIQ3I4YIuQcB5HGJLDAVuEhPM4wpAcDtgiJJzHEYbkcMAWIeE8jjAkhwO2CAnncYQhORywRUg4jyMMyeGALULCeRxhSA4HbBESzuMIQ3I4YIuQcB5HGJLDAVuEhPM4wpAcDtgiJJzHEYbkcMAWIeE8jjAkhwO2CAnncYQhORywRUg4jyMMyeGALULCeRxhSA4HbBESzuMIQ3I4YIuQcB5HGJLDAVuEhPM4wpAcDtgiJJzHEYbkcMAWIeE8jjAkhwO2CAnncYQhORywRUg4jyMMyeGALULCeRxhSA4HbBESzuMIQ3I4YIuQcB5HGJLDAVuEhPM4wpAcDtgiJJzHEYbkcMAWIeE8jjAkhwO2CAnncYQhORywRUg4jyMMyeGALULCeRxhSA4HbBESzuMIQ3I4YIuQcB5HGJLDAVuEhPM4wpAcDtgiJJzHEYbkcMAWIeE8jvBwPp/fHVVq8ccC9x/NKxLAgFsLOAAAAABJRU5ErkJggg==" mediaID="Physics engine v1.0_Object#(1)_cst_Untitled"/><costume name="Untitled" center-x="52.49999999999995" center-y="53.00000000000001" image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGkAAABqCAYAAAC/Fn+UAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAaaADAAQAAAABAAAAagAAAACCNcMyAAACX0lEQVR4Ae3UwWnDQABE0VVwajC+uQOV5EJyCqSzNOAuZDVhQs7e/EOM4R++QBeN0Q7zsJbL5fIxuswLfB+WZfkyN6zb+HxrBP8CIfmNxmHWcd/3cbvdZlHPXrzAuq4PJ0yRtm0b1+v14cc9eP0CM6Q+d6/f/ekTpv+k4/E4ZqJPn9YL/rXAFOl0Oo3fu8uxQJ87hwO2CAnncYQhORywRUg4jyMMyeGALULCeRxhSA4HbBESzuMIQ3I4YIuQcB5HGJLDAVuEhPM4wpAcDtgiJJzHEYbkcMAWIeE8jjAkhwO2CAnncYQhORywRUg4jyMMyeGALULCeRxhSA4HbBESzuMIQ3I4YIuQcB5HGJLDAVuEhPM4wpAcDtgiJJzHEYbkcMAWIeE8jjAkhwO2CAnncYQhORywRUg4jyMMyeGALULCeRxhSA4HbBESzuMIQ3I4YIuQcB5HGJLDAVuEhPM4wpAcDtgiJJzHEYbkcMAWIeE8jjAkhwO2CAnncYQhORywRUg4jyMMyeGALULCeRxhSA4HbBESzuMIQ3I4YIuQcB5HGJLDAVuEhPM4wpAcDtgiJJzHEYbkcMAWIeE8jjAkhwO2CAnncYQhORywRUg4jyMMyeGALULCeRxhSA4HbBESzuMIQ3I4YIuQcB5HGJLDAVuEhPM4wpAcDtgiJJzHEYbkcMAWIeE8jjAkhwO2CAnncYQhORywRUg4jyMMyeGALULCeRxhSA4HbBESzuMIQ3I4YIuQcB5HGJLDAVuEhPM4wpAcDtgiJJzHEYbkcMAWIeE8jvBwPp/fHVVq8ccC9x/NKxLAgFsLOAAAAABJRU5ErkJggg==" mediaID="Physics engine v1.0_Object#(2)_cst_Untitled"/></media></snapdata>