info = { type = "image", title = "Rain sats", category = "btc", author = "BRRRO", version = "1.0", license = "MIT", desc = "Falling bitcoin coins and confetti", api = 33, } local BTC = { "00101000","11111100","01100110","01100110","01111100","01100011","01100011","11111110","00101000" } function render() local W, H, FPS = gfx.W, gfx.H, gfx.FPS for y = 0, H - 1 do local f = y / H gfx.rect(0, y, W, 1, 120 + 72 * f, 170 + 44 * f, 230 + 10 * f) end for i = 0, 13 do local x = (i * 37 + 11) % W local y = math.floor((i * 53 + frame * 48 / FPS) % (H + 8)) - 4 if i % 3 == 0 then for r = 1, 9 do local row = BTC[r] local Y = y + r - 1 if Y >= 0 and Y < H then for c = 1, 8 do if row:sub(c, c) == "1" then gfx.px(x + c - 1, Y, 255, 192, 72) end end end end elseif y >= 0 and y < H then if i % 2 == 1 then gfx.rect(x, y, 2, 2, 255, 172, 72) else gfx.rect(x, y, 2, 2, 255, 226, 124) end end end end