local sentences = {
"$name, 1 бич ебаный",
"$name, Звали в школе Убиватор теперь я Терминатор",
"$name, Олежка2001",
"$name, Че смотришь пидор очкастый",
"$name, Марат Чушпан Беги",
"$name, Че Че пошел ты нахуй кирпич",
"$name, Ебать тебя вова адидас заовнил",
"$name, *Прикупи конфигурацию чушка",
"$name, Играю со скитом с 2004 года",
"$name, Че пиздишь в войс старичек",
"$name, С какого года на хвх а я ебу что-ли",
}
local ui = {
new_checkbox = ui.new_checkbox,
get = ui.get
}
local client = {
set_event_callback = client.set_event_callback,
userid_to_entindex = client.userid_to_entindex,
exec = client.exec,
log = client.log
}
local entity = {
get_local_player = entity.get_local_player,
get_player_name = entity.get_player_name
}
local killsay_enabled = ui.new_checkbox("LUA", "A", "[TT] Enable trashtalk")
local killsayName_enabled = ui.new_checkbox("LUA","A","[TT] With name")
local function on_player_death(event)
if not ui.get(killsay_enabled) then return end
local local_player = entity.get_local_player()
local attacker = client.userid_to_entindex(event.attacker)
local victim = client.userid_to_entindex(event.userid)
if local_player == nil or attacker == nil or victim == nil then
return
end
if attacker == local_player and victim ~= local_player then
if ui.get(killsayName_enabled) then
local killsay = "say " .. sentences[math.random(#sentences)]
killsay = string.gsub(killsay, "$name", entity.get_player_name(victim))
client.log(killsay)
client.exec(killsay)
else
local killsay = "say " .. sentences[math.random(#sentences)]
killsay = string.gsub(killsay, "$name,", " ")
client.log(killsay)
client.exec(killsay)
end
end
end
math.randomseed(133742069)
math.random(); math.random(); math.random()
client.set_event_callback("player_death", on_player_death)