local clicked = false local player = require("player") registerClientTick(function() local slot = 13 local item = player.inventory.getStackFromContainer(slot) if not item or not string.find(item.display_name, "§aVisit player island") then slot = 11 item = player.inventory.getStackFromContainer(slot) end if item then if string.find(item.display_name, "§aVisit player island") and not clicked then player.inventory.leftClick(slot) player.inventory.closeScreen() clicked = true end else clicked = false end end)