var screen_size = Global.GetScreenSize();
function render_arc(x, y, radius, radius_inner, start_angle, end_angle, segments, color)
{
while(360 % segments != 0)
{
segments++;
}
segments = 360 / segments;
for (var i = start_angle; i < start_angle + end_angle; i = i + segments)
{
var rad = i * Math.PI / 180;
var rad2 = (i + segments) * Math.PI / 180;
var rad_cos = Math.cos(rad)
var rad_sin = Math.sin(rad)
var rad2_cos = Math.cos(rad2);
var rad2_sin = Math.sin(rad2);
var x1_outer = x + rad_cos * radius;
var y1_outer = y + rad_sin * radius;
var x2_outer = x + rad2_cos * radius;
var y2_outer = y + rad2_sin * radius;
var x1_inner = x + rad_cos * radius_inner;
var y1_inner = y + rad_sin * radius_inner;
var x2_inner = x + rad2_cos * radius_inner;
var y2_inner = y + rad2_sin * radius_inner;
Render.Polygon( [
[ x1_outer, y1_outer ],
[ x2_outer, y2_outer ],
[ x1_inner, y1_inner ] ],
color
);
Render.Polygon( [
[ x1_inner, y1_inner ],
[ x2_outer, y2_outer ],
[ x2_inner, y2_inner ] ],
color
);
}
}
function drawString()
{
const alpha = Math.sin(Math.abs(-Math.PI + (Globals.Curtime() * (1 / 1)) % (Math.PI * 2))) * 255;
const alphax = Math.sin(Math.abs(-Math.PI + (Globals.Curtime() * (1 / .5)) % (Math.PI * 2))) * 255;
charge = Exploit.GetCharge();
max_angle = 360*Exploit.GetCharge();
center = Render.GetScreenSize();
X = center[0] / 2
Y = center[1] / 2
if (isDoubletap)
{
if (charge >= 1)
{
Render.String(screen_size[0] /2, screen_size[1] /2 +96, 1, isDoubletap ? "DT" : "DT", isDoubletap ? [ 0, 0, 0, 255 ] : [ 0, 0, 0, 255 ], 3 );
Render.String(screen_size[0] /2, screen_size[1] /2 +95, 1, isDoubletap ? "DT" : "DT", isDoubletap ? [ 65, 180, 80, 255 ] : [ 255, 0, 0, 255 ], 3 );
}
if (charge < 1)
{
Render.String(screen_size[0] /2 -5, screen_size[1] /2 +96, 1, isDoubletap ? "DT" : "DT", isDoubletap ? [ 0, 0, 0, 255 ] : [ 0, 0, 0, 255 ], 3 );
Render.String(screen_size[0] /2 -5, screen_size[1] /2 +95, 1, isDoubletap ? "DT" : "DT", isDoubletap ? [ 255-(charge*190), charge*180, charge*80, 255 ] : [ 255, 0, 0, 255 ], 3 );
render_arc(X + 8, Y + 99, 5, 2.5, -90, 360, 36, [120, 120, 120, 190]);
render_arc(X + 8, Y + 99, 5, 2.5, -90, max_angle, 36, [ 255-(charge*190), charge*180, charge*80, 255]);
}
}if (!isDoubletap)
{
Render.String(screen_size[0] /2, screen_size[1] /2 +96, 1, isDoubletap ? "DT" : "DT", isDoubletap ? [ 0, 0, 0, 255 ] : [ 0, 0, 0, 255 ], 3 );
Render.String(screen_size[0] /2, screen_size[1] /2 +95, 1, isDoubletap ? "DT" : "DT", isDoubletap ? [ 65, 180, 80, 255 ] : [ 255, 0, 0, 255 ], 3 );
}
}
Global.RegisterCallback("Draw", "drawString");