LUA скрипт [neverlose] Watermark {"Cheat name", "Name", "ping", "fps", "tick", "time"}

Эксперт
Статус
Оффлайн
Регистрация
22 Мар 2020
Сообщения
2,187
Реакции[?]
484
Поинты[?]
3K
Creator- KOMRAD (дал сурс он)
Fixed - restenj

Код:
local ffi = require("ffi")
ffi.cdef[[
    typedef struct {
        unsigned short wYear;
        unsigned short wMonth;
        unsigned short wDayOfWeek;
        unsigned short wDay;
        unsigned short wHour;
        unsigned short wMinute;
        unsigned short wSecond;
        unsigned short wMilliseconds;
    } SYSTEMTIME, *LPSYSTEMTIME;
    
    void GetSystemTime(LPSYSTEMTIME lpSystemTime);
    void GetLocalTime(LPSYSTEMTIME lpSystemTime);
]]
local Editor = Menu.MultiCombo("Watermark Options", "Watermark Preset", {"Cheat name", "Name", "ping", "fps", "tick", "time"}, 0)
local pingFix = Menu.Combo("Watermark Options", "Ping preset", {"Classic", "Adaptive"}, 0, "If ping 10-100 use Classic preset                   If ping 100+ use Adaptive preset")
local Custom_Cheatname_switch = Menu.Switch("Watermark Options", "Custom cheat name", false)
local Custom_Cheatname = Menu.TextBox("Watermark Options", "cheat name", 64, "")
local Custom_name_switch = Menu.Switch("Watermark Options", "Custom name", false)
local Custom_name = Menu.TextBox("Watermark Options", "Username", 64, "")
local water_clr = Menu.ColorEdit("Watermark Options", "Watermark Line Color", Color.new( 102/255,118/255,202/255 ) )
local water_rainbow = Menu.Switch("Watermark Options", "Rainbow line", false)
local water_rainbow_speed = Menu.SliderInt("Watermark Options", "Rainbow line Speed", 0, 1, 50)
local blur_box = Menu.Switch("Watermark Options", "Blur", false)
local water_fon = Menu.ColorEdit("Watermark Options", "Watermark Background Color", Color.new( 0, 0, 0, 20/255 ))
local Obvodka = Menu.Switch("Watermark Options", "Text shadow", false)
--local Custom_font_switch = Menu.Switch("Watermark Options", "Custom font", false)
--local Custom_font = Menu.TextBox("Watermark Options", "font name", 64, "")

local r, g, b
local font = Render.InitFont("Verdana", 12)

local frame_rate = 0.0
local function get_abs_fps()
frame_rate = 0.9 * frame_rate + (1.0 - 0.9) * GlobalVars.absoluteframetime
return math.floor((1.0 / frame_rate) + 0.5)
end

local function get_latency()
local netchann_info = EngineClient.GetNetChannelInfo()
if netchann_info == nil then return "0" end
local latency = netchann_info:GetLatency(0)
return string.format("%1.f", math.max(0.0, latency) * 1000.0)
end

local textSize = 0

