LUA скрипт [NL] Watermark source

Начинающий
Статус
Оффлайн
Регистрация
13 Апр 2021
Сообщения
22
Реакции[?]
3
Поинты[?]
0
Сурс ватермарка на NeverLose
1672822568081.png
Watermark:
--- OnlyMiss
--- Discord - ! [OnlyMiss]#0001
--- Watermark and Steam Watermark
--- https://neverlose.cc/market/item?id=a0lhkE

local username = common.get_username()
local screen_size_x = render.screen_size().x
local screen_size_y = render.screen_size().y

-- UI
local main = ui.create("Position")
local wm = ui.create("Watermark")
local text = ui.create("Text Color")
local gradient = ui.create("Gradient")

-- Градиент
local gradient_left = gradient:color_picker("Color left")
local gradient_right = gradient:color_picker("Color right")
local bottom_left = gradient:color_picker("Bottom left")
local bottom_right = gradient:color_picker("Bottom right")
local roundingF = gradient:slider("Rounding off", 0, 15)

--- Main
local position_x = main:slider("X Position", 5, screen_size_x - 200)
local position_y = main:slider("Y Position", 5, screen_size_y - 27)

--- Ватермарка
local watermark_color = wm:color_picker("Color")
local rounding = wm:slider("Rounding Off", 0, 10)

--- Текст
local text_color = text:color_picker("Color")

-- Функционал
local function RenderWatermark()
    local x = position_x:get()
    local y = position_y:get()
   
    render.gradient(vector(x -12, y -1.5), vector(x + 232, y + 17), gradient_left:get(), gradient_right:get(), bottom_left:get(), bottom_right:get(), roundingF:get())
    render.rect(vector(x -10, y), vector(x + 230, y + 16), watermark_color:get(), rounding:get())
    render.text(3, vector(x + 10, y), text_color:get(), s, "NeverLose", " |", username, "| Доминируй пупс")
end

-- Ивенты
events.render:set(function()
    RenderWatermark()
end)

--- Аватарка стим

local main_group = ui.create("Steam")
local ui = {
    enable = main_group:switch("Enable", false),
    color = main_group:color_picker("Color"),
}
events.render:set( function()
    local lp = entity.get_local_player()
    if not lp then return end
    local screensize = render.screen_size()
    local x = screensize.x / 2 --- Меняет расположение ватермарки по X
    local y = screensize.y / 2 --- Меняет расположение ватермарки по Y
    local clr = ui.color:get()
   
    if ui.enable:get() then
        local avatar = lp:get_steam_avatar()
        render.texture(avatar, vector(x, y + 45), vector(35, 35), color())
        render.text(3, vector(x + 40, y + 50), clr, "", "NeverLose Beta")
        render.text(3, vector(x + 40, y + 63), clr, "", string.upper(common.get_username().."   -   beta"))
    end
end)
 
Последнее редактирование:
Juicy
Участник
Статус
Оффлайн
Регистрация
5 Май 2021
Сообщения
678
Реакции[?]
158
Поинты[?]
17K
Сурс ватермарка на NeverLose
Watermark:
--- OnlyMiss
--- Discord - ! [OnlyMiss]#0001
--- Watermark and Steam Watermark

local username = common.get_username()
local screen_size_x = render.screen_size().x
local screen_size_y = render.screen_size().y

-- UI
local main = ui.create("Position")
local wm = ui.create("Watermark")
local text = ui.create("Text Color")
local gradient = ui.create("Gradient")

-- Градиент
local gradient_left = gradient:color_picker("Color left")
local gradient_right = gradient:color_picker("Color right")
local bottom_left = gradient:color_picker("Bottom left")
local bottom_right = gradient:color_picker("Bottom right")
local roundingF = gradient:slider("Rounding off", 0, 15)

--- Main
local position_x = main:slider("X Position", 5, screen_size_x - 200)
local position_y = main:slider("Y Position", 5, screen_size_y - 27)

--- Ватермарка
local watermark_color = wm:color_picker("Color")
local rounding = wm:slider("Rounding Off", 0, 10)

--- Текст
local text_color = text:color_picker("Color")

-- Функционал
local function RenderWatermark()
    local x = position_x:get()
    local y = position_y:get()
   
    render.gradient(vector(x -12, y -1.5), vector(x + 232, y + 17), gradient_left:get(), gradient_right:get(), bottom_left:get(), bottom_right:get(), roundingF:get())
    render.rect(vector(x -10, y), vector(x + 230, y + 16), watermark_color:get(), rounding:get())
    render.text(3, vector(x + 10, y), text_color:get(), s, "NeverLose", " |", username, "| Доминируй пупс")
end

-- Ивенты
events.render:set(function()
    RenderWatermark()
end)

--- Аватарка стим

local main_group = ui.create("Steam")
local ui = {
    enable = main_group:switch("Enable", false),
    color = main_group:color_picker("Color"),
}
events.render:set( function()
    local lp = entity.get_local_player()
    if not lp then return end
    local screensize = render.screen_size()
    local x = screensize.x / 2 --- Меняет расположение ватермарки по X
    local y = screensize.y / 2 --- Меняет расположение ватермарки по Y
    local clr = ui.color:get()
   
    if ui.enable:get() then
        local avatar = lp:get_steam_avatar()
        render.texture(avatar, vector(x, y + 45), vector(35, 35), color())
        render.text(3, vector(x + 40, y + 50), clr, "", "NeverLose Beta")
        render.text(3, vector(x + 40, y + 63), clr, "", string.upper(common.get_username().."   -   beta"))
    end
end)
зачем?
 
Сверху Снизу