Global.PrintChat("[onetap config by linran] 爱因斯坦IQ.js 加载完毕 ")
UI.AddCheckbox("Rainbow -ENEMIES");
UI.AddCheckbox("Rainbow Glow");
UI.AddCheckbox("Rainbow  Box");
UI.AddCheckbox("Rainbow  Name");
UI.AddCheckbox("Rainbow  Skeleton");
UI.AddCheckbox("Rainbow - FRIENDLIES");
UI.AddCheckbox("Rainbow  Glow");
UI.AddCheckbox("Rainbow  Box");
UI.AddCheckbox("Rainbow Name");
UI.AddCheckbox("Rainbow  Skeleton");
function main()
{
// Just keep changing the values cuz rainbow shiz
tickcount = Global.Tickcount();
color = HSVtoRGB(tickcount % 350 / 350, 1, 1, 1, 255);

var use = UI.IsHotkeyActive( "Misc", "JAVASCRIPT", "Script Items", "Rainbow Enabled" );
var en = UI.GetValue( "Misc", "JAVASCRIPT", "Script Items", "Rainbow - ENEMIES" );
var en_glow = UI.GetValue( "Misc", "JAVASCRIPT", "Script Items", "Rainbow - E - Glow");
var en_box = UI.GetValue( "Misc", "JAVASCRIPT", "Script Items", "Rainbow - E - Box");
var en_name = UI.GetValue( "Misc", "JAVASCRIPT", "Script Items", "Rainbow - E - Name");
var en_skeleton = UI.GetValue( "Misc", "JAVASCRIPT", "Script Items", "Rainbow - E - Skeleton");
var fr = UI.GetValue( "Misc", "JAVASCRIPT", "Script Items", "Rainbow - FRIENDLIES");
var fr_glow = UI.GetValue( "Misc", "JAVASCRIPT", "Script Items", "Rainbow - F - Glow");
var fr_box = UI.GetValue( "Misc", "JAVASCRIPT", "Script Items", "Rainbow - F - Box");
var fr_name = UI.GetValue( "Misc", "JAVASCRIPT", "Script Items", "Rainbow - F - Name");
var fr_skeleton = UI.GetValue( "Misc", "JAVASCRIPT", "Script Items", "Rainbow - F - Skeleton");

if (en)
{
if (en_glow)
UI.SetColor("Visuals", "ENEMIES","ESP", "Glow", [color.r, color.g, color.b, 255]);
if (en_box)
UI.SetColor("Visuals", "ENEMIES","ESP", "Box", [color.r, color.g, color.b, 255]);
if (en_name)
UI.SetColor("Visuals", "ENEMIES","ESP", "Name", [color.r, color.g, color.b, 255]);
if (en_skeleton)
UI.SetColor("Visuals", "ENEMIES","ESP", "Skeleton", [color.r, color.g, color.b, 255]);
}
if (fr)
{
if (fr_glow)
UI.SetColor("Visuals", "FRIENDLIES","ESP", "Glow", [color.r, color.g, color.b, 255]);
if (fr_box)
UI.SetColor("Visuals", "FRIENDLIES","ESP", "Box", [color.r, color.g, color.b, 255]);
if (fr_name)
UI.SetColor("Visuals", "FRIENDLIES","ESP", "Name", [color.r, color.g, color.b, 255]);
if (fr_skeleton)
UI.SetColor("Visuals", "FRIENDLIES","ESP", "Skeleton", [color.r, color.g, color.b, 255]);
}
}

function HSVtoRGB(h, s, v) {
var r, g, b, i, f, p, q, t;
if (arguments.length === 1) {
s = h.s, v = h.v, h = h.h;
}
i = Math.floor(h * 6);
f = h * 6 - i;
p = v * (1 - s);
q = v * (1 - f * s);
t = v * (1 - (1 - f) * s);
switch (i % 6) {
case 0: r = v, g = t, b = p; break;
case 1: r = q, g = v, b = p; break;
case 2: r = p, g = v, b = t; break;
case 3: r = p, g = q, b = v; break;
case 4: r = t, g = p, b = v; break;
case 5: r = v, g = p, b = q; break;
}
return {
r: Math.round(r * 255),
g: Math.round(g * 255),
b: Math.round(b * 255)
};
}
start();
function start()
{
// Callback our main function. (Looping)
Global.RegisterCallback("Draw", "main")
}
function rect(x, y, w, h, dir, color1, color2) {
    Render.GradientRect(x - Math.round(w/2), y - Math.round(h/2), w, h, dir, color1, color2);
}

var startX = 1920/2;
var startY = 1080/2;

function run() {
    
    var sizeX = 190;
    var sizeY = 2;
    var off = sizeX /2+20;
    var c2 = [150, 200, 255, 255];
    var c1 = [150,0, 200, 0];
    
    if (Entity.GetProp(Entity.GetLocalPlayer(), "CCSPlayer", "m_bIsScoped")) {
        rect(startX - off, startY, sizeX, sizeY, 1, c1, c2);
        rect(startX + off, startY, sizeX, sizeY, 1, c2, c1);
        rect(startX, startY - off, sizeY, sizeX, 0, c1, c2);
        rect(startX, startY + off, sizeY, sizeX, 0, c2, c1);
    }
}

Cheat.RegisterCallback("Draw", "run");
