Код:
local water_clr = menu.ColorEdit("Watermark Options", "Watermark Color", Color.new( 102/255,118/255,202/255 ) )
local water_rainbow = menu.Switch("Watermark Options", "Rainbow", false)
local water_rainbow_speed = menu.SliderInt("Watermark Options", "Rainbow Speed", 0, 1, 50)
local r, g, b
local font = g_Render:InitFont("Verdana",12)
local frame_rate = 0.0
local function get_abs_fps()
frame_rate = 0.9 * frame_rate + (1.0 - 0.9) * g_GlobalVars.absoluteframetime
return math.floor((1.0 / frame_rate) + 0.5)
end
local function get_latency()
local netchann_info = g_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()
r = (math.floor(math.sin(g_GlobalVars.realtime * water_rainbow_speed:GetInt()) * 127 + 128)) / 1000 * 3.92
g = (math.floor(math.sin(g_GlobalVars.realtime * water_rainbow_speed:GetInt() + 2) * 127 + 128)) / 1000 * 3.92
b = (math.floor(math.sin(g_GlobalVars.realtime * water_rainbow_speed:GetInt() + 4) * 127 + 128)) / 1000 * 3.92
local screen = g_EngineClient:GetScreenSize()
local fps = get_abs_fps()
local ping = get_latency()
local ticks = math.floor(1.0 / g_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
g_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 water_rainbow:GetBool() then
g_Render:BoxFilled(Vector2.new(x,y),Vector2.new(x+textSize+20,h-6), water_clr:GetColor())
water_rainbow_speed:SetVisible(false)
else
g_Render:BoxFilled(Vector2.new(x,y),Vector2.new(x+textSize+20,h-6), Color.new(r,g, b ,255))
water_rainbow_speed:SetVisible(true)
end
local nexttext = "peekkaabboo.tech| beta version"
g_Render:Text(nexttext, Vector2.new(var,12), Color.new(255,255,255), 12, font)
local wide = g_Render:CalcTextSize(nexttext, 12, font)
var = var + wide.x
nexttext = " | ping: ".. ping .."ms"
g_Render:Text(nexttext, Vector2.new(var,12), Color.new(255,255,255), 12,font)
wide = g_Render:CalcTextSize(nexttext, 12,font)
var = var + wide.x
nexttext = " | " .. ticks .. " rate"
g_Render:Text(nexttext, Vector2.new(var,12), Color.new(255,255,255), 12,font)
wide = g_Render:CalcTextSize(nexttext, 12,font)
var = var + wide.x
textSize = var - (screen.x - textSize - rightPadding)
end
cheat.RegisterCallback("draw",draw)