morganday

starter code for ap/cc:

Oct 1st, 2023 (edited)
731
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.92 KB | None | 0 0
  1. --orn code maked by morgaton on discord/morgatronday on pastebin. read bottem part for more info
  2. local perfix = "bot"
  3. local brakits = "[]"
  4. -- ^  [bot]
  5.  
  6. local wc1 = "test1" -- word check 1
  7. local rs1 = "test1 check" -- responds 1
  8. -- ect
  9.  
  10. local wc2 = "test2"
  11. local rs2 = "test2 check"
  12.  
  13. local wc3 = "test3"
  14. local rs3 = "test3 check"
  15.  
  16. local cb = peripheral.find("chatBox") -- looking for a chatBox™ defineing cb as the chatBox™ that we just found
  17. while(true)
  18. do
  19.  
  20.  local event,  un, ms = os.pullEvent("chat") -- un = username. ms = message
  21.  if ms == wc1
  22. then
  23. cb.sendMessage(rs1, perfix, brakits) -- gets all the shit and smashs it together
  24.  
  25. elseif ms == wc2
  26. then
  27. cb.sendMessage(rs2, perfix, brakits)
  28.  
  29. elseif ms == wc3
  30. then
  31. cb.sendMessage(rs3, perfix, brakits)
  32.  
  33.  end
  34. end
  35. -- feel free to edit or reupload my code just dont remove my thing at the top or credit me
  36. -- this was maked for cc: and ap on minecraft
Advertisement
Add Comment
Please, Sign In to add comment