function time_to_ticks(time) {
return Math.floor(time / Globals.TickInterval() + .5)
}
UI.AddCheckbox("Clan tag")
function gamesense_anim(text, indices) {
var text_anim = " " + text + " "
var tickinterval = Globals.TickInterval()
var tickcount = Globals.Tickcount() + time_to_ticks(Local.Latency())
var i = tickcount / time_to_ticks(0.3)
i = Math.floor(i % indices.length)
i = indices[i + 1] + 1
return text_anim.substr(i, i+15)
}
function run_tag_animation() {
if (UI.GetValue("Script items", "Clan tag")) {
//don't advertise other cheats using this or drone strike
var clan_tag = gamesense_anim("skeet.cc", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 11, 11, 11, 11, 11, 11, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22])
Local.SetClanTag(clan_tag)
}
}
function on_paint() {
if (UI.GetValue("Script items", "Clan tag")) {
var local_player = Entity.GetLocalPlayer()
if (local_player != null && (Entity.IsAlive(local_player)) && Globals.Tickcount() % 2 == 0) { //missing noclip check
run_tag_animation()
}
} else {
Local.SetClanTag("\0")
}
}
Cheat.RegisterCallback("Draw", "on_paint")