local function draw()
    Custom_Cheatname_switch:SetVisible(false)
    Custom_name_switch:SetVisible(false)
    Custom_Cheatname:SetVisible(false)
    Custom_name:SetVisible(false)
    water_rainbow_speed:SetVisible(water_rainbow:GetBool())
    pingFix:SetVisible(false)

    --[[if Custom_font_switch:GetBool() then
        font = Render.InitFont(Custom_font:GetString(), 12)
    else
        --font = Render.InitFont("Verdana", 12)
    end]]

    if Editor:GetBool(0) or Editor:GetBool(1) or Editor:GetBool(2) or Editor:GetBool(3) or Editor:GetBool(4) or Editor:GetBool(5) then

        local local_time = ffi.new("SYSTEMTIME")
        ffi.C.GetLocalTime(local_time)

        r = (math.floor(math.sin(GlobalVars.realtime * water_rainbow_speed:GetInt()) * 127 + 128)) / 1000 * 3.92
        g = (math.floor(math.sin(GlobalVars.realtime * water_rainbow_speed:GetInt() + 2) * 127 + 128)) / 1000 * 3.92
        b = (math.floor(math.sin(GlobalVars.realtime * water_rainbow_speed:GetInt() + 4) * 127 + 128)) / 1000 * 3.92


        local screen = EngineClient.GetScreenSize()
        local fps = get_abs_fps()
        local ping = get_latency()
        local ticks = math.floor(1.0 / GlobalVars.interval_per_tick)
        local time = string.format("%02d:%02d:%02d", local_time.wHour, local_time.wMinute, local_time.wSecond)

        local rightPadding = 20
        local var = screen.x - textSize - rightPadding

        local x = var - 10
        local y = 7
        local w = textSize + 20
        local h = 15
        local y_text = 11

        if blur_box:GetBool() then
            water_fon:SetVisible(false)
            Render.Blur(Vector2.new(x,y+2), Vector2.new(x+textSize+20,h * 1.5 + 4))
        else
            water_fon:SetVisible(true)
            Render.BoxFilled(Vector2.new(x,y+2),Vector2.new(x+textSize+20,h * 1.5 + 4), water_fon:GetColor())
        end

        if not water_rainbow:GetBool() then
            Render.BoxFilled(Vector2.new(x,y),Vector2.new(x+textSize+20,h-6), water_clr:GetColor())
        else
            Render.BoxFilled(Vector2.new(x,y),Vector2.new(x+textSize+20,h-6),  Color.new(r,g, b ,255))
        end

        local nexttext = ""
        local nexttext1 = ""

        if Custom_Cheatname_switch:GetBool() then
            nexttext = Custom_Cheatname:GetString()
            nexttext1 = Custom_Cheatname:GetString()
        else
            nexttext = "neverlose.cc"
            nexttext1 = "neverlose.cc"
        end

        if Editor:GetBool(1) then
            Custom_Cheatname_switch:SetVisible(true)
            --Custom_Cheatname:SetVisible(true)
            Custom_Cheatname:SetVisible(Custom_Cheatname_switch:GetBool())
            if Obvodka:GetBool() then
            Render.Text(nexttext1, Vector2.new(var + 1,y_text + 1), Color.new(0,0,0,255), 12, font)  --neverlose
            end
            Render.Text(nexttext, Vector2.new(var,y_text), Color.new(255,255,255), 12, font)  --neverlose
            local wide = Render.CalcTextSize(nexttext, 12, font)
            var = var + wide.x
            if Editor:GetBool(2) or Editor:GetBool(3) or Editor:GetBool(4) or Editor:GetBool(5) or Editor:GetBool(6) then
                if Obvodka:GetBool() then
                Render.Text(" | ", Vector2.new(var + 1,y_text + 1), Color.new(0,0,0,255), 12, font)
                end
                Render.Text(" | ", Vector2.new(var,y_text), Color.new(255,255,255), 12, font)
                local wide = Render.CalcTextSize(" | ", 12, font)
                var = var + wide.x
            end
        end

        if Custom_name_switch:GetBool() then
            nexttext = Custom_name:GetString()
            nexttext1 = Custom_name:GetString()
        else
            nexttext = string.lower(Cheat.GetCheatUserName())
            nexttext1 = string.lower(Cheat.GetCheatUserName())
        end

        if Editor:GetBool(2) then
            Custom_name_switch:SetVisible(true)
            --Custom_name:SetVisible(true)
            Custom_name:SetVisible(Custom_name_switch:GetBool())
            if Obvodka:GetBool() then
            Render.Text(nexttext1, Vector2.new(var + 1,y_text + 1), Color.new(0,0,0,255), 12,font)   --username
            end
            Render.Text(nexttext, Vector2.new(var,y_text), Color.new(255,255,255), 12,font)   --username

            wide = Render.CalcTextSize(nexttext, 12,font)
            var = var + wide.x
            if Editor:GetBool(3) or Editor:GetBool(4) or Editor:GetBool(5) or Editor:GetBool(6) then
                if Obvodka:GetBool() then
                Render.Text(" | ", Vector2.new(var + 1,y_text + 1), Color.new(0,0,0,255), 12, font)
                end
                Render.Text(" | ", Vector2.new(var,y_text), Color.new(255,255,255), 12, font)
                local wide = Render.CalcTextSize(" | ", 12, font)
                var = var + wide.x
            end
        end
        nexttext = "delay: ".. ping .."ms"
        nexttext1 = "delay: ".. ping .."ms"
        if Editor:GetBool(3) then
            pingFix:SetVisible(true)
            if Obvodka:GetBool() then
            Render.Text(nexttext1, Vector2.new(var + 1,y_text + 1), Color.new(0,0,0,255), 12,font)   --ping
            end
            Render.Text(nexttext, Vector2.new(var,y_text), Color.new(255,255,255), 12,font)   --ping

            if pingFix:GetBool(1) then
                wide = Render.CalcTextSize(nexttext, 12,font)
            else
                wide = Render.CalcTextSize("000000000", 12,font)
            end

            var = var + wide.x
            if Editor:GetBool(4) or Editor:GetBool(5) or Editor:GetBool(6) then
                if Obvodka:GetBool() then
                Render.Text(" | ", Vector2.new(var + 1,y_text + 1), Color.new(0,0,0,255), 12, font)
                end
                Render.Text(" | ", Vector2.new(var,y_text), Color.new(255,255,255), 12, font)
                local wide = Render.CalcTextSize(" | ", 12, font)
                var = var + wide.x
            end
        end

        nexttext = "fps: ".. fps ..""
        nexttext1 = "fps: ".. fps ..""
        if Editor:GetBool(4) then
            if Obvodka:GetBool() then
            Render.Text(nexttext1, Vector2.new(var + 1,y_text + 1), Color.new(0,0,0,255), 12,font)   --fps
            end
            Render.Text(nexttext, Vector2.new(var,y_text), Color.new(255,255,255), 12,font)   --fps

            if fps >= 100 then
                wide = Render.CalcTextSize("000000 ", 12,font)
            elseif fps >= 10 then
                wide = Render.CalcTextSize("00000 ", 12,font)
            end

            var = var + wide.x
            if Editor:GetBool(5) or Editor:GetBool(6) then
                if Obvodka:GetBool() then
                Render.Text(" | ", Vector2.new(var + 1,y_text + 1), Color.new(0,0,0,255), 12, font)
                end
                Render.Text(" | ", Vector2.new(var,y_text), Color.new(255,255,255), 12, font)
                local wide = Render.CalcTextSize(" | ", 12, font)
                var = var + wide.x
            end
        end
        nexttext = ticks .. "tick"
        nexttext1 = ticks .. "tick"
        if Editor:GetBool(5) then
            if Obvodka:GetBool() then
            Render.Text(nexttext1, Vector2.new(var + 1,y_text + 1), Color.new(0,0,0,255), 12,font)   --tick
            end
            Render.Text(nexttext, Vector2.new(var,y_text), Color.new(255,255,255), 12,font)   --tick

            wide = Render.CalcTextSize(nexttext, 12,font)
            var = var + wide.x
            if Editor:GetBool(6) then
                if Obvodka:GetBool() then
                Render.Text(" | ", Vector2.new(var + 1,y_text + 1), Color.new(0,0,0,255), 12, font)
                end
                Render.Text(" | ", Vector2.new(var,y_text), Color.new(255,255,255), 12, font)
                local wide = Render.CalcTextSize(" | ", 12, font)
                var = var + wide.x
            end
        end
        nexttext = time ..""
        nexttext1 = time ..""
        if Editor:GetBool(6) then
            if Obvodka:GetBool() then
            Render.Text(nexttext1, Vector2.new(var + 1,y_text + 1), Color.new(0,0,0,255), 12,font)    --time
            end
            Render.Text(nexttext, Vector2.new(var,y_text), Color.new(255,255,255), 12,font)   --time

            wide = Render.CalcTextSize("хуй яйца", 12,font)
            var = var + wide.x
        end
        textSize = var - (screen.x - textSize - rightPadding)
    end
end

Cheat.RegisterCallback("draw", draw)
Пожалуйста, авторизуйтесь для просмотра ссылки.
 
nikogda nikogda
Пользователь
Статус
Оффлайн
Регистрация
29 Окт 2018
Сообщения
304
Реакции[?]
99
Поинты[?]
0
До принца еще далеко конечно. Ох далеко
 
Сверху Снизу