require "lua/entity.lua" require "lua/utilities.lua" smallLoot = { "coinhole_a" , "coin_a" , "crystal" } px , py , pz = position() pz = pz + 0.5 while tick() do if trigger.received(1) then print("Destructible_Small dying") lootNumber = math.random(0,100) if lootNumber <= 1 then spawnThrownLoot( "diamond", {px , py , pz} , 100 , 0 , 1 ) elseif lootNumber <= 25 then spawnThrownLoot( "emerald2", {px , py , pz} , 10 , 0 , 1 ) else spawnThrownLoot( smallLoot[math.random(1,#smallLoot)], {px , py , pz} , 1 , 0 , 1 ) end end end