I'm running a Jumpgate game and tryed to write a second code to have 2 Sream Break messages running at same time, but the game only runs the second one this is my first Api on("ready",function(){ var isItRunning; on("change:campaign:playerpageid", function () { var currentPage = getObj("page", Campaign().get("playerpageid")); if (!currentPage) return; if (currentPage.get("name") === "loadingScreen") { var token = findObjs({ name: "textLocation", type: "graphic", pageid: Campaign().get("playerpageid") }); if (!token || token.length === 0) { log("Erro: token 'textLocation' não encontrado."); return; } var textLocation = token[0]; var textBox; if (!state.LoadingScreen || !getObj("text", state.LoadingScreen.textID)) { textBox = createObj("text", { text: "Loading...", font_size: 32, font_family: "Contrail One", color: "rgb(250,250,250)", layer: "objects", pageid: Campaign().get("playerpageid"), left: textLocation.get("left"), top: textLocation.get("top") }); state.LoadingScreen = { module: "Loading Screen", textID: textBox.get("id") }; } else { textBox = getObj("text", state.LoadingScreen.textID); } if (!textBox) { log("Erro: textBox não foi criado ou encontrado."); return; } var tables = findObjs({ type: "rollabletable", name: "loadingMessages" }); if (!tables || tables.length === 0) { log("Erro: tabela 'loadingMessages' não encontrada."); return; } var loadingMessagesTable = tables[0]; var messageList = findObjs({ type: "tableitem", rollabletableid: loadingMessagesTable.id }); if (!messageList || messageList.length === 0) { log("Erro: nenhum item encontrado na tabela 'loadingMessages'."); return; } isItRunning = setInterval(function () { var tableItem = messageList[randomInteger(messageList.length) - 1]; if (textBox && tableItem) { textBox.set({ text: tableItem.get("name"), left:textLocation.get("left"), top:textLocation.get("top") }); } }, 5000); } else { clearInterval(isItRunning); } }); on("chat:message", function (msg) { if (msg.type === "api" && msg.content.indexOf("!clearLoadingScreenText") === 0) { textBox = getObj("text",state.LoadingScreen.textID); textBox.remove(); state.LoadingScreen = undefined; } }); }); And this is the second one on("ready",function(){ var isItRunning; on("change:campaign:playerpageid", function () { var currentPage1 = getObj("page", Campaign().get("playerpageid")); if (!currentPage1) return; if (currentPage1.get("name") === "loadingScreen") { var token1 = findObjs({ name: "textLocation1", type: "graphic", pageid: Campaign().get("playerpageid") }); if (!token1 || token1.length === 0) { log("Erro: token1 'textLocation1' não encontrado."); return; } var textLocation1 = token1[0]; var textBox1; if (!state.LoadingScreen || !getObj("text", state.LoadingScreen.textID)) { textBox1 = createObj("text", { text: "Act", font_size: 40, font_family: "Goblin One", color: "rgb(250,250,250)", layer: "objects", pageid: Campaign().get("playerpageid"), left: textLocation1.get("left"), top: textLocation1.get("top") }); state.LoadingScreen = { module: "Loading Screen", textID: textBox.get("id") }; } else { textBox1 = getObj("text", state.LoadingScreen.textID); } if (!textBox) { log("Erro: textBox não foi criado ou encontrado."); return; } var tables1 = findObjs({ type: "rollabletable", name: "Act" }); if (!tables1 || tables1.length === 0) { log("Erro: tabela 'Act' não encontrada."); return; } var ActTable = tables1[0]; var messageList1 = findObjs({ type: "tableitem", rollabletableid: ActTable.id }); if (!messageList1 || messageList1.length === 0) { log("Erro: nenhum item encontrado na tabela 'Act'."); return; } isItRunning = setInterval(function () { var tableItem1 = messageList[randomInteger(messageList.length) - 1]; if (textBox1 && tableItem1) { textBox.set({ text: tableItem1.get("name"), left:textLocation1.get("left"), top:textLocation1.get("top") }); } }, 3000); } else { clearInterval(isItRunning); } }); on("chat:message", function (msg) { if (msg.type === "api" && msg.content.indexOf("!clearLoadingScreenText") === 0) { textBox1 = getObj("text",state.LoadingScreen.textID); textBox1.remove(); state.LoadingScreen = undefined; } }); });