EDIT: I managed to find a few different scripts, pushed them together and managed to fix it.
Feel free to use it (I've changed level -> mlevel, so change it back if you're using level for spells):
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local text = ""...