Like this?
local config = {
eff = 35,
chance = 50, --50% chance spawn the monster
monster = 'Hydra', --monster which will spawn
msg = "Sorry...", --msg that will be sent to the player IF the egg 'fails'
}
function onUse(cid, item, fromPosition, itemEx, toPosition)...