Advertisement
Guest User

sonar

a guest
Apr 16th, 2015
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.38 KB | None | 0 0
  1. local sensor = peripheral.wrap("right")
  2. local chatbox = peripheral.wrap("left")
  3. while true do
  4.   local allPlayers = sensor.getNearbyPlayers(300)
  5.   local string = "!!! INTRUDER ALERT !!! - "
  6.  
  7.   for key, var in pairs(allPlayers) do
  8.     string = string .. var['player']
  9.   end
  10.   if string ~= "!!! INTRUDER ALERT !!! - " then
  11.     chatbox.tell("shoham", string)
  12.   end
  13.   sleep(1)
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement