Advertisement
Guest User

startup

a guest
Jul 23rd, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. term.clear();
  2. term.setCursorPos(1,1);
  3. term.setTextColor(colors.green);
  4.  
  5. print("Detekuji prichozi redstone signal...");
  6.  
  7. term.setTextColor(colors.orange);
  8.  
  9. local turbine = peripheral.wrap("BigReactors-Turbine_2");
  10.  
  11. off, on = true;
  12.  
  13. while true do
  14.   if rs.getInput("bottom") then
  15.     turbine.setActive(true);  
  16.  
  17.     off = true;
  18.  
  19.     if on == true then
  20.       print("Turbina byla spustena!");
  21.      
  22.       on = false;
  23.     end
  24.   else
  25.     turbine.setActive(false);
  26.    
  27.     on = true;
  28.    
  29.     if off == true then
  30.       print("Turbina byla zastavena!");
  31.      
  32.       off = false;
  33.     end
  34.   end
  35.  
  36.   sleep(1);
  37. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement