Advertisement
Guest User

Untitled

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