addhook("leave","king.leave")function king.leave(id) -- if king or king candidate leaves the game if #king.currentking > 0 then for a, b in ipairs(king.currentking) do if b == id then table.remove(king.currentking,a) break end end updatehud() end king.kstreak[id] = nil king.dcount[id] = nilend

addhook("kill","king.kill")function king.kill(killer) king.kstreak[killer] = king.kstreak[killer] + 1 if king.kstreak[killer] == 15 then -- 15 kill streak local isking = false if #king.currentking > 0 then for a, b in ipairs(king.currentking) do if b == killer then isking = true break end end end if not isking then table.insert(king.currentking,killer) if #king.currentking == 1 then msg2(killer,"\169000255000You are now king!") elseif #king.currentking > 1 then msg2(killer,"\169000255000You are now eligible to be a king! Kill the king and survive to be the next king!") end updatehud() end endend