Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local sensor = peripheral.wrap("right")
- local chatbox = peripheral.wrap("left")
- while true do
- local allPlayers = sensor.getNearbyPlayers(300)
- local string = "!!! INTRUDER ALERT !!! - "
- for key, var in pairs(allPlayers) do
- string = string .. var['player']
- end
- if string ~= "!!! INTRUDER ALERT !!! - " then
- chatbox.tell("shoham", string)
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement