LUA скрипт [FTC] Skeet scope [WARNING, MASSIVE SHITCODE]

life is cheap, death is free!
Эксперт
Статус
Оффлайн
Регистрация
9 Дек 2019
Сообщения
1,603
Реакции[?]
517
Поинты[?]
2K
Код:
local render = fatality.render
local config = fatality.config
local menu = fatality.menu
local cvar = csgo.interface_handler:get_cvar()
local engine_client = csgo.interface_handler:get_engine_client()
local entity_list = csgo.interface_handler:get_entity_list()
local global_vars = csgo.interface_handler:get_global_vars()

local r = math.floor( math.sin( global_vars.realtime * 2) * 127 + 128 )
local g = math.floor( math.sin( global_vars.realtime * 2 + 2 ) * 127 + 128 )
local b = math.floor( math.sin( global_vars.realtime * 2 + 4 ) * 127 + 128 )

local default_color = csgo.color(r, g, b, 255)
local c = csgo.color(145, 145, 145, 0)
local c1 = csgo.color(112, 174, 255, 255)
local c2 = csgo.color(255, 0, 0, 255)
    
local fis_item = config:add_item( "fis_lua", 1.0 )
local fis_item2 = config:add_item( "fis_lua2", 1.0)
local fis_item3 = config:add_item( "fis_lua3", 1.0)
local fis_checkbox = menu:add_checkbox( "Skeet Scope", "Visuals", "MISC", "Various", fis_item )
local fis_slider = menu:add_slider( "Scope length", "Visuals", "MISC", "Various", fis_item2, 0, 255, 0)
local fis_slidere = menu:add_slider( "Scope height", "Visuals", "MISC", "Various", fis_item3, 0, 255, 0)
local fisline = menu:get_reference( "Visuals", "MISC", "Various", "fisline" )
local fisline1 = menu:get_reference( "Visuals", "MISC", "Various", "fisline1" )

function on_paint()
    if not engine_client:is_in_game() then
       return end
        
    local local_player = entity_list:get_localplayer()

    if not local_player:is_alive() then
        return end
        
    local is_scoped = local_player:get_var_int("CCSPlayer->m_bIsScoped")
    local scopeline = cvar:find_var("cl_drawhud")
    
    if fis_item:get_bool() then
        if fis_item:get_bool() then
            if is_scoped then
                render:rect_fade( render:screen_size().x / 2, render:screen_size().y / 2 - 1 + fis_item3:get_float() + 2, 1, fis_item2:get_float(), csgo.color(255, 255, 255, 255), csgo.color(255, 255, 255, 25) )
                render:rect_fade( render:screen_size().x / 2, render:screen_size().y / 2 - fis_item2:get_float() - fis_item3:get_float(), 1, fis_item2:get_float(), csgo.color(255, 255, 255, 25), csgo.color(255, 255, 255, 255) )
                render:rect_fade( render:screen_size().x / 2 - fis_item2:get_float() - fis_item3:get_float(), render:screen_size().y / 2, fis_item2:get_float(), 1, csgo.color(255, 255, 255, 25), csgo.color(255, 255, 255, 255), 1 )
                render:rect_fade( render:screen_size().x / 2 + fis_item3:get_float() + 1, render:screen_size().y / 2, fis_item2:get_float(), 1, csgo.color(255, 255, 255, 255), csgo.color(255, 255, 255, 25), 1 )
                scopeline:set_float(0)
            else
                scopeline:set_float(1)
            end   
        end
    end
end

local callbacks = fatality.callbacks
callbacks:add("paint", on_paint)
скиньте сс, добавлю в тему и дам реакцию

(за код не бейте, я просто переписал хуёво другую луашку)
 
Начинающий
Статус
Оффлайн
Регистрация
24 Ноя 2021
Сообщения
2
Реакции[?]
0
Поинты[?]
0
Код:
local render = fatality.render
local config = fatality.config
local menu = fatality.menu
local cvar = csgo.interface_handler:get_cvar()
local engine_client = csgo.interface_handler:get_engine_client()
local entity_list = csgo.interface_handler:get_entity_list()
local global_vars = csgo.interface_handler:get_global_vars()

local r = math.floor( math.sin( global_vars.realtime * 2) * 127 + 128 )
local g = math.floor( math.sin( global_vars.realtime * 2 + 2 ) * 127 + 128 )
local b = math.floor( math.sin( global_vars.realtime * 2 + 4 ) * 127 + 128 )

local default_color = csgo.color(r, g, b, 255)
local c = csgo.color(145, 145, 145, 0)
local c1 = csgo.color(112, 174, 255, 255)
local c2 = csgo.color(255, 0, 0, 255)
   
