local switcher = require("pet_switcher") local player = require("player") registerCommand("pet", function(commandName, args) if #args >= 1 then -- Join all arguments with space to support multi-word pet names local name = table.concat(args, " ") -- Replace underscores with spaces for names like "flying_fish" name = name:gsub("_", " ") switcher.equipPet(name, function(equpped, success) if success then print(equpped) player.addMessage("§7[§6Hypixel Cry§7] §a✔ Successfully equipped §f" .. equpped) else player.addMessage("§7[§6Hypixel Cry§7] §c✘ Failed to equip §f" .. name .. "§c: " .. (pet_name or "Pet not found")) end end) else player.addMessage("§7[§6Hypixel Cry§7] §cUsage: /pet ") end end) return switcher