Advertisement
tuturox

Untitled

Mar 18th, 2022
1,007
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local chatB = peripheral.wrap("right")
  2. local playerB = peripheral.wrap("left")
  3.  
  4. function ChekPidor()
  5.     local listPlayer = playerB.getOnlinePlayers()
  6.     local playerNumber = table.getn(listPlayer)
  7.     chatB.sendMessage("O vas aj: ".. playerNumber , "SHODAN")
  8.     sleep(1)
  9.  chatB.sendMessage("Taaaak kto je stanet pidorom?!", "SHODAN")
  10.  local d = math.random(1, playerNumber)
  11.  sleep(3)
  12.     chatB.sendMessage("Pidorom budet: ".. listPlayer[d], "SHODAN")
  13. end
  14.  
  15.  
  16. while true do
  17.     event, username, message = os.pullEvent("chat") --By Igor
  18.     if(message == "pidor") then
  19.         ChekPidor()
  20.     end
  21. end
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement