Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HASH = "c25cbfb45654dad36efe68077710cc60"
- function selfInstall()
- fileContents = 'shell.run("pastebin run 3HeLiT7k")'
- local file = fs.open("startup", "w")
- file.write(fileContents)
- file.close()
- end
- function krypto()
- display = nil
- inventory = {nil, 0}
- function setDisplay(disp)
- display = disp
- end
- function setInventory(accessor, slotCount)
- inventory = {accessor, slotCount}
- end
- function check(nbt)
- if nbt.name ~= "ironchests:key" then
- return "not currency"
- end
- if nbt.nbt ~= HASH then
- return "FAKE CURRENCY!"
- end
- return "valid currency"
- end
- function full_check()
- display.clear()
- display.setCursorPos(1, 1)
- for i = 1, inventory[2] do
- nbt = inventory[1](i)
- if nbt ~= nil then
- display.write("Slot " .. i .. " - " .. check(nbt) .. "\n")
- x, y = display.getCursorPos()
- display.setCursorPos(1, y + 1)
- end
- end
- end
- function run()
- while true do
- full_check()
- sleep(1)
- end
- end
- return {
- setDisplay = setDisplay,
- setInventory = setInventory,
- run = run
- }
- end
- selfInstall()
- k = krypto()
- k.setDisplay(term)
- k.setInventory(turtle.getItemDetail, 16)
- k.run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement