Advertisement
_GameDoctor_

gbroke

Mar 12th, 2020
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.08 KB | None | 0 0
  1. local sides = require "sides"
  2. local robot = require "robot"
  3. local component = require "component"
  4. local inv = component.inventory_controller
  5. local Minimum = 0.2
  6. local active_slot = 1
  7.  
  8. local function Text()
  9.     os.execute("cls")
  10.     print("Обновлённая прошивка для робота Копателя успешно запущена.")
  11.     print("Спасибо за покупку :D")
  12.     print("By GameDoctor")
  13.     print("Если вы случайно отключили робота, чтобы запустить программу снова, пропишите gbroke")
  14. end
  15.  
  16. Text()
  17.  
  18. function Charging()
  19.    robot.turnLeft()
  20.     os.sleep(7)
  21.     robot.turnLeft()
  22.     os.sleep(7)
  23.      inv.equip()
  24.      robot.drop()
  25.       os.sleep(7)
  26.        robot.suck()
  27.         os.sleep(7)
  28.         robot.turnRight()
  29.         os.sleep(7)
  30.          robot.turnRight()
  31.             os.sleep(7)
  32.           inv.equip()
  33. end
  34.  
  35. function Energy()
  36.   if robot.durability() < Minimum then
  37.     Charging()
  38.   end
  39. end
  40.  
  41. while true do
  42.   if robot.durability() < Minimum then
  43. Energy()
  44. end
  45. robot.swing()
  46. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement