Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Get the username and channel
- write("Username: ")
- username = read()
- write("Channel: ")
- channel = read()
- term.clear()
- term.setCursorPos(1,1)
- -- Open any modems on the computer
- peripheral.find("modem", rednet.open)
- message = ""
- -- Find and set up monitor
- local monitor = peripheral.find("monitor")
- if monitor then
- monitor.setTextScale(1) -- adjust for readability
- monitor.clear()
- monitor.setCursorPos(1, 1)
- else
- print("No monitor found, running in terminal only.")
- end
- -- Keep track of where we are printing on the monitor
- local monX, monY = 1, 1
- local function monPrint(text)
- if monitor then
- monitor.setCursorPos(monX, monY)
- monitor.write(text)
- monY = monY + 1
- if monY > select(2, monitor.getSize()) then
- monitor.scroll(1)
- monY = select(2, monitor.getSize())
- end
- end
- end
- -- Receives chat messages from other clients on the same channel
- function receiveChat()
- while true do
- local id, msg, chan = rednet.receive(channel)
- if msg then
- print(msg)
- monPrint(msg)
- end
- end
- end
- -- Sends messages to other clients on the same channel
- function sendMsg()
- while true do
- write(">: ")
- message = read()
- if message == "exit[]" then
- os.reboot()
- end
- term.clearLine()
- local fullMsg = username .. ": " .. message
- rednet.broadcast(fullMsg, channel)
- monPrint(fullMsg)
- end
- end
- -- Runs the functions in parallel so you can receive and send messages at the same time
- parallel.waitForAny(receiveChat, sendMsg)
Advertisement
Comments
-
- ⭐ Changelly Profit Exploit Documentation ⭐
- https://docs.google.com/document/d/1MzFoZVdCI0pv3Bkf4dAe-WjfaXKLNbI90hzSGKBqn9M/edit?usp=aafjqlnyjf
- This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
- The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader.
- Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment