ecco7777

CC Auto Laser Look Direction Entity Sensor

Jan 4th, 2026 (edited)
20
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.34 KB | None | 0 0
  1. -- CONFIG
  2. local PLAYER_NAME = "ecco7777"
  3. local POTENCY = 5
  4.  
  5. -- wrap peripherals
  6. local s = peripheral.wrap("back")
  7.  
  8. while true do
  9.     local meta = s.getMetaByName(PLAYER_NAME)
  10.     if meta and meta.yaw and meta.pitch then
  11.         -- fire laser in the look direction
  12.         s.fire(meta.yaw, meta.pitch, POTENCY)
  13.     end
  14.     sleep(0.1)
  15. end
  16.  
Advertisement
Add Comment
Please, Sign In to add comment