let team1 = 0; let team2 = 0; const webhook = "https://discord.com/api/webhooks/1509054463636406332/TQUL-0OoZ7gbsY2TU2sR7kk0jyuR023H7yFkGI_kH1hJ11lrrKk-FahKT9l8iSbdv873"; async function sendDiscordUpdate(scoringTeam){ const payload = { embeds: [ { title: "🏐 Orion Drift Match Update", description: `${scoringTeam} scored!\n\n` + `Orion Drift: ${team1}\n` + `Public Lobby: ${team2}`, color: 65280, footer: { text: "Live Match Tracker" }, timestamp: new Date() } ] }; await fetch(webhook, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(payload) }); } function addScore(team){ if(team === "team1"){ team1++; document.getElementById("team1Score") .innerText = team1; sendDiscordUpdate("Orion Drift"); } if(team === "team2"){ team2++; document.getElementById("team2Score") .innerText = team2; sendDiscordUpdate("Public Lobby"); } updateWinner(); } function updateWinner(){ const title = document.getElementById("matchTitle"); if(team1 > team2){ title.innerHTML = "Orion Drift VS Public Lobby"; } if(team2 > team1){ title.innerHTML = "Public Lobby VS Orion Drift"; } } // // AUTO MVP SYSTEM // const players = [ "Coz1e", "DoneDeal21", "Mark", "Volt", "Echo" ]; setInterval(() => { const randomPlayer = players[Math.floor(Math.random() * players.length)]; document.getElementById("mvpPlayer") .innerText = randomPlayer; }, 5000);