For kills:
Set SL_PlayerXP[(Player number of (Owner of (Killing unit)))] = ((((SL_PlayerLvl[(Player number of (Owner of (Dying unit)))] + 3) / 4) x (((Hero level of (Dying unit)) + 4) / 3)) + SL_PlayerXP[(Player number of (Owner of (Killing unit)))])
and for deaths:
Set SL_PlayerXP[(Player number of (Owner of (Dying unit)))] = ((((SL_PlayerLvl[(Player number of (Owner of (Dying unit)))] + 3) / 2) x -1) + SL_PlayerXP[(Player number of (Owner of (Dying unit)))])
uhhh, im too lazy to type up the levels... it increases every level, obviously. 30,000 is the max, at lvl 20.