Код:
function HSVtoRGB(h, s, v) {
var r, g, b, i, f, p, q, t;
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) }; }
UI.AddCheckbox("Watermark"), UI.AddColorPicker("Watermark color"), UI.AddDropdown( "Style", ["Static", "Rainbow"] ),UI.AddSliderFloat("Gradient Speed", 0.01, 1.0);
function draw() {
if (!UI.GetValue("MISC", "JAVASCRIPT", "Script Items", "Watermark")) return;
if(!World.GetServerString()) return;
var today = new Date();
var colors = HSVtoRGB(Global.Realtime() * UI.GetValue("MISC", "JAVASCRIPT", "Script Items", "Gradient Speed"), 1, 1);
var color = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Watermark color");
var server_tickrate = Globals.Tickrate().toString()
var ebanaya_hueta = Math.round(Entity.GetProp(Entity.GetLocalPlayer(), "CPlayerResource", "m_iPing")).toString()
var font = Render.AddFont("Verdana", 7, 400);
var text = "brokencore.club | version: 1 [release] | user: [" + Cheat.GetUsername() + "] | " + ebanaya_hueta + " ms / " + server_tickrate + " tick";
var w = Render.TextSizeCustom(text, font)[0] + 8;
var x = Global.GetScreenSize()[0];
var y = Global.GetScreenSize()[1];
x = x - w - 10;
Render.GradientRect( x + 200, 12, w - 200, 2, 1, [ color[0], color[1], color[2], 0 ], [ color[0], color[1], color[2], 255 ]); Render.GradientRect( x, 12, w - 200, 2, 1, [ color[0], color[1], color[2], 255 ], [ color[0], color[1], color[2], 0 ]);
Render.FilledRect(x, 12, w, 2, [ color[0], color[1], color[2], 85 ]); Render.FilledRect(x, 14, w, 16, [ 17, 17, 17, color[3] ]); Render.StringCustom(x+4, 15, 0, text, [ 255, 255, 255, 245 ], font);
if(UI.GetValue("Script items", "Style") == 1) {
Render.GradientRect( x + 160, 12, w - 160, 2, 1, [colors.r, colors.g, colors.b, 255], [colors.b, colors.r, colors.g, 255]);
Render.GradientRect( x, 12, w - 200, 2, 1, [colors.g, colors.b, colors.r, 255], [colors.r, colors.g, colors.b, 255]); }else{
Render.FilledRect(x/2, y/2 + 450, w, 2, [color1[0], color1[1], color1[2], 255]); } }
Cheat.RegisterCallback("Draw", "draw");
ss -