Advertisement
BluAxolotl

CC:Turtle Interface Client

Oct 27th, 2022 (edited)
1,243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.41 KB | None | 0 0
  1. local connectionURL = "wss://MCTurtleClient.donovanedwards.repl.co"
  2. local ws, err = http.websocket(connectionURL)
  3. if not ws then
  4.   return printError(err)
  5. end
  6.  
  7. ws.send("Hello BITCH!")
  8.  
  9. while true do
  10.   local _, url, response, isBinary = os.pullEvent("websocket_message")
  11.   if url == connectionURL and response != nil then
  12.         print(response)
  13.   else then
  14.         print("awaiting...")
  15.     break
  16.   end  
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement