Advertisement
_GameDoctor_

gset

Mar 12th, 2020
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.89 KB | None | 0 0
  1. local sides = require "sides"
  2. local robot = require "robot"
  3. local component = require "component"
  4. local active_slot = 1
  5. size=robot.inventorySize()
  6. local function Text()
  7.     os.execute("cls")
  8.     print("Обновлённая прошивка для робота Строителя успешно запущена.")
  9.     print("Спасибо за покупку :D")
  10.     print("By GameDoctor")
  11.     print("Если вы случайно отключили робота, чтобы запустить программу снова, пропишите gset")
  12. end
  13.  
  14. Text()
  15.  
  16.  
  17.  
  18. while true do
  19. robot.select(active_slot)
  20. if robot.count(active_slot) == 0 then
  21.     active_slot = active_slot + 1 end
  22.   if robot.select(active_slot) ==size then
  23.    active_slot = 1 end
  24. if robot.place() == false then active_slot = active_slot + 1 end
  25. if active_slot == size then active_slot = 1 end
  26. robot.place()
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement