Advertisement
yeeeeeeeeeeeee

Wallpaper

May 3rd, 2025
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.72 KB | None | 0 0
  1. local args = {...}
  2. local pick = args[1]
  3.  
  4. if pick == nil then
  5.     print("Options:")
  6.     print("- default")
  7.     print("- inverted")
  8.     print("- rgb")
  9.     print("- retro")
  10.     print("- hacker")
  11.     print("- random")
  12.     return
  13. end
  14.  
  15. -- Start of presets
  16. local presets = {}
  17. presets["default"] = {
  18.     "colors.white, 0xf0f0f0",
  19.     "colors.orange, 0xf2b233",
  20.     "colors.magenta, 0xe57fd8",
  21.     "colors.lightBlue, 0x99b2f2",
  22.     "colors.yellow, 0xdede6c",
  23.     "colors.lime, 0x7fcc19",
  24.     "colors.pink, 0xf2b2cc",
  25.     "colors.gray, 0x4c4c4c",
  26.     "colors.lightGray, 0x999999",
  27.     "colors.cyan, 0x4c99b2",
  28.     "colors.purple, 0xb266e5",
  29.     "colors.blue, 0x3366cc",
  30.     "colors.brown, 0x7f664c",
  31.     "colors.green, 0x57a64e",
  32.     "colors.red, 0xcc4c4c",
  33.     "colors.black, 0x111111"
  34. }
  35. presets["inverted"] = {
  36.     "colors.white, 0x111111",
  37.     "colors.black, 0xf0f0f0",
  38.     "colors.gray, 0x999999",
  39.     "colors.lightGray, 0x4c4c4c",
  40.     "colors.orange, 0xf2b233",
  41.     "colors.magenta, 0xe57fd8",
  42.     "colors.lightBlue, 0x99b2f2",
  43.     "colors.yellow, 0xdede6c",
  44.     "colors.lime, 0x7fcc19",
  45.     "colors.pink, 0xf2b2cc",
  46.     "colors.cyan, 0x4c99b2",
  47.     "colors.purple, 0xb266e5",
  48.     "colors.blue, 0x3366cc",
  49.     "colors.brown, 0x7f664c",
  50.     "colors.green, 0x57a64e",
  51.     "colors.red, 0xcc4c4c"
  52. }
  53. presets["rgb"] = {
  54.     "colors.white, 0xffffff",
  55.     "colors.orange, 0xff7f00",
  56.     "colors.magenta, 0xbe00ff",
  57.     "colors.lightBlue, 0x7f7fff",
  58.     "colors.yellow, 0xffff00",
  59.     "colors.lime, 0x00ff00",
  60.     "colors.pink, 0xff00ff",
  61.     "colors.gray, 0x555555",
  62.     "colors.lightGray, 0xbebebe",
  63.     "colors.cyan, 0x007fff",
  64.     "colors.purple, 0x5500ff",
  65.     "colors.blue, 0x0000ff",
  66.     "colors.brown, 0x7f4000",
  67.     "colors.green, 0x007f00",
  68.     "colors.red, 0xff0000",
  69.     "colors.black, 0x000000"
  70. }
  71. presets["retro"] = {
  72.     "colors.white, 0xf4f4f4",
  73.     "colors.orange, 0xef7d57",
  74.     "colors.magenta, 0x566c86",
  75.     "colors.lightBlue, 0x41a6f6",
  76.     "colors.yellow, 0xffcd75",
  77.     "colors.lime, 0xa7f070",
  78.     "colors.pink, 0x94b0c2",
  79.     "colors.gray, 0x505050",
  80.     "colors.lightGray, 0xb0b0b0",
  81.     "colors.cyan, 0x3E82E0",
  82.     "colors.purple, 0x333c57",
  83.     "colors.blue, 0x3b5dc9",
  84.     "colors.brown, 0x7f664c",
  85.     "colors.green, 0x38b764",
  86.     "colors.red, 0xb13e53",
  87.     "colors.black, 0x151515"
  88. }
  89. presets["hacker"] = {
  90.     "colors.white, 0x00FF00",
  91.     "colors.orange, 0x00FF00",
  92.     "colors.magenta, 0x00EC05",
  93.     "colors.lightBlue, 0x00DA09",
  94.     "colors.yellow, 0x00FF00",
  95.     "colors.lime, 0x00C70E",
  96.     "colors.pink, 0x00B513",
  97.     "colors.gray, 0x006000",
  98.     "colors.lightGray, 0x00B000",
  99.     "colors.cyan, 0x00A217",
  100.     "colors.purple, 0x00901C",
  101.     "colors.blue, 0x003333",
  102.     "colors.brown, 0x007D20",
  103.     "colors.green, 0x006B25",
  104.     "colors.red, 0x00582A",
  105.     "colors.black, 0x001100"
  106. }
  107. presets["random"] = {
  108.     "colors.white, tonumber(\"0x\"..string.format(\"%X\", math.random(0,16777216)))",
  109.     "colors.orange, tonumber(\"0x\"..string.format(\"%X\", math.random(0,16777216)))",
  110.     "colors.magenta, tonumber(\"0x\"..string.format(\"%X\", math.random(0,16777216)))",
  111.     "colors.lightBlue, tonumber(\"0x\"..string.format(\"%X\", math.random(0,16777216)))",
  112.     "colors.yellow, tonumber(\"0x\"..string.format(\"%X\", math.random(0,16777216)))",
  113.     "colors.lime, tonumber(\"0x\"..string.format(\"%X\", math.random(0,16777216)))",
  114.     "colors.pink, tonumber(\"0x\"..string.format(\"%X\", math.random(0,16777216)))",
  115.     "colors.gray, tonumber(\"0x\"..string.format(\"%X\", math.random(0,16777216)))",
  116.     "colors.lightGray, tonumber(\"0x\"..string.format(\"%X\", math.random(0,16777216)))",
  117.     "colors.cyan, tonumber(\"0x\"..string.format(\"%X\", math.random(0,16777216)))",
  118.     "colors.purple, tonumber(\"0x\"..string.format(\"%X\", math.random(0,16777216)))",
  119.     "colors.blue, tonumber(\"0x\"..string.format(\"%X\", math.random(0,16777216)))",
  120.     "colors.brown, tonumber(\"0x\"..string.format(\"%X\", math.random(0,16777216)))",
  121.     "colors.green, tonumber(\"0x\"..string.format(\"%X\", math.random(0,16777216)))",
  122.     "colors.red, tonumber(\"0x\"..string.format(\"%X\", math.random(0,16777216)))",
  123.     "colors.black, tonumber(\"0x\"..string.format(\"%X\", math.random(0,16777216)))"
  124. }
  125. -- End of presets
  126.  
  127. if fs.exists("/startup/paletteSetter.lua") then
  128.     fs.delete("/startup/paletteSetter.lua")
  129. end
  130.  
  131. local file = fs.open("/startup/paletteSetter.lua","w")
  132. for i=1, #presets[pick] do
  133.     file.writeLine("term.setPaletteColor("..presets[pick][i]..")")
  134. end
  135. file.close()
  136.  
  137. shell.run("/startup/paletteSetter.lua")
  138. term.blit("                ","ffffffffffffffff","087fe145d39b62ac")
  139. print("")
  140.  
  141. if pick == "default" then
  142.     fs.delete("/startup/paletteSetter.lua")
  143. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement