local cathode = nil
local phb = false
local betadraw = draw
local cr = hook
local ptr = print
local ptrt = PrintTable
local cadd = cr.Add
local crem = cr.Remove
local colorpanel = Color(52, 51, 51)
local scrw, scrh = ScrW(), ScrH()
local speedtxt = 100
local txtPos = 0
local requir = require
local req = requir
surface.CreateFont( "epic",{font = "TabLarge",extended = false,size = 45,weight = 900,blursize = 0})
surface.CreateFont("XX", { font = "Verdana", size = 15, antialias = false, outline = true } )
surface.CreateFont("XXL", { font = "Verdana", size = 45,weight = 900, antialias = false, outline = true } )

req("zxcmodule")
local strtext = {
    "Betadine.xyz", "Betadine.nig", "Betadine.cock", "Betadine.eww",
    "Betadine.net", "Betadine.gov", "Betadine.corn", "Betadine.xdog",
    "Betadine.pedo", "Betadine.xbox", "Betadine.leak", "Betadine.xD",
    "Betadine.baduser", "Betadine.spaceNègre", "Betadine.brainNègre",
    "Betadine.KALI", "Betadine.Muslim", "Betadine.IronLeGay",
    "Betadine.ZwkNoSSD", "Betadine.CursedMonBB", "Betadine.Atheware",
    "Betadine.Nigger", "Betadine.NaylLePD", "Betadine.FenekLeBon",
    "Betadine.Asterion", "Betadine.VoxLeNègreResolved",
    "Betadine.SSHsousMariePrime", "DrakoSousLemiProject"
}

