Advertisement
_Ziper_YT_

Untitled

Nov 3rd, 2024 (edited)
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. nick = "_Ziper_"
  2. local modem = peripheral.find("modem")
  3. modem.open(19276)
  4. a = false
  5. b = false
  6. while true do
  7. local event, username, message, uuid, isHidden = os.pullEvent("chat")
  8. local words = {}
  9. for word in string.gmatch(message, "%S+") do
  10. table.insert(words, word)
  11. end
  12. if username == "_Ziper_" or username == nick then
  13. if words[1] == "go" then
  14. print(message)
  15. if a == false then
  16. print("T")
  17. redstone.setOutput("top", true)
  18. a = true
  19. elseif a == true then
  20. print("F")
  21. redstone.setOutput("top", false)
  22. a = false
  23. end
  24. elseif words[1] == "st" then
  25. redstone.setOutput("front", true)
  26. redstone.setOutput("top", false)
  27. a = false
  28. sleep(5)
  29. redstone.setOutput("front", false)
  30. elseif words[1] == "dostyp" and username ~= nick then
  31. nick = tostring(words[2])
  32. end
  33. elseif words[1] == "lift" then
  34. blocks = mwords[2]
  35. modem.transmit(19276, 19276, blocks)
  36. end
  37. end
  38. end
  39.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement