Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function one()
- sleep(0.1)
- data = sens.getPlayerData(name)
- loadstring(runit)
- print("loaded")
- print(value)
- valuetext.setText(value)
- print("set")
- end
- function two()
- os.pullEvent("chat_command")
- bacon = false
- print("event pulled")
- end
- sens = peripheral.wrap("left")
- terminal = peripheral.wrap("right")
- terminal.clear()
- namebox = terminal.addBox(10, 10, 75, 25, 0x00FFFF, 0.5)
- nametext = terminal.addText(12, 17, "placeholder", 0xFFFFFF)
- typebox = terminal.addBox(10, 40, 50, 15, 0x00FFFF, 0.5)
- valuebox = terminal.addBox(10, 60, 50, 15, 0x00FFFF, 0.5)
- typetext = terminal.addText(12, 45, "I'm not going to make the type work.", 0xFFFFFF)
- valuetext = terminal.addText(12, 65, "1", 0xFFFFFF)
- while true do
- local _, msg = os.pullEvent("chat_command")
- data = sens.getPlayerData(name)
- print(data.health)
- if string.find(msg, "name") then
- for word in msg:gmatch('%S+') do
- if word == "name" then
- print("nope")
- else
- name = word
- end
- end
- nametext.setText(name)
- print(name.."t")
- else
- end
- if string.find(msg, "typeset") then
- local pos = string.find(msg, " ")
- local type = string.sub(msg, 1, pos, -1)
- typetext.setText(type)
- end
- if string.find(msg, "value") then
- runit = msg
- end
- if msg == "loop" then
- bacon = true
- while bacon == true do
- parallel.waitForAny(function() one() end, function() return two() end)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement