Advertisement
AkaShiroKage

Spawn Controller

Mar 19th, 2024 (edited)
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | Source Code | 0 0
  1. local reader = peripheral.find("blockReader")
  2. local nbtBuffer = peripheral.find("nbtStorage")
  3.  
  4. local taskID = "Task"
  5. local regex = "[0-9]+"
  6.  
  7. local function getValue()
  8. local data = textutils.serialiseJSON(reader.getBlockData()[taskID])
  9. local value = data:match(regex)
  10. return tonumber(value)
  11. end
  12.  
  13. print(getValue())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement