Guest User

Untitled

a guest
Nov 18th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. local tArgs = {...}
  2. if #tArgs ~= 1 then
  3.   print("Usage: apiary <#>")
  4.   return
  5. end
  6.  
  7. local side = "left"
  8. local colors = {
  9.   "white",
  10.   "orange",
  11.   "magenta",
  12.   "lightblue",
  13.   "yellow",
  14.   "lime",
  15.   "pink",
  16.   "grey"
  17.   }
  18.  
  19. local select = tonumber( tArgs[1] )
  20. local state = tostring( tArgs[2] )
  21. local offcheck = tostring(tArgs[1])
  22.  
  23. for i=1,#colors do
  24.     if select == i then
  25.     local cs = ("colors."..colors[i])
  26.         if state == "on" then
  27.             rs.setBundledOutput(side,cs)
  28.         end
  29.     elseif offcheck = "off"
  30.         rs.setBundledOutput(side,0)
  31.     end
  32.        
  33. end
Add Comment
Please, Sign In to add comment