Advertisement
CyMC888

Untitled

Apr 30th, 2024
1,031
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.39 KB | None | 0 0
  1. for i = 1, #blockData do
  2.  
  3.     local nextBlock = blockData["block"..i]
  4.     print(nextBlock)
  5.     local temp = textutils.unserialize(nextBlock)
  6.  
  7.     if doorState then
  8.  
  9.     tempBlock = temp["onBlock"]
  10.  
  11.     elseif not doorState then
  12.  
  13.     tempBlock = temp["offBlock"]
  14.  
  15.     end
  16.  
  17.     commands.execAsync("setblock "..temp["xPos"].." "..temp["yPos"].." "..temp["zPos"].." "..tempBlock)
  18.  
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement