TechManDylan

laser

Apr 21st, 2021 (edited)
203
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local modules = peripheral.find("neuralInterface")
  2. if not modules then
  3.     error("Must have a neural interface", 0)
  4. end
  5.  
  6. if not modules.hasModule("plethora:sensor") then
  7.     error("Must have an entity sensor", 0)
  8. end
  9. if not modules.hasModule("plethora:introspection") then
  10.     error("Must have an introspection module", 0)
  11. end
  12. if not modules.hasModule("plethora:laser", 0) then
  13.     error("Must have a laser", 0)
  14. end
  15.  
  16. while true do
  17.     local meta = modules.getMetaOwner()
  18.     if meta.isSneaking then
  19.         modules.fire(meta.yaw, meta.pitch, 5)
  20.         sleep(0.2)
  21.     else
  22.         sleep(0.1)
  23.     end
  24. end
  25.  
RAW Paste Data