Exozze

Untitled

Sep 24th, 2021
835
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local component = require("component")
  2. local computer = require("computer")
  3. local whitelist = {['Exozze'] = true}
  4. local term = require("term")
  5. local t = require("table")
  6. local event = require("event")
  7. local gpu = component.gpu
  8. local r = component.radar
  9. local chat = component.chat_box
  10. local players = {}
  11. chat.setName("§9ВНИМАНИЕ§7")
  12. floor = math.floor
  13.  
  14. gpu.setResolution(35,15)
  15.  
  16. color = {
  17.   green = 0x00ff00,
  18.   yellow = 0xffb600,
  19.   red = 0xff0000
  20. }
  21. function palevo()
  22.   local scan = r.getPlayers()
  23.   for i = 1, #scan do
  24.    if not whitelist[scan[i].name] then
  25.     t.insert(players, scan[i].name)
  26.    end
  27. end
  28.   local info = t.concat(players,",")
  29.    chat.say("§6Был замечен: §c" ..info)
  30.   players = {}
  31. end
  32.  
  33. while true do
  34. local pl = r.getPlayers()
  35. term.clear()
  36.   gpu.setForeground(color.yellow)
  37.   gpu.set(2,1, 'В зоне обнаружения радара: '..#pl..' чел.')
  38.     for i = 1, #pl do
  39.       if whitelist[pl[i].name] then gpu.setForeground(color.green)
  40.       else gpu.setForeground(color.red) end
  41.       gpu.set(2, i+1, i..'. '..pl[i].name)
  42.       gpu.set(25, i+1, ' - '..floor(pl[i].distance)..' м')
  43.   if r.getPlayers() then
  44.    for j = 1, #pl do
  45.     if not whitelist[pl[j].name] then
  46.       palevo()
  47.     end
  48.    end
  49. end
  50. end
  51.   os.sleep(30)
  52. end
RAW Paste Data