Hydroxios

color_rs_sender

Jan 20th, 2016
110
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function getColorFromString(color_name)
  2.  
  3.     if color_name == white then
  4.         return 0 + 1;
  5.     else if color_name == yellow then
  6.         return 4 + 1;
  7.     end
  8.     end
  9.  
  10. end
  11.  
  12. while true do
  13.  
  14.  
  15.     print("Enter a color name: ")
  16.     read_str = read()
  17.  
  18.     color = getColorFromString(read_str)
  19.  
  20.     rs.setBundledOutput("left", tonumber(color))
  21.  
  22.     sleep(1)
  23.  
  24. end
RAW Paste Data