--[[ ╔══════════════════════════════════════════════════[ www.novacapital.gg ]═════════════════════════════════════════════════════════════╗ _ _ _____ _ _ _ | \ | | / __ \ (_)| | | | | \| | ___ __ __ __ _ | / \/ __ _ _ __ _ | |_ __ _ | | | . ` | / _ \ \ \ / / / _` | | | / _` || '_ \ | || __| / _` || | | |\ || (_) | \ V / | (_| | | \__/\| (_| || |_) || || |_ | (_| || | \_| \_/ \___/ \_/ \__,_| \____/ \__,_|| .__/ |_| \__| \__,_||_| | | |_| ╚══════════════════════════════════════════════════[ www.novacapital.gg ]═════════════════════════════════════════════════════════════╝ --]] local icons = { logo = { raw = ':nc_interface/assets/svgs/logo.svg', -- w = 186, w = 169, h = 46 }, } BIND = "F10" -- Mude aqui a bind para efetuar a limpeza de tela function math.round(number) return (math.floor((number * (10 ^ 0)) + 0.5)) / (10 ^ 0) end isScreenShowing = true local myScreenSource local screenWidth, screenHeight = guiGetScreenSize() local scale = (math.abs(screenWidth / screenHeight) < 1.7) and math.min(screenWidth / 1920, 2) or math.min(screenHeight / 1080, 2) local scaleY = math.min(screenHeight / 1080, 2) local LOGO_CENTER = {x = math.round((screenWidth - (icons.logo.w * scale)) / 2), y = 12 * scaleY} local logo function cleanScreen() if isScreenShowing == false then if myScreenSource then dxUpdateScreenSource( myScreenSource ) dxSetBlendMode("blend") dxDrawImage(0, 0, screenWidth, screenHeight, myScreenSource, 0, 0, 0, tocolor(255, 255, 255, 255), true) if isElement(logo) then dxDrawImage(LOGO_CENTER.x, LOGO_CENTER.y, icons.logo.w * scale, icons.logo.h * scale, logo, 0, 0, 0, tocolor(255, 255, 255, alpha), true) end dxSetBlendMode("blend") end end end bindKey(BIND, "down", function() if isScreenShowing then if (getElementData(localPlayer, 'blockUI')) then return end if (not isElement(myScreenSource)) then myScreenSource = dxCreateScreenSource ( screenWidth, screenHeight ) end if not isElement(logo) then logo = svgCreate(icons.logo.w * scale, icons.logo.h * scale, icons.logo.raw) end isScreenShowing = false addEventHandler("onClientRender", root, cleanScreen) else if isElement(myScreenSource) then destroyElement(myScreenSource) end if isElement(logo) then destroyElement(logo) end isScreenShowing = true removeEventHandler("onClientRender", root, cleanScreen) end end )