local fis_item = config:add_item( "fis_lua", 1.0 )
local fis_item2 = config:add_item( "fis_lua2", 1.0)
local fis_item3 = config:add_item( "fis_lua3", 1.0)
local fis_checkbox = menu:add_checkbox( "Skeet Scope", "Visuals", "MISC", "Various", fis_item )
local fis_slider = menu:add_slider( "Scope length", "Visuals", "MISC", "Various", fis_item2, 0, 255, 0)
local fis_slidere = menu:add_slider( "Scope height", "Visuals", "MISC", "Various", fis_item3, 0, 255, 0)
local fisline = menu:get_reference( "Visuals", "MISC", "Various", "fisline" )
local fisline1 = menu:get_reference( "Visuals", "MISC", "Various", "fisline1" )

function on_paint()
    if not engine_client:is_in_game() then
       return end
       
    local local_player = entity_list:get_localplayer()

    if not local_player:is_alive() then
        return end
       
    local is_scoped = local_player:get_var_int("CCSPlayer->m_bIsScoped")
    local scopeline = cvar:find_var("cl_drawhud")
   
    if fis_item:get_bool() then
        if fis_item:get_bool() then
            if is_scoped then
                render:rect_fade( render:screen_size().x / 2, render:screen_size().y / 2 - 1 + fis_item3:get_float() + 2, 1, fis_item2:get_float(), csgo.color(255, 255, 255, 255), csgo.color(255, 255, 255, 25) )
                render:rect_fade( render:screen_size().x / 2, render:screen_size().y / 2 - fis_item2:get_float() - fis_item3:get_float(), 1, fis_item2:get_float(), csgo.color(255, 255, 255, 25), csgo.color(255, 255, 255, 255) )
                render:rect_fade( render:screen_size().x / 2 - fis_item2:get_float() - fis_item3:get_float(), render:screen_size().y / 2, fis_item2:get_float(), 1, csgo.color(255, 255, 255, 25), csgo.color(255, 255, 255, 255), 1 )
                render:rect_fade( render:screen_size().x / 2 + fis_item3:get_float() + 1, render:screen_size().y / 2, fis_item2:get_float(), 1, csgo.color(255, 255, 255, 255), csgo.color(255, 255, 255, 25), 1 )
                scopeline:set_float(0)
            else
                scopeline:set_float(1)
            end  
        end
    end
end

local callbacks = fatality.callbacks
callbacks:add("paint", on_paint)
скиньте сс, добавлю в тему и дам реакцию

(за код не бейте, я просто переписал хуёво другую луашку)
Код:
local menu = fatality.menu
local config = fatality.config
local comboRemoveScope = menu:get_reference('visuals', 'misc', 'local', 'remove scope');

local lines_enable = config:add_item("lines_enable", 1);
local guiLinesCheckbox = menu:add_checkbox("Enable Custom Scope Lines", "visuals", "misc", "local", lines_enable);

local margin_lines = config:add_item("margin_lines", 15);
local guiMarginSlider = menu:add_slider("Scope Lines Margin", "visuals", "misc", "local", margin_lines, 0, 1000, 1);

local size_lines = config:add_item("size_lines", 200);
local guiSizeSlider = menu:add_slider("Scope Lines Size", "visuals", "misc", "local", size_lines, 0, 1000, 1);

--
local render = fatality.render
local callbacks = fatality.callbacks;
local ConVar = csgo.interface_handler:get_cvar();
local screenCenter = render:screen_size();
screenCenter.x = screenCenter.x * 0.5;
screenCenter.y = screenCenter.y * 0.5;
--

local r, g, b = 194, 200, 255; -- change it if u wanna to change lines color

local function on_paint()
local function scopeline_handler()
    if not lines_enable:get_bool() then
        return;
    end

    local localPlayer = csgo.interface_handler:get_entity_list():get_localplayer();
    if not localPlayer:is_in_game() then
    if not csgo.interface_handler:get_engine_client():is_in_game() then
        return;
    end

    local localPlayer = csgo.interface_handler:get_entity_list():get_localplayer();
    local hudCvar = ConVar:find_var("cl_drawhud");

    if not localPlayer:is_alive() then
@@ -44,4 +60,4 @@ local function on_paint()
    render:rect_fade(screenCenter.x, screenCenter.y + margin, 1, size, color, color2, false); -- down
end

callbacks:add("paint", on_paint);
callbacks:add("paint", scopeline_handler);
Эта луа получше будет
 
Сверху Снизу