// code from goatstore // api: https://store.agi.bd module.exports = { config: { name: "slot", aliases: ["slots", "s"], version: "1.3", author: "nabin", countDown: 3, role: 0, description: "šŸŽ° Ultra-stylish slot machine with balanced odds", category: "game", guide: { en: "Use: {pn} [bet amount]" } }, onStart: async function ({ message, event, args, usersData }) { const { senderID } = event; const bet = parseInt(args[0]); // Enhanced money formatting with colors const formatMoney = (amount) => { if (isNaN(amount)) return "šŸ’²0"; amount = Number(amount); const scales = [ { value: 1e15, suffix: 'Q', color: '🌈' }, // Quadrillion { value: 1e12, suffix: 'T', color: '✨' }, // Trillion { value: 1e9, suffix: 'B', color: 'šŸ’Ž' }, // Billion { value: 1e6, suffix: 'M', color: 'šŸ’°' }, // Million { value: 1e3, suffix: 'k', color: 'šŸ’µ' } // Thousand ]; const scale = scales.find(s => amount >= s.value); if (scale) { const scaledValue = amount / scale.value; return `${scale.color}${scaledValue.toFixed(2)}${scale.suffix}`; } return `šŸ’²${amount.toLocaleString()}`; }; if (isNaN(bet) || bet <= 0) { return message.reply("šŸ”“ š—˜š—„š—„š—¢š—„: Please enter a valid bet amount!"); } const user = await usersData.get(senderID); if (user.money < bet) { return message.reply(`šŸ”“ š—œš—”š—¦š—Øš—™š—™š—œš—–š—œš—˜š—”š—§ š—™š—Øš—”š——š—¦: You need ${formatMoney(bet - user.money)} more to play!`); } // Premium symbols with different weights const symbols = [ { emoji: "šŸ’", weight: 30 }, { emoji: "šŸ‹", weight: 25 }, { emoji: "šŸ‡", weight: 20 }, { emoji: "šŸ‰", weight: 15 }, { emoji: "⭐", weight: 7 }, { emoji: "7ļøāƒ£", weight: 3 } ]; // Weighted random selection const roll = () => { const totalWeight = symbols.reduce((sum, symbol) => sum + symbol.weight, 0); let random = Math.random() * totalWeight; for (const symbol of symbols) { if (random < symbol.weight) return symbol.emoji; random -= symbol.weight; } return symbols[0].emoji; }; const slot1 = roll(); const slot2 = roll(); const slot3 = roll(); // 50% chance to win with various multipliers let winnings = 0; let outcome; let winType = ""; let bonus = ""; if (slot1 === "7ļøāƒ£" && slot2 === "7ļøāƒ£" && slot3 === "7ļøāƒ£") { winnings = bet * 10; outcome = "šŸ”„ š— š—˜š—šš—” š—š—”š—–š—žš—£š—¢š—§! š—§š—„š—œš—£š—Ÿš—˜ 7ļøāƒ£!"; winType = "šŸ’Ž š— š—”š—« š—Ŗš—œš—”"; bonus = "šŸŽ† š—•š—¢š—”š—Øš—¦: +3% to your total balance!"; await usersData.set(senderID, { money: user.money * 1.03 }); } else if (slot1 === slot2 && slot2 === slot3) { winnings = bet * 5; outcome = "šŸ’° š—š—”š—–š—žš—£š—¢š—§! 3 matching symbols!"; winType = "šŸ’« š—•š—œš—š š—Ŗš—œš—”"; } else if (slot1 === slot2 || slot2 === slot3 || slot1 === slot3) { winnings = bet * 2; outcome = "✨ š—”š—œš—–š—˜! 2 matching symbols!"; winType = "🌟 š—Ŗš—œš—”"; } else if (Math.random() < 0.5) { // 50% base chance to win something winnings = bet * 1.5; outcome = "šŸŽÆ š—Ÿš—Øš—–š—žš—¬ š—¦š—£š—œš—”! Bonus win!"; winType = "šŸ€ š—¦š— š—”š—Ÿš—Ÿ š—Ŗš—œš—”"; } else { winnings = -bet; outcome = "šŸ’ø š—•š—˜š—§š—§š—˜š—„ š—Ÿš—Øš—–š—ž š—”š—˜š—«š—§ š—§š—œš— š—˜!"; winType = "ā˜ ļø š—Ÿš—¢š—¦š—¦"; } await usersData.set(senderID, { money: user.money + winnings }); const finalBalance = user.money + winnings; // Fancy ASCII art for slots const slotBox = "╔═════════════════════╗\n" + "ā•‘ šŸŽ° š—¦š—Ÿš—¢š—§ š— š—”š—–š—›š—œš—”š—˜ šŸŽ° ā•‘\n" + "╠═════════════════════╣\n" + `ā•‘ [ ${slot1} | ${slot2} | ${slot3} ] ā•‘\n` + "ā•šā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•"; // Color-coded result message const resultColor = winnings >= 0 ? "🟢" : "šŸ”“"; const resultText = winnings >= 0 ? `šŸ† š—Ŗš—¢š—”: ${formatMoney(winnings)}` : `šŸ’ø š—Ÿš—¢š—¦š—§: ${formatMoney(bet)}`; const messageContent = `${slotBox}\n\n` + `šŸŽÆ š—„š—˜š—¦š—Øš—Ÿš—§: ${outcome}\n` + `${winType ? `${winType}\n` : ""}` + `${bonus ? `${bonus}\n` : ""}` + `\n${resultColor} ${resultText}` + `\nšŸ’° š—•š—”š—Ÿš—”š—”š—–š—˜: ${formatMoney(finalBalance)}` + `\n\nšŸ’” š—§š—œš—£: Higher bets increase jackpot chances!`; return message.reply(messageContent); } };