diff --git a/Construct ID License Plate/Dynamic License Plate - PB.txt b/Construct ID License Plate/Dynamic License Plate - PB.txt
new file mode 100644
index 0000000..87499cc
--- /dev/null
+++ b/Construct ID License Plate/Dynamic License Plate - PB.txt
@@ -0,0 +1 @@
+{"slots":{"0":{"name":"slot1","type":{"events":[],"methods":[]}},"1":{"name":"slot2","type":{"events":[],"methods":[]}},"2":{"name":"slot3","type":{"events":[],"methods":[]}},"3":{"name":"slot4","type":{"events":[],"methods":[]}},"4":{"name":"slot5","type":{"events":[],"methods":[]}},"5":{"name":"slot6","type":{"events":[],"methods":[]}},"6":{"name":"slot7","type":{"events":[],"methods":[]}},"7":{"name":"slot8","type":{"events":[],"methods":[]}},"8":{"name":"slot9","type":{"events":[],"methods":[]}},"9":{"name":"slot10","type":{"events":[],"methods":[]}},"-1":{"name":"unit","type":{"events":[],"methods":[]}},"-3":{"name":"player","type":{"events":[],"methods":[]}},"-2":{"name":"construct","type":{"events":[],"methods":[]}},"-4":{"name":"system","type":{"events":[],"methods":[]}},"-5":{"name":"library","type":{"events":[],"methods":[]}}},"handlers":[{"code":"slot1.setScriptInput(construct.getId())","filter":{"args":[],"signature":"onStart()","slotKey":"-1"},"key":1}],"methods":[],"events":[]}
\ No newline at end of file
diff --git a/Construct ID License Plate/Dynamic License Plate - renderscript.txt b/Construct ID License Plate/Dynamic License Plate - renderscript.txt
new file mode 100644
index 0000000..e98bea6
--- /dev/null
+++ b/Construct ID License Plate/Dynamic License Plate - renderscript.txt
@@ -0,0 +1,156 @@
+local atlas = require("atlas")
+--user configurable variables
+local bgplanet = 2
+local planetsize = 400
+local outlinecolor1R, outlinecolor1G, outlinecolor1B = 0, 1.5, 1.75
+local outlinecolor2R, outlinecolor2G, outlinecolor2B = 0, 0.25, 0.5
+local outlinecolor3R, outlinecolor3G, outlinecolor3B = 0, 0.25, 0.5
+local textcolor1R, textcolor1G, textcolor1B = 1, 1, 1
+local textcolor2R, textcolor2G, textcolor2B = 3, 3, 3
+local spacebg = loadImage("assets.prod.novaquark.com/66839/ea555f35-0b6a-4c15-a4d4-d0d0b1e26927.png")
+local drawspacebg = 1
+--# Local rendering preparation
+-- Create layers
+local rear = createLayer()
+local back = createLayer()
+local front = createLayer()
+local fore = createLayer()
+
+local layer2 = createLayer()
+local platetextsize = 200
+local font1 = loadFont("Play",platetextsize)
+local font2 = loadFont("Play",platetextsize/2)
+
+local system = atlas[0]
+local rx,ry = getResolution()
+
+if drawspacebg == 1 then
+ addImage(rear, spacebg, 0, 0, rx, ry)
+end
+
+local images = {}
+local function loadImages(src)
+ for k,img in pairs(images) do
+ if k == src then return img end
+ end
+ images[src] = loadImage(src)
+ return images[src]
+end
+
+local function contains(t, u)
+ for i,v in pairs(t) do
+ if v == u then return true, i end
+ end
+ return false
+end
+
+_planets = _planets or {}
+local input, dist = getInput(), 0
+
+if not _init then
+ if not system[_select] then
+ _select = 1
+ end
+ for _,b in pairs(system) do
+ if b.systemId == 0 then
+ if b.satellites then
+ table.sort (b.satellites, function (b1, b2) return system[b1].positionInSystem < system[b1].positionInSystem end )
+ end
+ _planets[#_planets+1] = b
+ end
+ end
+ table.sort (_planets, function (b1, b2) return b1.positionInSystem < b2.positionInSystem end )
+ _init = true
+end
+
+local planet = system[_select]
+local vignette = loadImages(planet.iconPath)
+
+
+--- Draw all planets
+for i,body in pairs(_planets) do
+ -- For each planet load the icon from the atlas data
+ if i == bgplanet then
+ local img = loadImages(body.iconPath)
+ local hover = false
+ local r = planetsize
+ local bx, by = 450,350
+ local mbx = 224+(i*350)/6
+
+ if body.hasAtmosphere then
+ local atm = body.atmosphereRadius/900
+
+ setNextStrokeWidth( rear, 0.1)
+ setNextStrokeColor( rear, 1, 1, 1, 0.03)
+ setNextShadow( rear, 80, 1, 1, 1, 0.035)
+ setNextFillColor( rear, 1, 1, 1, 0.025)
+ addCircle( rear, bx, by, r)
+ end
+ --Draw planet image
+ addImage( back, img, bx-r, by-r, 2*r, 2*r)
+ --draw border
+ setNextShadow(fore,25,outlinecolor1R, outlinecolor1G, outlinecolor1B,1)
+ setNextStrokeWidth(fore,5)
+ setNextFillColor(fore,0,0,0,0)
+ addBoxRounded(fore, 25, 25, rx - 50, ry - 50, 20)
+
+ setNextShadow(fore,25,outlinecolor2R, outlinecolor2G, outlinecolor2B,1)
+ setNextFillColor(fore,textcolor1R, textcolor1G, textcolor1B,1)
+ local bndx,bndy = getTextBounds(font2,body.name[1])
+ addText(fore,font2,body.name[1],rx/2-(bndx/2),ry/2-(bndy/2)-100)
+ end
+end
+
+local baseCharacters = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
+local baseLength = #baseCharacters
+
+local floor = math.floor
+local abs = math.abs
+local sub = string.sub
+function baseEncode(x, base)
+ assert(base, "Argument 2 missing or nil")
+ assert(not (base > baseLength or base < 2), "Base not in range of 2 - " .. baseLength)
+ local returnString = ""
+ local negative = x < 0
+ if negative then
+ x = abs(x)
+ end
+ local i = 0
+ local remainder
+ while x ~= 0 do
+ i = i + 1
+ x, remainder = floor(x / base), x % base + 1
+ returnString = sub(baseCharacters, remainder, remainder) .. returnString
+ end
+ return (negative and "-" or "") .. returnString
+end
+local find = string.find
+function baseDecode(s, encodedBase)
+ if encodedBase <= 36 then
+ s = s:upper()
+ end
+
+ local positive = true
+ if sub(s, 1, 1) == "-" then
+ positive = false
+ s = sub(s, 2, -1)
+ end
+
+ local returnNumber = 0
+ local length = #s
+
+ for i = 1, length do
+ local currentCharacter = sub(s, i, i)
+ local characterValue = (find(baseCharacters, currentCharacter) - 1) * encodedBase ^ (length - i)
+ returnNumber = returnNumber + characterValue
+ end
+ return positive and returnNumber or -returnNumber
+end
+function convertBase(s, encodedBase, newBase)
+ return baseEncode(baseDecode(s, encodedBase), newBase)
+end
+local platetext = convertBase(getInput(), 10, 36)
+local bndw, bndh = getTextBounds(font1,platetext)
+setNextShadow(layer2,50,outlinecolor3R, outlinecolor3G, outlinecolor3B,1)
+setNextFillColor(layer2,textcolor2R, textcolor2G, textcolor2B,1)
+addText(layer2,font1,platetext,rx/2-(bndw/2),(ry/2)+100)
\ No newline at end of file
diff --git a/Construct ID License Plate/readme.md b/Construct ID License Plate/readme.md
new file mode 100644
index 0000000..5cee0e0
--- /dev/null
+++ b/Construct ID License Plate/readme.md
@@ -0,0 +1,24 @@
+# Dynamic Ship License Plate
+
+### Installation
+
+Copy the content of renderscript.txt into the screen you wish to use to display the license plate.
+You may either use a standalone programming board, or a control seat to set the input to the script.
+
+To use a Programming Board: Paste PB.txt into a Programming Board as a config, and link it to the screen.
+Any time the construct is compactified, the ID is regenerated, and the script input will need to be reset.
+For this reason it may be preferable to use your control seat.
+
+To use your Control Seat: Link the seat to the screen, edit the seat's Lua with CTRL+L, click Unit on the left, and then click the onStart filter.
+Paste this line into the very bottom of the onStart filter's code;
+
+[screenslot].setScriptInput(construct.getId())
+
+where [screenslot] is replaced with the slot corresponding to the screen you linked earlier.
+
+### Configuration
+
+The colors and images are all customizable. Check the first couple lines of code.
+To change the planet name and image displayed, simply change the "bgplanet" variable.
+The values of this variable correspond to the entries in atlas.json.
+For example, a value of 1 displays Madis, 2 displays Alioth, and 3 for Thades.
\ No newline at end of file
diff --git a/Conway's Game of Life/Conways Game Of Life - Renderscript.txt b/Conway's Game of Life/Conways Game Of Life - Renderscript.txt
new file mode 100644
index 0000000..cd33a3b
--- /dev/null
+++ b/Conway's Game of Life/Conways Game Of Life - Renderscript.txt
@@ -0,0 +1,122 @@
+if not init then
+ l1fontsize = 8
+ l1xoffset = -20
+ l1yoffset = 0
+ rx, ry = getResolution()
+ cx1, cy1 = math.floor(rx/l1fontsize-1), math.floor(ry/l1fontsize)
+ mem1 = {}
+ mem2 = {}
+ refresh = 1
+ for ix=1,cx1 do
+ mem1[ix] = {}
+ for iy=1,cy1 do
+ mem1[ix][iy] = math.random(math.floor(2))-1
+ if mem1[ix][iy] == 1 then
+ mem1[ix][iy] = math.random(math.floor(2))-1
+ if mem1[ix][iy] == 1 then
+ mem1[ix][iy] = math.random(math.floor(2))-1
+ if mem1[ix][iy] == 1 then
+ mem1[ix][iy] = math.random(math.floor(2))-1
+ end
+ end
+ end
+ end
+ end
+ for ix1=1,cx1 do
+ mem2[ix1] = {}
+ for iy1=1,cy1 do
+ mem2[ix1][iy1] = 0
+ end
+ end
+ init = true
+end
+
+fontL = loadFont("Play", 15)
+layer1 = createLayer()
+layer2 = createLayer()
+cursorx, cursory = getCursor()
+curx2 = math.floor(cursorx/8)+2
+cury2 = math.floor(cursory/8)+1
+
+setNextFillColor(layer2, 0.4, 0.4, 0.4, 0.3)
+addBox(layer2, 100, 100, 100, 25)
+if refresh == 1 then
+ setNextFillColor(layer2, 0, 1, 0, 0.3)
+else
+ setNextFillColor(layer2, 1, 0, 0, 1)
+end
+addText(layer2,fontL,"Pause",125,115)
+
+function updateStates()
+ for dx=1,cx1 do
+ for dy=1,cy1 do
+ --rules, in order
+ --mem2[dx][dy] = 0
+ --neighbors = 0
+ if dx > 1 and dx < cx1 then
+ if dy > 1 and dy < cy1 then
+ dx0 = dx - 1
+ dx2 = dx + 1
+ dy0 = dy - 1
+ dy2 = dy + 1
+ neighbors = mem1[dx0][dy0] + mem1[dx][dy0] + mem1[dx2][dy0] + mem1[dx0][dy] + mem1[dx2][dy] + mem1[dx0][dy2] + mem1[dx][dy2] + mem1[dx2][dy2]
+ if mem1[dx][dy] == 1 then
+ if neighbors == 2 or neighbors == 3 then
+ mem2[dx][dy] = 1
+ else
+ mem2[dx][dy] = 0
+ end
+ else
+ if neighbors == 3 then
+ mem2[dx][dy] = 1
+ else
+ mem2[dx][dy] = 0
+ end
+ end
+ end
+ end
+ end
+ end
+ mem1 = mem2
+end
+
+function DrawAllBoxes()
+ for bx=2,cx1 - 1 do
+ for by=2,cy1 - 1 do
+ if mem1[bx][by] == 1 then
+ setNextFillColor(layer1, 1, 1, 1, 1)
+ addBox(layer1, (bx*l1fontsize)+l1xoffset, (by*l1fontsize)+l1yoffset, l1fontsize, l1fontsize)
+ --addText(layer1,fontL,mem1[bx - 1][by - 1] + mem1[bx][by - 1] + mem1[bx + 1][by - 1] + mem1[bx - 1][by] + mem1[bx + 1][by] + mem1[bx - 1][by + 1] + mem1[bx][by + 1] + mem1[bx + 1][by + 1],(l1fontsize*bx)+l1xoffset, (l1fontsize*by)+l1yoffset)
+
+ --addText(layer1,fontL,mem2[bx][by],(l1fontsize*bx)+l1xoffset, (l1fontsize*by)+l1yoffset)
+ end
+ end
+ end
+end
+
+if refresh == 1 then
+ updateStates()
+end
+
+
+if getCursorReleased() then
+ if cursorx > 100 and cursorx < 200 then
+ if cursory > 100 and cursory < 125 then
+ if refresh == 1 then
+ refresh = 0
+ else
+ refresh = 1
+ end
+ end
+ end
+ if curx2 > 0 and cury2 > 0 then
+ if mem1[curx2][cury2] == 1 then
+ mem1[curx2][cury2] = 0
+ else
+ mem1[curx2][cury2] = 1
+ end
+ end
+end
+
+DrawAllBoxes()
+requestAnimationFrame(1)
\ No newline at end of file
diff --git a/Custom Font From Image/Custom Font.txt b/Custom Font From Image/Custom Font.txt
new file mode 100644
index 0000000..bb4a9fa
--- /dev/null
+++ b/Custom Font From Image/Custom Font.txt
@@ -0,0 +1,23 @@
+local customfontimage = loadImage("assets.prod.novaquark.com/66839/e294a1f0-11ae-4fa1-a5f8-aeb02288eb24.png")
+local layer1 = createLayer()
+local layer2 = createLayer()
+local font1 = loadFont("Play",20)
+local rx,ry = getResolution()
+
+setBackgroundColor(0.5,0.5,0.5)
+
+function addCustomText(drawlayer, imagehandle, textstring, xpos, ypos, size, colorr, colorg, colorb, colora)
+ destructstring = textstring
+ for ix=1,#textstring do
+ nextletter = string.sub(destructstring,1,1)
+ destructstring = string.sub(destructstring,2,string.len(destructstring))
+ nextascii = string.byte(nextletter) - 33
+
+ local subxpos = math.fmod(nextascii,32)
+ local subypos = math.floor(nextascii / 32)
+ setNextFillColor(drawlayer, colorr, colorg, colorb, colora)
+ addImageSub(drawlayer, imagehandle, xpos+(ix * (size/2)), ypos, size, size, 0 + (68*subxpos), 0 + (68 * subypos), 68, 68)
+ end
+end
+
+addCustomText(layer1, customfontimage, "This is a custom font, rendered from an image file.", 50, 150, 28, 0,0,0,1)
\ No newline at end of file
diff --git a/Custom Font From Image/customfont1.png b/Custom Font From Image/customfont1.png
new file mode 100644
index 0000000..9203087
Binary files /dev/null and b/Custom Font From Image/customfont1.png differ
diff --git a/DUOpenMarket Ad/DUOpenMarket Ad - Renderscript.txt b/DUOpenMarket Ad/DUOpenMarket Ad - Renderscript.txt
new file mode 100644
index 0000000..8bad569
--- /dev/null
+++ b/DUOpenMarket Ad/DUOpenMarket Ad - Renderscript.txt
@@ -0,0 +1,186 @@
+if not init then
+ tick = 0
+ tickmax = 100
+ hexx = 515
+ hexy = 175
+ a = 2 * math.pi / 6
+ r = 100
+ display = 1
+ displaymax = 4
+ displaytick = 0
+ displaytickmax = 175
+ init = true
+end
+local layer = createLayer()
+local layer2 = createLayer()
+local layer3 = createLayer()
+local layer4 = createLayer()
+local rx, ry = getResolution()
+local fontL = loadFont("Play", 80)
+local fontB = loadFont("Play", 70)
+local fontB2 = loadFont("Play", 71)
+local fontB3 = loadFont("Play", 72)
+local fontM = loadFont("Play", 50)
+local fontS = loadFont("Play", 40)
+local imagehandle = loadImage("assets.prod.novaquark.com/66839/b249f117-4120-472e-8c12-d84c04c28775.png")
+local imagehandle2 = loadImage("assets.prod.novaquark.com/66839/8452f802-cb36-40ec-9d26-f5530a82ac1c.png")
+
+if display == 1 then
+
+ addImage(layer, imagehandle, 0, 0, rx, ry)
+
+ --setNextFillColor(layer, 1, 0, 0, 1)
+ --addText(layer, fontS, "In Development", rx*0.02, ry*0.08)
+ --setNextFillColor(layer, 1, 0, 0, 1)
+ --addText(layer, fontS, "@EpicPhail#3860", rx*0.02, ry*0.16)
+
+ setNextShadow(layer3,15,0,0,0,1)
+ setNextFillColor(layer3, 1, 1, 1, 1)
+ addText(layer3, fontB, "DUOpenMarket", rx*0.265, ry*0.55)
+
+ setNextShadow(layer3,15,0,0,0,1)
+ setNextFillColor(layer3, 0.65, 0.65, 0.65, 1)
+ addText(layer3, fontM, "Open Source Third-Party Market API", rx*0.11, ry*0.675)
+
+ setNextFillColor(layer3, 0.65, 0.65, 0.65, 1)
+ setNextShadow(layer3,15,0,0,0,1)
+ addText(layer3, fontM, "with Discord-based login", rx*0.235, ry*0.74)
+
+ setNextShadow(layer3,15,0,0,0,1)
+ setNextFillColor(layer3, 2, 2, 0, 1)
+ addText(layer3, fontL, "https://duopenmarket.com", rx*0.025, ry*0.9)
+
+
+ setNextShadow(layer4,15,0,0,0,1)
+ setNextFillColor(layer4, 1, 0.85, 0, 1)
+ addText(layer4, fontM, "Version 1.61.1", rx*0.04, ry*0.07)
+
+ setNextShadow(layer4,15,0,0,0,1)
+ setNextFillColor(layer4, 1, 0.85, 0, 1)
+ addText(layer4, fontM, "Now Available!", rx*0.04, ry*0.17)
+
+ setLayerOrigin(layer4,rx/2,ry/2)
+ setLayerRotation(layer4,(math.pi*2)*-0.1)
+ setLayerTranslation(layer4,50,-150)
+
+ if tick > tickmax then
+ tick = 0
+ end
+ if tick > (tickmax / 2) then
+ alpha = 1-(tick/tickmax)
+ else
+ alpha = (tick/tickmax)
+ end
+ for ia=0,5 do
+ setNextShadow(layer3,20,1,0.85,0,alpha)
+ setNextStrokeWidth(layer3,15)
+ setNextStrokeColor(layer3,1,0.85,0,alpha)
+ addLine(layer3,hexx + (r + tick) * math.cos(a * ia), hexy + (r + tick) * math.sin(a * ia),hexx + (r + tick) * math.cos(a * (ia+1)), hexy + (r + tick) * math.sin(a * (ia+1)))
+ end
+ tick = tick + 1
+end
+
+if display == 2 then
+ addImage(layer, imagehandle, 0, 0, rx, ry)
+ addImage(layer2, imagehandle2, -50, -75, rx, ry)
+
+ setNextShadow(layer3,15,0,0,0,1)
+ setNextFillColor(layer3, 0.85, 0.85, 0.15, 1)
+ addText(layer3, fontS, "Tired of spreadsheets?", rx*0.05, ry*0.1)
+
+ setNextShadow(layer3,15,0,0,0,1)
+ setNextFillColor(layer3, 0.85, 0.85, 0.15, 1)
+ addText(layer3, fontS, "Try graphs instead!", rx*0.05, ry*0.175)
+
+
+ setNextShadow(layer3,15,0,0,0,1)
+ setNextFillColor(layer3, 0.85, 0.85, 0.15, 1)
+ addText(layer3, fontS, "Automatically generated historical statistics", rx*0.05, ry*0.7)
+
+
+ setNextShadow(layer3,15,0,0,0,1)
+ setNextFillColor(layer3, 2, 2, 0, 1)
+ addText(layer3, fontL, "https://duopenmarket.com", rx*0.025, ry*0.9)
+end
+
+if display == 3 then
+
+ addImage(layer, imagehandle, 0, 0, rx, ry)
+
+ setNextShadow(layer3,15,0,0,0,1)
+ setNextFillColor(layer3, 0.75, 0.75, 0.75, 1)
+ addText(layer3, fontB, "Current Features:", rx*0.025, ry*0.1)
+
+ setNextShadow(layer3,15,0,0,0,1)
+ setNextFillColor(layer3, 0.45, 0.85, 0.25, 1)
+ addText(layer3, fontM, "Open-Source, with Secure Auth", rx*0.05, ry*0.2)
+
+ setNextShadow(layer3,15,0,0,0,1)
+ setNextFillColor(layer3, 0.45, 0.85, 0.25, 1)
+ addText(layer3, fontM, "Advanced Searching, save search terms", rx*0.05, ry*0.3)
+
+ setNextShadow(layer3,15,0,0,0,1)
+ setNextFillColor(layer3, 0.45, 0.85, 0.25, 1)
+ addText(layer3, fontM, "Small client, low resource use", rx*0.05, ry*0.4)
+
+ setNextShadow(layer3,15,0,0,0,1)
+ setNextFillColor(layer3, 0.45, 0.85, 0.25, 1)
+ addText(layer3, fontM, "Sort by price, market, quantity, etc", rx*0.05, ry*0.5)
+
+ setNextShadow(layer3,15,0,0,0,1)
+ setNextFillColor(layer3, 0.45, 0.85, 0.25, 1)
+ addText(layer3, fontM, "History trend Graphing and Economy stats", rx*0.05, ry*0.6)
+
+ setNextShadow(layer3,15,0,0,0,1)
+ setNextFillColor(layer3, 2, 2, 0, 1)
+ addText(layer3, fontL, "https://duopenmarket.com", rx*0.025, ry*0.9)
+
+end
+
+if display == 4 then
+
+ addImage(layer, imagehandle, 0, 0, rx, ry)
+
+ setNextShadow(layer3,15,0,0,0,1)
+ setNextFillColor(layer3, 0.75, 0.75, 0.75, 1)
+ addText(layer3, fontB, "Features In Development:", rx*0.025, ry*0.1)
+
+ setNextShadow(layer3,15,0,0,0,1)
+ setNextFillColor(layer3, 0.85, 0.45, 0.25, 1)
+ addText(layer3, fontM, "Profit and Margin calculators for industry", rx*0.05, ry*0.2)
+
+ setNextShadow(layer3,15,0,0,0,1)
+ setNextFillColor(layer3, 0.85, 0.45, 0.25, 1)
+ addText(layer3, fontM, "Cost/value calculator for constructs", rx*0.05, ry*0.3)
+
+ setNextShadow(layer3,15,0,0,0,1)
+ setNextFillColor(layer3, 0.85, 0.45, 0.25, 1)
+ addText(layer3, fontM, "Construct / Blueprint / Script Market", rx*0.05, ry*0.4)
+
+ setNextShadow(layer3,15,0,0,0,1)
+ setNextFillColor(layer3, 0.85, 0.45, 0.25, 1)
+ addText(layer3, fontM, "Public anti-scam Reputation directory", rx*0.05, ry*0.5)
+
+ setNextShadow(layer3,15,0,0,0,1)
+ setNextFillColor(layer3, 0.85, 0.45, 0.25, 1)
+ addText(layer3, fontM, "...And more!", rx*0.05, ry*0.7)
+
+ setNextShadow(layer3,15,0,0,0,1)
+ setNextFillColor(layer3, 2, 2, 0, 1)
+ addText(layer3, fontL, "https://duopenmarket.com", rx*0.025, ry*0.9)
+
+end
+
+
+if displaytick < displaytickmax then
+ displaytick = displaytick + 1
+else
+ if display == displaymax then
+ display = 1
+ else
+ display = display + 1
+ end
+ displaytick = 0
+end
+
+requestAnimationFrame(1)
\ No newline at end of file
diff --git a/Databank Key Viewer/DB Key Viewer - PB.txt b/Databank Key Viewer/DB Key Viewer - PB.txt
new file mode 100644
index 0000000..9ed475f
--- /dev/null
+++ b/Databank Key Viewer/DB Key Viewer - PB.txt
@@ -0,0 +1 @@
+{"slots":{"0":{"name":"screen","type":{"events":[],"methods":[]}},"1":{"name":"databank","type":{"events":[],"methods":[]}},"2":{"name":"slot3","type":{"events":[],"methods":[]}},"3":{"name":"slot4","type":{"events":[],"methods":[]}},"4":{"name":"slot5","type":{"events":[],"methods":[]}},"5":{"name":"slot6","type":{"events":[],"methods":[]}},"6":{"name":"slot7","type":{"events":[],"methods":[]}},"7":{"name":"slot8","type":{"events":[],"methods":[]}},"8":{"name":"slot9","type":{"events":[],"methods":[]}},"9":{"name":"slot10","type":{"events":[],"methods":[]}},"-1":{"name":"unit","type":{"events":[],"methods":[]}},"-3":{"name":"player","type":{"events":[],"methods":[]}},"-2":{"name":"construct","type":{"events":[],"methods":[]}},"-4":{"name":"system","type":{"events":[],"methods":[]}},"-5":{"name":"library","type":{"events":[],"methods":[]}}},"handlers":[{"code":"local screenoutput = screen.getScriptOutput()\nlocal screeninput = \"\"\nif screenoutput == \"\" then\n screeninput = \"?\"\nelse\n if screenoutput == \"<\" then\n --previous key\n if page > 0 then\n page = page - 1\n screeninput = \"KEY: \" .. DBKeys[page]\n else\n screeninput = \"\"\n end\n else\n if screenoutput == \">\" then\n --next key\n if page < NBKeys then\n page = page + 1\n screeninput = \"KEY: \" .. DBKeys[page]\n else\n screeninput = \"\"\n end\n else\n if screenoutput == \"KEYOK\" then\n --accepted key, send val\n screeninput = \"VAL: \" .. databank.getStringValue(DBKeys[page])\n else\n --command not understood\n end\n end\n end\nend\nscreen.setScriptInput(screeninput)\nscreen.clearScriptOutput()\nsystem.print(\"Screen OUT: \" .. screenoutput)\nsystem.print(\"Screen IN: \" .. screeninput)","filter":{"args":[{"variable":"*"}],"signature":"onOutputChanged(output)","slotKey":"0"},"key":"0"},{"code":"DBKeys = json.decode(databank.getKeys())\nNBKeys = databank.getNbKeys()\nscreen.activate()\nlocal screenoutput = screen.getScriptOutput()\nlocal screeninput = \"\"\nscreen.setScriptInput(\"?\")\nscreen.clearScriptOutput()\npage = 1\n\n\nsystem.print(\"Screen OUT: \" .. screenoutput)\nsystem.print(\"Screen IN: \" .. screeninput)","filter":{"args":[],"signature":"start()","slotKey":"-1"},"key":"1"}],"methods":[],"events":[]}
\ No newline at end of file
diff --git a/Databank Key Viewer/DB Key Viewer - renderscript.txt b/Databank Key Viewer/DB Key Viewer - renderscript.txt
new file mode 100644
index 0000000..d799a20
--- /dev/null
+++ b/Databank Key Viewer/DB Key Viewer - renderscript.txt
@@ -0,0 +1,190 @@
+json = require("dkjson")
+if not init then
+ init = true
+ imagebg = 1
+ passwordstring = ""
+ displaystringdefault = "NO KEYS FOUND"
+ displaystringkey = ""
+ displaystringvalue = ""
+ lastinput = ""
+ valuetable = ""
+ drawposx = 50
+ drawposy = 50
+ scrollpos = 0
+ color1R, color1G, color1B, color1A = 0, 0, 0, 0.85 --background
+ color2R, color2G, color2B, color2A = 0.1, 0.1, 0.1, 0.5 --button BG
+ color3R, color3G, color3B, color3A = 0.5, 0.3, 0.1, 0.5 --button border
+ color4R, color4G, color4B, color4A = 0.5, 0.3, 0.1, 0.5 --button BG hover
+ color5R, color5G, color5B, color5A = 0.9, 0.7, 0.1, 0.5 --button BG click
+ color6R, color6G, color6B, color6A = 1, 1, 1, 0.75 --button text
+
+ color7R, color7G, color7B, color7A = 0.15, 0.15, 0.15, 1 --scrollbar BG
+ --color8R, color8G, color8B, color8A = 0.25, 0.75, 0.25, 0.15 --scrollbar grabber BG
+ --color9R, color9G, color9B, color9A = 1, 1, 1, 0.75 --scrollbar grabber border
+
+
+ color10R, color10G, color10B, color10A = 0.05, 0.05, 0.05, 1 --UI Panel BG
+ color11R, color11G, color11B, color11A = 1, 1, 0, 1 --Data Value Text
+end
+local layer = createLayer() -- Main Background
+local layer4 = createLayer() -- key value text
+local layer5 = createLayer() -- UI
+local rx, ry = getResolution()
+local fontL = loadFont("Play", 110)
+local fontH = loadFont("Play", 100)
+local fontB = loadFont("Play", 60)
+local fontM = loadFont("Play", 40)
+local fontS = loadFont("Play", 20)
+local curx, cury = getCursor()
+local scriptinput = ""
+drawposx = 50
+drawposy = 50
+
+setNextFillColor(layer, color1R, color1G, color1B, 1)
+addBox(layer,0,0,rx,ry)
+
+if getInput() then
+ scriptinput = getInput()
+ --process PB input
+ if string.sub(scriptinput,0,4) == "KEY:" then
+ displaystringkey = string.sub(scriptinput,5,string.len(scriptinput))
+ setOutput("KEYOK")
+ else
+ if string.sub(scriptinput,0,4) == "VAL:" then
+ scriptinput = string.sub(scriptinput,5,string.len(scriptinput))
+ valuetable = scriptinput
+ setOutput("VALOK")
+ end
+ end
+ lastinput = scriptinput
+end
+
+function DrawKeypadButton(btnx, btny, btnw, btnh, btntxt)
+ setNextFillColor(layer5, color2R, color2G, color2B, color2A)
+ if curx > btnx then
+ if curx < btnx+btnw then
+ if cury > btny then
+ if cury < (btny+btnh) then
+ if getCursorReleased() == true then
+ setNextFillColor(layer5, color5R, color5G, color5B, color5A)
+ setOutput(btntxt)
+ else
+ setNextFillColor(layer5, color4R, color4G, color4B, color4A)
+ end
+ end
+ end
+ end
+ end
+ setNextStrokeColor(layer5, color3R, color3G, color3B, color3A)
+ setNextStrokeWidth(layer5, 5)
+ addBoxRounded(layer5, btnx, btny, btnw, btnh, 5)
+ setNextFillColor(layer5, color6R, color6G, color6B, color6A)
+ addText(layer5, fontM, btntxt, btnx + (rx*0.015), btny + (ry*0.0625))
+end
+
+function DrawScrollBar(btnx, btny, btnw, btnh)
+ setNextFillColor(layer5, color7R, color7G, color7B, color7A)
+ addBox(layer5, btnx, btny, btnw, btnh)
+ setNextFillColor(layer5, color2R, color2G, color2B, color2A)
+ if curx > btnx then
+ if curx < (btnx + btnw) then
+ if cury > btny then
+ if cury < (btny + btnh) then
+ if getCursorDown() == true then
+ --drag scrollbar
+ setNextFillColor(layer5, color5R, color5G, color5B, color5A)
+ scrollpos = ((cury - btny) / btnh) * 2048
+ else
+ setNextFillColor(layer5, color4R, color4G, color4B, color4A)
+ end
+ end
+ end
+ end
+ end
+ setNextStrokeColor(layer5, color3R, color3G, color3B, color3A)
+ setNextStrokeWidth(layer5, 5)
+ addBox(layer5, btnx, (((scrollpos/2048) * btnh) ), btnw, rx*0.025)
+end
+
+function DrawInterface()
+ --Control bar, bottom
+ setNextFillColor(layer5, color10R, color10G, color10B, color10A)
+ addBox(layer5, 0, ry*0.8, rx, ry*0.2)
+
+ DrawKeypadButton(rx*0.05,ry*0.8, rx*0.045, ry*0.08,"<")
+ DrawKeypadButton(rx*0.75,ry*0.8, rx*0.045, ry*0.08,">")
+
+ addText(layer5, fontM, displaystringkey, rx*0.1 + 15, ry*0.815 + 35)
+end
+
+function decodeJson(json)
+ local tempstring = string.sub(json, 2, string.len(json) - 1)
+ local tempchar = string.sub(json, 1, 1)
+ local charsleft = 0
+ local namebuffer = ""
+ local isname = 0
+ local valuebuffer = ""
+ local isvalue = 0
+ repeat
+ tempchar = string.sub(tempstring, 1, 1)
+ tempstring = string.sub(tempstring, 2, string.len(tempstring))
+ charsleft = string.len(tempstring)
+ if tempchar == "{" then
+ --increase indentation
+ drawposx = drawposx + 25
+ drawposy = drawposy + 20
+ namebuffer = ""
+ valuebuffer = ""
+ end
+ if tempchar == "}" then
+ --increase indentation
+ drawposx = drawposx - 25
+ end
+ if tempchar == "]" then
+ --stop accumulating chars in buffer and print
+ isname = 0
+ setNextFillColor(layer4, color11R, color11G, color11B, color11A)
+ addText(layer4, fontS, namebuffer, drawposx, drawposy - scrollpos)
+ --drawposy = drawposy + 20
+ namebuffer = ""
+ end
+ if isname == 1 then
+ --accumulate chars in buffer
+ namebuffer = namebuffer .. tempchar
+ end
+ if tempchar == "[" then
+ --accumulate chars in buffer until the end of the name is reached
+ isname = 1
+ end
+ if tempchar == "," and isvalue == 1 then
+ --stop accumulating chars in buffer and print
+ isvalue = 0
+ setNextFillColor(layer4, color11R, color11G, color11B, color11A)
+ addText(layer4, fontS, valuebuffer, drawposx + 175, drawposy - scrollpos)
+ drawposy = drawposy + 20
+ valuebuffer = ""
+ end
+ if tempchar == "{" and isvalue == 1 then
+ --stop accumulating chars in buffer and print
+ isvalue = 0
+ valuebuffer = ""
+ end
+ if isvalue == 1 then
+ --accumulate chars in buffer
+ valuebuffer = valuebuffer .. tempchar
+ end
+ if tempchar == "=" then
+ --accumulate chars in buffer until the end of the value is reached
+ isvalue = 1
+ end
+ until(charsleft == 0)
+end
+
+--draw key value
+decodeJson(valuetable)
+
+--draw UI
+DrawScrollBar(rx*0.9,0,rx*0.1,ry*0.8)
+DrawInterface()
+
+requestAnimationFrame(1)
\ No newline at end of file
diff --git a/Developer Utility Screen/DevScreen - Renderscript.txt b/Developer Utility Screen/DevScreen - Renderscript.txt
new file mode 100644
index 0000000..4e2a31a
--- /dev/null
+++ b/Developer Utility Screen/DevScreen - Renderscript.txt
@@ -0,0 +1,297 @@
+--simple persistence across frames, global varialbes must be created here
+if not init then
+ tabindex = 1
+ textbuffer = {}
+ keyboardshift = 0
+ for ix=1,2 do
+ textbuffer[ix] = ""
+ end
+ bufferselect = 1
+ a = 2 * math.pi / 6
+ b = 2 * math.pi / 5
+ r = 100
+ slidervalue = 100
+ fontselect = 1
+ fontselectmax = 12
+ init = true
+end
+
+fontS = loadFont("Play", 15)
+fontV = loadFont("Play", 30)
+fonttab = {}
+fontnames = {"FiraMono", "FiraMono-Bold", "Montserrat", "Montserrat-Light", "Montserrat-Bold", "Play", "Play-Bold", "RefrigeratorDeluxe", "RefrigeratorDeluxe-Light", "RobotoCondensed", "RobotoMono", "RobotoMono-Bold"}
+for ia=fontselect,fontselect+4 do
+ fonttab[ia] = loadFont(fontnames[ia], 15)
+end
+layer1 = createLayer()
+layer2 = createLayer()
+layer3 = createLayer()
+layer4 = createLayer()
+rx, ry = getResolution()
+cx, cy = getCursor()
+cd = getCursorDown()
+cp = getCursorPressed()
+cr = getCursorReleased()
+fontcount = getAvailableFontCount()
+line = 1
+charset = ""
+
+function DrawCharacterSet()
+ for ix=0,255 do
+ line = math.floor(ix / 32)
+ if ix > 32 and ix < 127 then
+ setNextFillColor(layer1,0,1,0,1)
+ if ix == 34 or ix == 92 then
+ setNextFillColor(layer1,1,0,0,1)
+ end
+ end
+ if ix > 160 and ix < 194 then
+ setNextFillColor(layer1,1,1,0,1)
+ end
+ addText(layer1, fontS, string.char(ix), 30*(ix-(line*32))+30, (65*(line+1))+30)
+ addText(layer1, fontS, ix, 30*(ix-(line*32))+25, 65*(line+1)+50)
+ end
+end
+
+function DrawButton(drawlayer, btnx, btny, btnw, btnh, btntxt, callfunc)
+ setNextFillColor(drawlayer, 0.35, 0.35, 0.35, 1)
+ if cx > btnx and cx < (btnx+btnw) then
+ if cy > btny and cy < (btny+btnh) then
+ if getCursorReleased() == true then
+ --clicked
+ setNextFillColor(drawlayer, 1, 0, 0, 1)
+ callfunc()
+ else
+ --hovered
+ setNextFillColor(drawlayer, 1, 1, 0, 1)
+ end
+ end
+ end
+ setNextStrokeWidth(drawlayer, 0)
+ addBoxRounded(drawlayer, btnx, btny, btnw, btnh, 5)
+ setNextFillColor(drawlayer, 1, 1, 1, 1)
+ local txtw, txty = getTextBounds(fontS,btntxt)
+ addText(drawlayer, fontS, btntxt, btnx + ((btnw - txtw)/2), btny + (btnh/2)+(txty/2))
+end
+
+function DrawScreenInfo()
+ setNextFillColor(layer1,1,0,0,1)
+ addText(layer1, fontS, "Resolution: " .. math.floor(rx) .. " x " .. math.floor(ry), 80, 80)
+
+ setNextFillColor(layer1,1,0.5,0,1)
+ addText(layer1, fontS, "Cursor: " .. cx .. " , " .. cy, 80, 100)
+ setNextFillColor(layer1,1,1,0,1)
+ addText(layer1, fontS, "Down: " .. tostring(cd), 80, 120)
+ setNextFillColor(layer1,1,1,0,1)
+ addText(layer1, fontS, "Press: " .. tostring(cp), 80, 140)
+ setNextFillColor(layer1,1,1,0,1)
+ addText(layer1, fontS, "Release: " .. tostring(cr), 80, 160)
+
+ ct = getTime()
+ dt = getDeltaTime()
+ setNextFillColor(layer1,0,1,0,1)
+ addText(layer1, fontS, "Time: " .. ct, 80, 200)
+ setNextFillColor(layer1,0,1,0,1)
+ addText(layer1, fontS, "Delta: " .. dt, 80, 220)
+
+ rc = getRenderCost()
+ rcmax = getRenderCostMax()
+ setNextFillColor(layer1,0,0.5,1,1)
+ addText(layer1, fontS, "Render Cost: " .. rc .. " / " .. rcmax, 80, 300)
+end
+
+function DrawOSKFull()
+ --generate on-screen keyboard
+ --Full keyboard, all buttons visible all the time, no shift.
+ local keyinc = 0
+ for af=33,127 do
+ if af == 127 then
+ --backspace
+ liney = math.floor(keyinc / 16)
+ linex = keyinc - (liney*16)
+ output = function() textbuffer[bufferselect] = string.sub(textbuffer[bufferselect],1,string.len(textbuffer[bufferselect])-1) end
+ DrawButton(layer1, 320+(linex*35), 250+(liney*35), 60, 25, "BKSPC", output)
+ keyinc = keyinc + 1
+ else
+ liney = math.floor(keyinc / 16)
+ linex = keyinc - (liney*16)
+ output = function() textbuffer[bufferselect] = textbuffer[bufferselect] .. string.char(af) end
+ DrawButton(layer1, 320+(linex*35), 250+(liney*35), 25, 25, string.char(af), output)
+ keyinc = keyinc + 1
+ end
+ end
+end
+
+function drawCircularProgressBar(layerin,xin,yin,rad,v,vmax)
+ local prcnt = v/vmax
+ local angle = prcnt*360
+ local cntr = 0
+ --progress circles
+ for xb = 1,20 do
+ cntr = cntr + 0.05
+ setNextStrokeWidth(layerin,1)
+ setNextStrokeColor(layerin,0,0,0,0)
+ setNextFillColor(layerin,0,0.2,0.7,1)
+ addCircle(layerin,xin+(math.cos((prcnt*cntr)*(math.pi*2))*rad),yin+(math.sin((prcnt*cntr)*(math.pi*2))*rad),rad/3)
+ end
+ --center circle
+ setNextStrokeWidth(layerin,2)
+ setNextStrokeColor(layerin,0,0,0,0)
+ setNextFillColor(layerin,0.5,0.5,0.5,1)
+ addCircle(layerin,xin,yin,rad/2+(rad/4))
+ --outer circle
+ setNextStrokeWidth(layerin,3)
+ setNextStrokeColor(layerin,0.5,0.5,0.5,1)
+ setNextFillColor(layerin,0,0,0,0)
+ addCircle(layerin,xin,yin,rad+(rad/3))
+ --position circle
+ setNextStrokeWidth(layerin,1)
+ setNextStrokeColor(layerin,0.75,0.75,0.75,1)
+ setNextFillColor(layerin,0.75,0.75,0.75,1)
+ addCircle(layerin,xin+(math.cos(prcnt*(math.pi*2))*rad),yin+(math.sin(prcnt*(math.pi*2))*rad),rad/3)
+end
+
+function DrawSlider(drawlayer, btnx, btny, btnw, btnh, value)
+ setNextFillColor(drawlayer, 0.35, 0.35, 0.35, 1)
+ if cx > btnx and cx < (btnx+btnw) then
+ if cy > (btny-(btnh*0.5)) and cy < (btny+(btnh*0.5)) then
+ if cd == true then
+ --clicked
+ setNextFillColor(drawlayer, 1, 0, 0, 1)
+ slidervalue = ((cx - btnx)/btnw)*100
+ else
+ --hovered
+ setNextFillColor(drawlayer, 1, 1, 0, 1)
+ end
+ end
+ end
+ setNextStrokeWidth(drawlayer, 0)
+ addBoxRounded(drawlayer, btnx, btny-(btnh*0.25), btnw, btnh-(btnh*0.5), 5)
+ setNextFillColor(drawlayer, 1, 1, 1, 1)
+ addBoxRounded(drawlayer, btnx+((value*0.01)*btnw), btny-(btnh*0.5), 15, btnh, 5)
+end
+
+function addHexagon1(inlayer,hexx,hexy,rad,strkwdth,sr,sg,sb,shwdth,shr,shg,shb,alpha)
+ for ia=0,5 do
+ setNextShadow(inlayer,shwdth,shr,shg,shb,alpha)
+ setNextStrokeWidth(inlayer,strkwdth)
+ setNextStrokeColor(inlayer,sr,sg,sb,alpha)
+ addLine(inlayer,hexx + (r + rad) * math.sin(a * ia), hexy + (r + rad) * math.cos(a * ia),hexx + (r + rad) * math.sin(a * (ia+1)), hexy + (r + rad) * math.cos(a * (ia+1)))
+ end
+end
+
+function addHexagon2(inlayer,hexx,hexy,rad,strkwdth,sr,sg,sb,shwdth,shr,shg,shb,alpha)
+ for ia=0,5 do
+ setNextShadow(inlayer,shwdth,shr,shg,shb,alpha)
+ setNextStrokeWidth(inlayer,strkwdth)
+ setNextStrokeColor(inlayer,sr,sg,sb,alpha)
+ addLine(inlayer,hexx + (r + rad) * math.cos(a * ia), hexy + (r + rad) * math.sin(a * ia),hexx + (r + rad) * math.cos(a * (ia+1)), hexy + (r + rad) * math.sin(a * (ia+1)))
+ end
+end
+
+function addPentagon(inlayer,hexx,hexy,rad,strkwdth,sr,sg,sb,shwdth,shr,shg,shb,alpha)
+ for ia=0,4 do
+ setNextShadow(inlayer,shwdth,shr,shg,shb,alpha)
+ setNextStrokeWidth(inlayer,strkwdth)
+ setNextStrokeColor(inlayer,sr,sg,sb,alpha)
+ addLine(inlayer,hexx + (r + rad) * math.sin(b * ia), hexy + (r + rad) * math.cos(b * ia),hexx + (r + rad) * math.sin(b * (ia+1)), hexy + (r + rad) * math.cos(b * (ia+1)))
+ end
+end
+
+function addCustomText(drawlayer, imagehandle, textstring, xpos, ypos, size, colorr, colorg, colorb, colora)
+ destructstring = textstring
+ for ix=1,#textstring do
+ nextletter = string.sub(destructstring,1,1)
+ destructstring = string.sub(destructstring,2,string.len(destructstring))
+ nextascii = string.byte(nextletter) - 33
+
+ local subxpos = math.fmod(nextascii,32)
+ local subypos = math.floor(nextascii / 32)
+ setNextFillColor(drawlayer, colorr, colorg, colorb, colora)
+ addImageSub(drawlayer, imagehandle, xpos+(ix * (size/2+2)), ypos, size, size, 0 + (68*subxpos), 0 + (68 * subypos), 68, 68)
+ end
+end
+
+--Simple tab pane to keep things organized
+setNextFillColor(layer1,0.1,0.1,0.1,1)
+addBox(layer1,0,50,rx,ry - 50)
+local output = function() tabindex = 1 end
+DrawButton(layer1,10,10,100,30,"Charset",output)
+local output = function() tabindex = 2 end
+DrawButton(layer1,130,10,100,30,"Screen Data",output)
+local output = function() tabindex = 3 end
+DrawButton(layer1,250,10,100,30,"Inputs",output)
+local output = function() tabindex = 4 end
+DrawButton(layer1,370,10,100,30,"Bars / Meters",output)
+local output = function() tabindex = 5 end
+DrawButton(layer1,490,10,100,30,"Shapes",output)
+local output = function() tabindex = 6 end
+DrawButton(layer1,610,10,100,30,"Text",output)
+
+if tabindex == 1 then
+ DrawCharacterSet()
+end
+if tabindex == 2 then
+ DrawScreenInfo()
+end
+if tabindex == 3 then
+ --text buffer 1
+ if bufferselect == 1 then
+ setNextFillColor(layer1,0.05,0.05,0.15,1)
+ else
+ setNextFillColor(layer1,0.05,0.05,0.05,1)
+ end
+ addBox(layer1,420,180,400,20)
+ setNextFillColor(layer1,1,1,1,1)
+ addText(layer1,fontS,textbuffer[1],420,195)
+ output = function() bufferselect = 1 end
+ DrawButton(layer1, 320, 180, 80, 15, "Buffer 1", output)
+
+ --text buffer 2
+ if bufferselect == 2 then
+ setNextFillColor(layer1,0.05,0.05,0.15,1)
+ else
+ setNextFillColor(layer1,0.05,0.05,0.05,1)
+ end
+ addBox(layer1,420,210,400,20)
+ setNextFillColor(layer1,1,1,1,1)
+ addText(layer1,fontS,textbuffer[2],420,225)
+ output = function() bufferselect = 2 end
+ DrawButton(layer1, 320, 210, 80, 15, "Buffer 2", output)
+
+ DrawOSKFull()
+end
+if tabindex == 4 then
+ drawCircularProgressBar(layer1,200,200,50,slidervalue,100)
+ DrawSlider(layer1,400,200,150,50,slidervalue)
+end
+if tabindex == 5 then
+ addHexagon1(layer1,200,200,25,5,1,1,1,20,0,0,0,1)
+ addHexagon2(layer1,200,200,25,5,1,1,1,20,0,0,0,1)
+ addPentagon(layer1,200,450,25,5,1,1,1,20,0,0,0,1)
+end
+if tabindex == 6 then
+ local customfontimage = loadImage("assets.prod.novaquark.com/66839/e294a1f0-11ae-4fa1-a5f8-aeb02288eb24.png")
+ addCustomText(layer2, customfontimage, "This is a custom font, rendered from an image file.", 150, 100, 22, 0,0.25,0.75,1)
+
+ setNextFillColor(layer1,0,1,1,1)
+ addText(layer1, fontS, "Available Fonts: " .. fontcount, 80, 495)
+ local prevfontselect = fontselect
+ local output = function() if fontselect > 1 then fontselect = fontselect - 1 end end
+ DrawButton(layer1, 40, 475, 35, 35, "<", output)
+ local output = function() if fontselect < fontselectmax - 4 then fontselect = fontselect + 1 end end
+ DrawButton(layer1, 300, 475, 35, 35, ">", output)
+ for aa=prevfontselect,prevfontselect+4 do
+ setNextFillColor(layer1,0,1,1,1)
+ addText(layer1, fonttab[aa], fontnames[aa], 100, ((aa - prevfontselect)*15)+515)
+ end
+
+ addText(layer3,fontV,"Vertical Text Example 1",10,10)
+ setLayerRotation(layer3,(6.285*0.75))
+ setLayerTranslation(layer3,25,400)
+
+ addText(layer4,fontV,"Vertical Text Example 2",10,10)
+ setLayerRotation(layer4,(6.285*0.25))
+ setLayerTranslation(layer4,75,100)
+end
+requestAnimationFrame(1)
\ No newline at end of file
diff --git a/Door Control/Door Control - PB.txt b/Door Control/Door Control - PB.txt
new file mode 100644
index 0000000..7365a0c
--- /dev/null
+++ b/Door Control/Door Control - PB.txt
@@ -0,0 +1 @@
+{"slots":{"0":{"name":"slot1","type":{"events":[],"methods":[]}},"1":{"name":"screen","type":{"events":[],"methods":[]}},"2":{"name":"slot3","type":{"events":[],"methods":[]}},"3":{"name":"slot4","type":{"events":[],"methods":[]}},"4":{"name":"slot5","type":{"events":[],"methods":[]}},"5":{"name":"slot6","type":{"events":[],"methods":[]}},"6":{"name":"slot7","type":{"events":[],"methods":[]}},"7":{"name":"slot8","type":{"events":[],"methods":[]}},"8":{"name":"slot9","type":{"events":[],"methods":[]}},"9":{"name":"slot10","type":{"events":[],"methods":[]}},"-1":{"name":"unit","type":{"events":[],"methods":[]}},"-3":{"name":"player","type":{"events":[],"methods":[]}},"-2":{"name":"construct","type":{"events":[],"methods":[]}},"-4":{"name":"system","type":{"events":[],"methods":[]}},"-5":{"name":"library","type":{"events":[],"methods":[]}}},"handlers":[{"code":"screen.activate()\nscreen.setScriptInput(\"?\")\nscreen.clearScriptOutput()","filter":{"args":[],"signature":"start()","slotKey":"-1"},"key":"0"},{"code":"slot1.deactivate()\nscreen.deactivate()","filter":{"args":[],"signature":"stop()","slotKey":"-1"},"key":"1"},{"code":"local screenoutput = screen.getScriptOutput()\nif unit.getMasterPlayerId() == 00000 then\n slot1.activate()\nelse\n if screenoutput == \"\" then\n screen.setScriptInput(\"?\")\n else\n if screenoutput == \"0000\" then\n screen.setScriptInput(\"1\")\n slot1.activate()\n else\n screen.setScriptInput(\"0\")\n slot1.deactivate()\n end\n end\nend\n\nscreen.clearScriptOutput()","filter":{"args":[],"signature":"update()","slotKey":"-4"},"key":"2"}],"methods":[],"events":[]}
\ No newline at end of file
diff --git a/Door Control/Door Control - renderscript.txt b/Door Control/Door Control - renderscript.txt
new file mode 100644
index 0000000..3bc7a40
--- /dev/null
+++ b/Door Control/Door Control - renderscript.txt
@@ -0,0 +1,191 @@
+if not init then
+ init = true
+ passwordstring = ""
+ displaystringdefault = "[ENTER ACCESS CODE]"
+ displaystring = ""
+ displayswitchtimer = 0
+ displayswitchtimerbase = 120
+ displaycolorR, displaycolor8G, displaycolorB, displaycolorA = 1, 1, 1, 0.75
+end
+local layer = createLayer() -- Main Background
+local layer4 = createLayer() -- keypad boxes
+local layer5 = createLayer() -- rotated text
+local rx, ry = getResolution()
+local fontL = loadFont("Play", 110)
+local fontH = loadFont("Play", 100)
+local fontB = loadFont("Play", 60)
+local fontM = loadFont("Play", 40)
+local fontS = loadFont("Play", 20)
+local color1R, color1G, color1B, color1A = 1, 1, 1, 0.0 --button background
+local color2R, color2G, color2B, color2A = 0, 0.75, 0, 0.5 --button border
+local color3R, color3G, color3B, color3A = 1, 1, 1, 1 --text
+local color4R, color4G, color4B, color4A = 1, 1, 1, 0.5 --button hover
+local color5R, color5G, color5B, color5A = 1, 0.15, 0.15, 1 --input deny
+local color6R, color6G, color6B, color6A = 0.15, 1, 0.15, 1 --input accept
+local color7R, color7G, color7B, color7A = 0.25, 0.75, 0.25, 0.5 --button click
+local color8R, color8G, color8B, color8A = 1, 1, 1, 0.75 --display text
+local curx, cury = getCursor()
+local scriptinput = ""
+
+setNextFillColor(layer, 0.0, 0, 0, 1)
+addBox(layer,0,0,rx,ry)
+logMessage(displayswitchtimer)
+if getInput() then
+ scriptinput = getInput()
+ if scriptinput == "0" then
+ displaycolorR = 1
+ displaycolorG = 0
+ displaycolorB = 0
+ displaycolorA = 0.75
+ displaystring = "[ACCESS DENIED]"
+ displayswitchtimer = displayswitchtimerbase
+ end
+ if scriptinput == "1" then
+ displaycolorR = 0
+ displaycolorG = 1
+ displaycolorB = 0
+ displaycolorA = 0.75
+ displaystring = "[ACCESS GRANTED]"
+ displayswitchtimer = displayswitchtimerbase
+ end
+end
+
+if displayswitchtimer > 0 then
+ displayswitchtimer = displayswitchtimer - 1
+end
+if displayswitchtimer == 0 then
+ displaycolorR = 1
+ displaycolorG = 1
+ displaycolorB = 1
+ displaycolorA = 0.75
+ displaystring = displaystringdefault
+end
+
+function DrawKeypadSendButton(btnx, btny, btnw, btnh, btntxt)
+ setNextFillColor(layer4, color1R, color1G, color1B, color1A)
+ if curx > btnx then
+ if curx < btnx+btnw then
+ if cury > btny then
+ if cury < (btny+btnh) then
+ if getCursorReleased() == true then
+ setNextFillColor(layer4, color7R, color7G, color7B, color7A)
+ setOutput(passwordstring)
+ passwordstring = ""
+ else
+ setNextFillColor(layer4, color4R, color4G, color4B, color4A)
+ end
+ end
+ end
+ end
+ end
+ setNextStrokeColor(layer4, color2R, color2G, color2B, color2A)
+ setNextStrokeWidth(layer4, 5)
+ addBoxRounded(layer4, btnx, btny, btnw, btnh, 5)
+ --setNextFillColor(layer5, 0.35, 0, 0, 1)
+ --addText(layer5, fontM, btntxt, btnx + (rx*0.015), btny + (ry*0.15))
+end
+
+function DrawKeypadButton(btnx, btny, btnw, btnh, btntxt)
+ setNextFillColor(layer4, color1R, color1G, color1B, color1A)
+ if curx > btnx then
+ if curx < btnx+btnw then
+ if cury > btny then
+ if cury < (btny+btnh) then
+ if getCursorReleased() == true then
+ if string.len(passwordstring) < 4 then
+ setNextFillColor(layer4, color7R, color7G, color7B, color7A)
+ passwordstring = passwordstring .. btntxt
+ else
+ setNextFillColor(layer4, color7R, color7G, color7B, color7A)
+ end
+ else
+ setNextFillColor(layer4, color4R, color4G, color4B, color4A)
+ end
+ end
+ end
+ end
+ end
+ setNextStrokeColor(layer4, color2R, color2G, color2B, color2A)
+ setNextStrokeWidth(layer4, 5)
+ addBoxRounded(layer4, btnx, btny, btnw, btnh, 5)
+ --setNextFillColor(layer5, 0.35, 0, 0, 1)
+ --addText(layer5, fontL, btntxt, btnx + (rx*0.015), btny + (ry*0.15))
+end
+
+function DrawKeypadText(btnx, btny, btnw, btnh, btntxt)
+ setNextFillColor(layer5, color3R, color3G, color3B, color3A)
+ addText(layer5, fontL, btntxt, btnx + (rx*0.015), btny + (ry*0.15))
+end
+
+function DrawKeypadSendText(btnx, btny, btnw, btnh, btntxt)
+ setNextFillColor(layer5, color3R, color3G, color3B, color3A)
+ addText(layer5, fontB, btntxt, btnx + (rx*0.015), btny + (ry*0.15))
+end
+
+function DrawInputText(rx, ry)
+ if string.len(passwordstring) < 4 then
+ setNextFillColor(layer5, color5R, color5G, color5B, color5A)
+ addText(layer5, fontL, passwordstring, rx*0.15, ry*0.35)
+ end
+ if string.len(passwordstring) == 4 then
+ setNextFillColor(layer5, color6R, color6G, color6B, color6A)
+ addText(layer5, fontL, passwordstring, rx*0.15, ry*0.35)
+ end
+end
+
+function DrawDisplayText(rx, ry)
+ setNextFillColor(layer5, displaycolorR, displaycolorG, displaycolorB, displaycolorA)
+ addText(layer5, fontM, displaystring, rx*0.095, ry*0.15)
+end
+
+function DrawDisplayLines(rx, ry)
+ setNextFillColor(layer5, color8R, color8G, color8B, color8A)
+ addLine(layer5, 0, ry*0.175, rx*1, ry*0.175)
+ setNextFillColor(layer5, color8R, color8G, color8B, color8A)
+ addLine(layer5, 0, ry*0.215, rx*0.42, ry*0.215)
+ setNextFillColor(layer5, color8R, color8G, color8B, color8A)
+ addLine(layer5, rx*0.13, ry*0.36, rx*1, ry*0.36)
+end
+
+--draw keypad buttons
+DrawKeypadButton(rx*0.3,ry*0.6, rx*0.1, ry*0.17,"1")
+DrawKeypadButton(rx*0.3,ry*0.4, rx*0.1, ry*0.17,"2")
+DrawKeypadButton(rx*0.3,ry*0.2, rx*0.1, ry*0.17,"3")
+
+DrawKeypadButton(rx*0.425,ry*0.6, rx*0.1, ry*0.17,"4")
+DrawKeypadButton(rx*0.425,ry*0.4, rx*0.1, ry*0.17,"5")
+DrawKeypadButton(rx*0.425,ry*0.2, rx*0.1, ry*0.17,"6")
+
+DrawKeypadButton(rx*0.55,ry*0.6, rx*0.1, ry*0.17,"7")
+DrawKeypadButton(rx*0.55,ry*0.4, rx*0.1, ry*0.17,"8")
+DrawKeypadButton(rx*0.55,ry*0.2, rx*0.1, ry*0.17,"9")
+
+DrawKeypadButton(rx*0.675,ry*0.6, rx*0.1, ry*0.17,"0")
+DrawKeypadSendButton(rx*0.675,ry*0.2, rx*0.1, ry*0.37,"send")
+
+
+--placeholder input text
+
+DrawDisplayText(rx, ry)
+DrawDisplayLines(rx, ry)
+DrawInputText(rx, ry)
+
+--draw keypad text
+DrawKeypadText(rx*0.13,ry*0.52, rx*0.1, ry*0.17,"1")
+DrawKeypadText(rx*0.245, ry*0.52, rx*0.1, ry*0.17,"2")
+DrawKeypadText(rx*0.365, ry*0.52, rx*0.1, ry*0.17,"3")
+DrawKeypadText(rx*0.13, ry*0.73, rx*0.1, ry*0.17,"4")
+DrawKeypadText(rx*0.245, ry*0.73, rx*0.1, ry*0.17,"5")
+DrawKeypadText(rx*0.365, ry*0.73, rx*0.1, ry*0.17,"6")
+DrawKeypadText(rx*0.13, ry*0.93, rx*0.1, ry*0.17,"7")
+DrawKeypadText(rx*0.245, ry*0.93, rx*0.1, ry*0.17,"8")
+DrawKeypadText(rx*0.365, ry*0.93, rx*0.1, ry*0.17,"9")
+DrawKeypadText(rx*0.13, ry*1.13, rx*0.1, ry*0.17,"0")
+DrawKeypadSendText(rx*0.245, ry*1.13, rx*0.23, ry*0.17,"send")
+
+
+--rotate text layer
+setLayerRotation(layer5,(3.14*0.75)*2)
+setLayerTranslation(layer5,-10,600)
+
+requestAnimationFrame(1)
\ No newline at end of file
diff --git a/Door Control/readme.md b/Door Control/readme.md
new file mode 100644
index 0000000..6123be9
--- /dev/null
+++ b/Door Control/readme.md
@@ -0,0 +1,8 @@
+# Lua Door Access Code Control Script
+
+### MAKE SURE you change the default access code when installing the script
+
+Recommended to have the programming board be triggered by a Detection Zone linked to a switch, so it will start automatically when someone is in proximity of the door/screen.
+
+All colors on the screen are easy to change variables. Users can be assigned specific codes that only work for them, or general all-access codes can be created.
+Supports automatic recognition of the system owner by player ID.
\ No newline at end of file
diff --git a/Drawing Board 1.1/Drawing Board 1 - Renderscript.txt b/Drawing Board 1.1/Drawing Board 1 - Renderscript.txt
new file mode 100644
index 0000000..580287f
--- /dev/null
+++ b/Drawing Board 1.1/Drawing Board 1 - Renderscript.txt
@@ -0,0 +1,216 @@
+if not Slider then
+
+
+ -- Returns a new slider class
+ Slider = {}
+ Slider.__index = Slider
+ function Slider:new(x, y, width, length, min, max, value, label)
+ self = {
+ x = x or 0,
+ y = y or 0,
+ l = length or 100,
+ w = width or 20,
+ min = min or 0,
+ max = max or 1,
+ ratio = 0,
+ label = label or "",
+ drag = false,
+ color = {1,1,1}
+ }
+ self.ratio = math.max(0, math.min(1, (value or self.min)/(self.max-self.min)))
+
+ -- Set the value of the slider
+ function self:setValue(val)
+ if type(val) == 'number' then
+ self.value = math.max(self.min, math.min(self.max, val))
+ end
+ end
+
+ -- Get the value of the slider
+ function self:getValue(val)
+ return self.ratio*(self.max - self.min) + self.min
+ end
+
+ -- Draws the slider on the screen using the given layer
+ function self:draw(layer)
+ -- Localize object data
+ local x, y, w, l = self.x, self.y, self.w, self.l
+ local min, max, ratio = self.min, self.max
+
+ local font = loadFont('Play', 14)
+
+ -- Get cursor data
+ local mx, my = getCursor()
+ local pressed = getCursorPressed()
+ local released = getCursorReleased()
+
+ -- Determine if the cursor is on the bar and detect if the mouse is down
+ if (mx >= x and mx <= x+w) and (my >= y and my <= y+l) then
+
+ if pressed then self.drag = true end
+ end
+
+ -- Set the ratio based on the cursor position
+ if self.drag then
+ self.ratio = math.max(0, math.min(1, 1 - (my-y)/l))
+ if released then
+ self.drag = false
+ end
+ end
+
+ local ratio = self.ratio
+ local h = ratio*(max-min)
+ local color = self.color
+
+ -- Draw the slider
+ setDefaultStrokeColor(layer, Shape_BoxRounded, 1, 1, 1, 1)
+ setDefaultStrokeWidth(layer, Shape_BoxRounded, 0.1)
+
+ setNextFillColor(layer, 0.1, 0.1, 0.1, 1)
+ addBoxRounded(layer, x, y, w, l, 0)
+
+ setNextFillColor(layer, color[1], color[2], color[3], 1)
+ addBoxRounded(layer, x, y+(1-ratio)*l, w, l*ratio, 0)
+
+ setNextFillColor(layer, 0.5, 0.5, 0.5, 1)
+ addBoxRounded(layer, x-3, y+(1-ratio)*l -3, w+6, 6, 0)
+
+ -- Draw label and value display
+ local label = self.label
+ setNextTextAlign( layer, AlignH_Center, AlignV_Middle)
+ addText( layer, font, label, x+0.5*w, y-14)
+
+ local display = string.format('%.0f', math.floor(((ratio*(max - min) + min)*255)+0.5))
+ setNextTextAlign( layer, AlignH_Center, AlignV_Middle)
+ addText( layer, font, display, x+0.5*w, y+l+14)
+ end
+
+
+ return setmetatable(self, Slider)
+ end
+
+end
+
+if not init then
+ l3fontsize = 20
+ l2fontsize = 30
+ l1fontsize = 40
+ l3xoffset = -20
+ l3yoffset = 0
+ l2xoffset = -20
+ l2yoffset = 0
+ l1xoffset = -20
+ l1yoffset = 0
+ brushr = 0.5
+ brushg = 0.2
+ brushb = 0.7
+ showmenu = 0
+ fontL = loadFont("Play", l1fontsize)
+ rr = 8
+ rx, ry = getResolution()
+ cx1, cy1 = rx/rr, ry/rr
+ mem1 = {}
+ mem2 = {}
+ mem3 = {}
+ charset = "0123456789ABCDEF"
+ for ix=1,cx1 do
+ mem1[ix] = {}
+ for iy=1,cy1 do
+ mem1[ix][iy] = 0
+ end
+ end
+ for ix2=1,cx1 do
+ mem2[ix2] = {}
+ for iy2=1,cy1 do
+ mem2[ix2][iy2] = 0
+ end
+ end
+ for ix3=1,cx1 do
+ mem3[ix3] = {}
+ for iy3=1,cy1 do
+ mem3[ix3][iy3] = 0
+ end
+ end
+ maxcost = getRenderCostMax()
+ local r, g, b = 0.5, 0.5, 0.5
+
+ sliderRed = Slider:new(rx*0.8, ry*0.2, 16, ry*0.6, 0, 1, r, "Red")
+ sliderRed.color = { 1, 0, 0}
+ sliderGreen = Slider:new(rx*0.85, ry*0.2, 16, ry*0.6, 0, 1, g, "Green")
+ sliderGreen.color = { 0, 1, 0}
+ sliderBlue = Slider:new(rx*0.9, ry*0.2, 16, ry*0.6, 0, 1, b, "Blue")
+ sliderBlue.color = { 0, 0, 1}
+
+ init = true
+end
+
+
+fontL = loadFont("Play", l1fontsize)
+layer1 = createLayer()
+layer2 = createLayer()
+cursorx, cursory = getCursor()
+curx2 = math.floor(cursorx/rr)
+cury2 = math.floor(cursory/rr)
+
+function DrawAllPixelsL1()
+ local lm1, lm2, lm3, rr = mem1, mem2, mem3, rr
+ local sNFC, aB = setNextFillColor, addBox
+ for bx=1,cx1 do
+ currcost = getRenderCost()
+ if currcost < (maxcost*0.9) then
+ for by=1,cy1 do
+ sNFC(layer1, mem1[bx][by], mem2[bx][by], mem3[bx][by], 1)
+ aB(layer1, bx*rr, by*rr, rr,rr)
+ end
+ end
+ end
+end
+
+function DrawUI()
+ if showmenu == 1 then
+ sliderRed:draw(layer2)
+ sliderGreen:draw(layer2)
+ sliderBlue:draw(layer2)
+ brushr = sliderRed.ratio
+ brushg = sliderGreen.ratio
+ brushb = sliderBlue.ratio
+
+ setNextStrokeWidth(layer2, 5)
+ setNextStrokeColor(layer2, 1, 0, 0, 1)
+ setNextFillColor(layer2, 0.5,0.5,0.5, 1)
+ addBox(layer2, rx*0.875, ry*0.08, rx*0.04, ry*0.06)
+
+ if cursorx > rx*0.875 and cursorx < (rx*0.875)+(rx*0.04) then
+ if cursory > ry*0.08 and cursory < (ry*0.08)+(ry*0.06) then
+ setNextStrokeWidth(layer2, 5)
+ setNextStrokeColor(layer2, 1, 0, 0, 1)
+ setNextFillColor(layer2, 1,0.5,0.5, 1)
+ addBox(layer2, rx*0.875, ry*0.08, rx*0.04, ry*0.06)
+ if getCursorDown() then
+ showmenu = 0
+ end
+ end
+ end
+ else
+ setNextFillColor(layer2, brushr, brushg, brushb, 1)
+ addBox(layer2, 0, ry - 20, rx, 20)
+ if getCursorDown() then
+ if curx2 > 0 and cury2 > 0 then
+ if curx2 < rx and cury2 < ry then
+ if cursory < ry and cursory > (ry - 20) then
+ showmenu = 1
+ else
+ mem1[curx2][cury2] = brushr
+ mem2[curx2][cury2] = brushg
+ mem3[curx2][cury2] = brushb
+ end
+ end
+ end
+ end
+ end
+end
+
+DrawAllPixelsL1()
+DrawUI()
+
+requestAnimationFrame(1)
\ No newline at end of file
diff --git a/Image Slideshow/Infinite Image Slideshow - Renderscript.txt b/Image Slideshow/Infinite Image Slideshow - Renderscript.txt
new file mode 100644
index 0000000..7d28520
--- /dev/null
+++ b/Image Slideshow/Infinite Image Slideshow - Renderscript.txt
@@ -0,0 +1,77 @@
+if not init then
+ anim = 0
+ animtick = 0
+ animtickmax = 100
+ display = 1
+ nextdisplay = 1
+ displaymax = 20
+ displaytick = 0
+ displaytickmax = 175
+ images = {}
+ for xa=1,displaymax do
+ images[xa] = ""
+ end
+
+ images[1] = "assets.prod.novaquark.com/66839/b249f117-4120-472e-8c12-d84c04c28775.png"
+ images[2] = "assets.prod.novaquark.com/66839/8452f802-cb36-40ec-9d26-f5530a82ac1c.png"
+ images[3] = "assets.prod.novaquark.com/10847/74614e8a-3e83-4054-ae34-5bd13e80b3fe.jpg"
+ images[4] = "assets.prod.novaquark.com/10847/2652fe31-3c4b-4daa-b1d2-4d25ec230cae.jpg"
+ images[5] = "assets.prod.novaquark.com/51710/a31ce61b-b290-49fd-b8cc-60ed50837e86.jpg"
+ images[6] = "assets.prod.novaquark.com/60816/b543e8eb-deb8-4319-926e-0bea0da6aa91.jpg"
+ images[7] = "assets.prod.novaquark.com/60816/d457cdb8-67bc-43b5-97e8-afcad2c42dde.jpg"
+ images[8] = "assets.prod.novaquark.com/15526/661fe770-9e52-4026-be44-7834c37da61c.jpg"
+ images[9] = "assets.prod.novaquark.com/15526/b7826b57-3ca0-4721-8bb3-13b47986dc9b.jpg"
+ images[10] = "assets.prod.novaquark.com/15526/e9d43aac-6706-486f-b91d-78024fac4679.jpg"
+ images[11] = "assets.prod.novaquark.com/15526/f79d0256-34c1-4945-b786-91027681b6df.png"
+ images[12] = "assets.prod.novaquark.com/3014/10bcb0e9-1ac9-44bf-9174-afb1854cce13.jpg"
+ images[12] = "assets.prod.novaquark.com/35519/b997a7b6-6217-4394-b34c-fa1ef6fee1d0.png"
+ images[13] = "assets.prod.novaquark.com/40256/19e9ef08-6674-4ab5-a9cf-708c2ed3c9be.jpg"
+ images[14] = "assets.prod.novaquark.com/40256/ae88a73f-acb0-45d1-a164-047084905db9.jpg"
+ images[15] = "assets.prod.novaquark.com/40256/fefa0f2d-31ee-4023-9ff7-abde8f43a00b.jpg"
+ images[16] = "assets.prod.novaquark.com/4745/566b4304-6cc5-4d3d-92ea-44b7f03f453d.jpg"
+ images[17] = "assets.prod.novaquark.com/60491/0ea71244-19fe-417f-bca2-6927bcafd9cd.jpg"
+ images[18] = "assets.prod.novaquark.com/60816/2c93cca6-f883-4be2-a279-396af1498efb.jpg"
+ images[19] = "assets.prod.novaquark.com/60816/6a2a2a2d-e9bd-403d-b87f-bec526314869.jpg"
+ images[20] = "assets.prod.novaquark.com/60816/814bd0e5-a651-410d-a2b7-0cc885c8ed7f.png"
+
+ imagehandle = 0
+ init = true
+end
+local layer = createLayer()
+local rx, ry = getResolution()
+
+imagehandle = loadImage(images[display])
+imagehandle2 = loadImage(images[nextdisplay])
+if anim == 1 then
+ if animtick < animtickmax then
+ if display == displaymax then
+ nextdisplay = 1
+ else
+ nextdisplay = display + 1
+ end
+ local animprcnt = animtick/animtickmax
+ addImage(layer, imagehandle, 0 - rx*animprcnt, 0, rx, ry)
+ addImage(layer, imagehandle2, 0 - (rx*animprcnt) + rx, 0, rx, ry)
+ animtick = animtick + 1
+ else
+ if display == displaymax then
+ display = 1
+ else
+ display = display + 1
+ end
+ displaytick = 0
+ anim = 0
+ addImage(layer, imagehandle2, 0, 0, rx, ry)
+ animtick = 0
+ end
+else
+ addImage(layer, imagehandle, 0, 0, rx, ry)
+end
+
+if displaytick < displaytickmax then
+ displaytick = displaytick + 1
+else
+ anim = 1
+end
+
+requestAnimationFrame(1)
\ No newline at end of file
diff --git a/ImageToMovie/ImageMovieScript - Renderscript.txt b/ImageToMovie/ImageMovieScript - Renderscript.txt
new file mode 100644
index 0000000..8f6f36a
--- /dev/null
+++ b/ImageToMovie/ImageMovieScript - Renderscript.txt
@@ -0,0 +1,18 @@
+if not init then
+ frame = 1
+ init = true
+end
+local movieimage = loadImage("assets.prod.novaquark.com/66839/9fb73abf-9898-439c-94fa-2cb6e63782ae.png")
+local layer1 = createLayer()
+local layer2 = createLayer()
+local font1 = loadFont("Play",20)
+local rx,ry = getResolution()
+if frame == 255 then
+ frame = 1
+else
+ frame = frame + 1
+end
+local subxpos = math.fmod(frame,5)
+local subypos = math.floor(frame / 5)
+addImageSub(layer1, movieimage, 0, 0, rx, ry, 0 + (200*subxpos), 0 + (112 * subypos), 200, 112)
+requestAnimationFrame(1)
\ No newline at end of file
diff --git a/ImageToMovie/spacex-rocketlaunch-clip1.png b/ImageToMovie/spacex-rocketlaunch-clip1.png
new file mode 100644
index 0000000..76bddf2
Binary files /dev/null and b/ImageToMovie/spacex-rocketlaunch-clip1.png differ
diff --git a/Item ID Scraper/Item ID Scraper - PB.txt b/Item ID Scraper/Item ID Scraper - PB.txt
new file mode 100644
index 0000000..6f68321
--- /dev/null
+++ b/Item ID Scraper/Item ID Scraper - PB.txt
@@ -0,0 +1 @@
+{"slots":{"0":{"name":"slot1","type":{"events":[],"methods":[]}},"1":{"name":"slot2","type":{"events":[],"methods":[]}},"2":{"name":"slot3","type":{"events":[],"methods":[]}},"3":{"name":"slot4","type":{"events":[],"methods":[]}},"4":{"name":"slot5","type":{"events":[],"methods":[]}},"5":{"name":"slot6","type":{"events":[],"methods":[]}},"6":{"name":"slot7","type":{"events":[],"methods":[]}},"7":{"name":"slot8","type":{"events":[],"methods":[]}},"8":{"name":"slot9","type":{"events":[],"methods":[]}},"9":{"name":"slot10","type":{"events":[],"methods":[]}},"-1":{"name":"unit","type":{"events":[],"methods":[]}},"-2":{"name":"system","type":{"events":[],"methods":[]}},"-3":{"name":"library","type":{"events":[],"methods":[]}}},"handlers":[{"code":"list = \"\"\ntick = 175947631\nexecute = 1\n\nunit.setTimer(\"main\",1/60)","filter":{"args":[],"signature":"start()","slotKey":"-1"},"key":"0"},{"code":"if execute == 1 then\n if string.len(list) < 40000 then\n for ab=tick,tick + 5000 do\n if system.getItem(ab)[\"displayName\"] == \"\" then\n --invalid item, do nothing\n else\n list = list .. \"\\n\" .. ab .. \", \" .. system.getItem(ab)[\"displayName\"]\n end\n end\n tick = tick + 5000\n system.print(tick)\n else\n system.print(\"FLUSHED AT: \" .. tick)\n system.print(\"Type \\\"C\\\" in Lua Chat to continue execution.\")\n slot1.setRenderScript(list)\n list = \"\"\n execute = 0\n end\nelse\n --Do nothing\nend","filter":{"args":[{"value":"main"}],"signature":"tick(timerId)","slotKey":"-1"},"key":"1"},{"code":"system.print(\"STOPPED AT: \" .. tick)\nslot1.setRenderScript(list)","filter":{"args":[],"signature":"stop()","slotKey":"-1"},"key":"2"},{"code":"if text == \"c\" then\n execute = 1\nend","filter":{"args":[{"variable":"*"}],"signature":"inputText(text)","slotKey":"-2"},"key":"3"}],"methods":[],"events":[]}
\ No newline at end of file
diff --git a/Lighting RGB Control/Light RGB Control - PB.txt b/Lighting RGB Control/Light RGB Control - PB.txt
new file mode 100644
index 0000000..dca7917
--- /dev/null
+++ b/Lighting RGB Control/Light RGB Control - PB.txt
@@ -0,0 +1 @@
+{"slots":{"0":{"name":"slot1","type":{"events":[],"methods":[]}},"1":{"name":"slot2","type":{"events":[],"methods":[]}},"2":{"name":"slot3","type":{"events":[],"methods":[]}},"3":{"name":"slot4","type":{"events":[],"methods":[]}},"4":{"name":"slot5","type":{"events":[],"methods":[]}},"5":{"name":"slot6","type":{"events":[],"methods":[]}},"6":{"name":"slot7","type":{"events":[],"methods":[]}},"7":{"name":"slot8","type":{"events":[],"methods":[]}},"8":{"name":"slot9","type":{"events":[],"methods":[]}},"9":{"name":"slot10","type":{"events":[],"methods":[]}},"-1":{"name":"unit","type":{"events":[],"methods":[]}},"-2":{"name":"system","type":{"events":[],"methods":[]}},"-3":{"name":"library","type":{"events":[],"methods":[]}}},"handlers":[{"code":"ColorRed = 255 --export: Ship Accent Lighting color Red component\nColorGreen = 0 --export: Ship Accent Lighting color Green component\nColorBlue = 0 --export: Ship Accent Lighting color Blue component\n\nRainbow = 1 --export: Ship Accent Lighting RGB component will shift through all possible colors. Overrides other RGB settings. \n\nDimWhenOff = 0\n\nCtrR = 1\nCtrG = 0\nCtrB = 0\n\nslot1.deactivate()\nslot2.deactivate()\nslot3.deactivate()\nslot4.deactivate()\nslot5.deactivate()\nslot6.deactivate()\nslot7.deactivate()\nslot8.deactivate()\nslot9.deactivate()\nslot10.deactivate()\n\nslot1.setRGBColor(ColorRed,ColorGreen,ColorBlue)\nslot2.setRGBColor(ColorRed,ColorGreen,ColorBlue)\nslot3.setRGBColor(ColorRed,ColorGreen,ColorBlue)\nslot4.setRGBColor(ColorRed,ColorGreen,ColorBlue)\nslot5.setRGBColor(ColorRed,ColorGreen,ColorBlue)\nslot6.setRGBColor(ColorRed,ColorGreen,ColorBlue)\nslot7.setRGBColor(ColorRed,ColorGreen,ColorBlue)\nslot8.setRGBColor(ColorRed,ColorGreen,ColorBlue)\nslot9.setRGBColor(ColorRed,ColorGreen,ColorBlue)\nslot10.setRGBColor(ColorRed,ColorGreen,ColorBlue)\n\nslot1.activate()\nslot2.activate()\nslot3.activate()\nslot4.activate()\nslot5.activate()\nslot6.activate()\nslot7.activate()\nslot8.activate()\nslot9.activate()\nslot10.activate()","filter":{"args":[],"signature":"start()","slotKey":"-2"},"key":"0"},{"code":"if Rainbow == 1 then\n if CtrR == 1 then\n ColorGreen = ColorGreen + 1\n ColorRed = ColorRed - 1\n if ColorBlue > 0 then\n ColorBlue = ColorBlue - 1\n ColorRed = ColorRed + 1\n end\n if ColorRed == 0 then\n CtrR = 0\n CtrG = 1\n end\n end\n\n if CtrG == 1 then\n ColorBlue = ColorBlue + 1\n ColorGreen = ColorGreen - 1\n if ColorRed > 0 then\n ColorRed = ColorRed - 1\n ColorGreen = ColorGreen + 1\n end\n if ColorGreen == 0 then\n CtrG = 0\n CtrB = 1\n end\n end\n\n if CtrB == 1 then\n ColorRed = ColorRed + 1\n ColorBlue = ColorBlue - 1\n if ColorGreen > 0 then\n ColorGreen = ColorGreen - 1\n ColorBlue = ColorBlue + 1\n end\n if ColorBlue == 0 then\n CtrB = 0\n CtrR = 1\n end\n end\n slot1.deactivate()\n slot2.deactivate()\n slot3.deactivate()\n slot4.deactivate()\n slot5.deactivate()\n slot6.deactivate()\n slot7.deactivate()\n slot8.deactivate()\n slot9.deactivate()\n slot10.deactivate()\n\n slot1.setRGBColor(ColorRed,ColorGreen,ColorBlue)\n slot2.setRGBColor(ColorRed,ColorGreen,ColorBlue)\n slot3.setRGBColor(ColorRed,ColorGreen,ColorBlue)\n slot4.setRGBColor(ColorRed,ColorGreen,ColorBlue)\n slot5.setRGBColor(ColorRed,ColorGreen,ColorBlue)\n slot6.setRGBColor(ColorRed,ColorGreen,ColorBlue)\n slot7.setRGBColor(ColorRed,ColorGreen,ColorBlue)\n slot8.setRGBColor(ColorRed,ColorGreen,ColorBlue)\n slot9.setRGBColor(ColorRed,ColorGreen,ColorBlue)\n slot10.setRGBColor(ColorRed,ColorGreen,ColorBlue)\n\n slot1.activate()\n slot2.activate()\n slot3.activate()\n slot4.activate()\n slot5.activate()\n slot6.activate()\n slot7.activate()\n slot8.activate()\n slot9.activate()\n slot10.activate()\nend","filter":{"args":[],"signature":"update()","slotKey":"-2"},"key":"1"},{"code":"if DimWhenOff == 1 then\n slot1.deactivate()\n slot2.deactivate()\n slot3.deactivate()\n slot4.deactivate()\n slot5.deactivate()\n slot6.deactivate()\n slot7.deactivate()\n slot8.deactivate()\n slot9.deactivate()\n slot10.deactivate()\nend","filter":{"args":[],"signature":"stop()","slotKey":"-2"},"key":"2"}],"methods":[],"events":[]}
\ No newline at end of file
diff --git a/Lighting RGB Control/Light RGB Control - renderscript.txt b/Lighting RGB Control/Light RGB Control - renderscript.txt
new file mode 100644
index 0000000..2f3521e
--- /dev/null
+++ b/Lighting RGB Control/Light RGB Control - renderscript.txt
@@ -0,0 +1,129 @@
+-- Initialize
+if not Slider then
+
+
+ -- Returns a new slider class
+ Slider = {}
+ Slider.__index = Slider
+ function Slider:new(x, y, width, length, min, max, value, label)
+ self = {
+ x = x or 0,
+ y = y or 0,
+ l = length or 100,
+ w = width or 20,
+ min = min or 0,
+ max = max or 1,
+ ratio = 0,
+ label = label or "",
+ drag = false,
+ color = {1,1,1}
+ }
+ self.ratio = math.max(0, math.min(1, (value or self.min)/(self.max-self.min)))
+
+ -- Set the value of the slider
+ function self:setValue(val)
+ if type(val) == 'number' then
+ self.value = math.max(self.min, math.min(self.max, val))
+ end
+ end
+
+ -- Get the value of the slider
+ function self:getValue(val)
+ return self.ratio*(self.max - self.min) + self.min
+ end
+
+ -- Draws the slider on the screen using the given layer
+ function self:draw(layer)
+ -- Localize object data
+ local x, y, w, l = self.x, self.y, self.w, self.l
+ local min, max, ratio = self.min, self.max
+
+ local font = loadFont('Play', 14)
+
+ -- Get cursor data
+ local mx, my = getCursor()
+ local pressed = getCursorPressed()
+ local released = getCursorReleased()
+
+ -- Determine if the cursor is on the bar and detect if the mouse is down
+ if (mx >= x and mx <= x+w) and (my >= y and my <= y+l) then
+
+ if pressed then self.drag = true end
+ end
+
+ -- Set the ratio based on the cursor position
+ if self.drag then
+ self.ratio = math.max(0, math.min(1, 1 - (my-y)/l))
+ if released then
+ self.drag = false
+ end
+ end
+
+ local ratio = self.ratio
+ local h = ratio*(max-min)
+ local color = self.color
+
+ -- Draw the slider
+ setDefaultStrokeColor(layer, Shape_BoxRounded, 1, 1, 1, 1)
+ setDefaultStrokeWidth(layer, Shape_BoxRounded, 0.1)
+
+ setNextFillColor(layer, 0.1, 0.1, 0.1, 1)
+ addBoxRounded(layer, x, y, w, l, 0)
+
+ setNextFillColor(layer, color[1], color[2], color[3], 1)
+ addBoxRounded(layer, x, y+(1-ratio)*l, w, l*ratio, 0)
+
+ setNextFillColor(layer, 0.5, 0.5, 0.5, 1)
+ addBoxRounded(layer, x-3, y+(1-ratio)*l -3, w+6, 6, 0)
+
+ -- Draw label and value display
+ local label = self.label
+ setNextTextAlign( layer, AlignH_Center, AlignV_Middle)
+ addText( layer, font, label, x+0.5*w, y-14)
+
+ local display = string.format('%.0f', math.floor(((ratio*(max - min) + min)*255)+0.5))
+ setNextTextAlign( layer, AlignH_Center, AlignV_Middle)
+ addText( layer, font, display, x+0.5*w, y+l+14)
+ end
+
+
+ return setmetatable(self, Slider)
+ end
+
+end
+
+
+-- Get screen resolution
+local rx, ry = getResolution()
+local click = getCursorDown()
+
+-- Draw the 3 sliders
+if not _init then
+ local r, g, b = 0.5, 0.5, 0.5
+
+ sliderRed = Slider:new(rx*0.8, ry*0.2, 16, ry*0.6, 0, 1, r, "Red")
+ sliderRed.color = { 1, 0, 0}
+ sliderGreen = Slider:new(rx*0.85, ry*0.2, 16, ry*0.6, 0, 1, g, "Green")
+ sliderGreen.color = { 0, 1, 0}
+ sliderBlue = Slider:new(rx*0.9, ry*0.2, 16, ry*0.6, 0, 1, b, "Blue")
+ sliderBlue.color = { 0, 0, 1}
+
+ _init = true
+end
+-- Set the background color based on sliders value
+setBackgroundColor( sliderRed.ratio, sliderGreen.ratio, sliderBlue.ratio, 1)
+local layer = createLayer()
+
+setNextFillColor( layer, 0.05, 0.05, 0.05, 1)
+addBoxRounded( layer, rx*0.75 +8, ry*0.1, rx*0.2, ry*0.8, 16)
+
+local font = loadFont('Play', 14)
+setNextFillColor( layer, 0.05, 0.05, 0.05, 1)
+addText(layer, font, math.floor((sliderRed.ratio*255)+0.5)..","..math.floor((sliderGreen.ratio*255)+0.5)..","..math.floor((sliderBlue.ratio*255)+0.5), 15, 15)
+if click then setOutput(math.floor((sliderRed.ratio*255)+0.5)..","..math.floor((sliderGreen.ratio*255)+0.5)..","..math.floor((sliderBlue.ratio*255)+0.5)) end
+
+sliderRed:draw( layer)
+sliderGreen:draw( layer)
+sliderBlue:draw( layer)
+
+requestAnimationFrame(1)
\ No newline at end of file
diff --git a/Matrix Code Rain/MatrixCodeRain - Renderscript.txt b/Matrix Code Rain/MatrixCodeRain - Renderscript.txt
new file mode 100644
index 0000000..6579778
--- /dev/null
+++ b/Matrix Code Rain/MatrixCodeRain - Renderscript.txt
@@ -0,0 +1,287 @@
+function randomString(length)
+ if not length or length <= 0 then return '' end
+ local rand1 = math.random(#charset)
+ return string.sub(charset, rand1, rand1)
+end
+
+if not init then
+ l3fontsize = 40
+ l2fontsize = 30
+ l1fontsize = 20
+ l3xoffset = -20
+ l3yoffset = 0
+ l2xoffset = -20
+ l2yoffset = 0
+ l1xoffset = -20
+ l1yoffset = 0
+ fontL = loadFont("Play", l1fontsize)
+ fontM = loadFont("Play", l2fontsize)
+ fontS = loadFont("Play", l3fontsize)
+ rx, ry = getResolution()
+ cx1, cy1 = rx/l1fontsize, ry/l1fontsize
+ cx2, cy2 = rx/l2fontsize, ry/l2fontsize
+ cx3, cy3 = rx/l3fontsize, ry/l3fontsize
+ mem1 = {}
+ mem2 = {}
+ mem3 = {}
+ charset = "0123456789ABCDEF"
+ for ix=1,cx1 do
+ mem1[ix] = {}
+ for iy=1,cy1 do
+ mem1[ix][iy] = {}
+ for iz=1,2 do
+ if iz == 1 then
+ mem1[ix][iy][iz] = randomString(1)
+ else
+ mem1[ix][iy][iz] = 1
+ end
+ end
+ end
+ end
+ for jx=1,cx2 do
+ mem2[jx] = {}
+ for jy=1,cy2 do
+ mem2[jx][jy] = {}
+ for jz=1,2 do
+ if jz == 1 then
+ mem2[jx][jy][jz] = randomString(1)
+ else
+ mem2[jx][jy][jz] = 1
+ end
+ end
+ end
+ end
+ for kx=1,cx3 do
+ mem3[kx] = {}
+ for ky=1,cy3 do
+ mem3[kx][ky] = {}
+ for kz=1,2 do
+ if kz == 1 then
+ mem3[kx][ky][kz] = randomString(1)
+ else
+ mem3[kx][ky][kz] = 1
+ end
+ end
+ end
+ end
+ init = true
+end
+
+fontL = loadFont("Play", l1fontsize)
+fontM = loadFont("Play", l2fontsize)
+fontS = loadFont("Play", l3fontsize)
+layer1 = createLayer()
+layer2 = createLayer()
+layer3 = createLayer()
+
+function randomValueL1()
+ if posx ~= nil then
+ mem1[posx][posy][1] = randomString(1)
+ else
+ local randx1 = math.random(math.floor(cx1))
+ local randy1 = math.random(math.floor(cy1))
+ mem1[randx1][randy1][1] = randomString(1)
+ end
+end
+
+function randomValueL2(posx,posy)
+ if posx ~= nil then
+ mem2[posx][posy][1] = randomString(1)
+ else
+ local randx2 = math.random(math.floor(cx2))
+ local randy2 = math.random(math.floor(cy2))
+ mem2[randx2][randy2][1] = randomString(1)
+ end
+end
+
+function randomValueL3(posx,posy)
+ if posx ~= nil then
+ mem3[posx][posy][1] = randomString(1)
+ else
+ local randx3 = math.random(math.floor(cx3))
+ local randy3 = math.random(math.floor(cy3))
+ mem3[randx3][randy3][1] = randomString(1)
+ end
+end
+
+function updateStatesL1()
+ for dx=1,cx1 do
+ local changecount = 0
+ for dy=1,cy1 do
+ dy0 = (dy - 1)
+ dy2 = dy+1
+ if dy0 > 0 then
+ if mem1[dx][dy][2] == 1 then
+ if mem1[dx][dy0][2] == 0 then
+ if changecount == 0 then
+ mem1[dx][dy][2] = 0
+ changecount = 1
+ end
+ end
+ end
+ end
+ if dy2 < cy1 then
+ if mem1[dx][dy][2] == 1 then
+ if mem1[dx][dy2][2] == 0 then
+ if changecount == 0 then
+ mem1[dx][dy2][2] = 1
+ randomValueL1(dx,dy2)
+ changecount = 1
+ end
+ end
+ end
+ end
+ end
+ rand4 = math.random(5)
+ if rand4 == 1 then
+ if changecount == 0 then
+ mem1[dx][1][2] = 0
+ changecount = 1
+ end
+ end
+ if rand4 == 4 then
+ if changecount == 0 then
+ mem1[dx][1][2] = 1
+ randomValueL1(dx,1)
+ changecount = 1
+ end
+ end
+ end
+end
+
+function updateStatesL2()
+ for fx=1,cx2 do
+ local changecount = 0
+ for fy=1,cy2 do
+ fy0 = (fy - 1)
+ fy2 = fy+1
+ if fy0 > 0 then
+ if mem2[fx][fy][2] == 1 then
+ if mem2[fx][fy0][2] == 0 then
+ if changecount == 0 then
+ mem2[fx][fy][2] = 0
+ changecount = 1
+ end
+ end
+ end
+ end
+ if fy2 < cy2 then
+ if mem2[fx][fy][2] == 1 then
+ if mem2[fx][fy2][2] == 0 then
+ if changecount == 0 then
+ mem2[fx][fy2][2] = 1
+ randomValueL2(fx,fy2)
+ changecount = 1
+ end
+ end
+ end
+ end
+ end
+ rand5 = math.random(5)
+ if rand5 == 1 then
+ if changecount == 0 then
+ mem2[fx][1][2] = 0
+ changecount = 1
+ end
+ end
+ if rand5 == 4 then
+ if changecount == 0 then
+ mem2[fx][1][2] = 1
+ randomValueL1(fx,1)
+ changecount = 1
+ end
+ end
+ end
+end
+
+function updateStatesL3()
+ for gx=1,cx3 do
+ local changecount = 0
+ for gy=1,cy3 do
+ gy0 = (gy - 1)
+ gy2 = gy+1
+ if gy0 > 0 then
+ if mem3[gx][gy][2] == 1 then
+ if mem3[gx][gy0][2] == 0 then
+ if changecount == 0 then
+ mem3[gx][gy][2] = 0
+ changecount = 1
+ end
+ end
+ end
+ end
+ if gy2 < cy3 then
+ if mem3[gx][gy][2] == 1 then
+ if mem3[gx][gy2][2] == 0 then
+ if changecount == 0 then
+ mem3[gx][gy2][2] = 1
+ randomValueL3(gx,gy2)
+ changecount = 1
+ end
+ end
+ end
+ end
+ end
+ rand6 = math.random(5)
+ if rand6 == 1 then
+ if changecount == 0 then
+ mem3[gx][1][2] = 0
+ changecount = 1
+ end
+ end
+ if rand6 == 4 then
+ if changecount == 0 then
+ mem3[gx][1][2] = 1
+ randomValueL3(gx,1)
+ changecount = 1
+ end
+ end
+ end
+end
+
+function DrawAllTextL1()
+ for bx=1,cx1 do
+ for by=1,cy1 do
+ for bz=1,2 do
+ if mem1[bx][by][2] == 1 then
+ setNextFillColor(layer1, 0, 0.25, 0, 0.33)
+ addText(layer1, fontL, mem1[bx][by][1], (l1fontsize*bx)+l1xoffset, (l1fontsize*by)+l1yoffset)
+ end
+ end
+ end
+ end
+end
+
+function DrawAllTextL2()
+ for ex=1,cx2 do
+ for ey=1,cy2 do
+ for ez=1,2 do
+ if mem2[ex][ey][2] == 1 then
+ setNextFillColor(layer2, 0, 0.5, 0, 0.5)
+ addText(layer2, fontM, mem2[ex][ey][1], (l2fontsize*ex)+l2xoffset, (l2fontsize*ey)+l2yoffset)
+ end
+ end
+ end
+ end
+end
+
+function DrawAllTextL3()
+ for hx=1,cx3 do
+ for hy=1,cy3 do
+ for hz=1,2 do
+ if mem3[hx][hy][2] == 1 then
+ setNextFillColor(layer3, 0, 1, 0, 0.66)
+ addText(layer3, fontS, mem3[hx][hy][1], (l3fontsize*hx)+l3xoffset, (l3fontsize*hy)+l3yoffset)
+ end
+ end
+ end
+ end
+end
+
+updateStatesL3()
+updateStatesL2()
+updateStatesL1()
+DrawAllTextL3()
+DrawAllTextL2()
+DrawAllTextL1()
+requestAnimationFrame(3)
\ No newline at end of file
diff --git a/Particle System/Particle System - Renderscript.txt b/Particle System/Particle System - Renderscript.txt
new file mode 100644
index 0000000..07f3bde
--- /dev/null
+++ b/Particle System/Particle System - Renderscript.txt
@@ -0,0 +1,116 @@
+if not init then
+ maxparticles = 120
+ particlespeed = 0.25
+ velocitylimit = 5
+ particles = {}
+ for aa=1,maxparticles do
+ particles[aa] = {}
+ particles[aa][1] = math.random(1,1000)
+ particles[aa][2] = math.random(1,600)
+ local neg = math.random(1,2) - 1
+ if neg == 0 then
+ neg = -1
+ end
+ particles[aa][3] = math.random(1,100)/100 * neg
+ neg = math.random(1,2) - 1
+ if neg == 0 then
+ neg = -1
+ end
+ particles[aa][4] = math.random(1,100)/100 * neg
+ particles[aa][5] = 0
+ particles[aa][6] = 0
+ end
+ -- xpos, ypos, xvec, yvec,
+
+ --particle behaviour
+ edgebehaviour = 1
+ gravity = 0
+ attraction = 1
+ attractdistance = 100
+ connect = 1
+ velolimiting = 1
+
+
+ function DrawParticles()
+ for ac=1,maxparticles do
+ setNextFillColor(layer1,0.3,0,0.3,0.6)
+ addCircle(layer1, particles[ac][1], particles[ac][2], 5)
+ end
+ end
+
+ function UpdateParticles()
+ for ac=1,maxparticles do
+ if edgebehaviour == 1 then
+ if particles[ac][1] > (rx - 10) then --right
+ particles[ac][3] = particles[ac][3] * -1
+ end
+ if particles[ac][1] < 10 then --left
+ particles[ac][3] = math.abs(particles[ac][3])
+ end
+
+ if particles[ac][2] < 10 then --top
+ particles[ac][4] = math.abs(particles[ac][4])
+ end
+ if particles[ac][2] > (ry - 10) then --bottom
+ particles[ac][4] = particles[ac][4] * -1
+ end
+ end
+ if edgebehaviour == 2 then
+ if particles[ac][1] > (rx - 10) then --right
+ particles[ac][1] = particles[ac][1] - rx
+ end
+ if particles[ac][1] < 10 then --left
+ particles[ac][1] = particles[ac][1] + rx
+ end
+
+ if particles[ac][2] < 10 then --top
+ particles[ac][2] = particles[ac][2] + ry
+ end
+ if particles[ac][2] > (ry - 10) then --bottom
+ particles[ac][2] = particles[ac][2] - ry
+ end
+ end
+ if attraction == 1 or connect == 1 then
+ for af=1,maxparticles do
+ if af ~= ac then
+ local tempx1 = particles[ac][1]
+ local tempx2 = particles[af][1]
+ local tempy1 = particles[ac][2]
+ local tempy2 = particles[af][2]
+ if math.abs(tempx2 - tempx1) < attractdistance then
+ if math.abs(tempy2 - tempy1) < attractdistance then
+ if connect == 1 then
+ local dist1 = (tempx1 - tempx2)/attractdistance
+ local dist2 = (tempy1 - tempy2)/attractdistance
+ local distavg = (dist1 + dist2) / 2
+ setNextStrokeColor(layer1,0.4+distavg,distavg,0.4-distavg,0.4+distavg)
+ addLine(layer1,tempx1,tempy1,tempx2,tempy2)
+ end
+ if attraction == 1 then
+ particles[ac][3] = particles[ac][3] - (((tempx2 - tempx1)/attractdistance)*0.05)
+ particles[ac][4] = particles[ac][4] - (((tempy2 - tempy1)/attractdistance)*0.05)
+ end
+ end
+ end
+ end
+ end
+ end
+ if velolimiting == 1 then
+ if particles[ac][3] > velocitylimit then particles[ac][3] = velocitylimit end
+ if particles[ac][3] < -velocitylimit then particles[ac][3] = -velocitylimit end
+ if particles[ac][4] > velocitylimit then particles[ac][4] = velocitylimit end
+ if particles[ac][4] < -velocitylimit then particles[ac][4] = -velocitylimit end
+ end
+ particles[ac][1] = particles[ac][1] + (particlespeed * particles[ac][3])
+ particles[ac][2] = particles[ac][2] + (particlespeed * particles[ac][4])
+ end
+ end
+ init = true
+end
+rx, ry = getResolution()
+layer1 = createLayer()
+
+UpdateParticles()
+DrawParticles()
+
+requestAnimationFrame(1)
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..f034657
--- /dev/null
+++ b/README.md
@@ -0,0 +1,27 @@
+# DU-Lua-Scripts
+A collection of potentially useful scripts and tools for Lua programming in Dual Universe.
+Nothing super complicated here, but perhaps you find some of these scripts useful to learn from.
+
+## List of available open-source scripts:
+
+