anyways, it basically is a encryption and decryption code….
os.pullEvent == os.pullEventRaw
function top()
rednet.open("top")
term.clear()
term.setCursorPos(1,1)
term.setTextColor(colors.lightBlue)
print("SimpleOS")
term.setTextColor(colors.gray)
print("========")
term.setTextColor(colors.white)
sleep(1)
term.setTextColor(colors.green)
print("Password: ")
local pass = read()
if pass == ("a22h013S[123]") then
end top()
else
os.reboot()
end
end
function encrypte() --This encryptes the msg you want to send.
msg ==
"a" == "01"
"b" == "001"
"c" == "0001"
"d" == "0010"
"e" == "0100"
"f" == "1000"
"g" == "1001"
"h" == "1010"
"i" == "1100"
"j" == "1110"
"k" == "1101"
"l" == "0110"
"m" == "1011"
"n" == "0011"
"o" == "0111"
"p" == "0010"
"q" == "1111"
"r" == "10"
"s" == "110"
"t" == "010"
"u" == "100"
"v" == "111"
"w" == "101"
"x" == "000"
"y" == "011"
"z" == "0000"
= Nmsg
end
function send()
rednet.broadcast(Nmsg)
end
function decrypte() --This decryptes the message your receiveing
RDmsg ==
"01" == "a"
"001" == "b"
"0001" == "c"
"0010" == "d"
"0100" == "e"
"1000" == "f"
"1001" == "j"
"1010" == "h"
"1100" == "i"
"1110" == "j"
"1101" == "k"
"0110" == "l"
"1011" == "m"
"0011" == "n"
"0111" == "o"
"0010" == "p"
"1111" == "q"
"10" == "r"
"110" == "s"
"010" == "t"
"100" == "u"
"111" == "v"
"101" == "w"
"000" == "x"
"011" == "y"
"0000" == "z"
= RNmsg
end
function receive()
id,DRmsg == rednet.receive
end
top()
while true do
term.setTextColor(colors.lime)
print("Message: ")
term.setTextColor(colors.white)
local msg = read()
encrypte(msg)
send(Nmsg)
receive(DRmsg)
decrypte(DRmsg)
term.setTextColor(colors.purple)
print(id..":Message: ")
write(RNmsg)
end