Advertisement
sasaa86

Untitled

Feb 1st, 2022
1,510
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 KB | None | 0 0
  1. local manager = peripheral.find("inventoryManager") -- Finds the peripheral if one is connected
  2.  
  3. if manager == nil then error("inventoryManager not found") end
  4.  
  5. manager.addItemToPlayer("UP", 63, 4, "minecraft:dirt") --Will add 63 dirt to the players inventory from the chest above. 4 Is the slot
  6.  
  7. manager.removeItemFromPlayer("UP", 114, -1, "minecraft:stone") --Will remove 114 stone blocks from the players inventory to the chest above. -1 Says it will ignore the slot
  8.  
  9. manager.removeItemFromPlayer("UP", 400) --Will remove 400 items from the players inventory to the chest above
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement