I have recently started learning Skript and I am having trouble with a skript. I want to have it so when a zombie spawns, there is a 2% chance it has diamond armor, a diamond sword, and 5 extra health, but I didn't know how to add the chance or how to give it the diamond weapons and armor.
Current Code:
on spawn of zombie:
give a diamond sword to the zombie
equip zombie with all diamond armour
set the maximum health of the zombie to 15
The zombie gets extra health, but it doesn't have a sword or armor. I also need help making it so when a drowned spawns, there is a 5% chance it could be riding a squid.
Current Code:
on spawn of drowned:
make the drowned ride a squid
Help would be appreciated!