-
Автор темы
- #1
всё, я спать, по этому потом чет еще закину, хз зачем я это делаю, мне скучно просто :c
Код:
local water_switch = Menu.Switch('Visual','Watermark', false)
local watermark_rainbow = Menu.Switch("Visual", "Watermark Rainbow", false)
local watermark_rainbow_speed = Menu.SliderInt("Visual", "Rainbow Speed", 0, 1, 50)
local watermark_color = Menu.ColorEdit("Visual", "Watermark Color", Color.new( 102/255,118/255,202/255))
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 water_mark()
if water_switch:Get() then
r = (math.floor(math.sin(GlobalVars.realtime * watermark_rainbow_speed:GetInt()) * 127 + 128)) / 1000 * 3.92
g = (math.floor(math.sin(GlobalVars.realtime * watermark_rainbow_speed:GetInt() + 2) * 127 + 128)) / 1000 * 3.92
b = (math.floor(math.sin(GlobalVars.realtime * watermark_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 rightPadding = 20
local var = screen.x - textSize - rightPadding
local x = var - 10
local y = 9
local w = textSize + 20
local h = 17
local username = Cheat.GetCheatUserName()
Render.BoxFilled(Vector2.new(x,y+2),Vector2.new(x+textSize+20,h * 1.5 + 2), Color.new(17/255,17/255,17/255,100/255))
if not watermark_rainbow:GetBool() then
Render.BoxFilled(Vector2.new(x,y),Vector2.new(x+textSize+20,h-6), watermark_color:GetColor())
watermark_rainbow_speed:SetVisible(false)
else
Render.BoxFilled(Vector2.new(x,y),Vector2.new(x+textSize+20,h-6), Color.new(r,g, b ,255))
watermark_rainbow_speed:SetVisible(true)
end
local watermark_text = "eXodus.lua "
Render.Text(watermark_text, Vector2.new(var,12), Color.new(255,255,255), 12, font)
local wide = Render.CalcTextSize(watermark_text, 12, font)
var = var + wide.x
watermark_text = " | ping: ".. ping .."ms"
Render.Text(watermark_text, Vector2.new(var,12), Color.new(255,255,255), 12,font)
wide = Render.CalcTextSize(watermark_text, 12,font)
var = var + wide.x
watermark_text = " | " .. ticks .. " rate"
Render.Text(watermark_text, Vector2.new(var,12), Color.new(255,255,255), 12,font)
wide = Render.CalcTextSize(watermark_text, 12,font)
var = var + wide.x
watermark_text = " | " .. username .. ""
Render.Text(watermark_text, Vector2.new(var,12), Color.new(255,255,255), 12,font)
wide = Render.CalcTextSize(watermark_text, 12,font)
var = var + wide.x
textSize = var - (screen.x - textSize - rightPadding)
end
end
function menu()
watermark_color:SetVisible(water_switch:Get())
watermark_rainbow:SetVisible(water_switch:Get())
watermark_rainbow_speed:SetVisible(watermark_rainbow:Get())
end
Cheat.RegisterCallback("draw", function()
menu()
water_mark()
end