-- Log initial
ptr("\n" .. string.rep(" \n", 100))
MsgC(Color(0, 247, 255), "[ + ] Working on the menu last save 20/11/2024 01:04\n[ ! ] Thanks Jelag to code the menu :)")
file.Append("loginfo.txt", string.format("[Date: %s] FPS: %.2f | Pos: %.2f, %.2f, %.2f | Vel: %.2f, %.2f, %.2f | Ping: %d | Gravity: %d | Players: %d | Server: %s\n", os.date("%Y-%m-%d %H:%M:%S"), math.Round(1 / FrameTime(), 2), LocalPlayer():GetPos().x, LocalPlayer():GetPos().y, LocalPlayer():GetPos().z, LocalPlayer():GetVelocity().x, LocalPlayer():GetVelocity().y, LocalPlayer():GetVelocity().z, LocalPlayer():Ping(), GetConVar("sv_gravity"):GetInt(), #player.GetAll(), GetHostName()))


local scrw, scrh = ScrW(), ScrH()
local watermark = vgui.Create("DPanel")

watermark:SetSize(0, 25)
watermark:SetPos(ScrW() - 600, 10)
watermark:SizeTo(600, 25, 1, 0, 2, function() end)
local rotationAngle = 0
watermark.Paint = function(self, w, h)
    draw.RoundedBox(0, 0, 0, w, h, Color(0, 0, 0))
    local centerX, centerY = 20, h / 2 
    local radius = 8.5 
    local segments = 360
    for i = 0, segments - 1 do
        local angle = math.rad(i) + math.rad(rotationAngle)
        local x = centerX + math.cos(angle) * radius
        local y = centerY + math.sin(angle) * radius

        local color = HSVToColor((i / segments) * 360, 1, 1)
        surface.SetDrawColor(color.r, color.g, color.b, 255)
        surface.DrawCircle(x, y, 1, color)
        surface.DrawOutlinedRect(0,0,w,h,1)
    end
    draw.SimpleTextOutlined(
        "Betadine.hvh | FPS: " .. math.Round(1 / FrameTime(), 0) ..
        " | Ping: " .. math.Round(LocalPlayer():Ping(), 2) ..
        " | Name: " .. LocalPlayer():Nick() ..
        " | cl_interp: " .. string.format("%.2f", GetConVar("cl_interp"):GetFloat()) ..
        " | Tickrate: " .. string.format("%.2f", 1 / engine.TickInterval()),
        "XX",
        w / 2,
        h / 2,
        Color(255, 0, 0),
        TEXT_ALIGN_CENTER,
        TEXT_ALIGN_CENTER,
        0.2,
        Color(0, 0, 0)
    )
    rotationAngle = (rotationAngle + 1) % 360 
end



watermark.Think = function(self)
    self:SetPos(scrw - self:GetWide() - 10, 10)
end



local function createcathode()
/*
 _______   ________  _______    ______   __       __  ________ 
 |       \ |        \|       \  /      \ |  \     /  \|        \
 | $$$$$$$\| $$$$$$$$| $$$$$$$\|  $$$$$$\| $$\   /  $$| $$$$$$$$
 | $$  | $$| $$__    | $$__| $$| $$__| $$| $$$\ /  $$$| $$__    
 | $$  | $$| $$  \   | $$    $$| $$    $$| $$$$\  $$$$| $$  \   
 | $$  | $$| $$$$$   | $$$$$$$\| $$$$$$$$| $$\$$ $$ $$| $$$$$   
 | $$__/ $$| $$      | $$  | $$| $$  | $$| $$ \$$$| $$| $$_____ 
 | $$    $$| $$      | $$  | $$| $$  | $$| $$  \$ | $$| $$     \
  \$$$$$$$  \$$       \$$   \$$ \$$   \$$ \$$      \$$ \$$$$$$$$
  */

    local frameW, frameH = scrw * 0.5, scrh * 0.5
    local time, delay, ease = 0.5, 0, 0.2

    cathode = vgui.Create("DFrame")
    cathode:SetTitle("")
    cathode:MakePopup()
    cathode:ShowCloseButton(false)
    cathode:SetSize(0, 0)

    cathode.Paint = function(self, w, h)
        draw.RoundedBox(0, 0, 0, w, h, colorpanel)
        surface.SetFont("XXL")
        draw.RoundedBox(0, 0, 50, scrw * 0.5, 2.5, Color(66, 245, 129))

        local currentText = strtext[(math.floor(CurTime() * 0.5) % #strtext) + 1]
        local txtWidth, txtHeight = surface.GetTextSize(currentText)

        surface.SetTextColor(0, 255, 157)
        surface.SetTextPos(txtPos, (h - txtHeight) / 75)
        surface.DrawText(currentText)

        txtPos = txtPos - (speedtxt * FrameTime())
        if txtPos + txtWidth < 0 then
            txtPos = w
        end
    end

    local anim = true
    cathode:SizeTo(frameW, frameH, time, delay, ease, function()
        anim = false
    end)

    cathode.Think = function(me)
        if anim then
            me:Center()
        end
    end



/*
 _______    ______   __    __  ________  ________  ________ 
 |       \  /      \ |  \  |  \|        \|        \|        \
 | $$$$$$$\|  $$$$$$\| $$  | $$| $$$$$$$$| $$$$$$$$ \$$$$$$$$
 | $$  | $$| $$___\$$| $$__| $$| $$__    | $$__       | $$   
 | $$  | $$ \$$    \ | $$    $$| $$  \   | $$  \      | $$   
 | $$  | $$ _\$$$$$$\| $$$$$$$$| $$$$$   | $$$$$      | $$   
 | $$__/ $$|  \__| $$| $$  | $$| $$_____ | $$_____    | $$   
 | $$    $$ \$$    $$| $$  | $$| $$     \| $$     \   | $$   
  \$$$$$$$   \$$$$$$  \$$   \$$ \$$$$$$$$ \$$$$$$$$    \$$   
*/
    local dsheet = vgui.Create("DPropertySheet", cathode)
    dsheet:SetSize(scrw * 2, scrh / 0.5)
    dsheet:SetPos(0, 53 )
    dsheet.Paint = function(self, w, h)
        draw.RoundedBox(0, 0, 0, w, h, Color(48, 48, 48))
    end
/*
 _______   _______    ______   __    __  ________  __       
 |       \ |       \  /      \ |  \  |  \|        \|  \      
 | $$$$$$$\| $$$$$$$\|  $$$$$$\| $$\ | $$| $$$$$$$$| $$      
 | $$  | $$| $$__/ $$| $$__| $$| $$$\| $$| $$__    | $$      
 | $$  | $$| $$    $$| $$    $$| $$$$\ $$| $$  \   | $$      
 | $$  | $$| $$$$$$$ | $$$$$$$$| $$\$$ $$| $$$$$   | $$      
 | $$__/ $$| $$      | $$  | $$| $$ \$$$$| $$_____ | $$_____ 
 | $$    $$| $$      | $$  | $$| $$  \$$$| $$     \| $$     \
  \$$$$$$$  \$$       \$$   \$$ \$$   \$$ \$$$$$$$$ \$$$$$$$$
                                                             
*/
    local betavisual = vgui.Create("DPanel", dsheet)
    betavisual:Dock(FILL)
    dsheet:AddSheet("betavisual", betavisual)
    dsheet:GetItems()[1].Tab:SetVisible(false)
    betavisual.Paint = function(self, w, h)
        draw.RoundedBox(0, 0, 0, w, h, Color(43, 42, 42))
    end

    local betaAIM = vgui.Create("DPanel", dsheet)
    betaAIM:Dock(FILL)
    betaAIM.Paint = function(self, w, h)
        draw.RoundedBox(10, 0, 0, w, h, Color(32, 28, 28, 215))
        surface.SetDrawColor(0, 255, 128)
        surface.DrawOutlinedRect(0, 0, w, h, 1)
    end
    dsheet:AddSheet("betaAIM", betaAIM)
    dsheet:GetItems()[2].Tab:SetVisible(false)

    
/*

 _______   __    __  ________  ________   ______   __    __ 
 |       \ |  \  |  \|        \|        \ /      \ |  \  |  \
 | $$$$$$$\| $$  | $$ \$$$$$$$$ \$$$$$$$$|  $$$$$$\| $$\ | $$
 | $$__/ $$| $$  | $$   | $$      | $$   | $$  | $$| $$$\| $$
 | $$    $$| $$  | $$   | $$      | $$   | $$  | $$| $$$$\ $$
 | $$$$$$$\| $$  | $$   | $$      | $$   | $$  | $$| $$\$$ $$
 | $$__/ $$| $$__/ $$   | $$      | $$   | $$__/ $$| $$ \$$$$
 | $$    $$ \$$    $$   | $$      | $$    \$$    $$| $$  \$$$
  \$$$$$$$   \$$$$$$     \$$       \$$     \$$$$$$  \$$   \$$
                                                              
*/
    local buttonVIS = vgui.Create("DButton", cathode)
    buttonVIS:SetSize(200, 25)
    buttonVIS:SetPos(10, 55)
    buttonVIS:SetText("")
    buttonVIS.DoClick = function()
        dsheet:SetActiveTab(dsheet:GetItems()[1].Tab)
        surface.PlaySound("garrysmod/balloon_pop_cute.wav")
        end
    local lineAlpha = 0
    buttonVIS.Paint = function(self, w, h)
        draw.RoundedBox(2, 0, 0, w, h, Color(0, 0, 0, 94))
        if self:IsHovered() then
            lineAlpha = Lerp(FrameTime() * 10, lineAlpha, 255)
        else
            lineAlpha = Lerp(FrameTime() * 10, lineAlpha, 0)
        end
    
        local lineColor = Color(76, 250, 154, lineAlpha)
        draw.RoundedBox(0, 0, h - 2, w, 2, lineColor)
    
        draw.SimpleText("V.I.S.U.A.L", "XX", w / 2, h / 2, Color(255, 77, 77), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
    end
    
    local buttonAIM = vgui.Create("DButton", cathode)
    buttonAIM:SetSize(200, 25)
    buttonAIM:SetPos(225, 55)
    buttonAIM:SetText("")
    buttonAIM.DoClick = function()
        dsheet:SetActiveTab(dsheet:GetItems()[2].Tab)
        surface.PlaySound("garrysmod/balloon_pop_cute.wav")
        end
    local lineeAlpha = 0
    buttonAIM.Paint = function(self, w, h)
        draw.RoundedBox(2, 0, 0, w, h, Color(0, 0, 0, 94))
        if self:IsHovered() then
            lineeAlpha = Lerp(FrameTime() * 10, lineeAlpha, 255)
        else
            lineeAlpha = Lerp(FrameTime() * 10, lineeAlpha, 0)
        end
    
        local lineeColor = Color(76, 250, 154, lineeAlpha)
        draw.RoundedBox(0, 0, h - 2, w, 2, lineeColor)
    
        draw.SimpleText("H.U.D", "XX", w / 2, h / 2, Color(255, 77, 77), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
    end
    
/*

                                   __         
                                  |  \        
          ______   _______    ____| $$        
 ______  /      \ |       \  /      $$ ______ 
|      \|  $$$$$$\| $$$$$$$\|  $$$$$$$|      \
 \$$$$$$| $$    $$| $$  | $$| $$  | $$ \$$$$$$
        | $$$$$$$$| $$  | $$| $$__| $$        
         \$$     \| $$  | $$ \$$    $$        
          \$$$$$$$ \$$   \$$  \$$$$$$$        
                                              
      */                                        
                                              


end

local function animexitmenu()
    if not IsValid(cathode) then
        createcathode()
    else
        local frameW, frameH = scrw * 0.5, scrh * 0.5
        local time, delay, ease = 0.5, 0, 0.1

        if cathode:IsVisible() then
            cathode:SizeTo(0, 0, time, delay, ease, function()
                cathode:SetVisible(false)
            end)
        else
            cathode:SetVisible(true)
            cathode:SetSize(0, 0)
            cathode:SizeTo(frameW, frameH, time, delay, ease)
        end
    end
end

hook.Add("Think", "OpenMenu", function()
    if input.IsKeyDown(KEY_INSERT) then
        if not phb then
            animexitmenu()
            phb = true
        end
    else
        phb = false
    end
end)
