Solución encontrada: logré crear una función a la que luego llamé, lo hice.
export function Checkoutsystem_Close() { $w("#Address2").hide("fade"); $w("#Line4").hide("fade"); $w("#PostalCode").hide("fade"); $w("#Line5").hide("fade"); $w("#Name").hide("fade"); } export function StopLineTop_viewportEnter(event) {Checkoutsystem_Close()} export function StopLineBottom_viewportEnter(event) {Checkoutsystem_Close()} export function CloseButtonHitbox_click(event) {Checkoutsystem_Close()} export function Glass_click(event) {Checkoutsystem_Close()}Comencé a codificar ayer y todo lo que sé usar es ocultar y mostrar funciones, pero hasta ahora he logrado construir un sistema de pago muy bonito. En mis conocimientos básicos. Pero hay tantos elementos para mostrar y ocultar, así que me gustaría aprender cómo guardar una función para que el código se vuelva muy corto, efectivo, simple y ligero.
Me gustaría guardar toda esta parte del código a continuación para guardarlo, así que puedo llamarlo más tarde para algo como;
función de exportación StopLineBottom_viewportEnter(evento) { "función cerrar pago" }
export function StopLineBottom_viewportEnter(event) { $w("#Glass").hide(""); $w("#CheckoutBox1").hide(""); $w("#Galasky").hide(""); $w("#PreviewBox").hide(""); $w("#GalaskyStarlight").hide(""); $w("#ProductPreview").hide(""); $w("#Price").hide(""); $w("#Address1").hide(""); $w("#Line1").hide(""); $w("#Country").hide(""); $w("#Line2").hide(""); $w("#City").hide(""); $w("#Line3").hide(""); $w("#Address2").hide(""); $w("#Line4").hide(""); $w("#PostalCode").hide(""); $w("#Line5").hide(""); $w("#Name").hide(""); $w("#Line6").hide(""); $w("#Number").hide("") $w("#Line7").hide(""); $w("#CheckoutButton").hide(""); $w("#CheckoutBox2").hide(""); $w("#PaymentProviders").hide(""); $w("#CloseButtonIcon").hide(""); $w("#CloseButtonHitbox").hide(""); }