tuturox

Untitled

Mar 18th, 2022 (edited)
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  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.     chatB.sendMessage("Pidorom budet: "..  listPlayer(math.random(0, playerNumber)) , "SHODAN")
  11. end
  12.  
  13.  
  14. while true do
  15.     event, username, message = os.pullEvent("chat") -- Will be fired when someone sends a chat message
  16.     if(message == "pidor") then
  17.         ChekPidor()
  18.     end
  19. end
  20.  
  21.  
  22.  
Add Comment
Please, Sign In to add comment