- Статус
- Оффлайн
- Регистрация
- 19 Янв 2022
- Сообщения
- 38
- Реакции
- 5
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Код:
local width1 = Menu.SliderInt("1", "1", 'Width', 0, 10, 500)
local offset1 = Menu.SliderInt("1", "1", 'Offset', 0, 10, 500)
local x = EngineClient.GetScreenSize().x
local y = EngineClient.GetScreenSize().y
local player = EntityList.GetLocalPlayer()
local function lerp(start, vend, time)
return start + (vend - start) * time
end
local anim = 0
local scope = Menu.SwitchColor("Visuals","Main", "Custom Scope", false, Color.new(1, 1, 1, 1))
local lp = EntityList.GetClientEntity(EngineClient.GetLocalPlayer())
if lp == nil then return end
local scoped = lp:GetPlayer():GetProp("m_bIsScoped")
function = draw()
if not lp:GetPlayer():GetProp("m_bIsScoped") then
anim = lerp(anim,0,15 * GlobalVars.frametime)
else
anim = lerp(anim,1,15 * GlobalVars.frametime)
end
local offset = offset1:GetInt() * anim
local length = width1:GetInt() * anim
local col = Color.new(scope:GetColor().r, scope:GetColor().g, scope:GetColor().b, 1)
local col1 = Color.new(scope:GetColor().r, scope:GetColor().g, scope:GetColor().b, 0)
if lp:GetPlayer():GetProp("m_bIsScoped") then
Render.GradientBoxFilled(Vector2.new(x/2 - offset, y/2), Vector2.new(x/2 - offset - length, y/2 + 1), col, col1, col, col1)
Render.GradientBoxFilled(Vector2.new(x/2 + offset, y/2), Vector2.new(x/2 + offset + length, y/2 + 1), col, col1, col, col1)
Render.GradientBoxFilled(Vector2.new(x/2, y/2 + offset), Vector2.new(x/2 + 1, y/2 + offset + length), col, col, col1, col1)
Render.GradientBoxFilled(Vector2.new(x/2, y/2 - offset), Vector2.new(x/2 + 1, y/2 - offset - length), col, col, col1, col1)
end
end
Cheat.RegisterCallback('draw', draw)