You got it. but don't use capitals. Here you go, 2 lines less code:
function onKill(ammo, killer, weapon, bodypart)
if killer and killer ~= source and getElementType ( killer ) == "player" then
local x, y, z = getElementPosition(source)
createExplosion (x, y, z, 10)
outputChatBox("You have been exploded by " .. getPlayerName(killer), getRootElement(), 255, 255, 0, true)
end
end
addEventHandler("onPlayerWasted", getRootElement(), onKill)
You are learning...