JS-скрипт [OTC3] Watermark

Эксперт
Статус
Оффлайн
Регистрация
14 Ноя 2020
Сообщения
1,768
Реакции[?]
586
Поинты[?]
1K
Привет! Решил сделать ватермарку на кряк. Взял у restenj с соседнего форума и почти полностью её переписал.


JavaScript:
UI.AddCheckbox("Enable watermark"),
UI.AddColorPicker("Watermark color"),
UI.AddMultiDropdown("Features to display", ["Cheat name", "User name", "Time", "Fps", "Ticks"]),
UI.AddTextbox("Cheat name"),
UI.AddTextbox("User name"),
UI.AddCheckbox("Fake fps "),
UI.AddSliderInt("Fake fps", 40, 500);
getdropdown = function getDropdownValue(value, index) { var mask = 1 << index; return value & mask ? true : false; };
getrandom = function getRandomIntInclusive(min_value, max_value) { min_value = Math.ceil(min_value); max_value = Math.floor(max_value); return Math.floor(Math.random() * (max_value - min_value + 1)) + min_value; };
var color = UI.GetColor("Script items", "Watermark color"); //Color
function watermark() {
    //Menu interface start
    features_to_dislay = UI.GetValue("Script items", "Features to display");
    UI.SetEnabled("Script items", "Watermark color", 1 && UI.GetValue("Script items", "Enable watermark") ? 1 : 0);
    UI.SetEnabled("Script items", "Features to display", 1 && UI.GetValue("Script items", "Enable watermark") ? 1 : 0);
    if (getdropdown(features_to_dislay, 0)) {
    UI.SetEnabled("Script items", "Cheat name", 1 && UI.GetValue("Script items", "Enable watermark") ? 1 : 0);
    } else {
    UI.SetEnabled("Script items", "Cheat name", 0)
    }
    if (getdropdown(features_to_dislay, 1)) {
    UI.SetEnabled("Script items", "User name", 1 && UI.GetValue("Script items", "Enable watermark") ? 1 : 0);
    } else {
    UI.SetEnabled("Script items", "User name", 0)
    }
    if (getdropdown(features_to_dislay, 3)) {
    UI.SetEnabled("Script items", "Fake fps ", 1)
     if (UI.GetValue("Script items", "Fake fps ")) {
    UI.SetEnabled("Script items", "Fake fps", 1 && UI.GetValue("Script items", "Enable watermark") ? 1 : 0);
     }
    } else {
    UI.SetEnabled("Script items", "Fake fps ", 0)
    UI.SetEnabled("Script items", "Fake fps", 0)
    }
    //Menu interface end
    //Render start
    if (!UI.GetValue("Script Items", "Enable watermark")) return; 
    if(!World.GetServerString()) return;
    
    var color = UI.GetColor("Script items", "Watermark color"); //Color
    var cheatname = UI.GetString("Script Items", "Cheat name") != "" ? UI.GetString("Script Items", "Cheat name") : "Monath";
    var username = UI.GetString("Script Items", "User name") != "" ?  UI.GetString("Script Items", "User name") : Cheat.GetUsername();
    var today = new Date();
    var hours = today.getHours() <= 9 ? "0"+today.getHours()+":" : today.getHours()+":";
    var minutes = today.getMinutes() <= 9 ? "0" + today.getMinutes()+":" : today.getMinutes()+":";
    var seconds = today.getSeconds() <= 9 ? "0" + today.getSeconds() : today.getSeconds();
    var server_tickrate = Globals.Tickrate().toString() //Server tickrate
    var fakefps = UI.GetValue("Script items", "Fake fps")
    var deffps = Math.floor(1/Global.Frametime())
    var fps = UI.GetValue("Script items", "Fake fps ") == 0 ? deffps : getrandom(fakefps - 20, fakefps);
    var font = Render.AddFont("Verdana", 7, 400); //Font
    var text = ""
    if (getdropdown(features_to_dislay, 0)) {
        text += (cheatname + " ")
    };
    if (getdropdown(features_to_dislay, 1)) {
        text += ("| " + username + " ")
    };
    if (getdropdown(features_to_dislay, 2)) {
        text += ("| " + hours+minutes+seconds + " ")
    };
    if (getdropdown(features_to_dislay, 3)) {
        text += ("| " + fps + "fps ")
    };
    if (getdropdown(features_to_dislay, 4)) {
        text += ("| " + server_tickrate + "ticks")
    };
   if (text == "") return;
    var w = Render.TextSizeCustom(text, font)[0] + 4*1.35;
    var x = Global.GetScreenSize()[0];
    var y = Global.GetScreenSize()[1];
    x = x - w - 10;
    Render.FilledRect(x, 12, w+1, 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);
    //Render end
}
Cheat.RegisterCallback("Draw", "watermark");


Завтра улучшу, добавлю тип линии и индикатор фпса(Можно будет поставить фейк фпс).​
 
Последнее редактирование:
Эксперт
Статус
Оффлайн
Регистрация
24 Апр 2018
Сообщения
1,468
Реакции[?]
909
Поинты[?]
42K
что с отступами?
1621973418459.png
 
https://t.me/Anarhian1337
Участник
Статус
Оффлайн
Регистрация
30 Июн 2020
Сообщения
563
Реакции[?]
177
Поинты[?]
2K
Привет! Решил сделать ватермарку на кряк. Взял у restenj с соседнего форума и почти полностью её переписал.
Завтра улучшу, добавлю тип линии и индикатор фпса(Можно будет поставить фейк фпс).​
идея и подача JS прикольная
 
НЕТ
Участник
Статус
Оффлайн
Регистрация
16 Ноя 2020
Сообщения
1,009
Реакции[?]
173
Поинты[?]
0
круто жду фейк фпс
 
Эксперт
Статус
Оффлайн
Регистрация
14 Ноя 2020
Сообщения
1,768
Реакции[?]
586
Поинты[?]
1K
Добавил индикатор фпса и фейк фпс.
 
Забаненный
Статус
Оффлайн
Регистрация
26 Мар 2021
Сообщения
65
Реакции[?]
24
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Сверху Снизу