Advertisement
LordMZTE

plethora Laser

May 20th, 2018
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 KB | None | 0 0
  1. local modules = peripheral.find("neuralInterface")
  2. if not modules then
  3.     error("Must have a neural interface", 0)
  4. end
  5. if not modules.hasModule("plethora:sensor") then
  6.     error("Must have an entity sensor", 0)
  7. end
  8. if not modules.hasModule("plethora:introspection") then
  9.     error("Must have an introspection module", 0)
  10. end
  11. if not modules.hasModule("plethora:laser", 0) then
  12.     error("Must have a laser", 0)
  13. end
  14. while true do
  15.     local meta = modules.getMetaOwner()
  16.     if meta.isSneaking then
  17.         modules.fire(meta.yaw, meta.pitch, 5)
  18.         sleep(0.2)
  19.     else
  20.         sleep(0.1)
  21.     end
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement