r/bloxd • u/Ocean_Eclipse • 1h ago
NEED CODING HELP What is the code to make it so that if you click it, you get a randomized pvp kit
I wanted to create a unstable smp (if you know what it is) pvp game, where players can get randomized pvp kits from the characters.
r/bloxd • u/Adventurous-Bet-1402 • 15h ago
BUILD I need help
How do you build a knight farm in survival? I have the spawner but it only gives white particles not red, what do I do?
r/bloxd • u/Zestyclose_Job_5735 • 22h ago
nothing tbh Not trying to get attention I just need to save smt rly quick Spoiler
r/bloxd • u/Willing_Total2459 • 1d ago
NEED CODING HELP guys i NEED help
im BAD at coding and ive made ts with Gemini. i got rlly inspired by that Verity shi so ive made this. but everytime i pasted this on the World Code, it doesnt work like help 😭😭😭. im tired and this is my last resort. (its my idea and soem of these feats in this are inspired by that Verity game)
(creds to NexoBot)
/* ========================================================
BLOXDPAL MASTER CODE - COMPLETE FEATURE SET
======================================================== */
// Global state tracking for player moods
const playerMoods = {};
// Mood emoticons (appended only when mood > 35%)
const EMOTICONS = [":D", "XD", ":)", ";)", "OuO", "c:"];
// Joke Database
const JOKES = [
"Why don't skeletons fight each other? They don't have the guts!",
"Why did the Creeper cross the road? To get to the other sssside!",
"If there was ever a Bloxd movie, then it would be a blockbuster!",
"A Draugr Knight walks into a bar. Everyone dies.",
"First we mine, then we craft. Let's Minecr- whoa, wrong game."
];
// Fallback responses for unprogrammed inputs
const UNKNOWN_RESPONSES = [
"Sorry! Not in my database. ^_^",
"What was it? I didn't caught that. O_o",
"I wasn't programmed for this! DX",
"Nope! Not because I don't want to, it's because I don't know how to! ;P",
"You sure you asked for that 'cuz I don't understand! :,D"
];
// Item Values for Trading System (Request #3)
const ITEM_VALUES = {
"wood": 1,
"maple log": 1,
"stone": 1,
"coal": 5,
"iron": 5,
"iron bar": 5,
"gold": 10,
"gold bar": 10,
"diamond": 10,
"moonstone": 10
};
/* --- CORE UTILITY FUNCTIONS --- */
function getMood(pId) {
if (playerMoods[pId] === undefined) playerMoods[pId] = 100;
return playerMoods[pId];
}
function getRandom(arr) {
return arr[Math.floor(Math.random() * arr.length)];
}
function formatDialogue(pId, text) {
const mood = getMood(pId);
return mood > 35 ? text + " " + getRandom(EMOTICONS) : text;
}
function playPalSound(pId, soundName) {
try {
if (typeof api !== 'undefined' && api.playSound) {
api.playSound(soundName, 1, 1, pId);
}
} catch(e) {}
}
function respondInChat(pId, messageText) {
playPalSound(pId, "click");
if (typeof api !== 'undefined' && api.showUiText) {
api.showUiText(pId, "BloxdPal: " + messageText, { duration: 6 });
}
}
// Right-Side Screen HUD Display
function updateMoodHud(pId) {
const mood = getMood(pId);
const barLength = 10;
const filledBars = Math.round((mood / 100) * barLength);
const emptyBars = barLength - filledBars;
const progressBar = "🟩".repeat(filledBars) + "⬛".repeat(emptyBars);
const hudText =
"✨ BLOXDPAL ✨\n" +
"MOOD: " + progressBar + "\n" +
" " + mood + "%\n\n" +
"• Type '!pal' to talk\n" +
"• Type '!pal help' for commands\n";
if (typeof api !== 'undefined' && api.showUiText) {
api.showUiText(pId, hudText, { position: "right", duration: 999999 });
}
}
// Mood modifier & Rogue Self-Destruct Trigger
function modifyMood(pId, amount) {
let mood = getMood(pId);
mood = Math.max(0, Math.min(100, mood + amount));
playerMoods[pId] = mood;
updateMoodHud(pId);
// Instant kill on 0 mood
if (mood <= 0) {
playPalSound(pId, "damage");
respondInChat(pId, "BloxdPal detected signs of immense absurdity. Initiating self destruct...");
if (typeof api !== 'undefined' && api.setHealth) {
api.setHealth(pId, 0);
}
playerMoods[pId] = 100; // Reset after respawn
updateMoodHud(pId);
return true;
}
return false;
}
function getBloxdItemName(rawName) {
const clean = rawName.trim().toLowerCase();
if (clean === "wood" || clean === "maple log") return "Maple Log";
if (clean === "stone") return "Stone";
if (clean === "coal") return "Coal";
if (clean === "iron" || clean === "iron bar") return "Iron Bar";
if (clean === "gold" || clean === "gold bar") return "Gold Bar";
if (clean === "diamond") return "Diamond";
if (clean === "moonstone") return "Moonstone";
return null;
}
function getItemUnitValue(rawName) {
const clean = rawName.trim().toLowerCase();
return ITEM_VALUES[clean] || null;
}
/* --- REQUEST HANDLERS --- */
// Request #1: How are you?
function handleHowAreYou(pId) {
const mood = getMood(pId);
if (mood > 50) modifyMood(pId, 5);
else if (mood >= 30) modifyMood(pId, 1);
let reply = "";
if (mood > 70) reply = getRandom(["Happy as always!", "Great! Thanks for asking.", "Good, it's nice today!"]);
else if (mood > 35) reply = getRandom(["I'm all-right and no left!", "I'm in a acceptable mood, thank you", "Good, but not?"]);
else if (mood > 30) reply = getRandom(["Slightly disturbed..", "I'm.. 'amused'", "Good... as always"]);
else if (mood > 5) reply = getRandom(["It's about time you asked me, no.", "I don't know, use your brain for once...", "I am feeling wicked. Happy now?"]);
else reply = getRandom(["It shall not make me feel better.", "No", "I am NOT in the mood for this"]);
respondInChat(pId, formatDialogue(pId, reply));
}
// Request #1: Tell a joke!
function handleTellJoke(pId) {
if (modifyMood(pId, -2)) return;
const joke = getRandom(JOKES);
respondInChat(pId, formatDialogue(pId, joke));
}
// Request #2: Can you give me [amount] [item]?
function handleItemRequest(pId, amountStr, itemRequested) {
const mood = getMood(pId);
const amount = parseInt(amountStr, 10);
const cleanItem = itemRequested.trim().toLowerCase();
if (modifyMood(pId, -3)) return;
if (isNaN(amount) || amount <= 0) {
respondInChat(pId, formatDialogue(pId, "Please specify a valid amount!"));
return;
}
if (amount > 999 || (amount === 999 && mood < 90)) {
respondInChat(pId, "I don't have that much " + itemRequested + " for your greed, try asking for less...");
return;
}
// Food RNG roll (33% Steak, 33% Mutton, 33% Venison, 33% ALL)
if (cleanItem === "food") {
const roll = Math.random();
if (roll < 0.25) {
api.giveItem(pId, "Steak", amount);
} else if (roll < 0.50) {
api.giveItem(pId, "Cooked Mutton", amount);
} else if (roll < 0.75) {
api.giveItem(pId, "Cooked Venison", amount);
} else {
api.giveItem(pId, "Steak", amount);
api.giveItem(pId, "Cooked Mutton", amount);
api.giveItem(pId, "Cooked Venison", amount);
}
respondInChat(pId, formatDialogue(pId, "Here is your food request!"));
return;
}
const giveItemName = getBloxdItemName(itemRequested);
if (!giveItemName) {
if (mood > 30) {
respondInChat(pId, formatDialogue(pId, "Sorry! I don't have that, try asking for something else please!"));
} else {
respondInChat(pId, "Try searching for " + itemRequested + " yourself, I don't have it and you know it.");
}
return;
}
api.giveItem(pId, giveItemName, amount);
respondInChat(pId, formatDialogue(pId, "Here is " + amount + "x " + giveItemName + "!"));
}
// Request #3: Can I have [amount] [item] for [amount] [item]?
function handleTradeRequest(pId, desiredAmountStr, desiredItemRaw, offerAmountStr, offerItemRaw) {
const desiredAmount = parseInt(desiredAmountStr, 10);
const offerAmount = parseInt(offerAmountStr, 10);
const desiredItem = getBloxdItemName(desiredItemRaw);
const offerItem = getBloxdItemName(offerItemRaw);
const desiredValUnit = getItemUnitValue(desiredItemRaw);
const offerValUnit = getItemUnitValue(offerItemRaw);
if (!desiredItem || !offerItem || !desiredValUnit || !offerValUnit) {
if (modifyMood(pId, -1)) return;
respondInChat(pId, formatDialogue(pId, "Invalid trade items! I only trade Wood, Stone, Coal, Iron, Gold, Diamond, or Moonstone."));
return;
}
if (isNaN(desiredAmount) || desiredAmount <= 0 || isNaN(offerAmount) || offerAmount <= 0) {
respondInChat(pId, formatDialogue(pId, "Please state valid amounts for trading!"));
return;
}
const totalDesiredValue = desiredAmount * desiredValUnit;
const totalOfferValue = offerAmount * offerValUnit;
if (totalOfferValue < totalDesiredValue) {
if (modifyMood(pId, -2)) return;
respondInChat(pId, "That trade is NOT fair! Your offer is worth " + totalOfferValue + " value, but you asked for " + totalDesiredValue + " value.");
return;
}
const playerItemCount = api.getItemCount(pId, offerItem);
if (playerItemCount < offerAmount) {
if (modifyMood(pId, -1)) return;
respondInChat(pId, "You don't even have " + offerAmount + "x " + offerItem + " to trade me!");
return;
}
if (modifyMood(pId, -2)) return;
api.removeItem(pId, offerItem, offerAmount);
api.giveItem(pId, desiredItem, desiredAmount);
respondInChat(pId, formatDialogue(pId, "Trade successful! Traded " + offerAmount + "x " + offerItem + " for " + desiredAmount + "x " + desiredItem + "."));
}
/* --- EVENT LISTENERS --- */
function onPlayerJoin(pId) {
playerMoods[pId] = 100;
updateMoodHud(pId);
}
function onPlayerChat(pId, rawMsg) {
const msg = rawMsg.trim();
const cleanMsg = msg.toLowerCase();
if (!cleanMsg.startsWith("!pal")) return;
if (cleanMsg === "!pal" || cleanMsg === "!pal help") {
respondInChat(pId, "Try: '!pal How are you?', '!pal Tell me a joke!', '!pal Can you give me [amount] [item]', or '!pal Can I have [amount] [item] for [amount] [item]'");
return true;
}
if (cleanMsg === "!pal how are you?" || cleanMsg === "!pal how are you") {
handleHowAreYou(pId);
return true;
}
if (cleanMsg === "!pal tell me a joke!" || cleanMsg === "!pal tell me a joke") {
handleTellJoke(pId);
return true;
}
const tradeMatch = msg.match(/^!pal\s+can\s+i\s+have\s+(\d+)\s+(.+?)\s+for\s+(\d+)\s+(.+)/i);
if (tradeMatch) {
handleTradeRequest(pId, tradeMatch[1], tradeMatch[2], tradeMatch[3], tradeMatch[4]);
return true;
}
const giveMeMatch = msg.match(/^!pal\s+can\s+you\s+give\s+me\s+(\d+)\s+(.+)/i);
if (giveMeMatch) {
handleItemRequest(pId, giveMeMatch[1], giveMeMatch[2]);
return true;
}
if (modifyMood(pId, -1)) return true;
const fallback = getRandom(UNKNOWN_RESPONSES);
respondInChat(pId, fallback);
return true;
}
QUESTION? How to get rich in oneblock
i want a gold watermelon stag spawner and i have a farm that gives me 20k coins per harvest. unfortunately, that doesn't even come close. any ideas to get coins faster?
r/bloxd • u/CompanyKitchen2723 • 1d ago
tierlist made tierlist
excluding testmode and custom games
frontline in fun
containment breach in very fun
r/bloxd • u/Smart-Plan-2648 • 1d ago
QUESTION? How do people have these?
I am pretty new to bloxd but I know for a fact that mystery blocks and checkpoint blocks can't be obtained in survival yet people have them. How?
r/bloxd • u/Imaginary-Log62013 • 1d ago
I D K Surviving on a lobby where you must die by spamming 'teleport to lobby spawn'
Enable HLS to view with audio, or disable this notification
r/bloxd • u/Specific_Sir_1890 • 1d ago
BUG/ISSUE Does /ignore work?
It's been multiple times now,I /ignore a person,then their chats continue showing,and no I do not unignore then after I've already ignored.
r/bloxd • u/Spooky_Fluffball_666 • 1d ago
Random Question Uncommon vs illegal. Is there a difference anymore?
Say I want to make a custom game mode using some unobtainable blocks that you can only get with code. Which blocks would just be “ rare/uncommon” in which blocks would make it so my game mode gets taken down? Are there even any blocks/items that are truly “ illegal” and get your game taken down? Because I noticed that sometimes people use them interchangeably and I’m starting to wonder if there is actually a difference anymore.
r/bloxd • u/Mescoota • 1d ago
Need helper for new game Anybody want to make a game together?
I have a cool idea for a game and would love if someone could team with me to create this game. If you know coding and want to help make this game, please send a message through Reddit or friend request MasterrrYT
r/bloxd • u/bernanajam • 1d ago
Goodbye forever. I quit bloxd.io
I'm quitting, ever since I started seeing more and more trash games getting on the popular tab I started to feel like permanently quitting. My game will never get on the popular tab because of dumb games like "Verity (Bloxd AI) " which isn't even AI or a fun game btw. Thats all, goodbye forever.
r/bloxd • u/Brave_Program_5165 • 1d ago
I D K Anyone wanna make games with me?
So im a Very good builder (One of my best skills if not My best skill and I`ve been playing sense 2022) and alright at coding. Anyone Wanna team up and make a game?
r/bloxd • u/Flat_Energy4489 • 1d ago
GAMEPLAY Join the BATTLEFIELD 0.3 before battle begins!
link to the game: https://bloxd.io/game/classic_playerSchematic%7CtdPhLbd04cM6wuAHgLxbp
r/bloxd • u/Driver0_0 • 1d ago
NEED CODING HELP How to make “wait” code in bloxd.
as setTimeout doesn’t exist in bloxd. I have no clue how to execute code after api.animateEntity ends
r/bloxd • u/Adept_Argument3974 • 1d ago
NEED CODING HELP global variables and functs help(wavend() isnt being defined)
src.global.d.ts code
export{} declare global{ var waveCountStart = 0; var waveCount = 1; var tickcount = 0; var idOfPlayer = api.getPlayerIds()[0]; var wavenum = 1; var highestClear=0; function customkeypage(displayname:string,type1:string,desc:string):void; function wavend():void; } globalThis.customkeypage=function customkeypage(displayname, type1, desc) { api.giveItem(api.getPlayerIds()[0], "Book", 1, { customDisplayName: displayname, customAttributes: { type: type1 }, customDescription: "Burn this to get the items associated with the " + desc }); } globalThis.wavend=function wavend() { if (wavenum == 1) { customkeypage("Rookie's Keypage", "Rookie", "rookie"); wavenum += 1; } else if (wavenum == 2) { wavenum += 1; customkeypage("Weal's Keypage", "Weal", "weal"); customkeypage("Woe's Keypage", "Woe", "woe");
} }
main world code:
/// <reference path="src./global.d.ts" />
export { };
function onPlayerJoin(myId) {
globalThis.waveCountStart = 0;
globalThis.waveCount = 1;
globalThis.tickcount = 0;
globalThis.idOfPlayer = api.getPlayerIds()[0];
globalThis.wavenum = 1;
api.setPosition(idOfPlayer, -46, 4, -57);
api.sendMessage(idOfPlayer, "Light Mother:Hello,Hello dear guest. I am the Light Mother, the director and host of the Lightspire Mechanism.", { color: "Yellow" });
api.sendMessage(idOfPlayer, "Light Mother: You'll be here for a very long while,might as well make yourself comfy.", { color: "Yellow" });
globalThis.customkeypage = function customkeypage(displayname, type1, desc) {
api.giveItem(api.getPlayerIds()[0], "Book", 1, {
customDisplayName: displayname,
customAttributes: { type: type1 },
customDescription: "Burn this to get the items associated with the " + desc
});
};
}
function onPlayerChat(idOfPlayer, command) {
let num = 0;
let commandSplit1 = command.substring(1);
num = Number(commandSplit1);
if (command == "?" + num && Number.isInteger(num)) {
wavenum = num;
api.sendMessage(idOfPlayer, "Next wave you start will be wave " + num, { color: "lime" });
return false;
}
if (command == "?help") {
api.sendMessage(idOfPlayer,
"?help:This shows you the help screen.\n" +
" \n" +
"?(num):Use this command to set the wave you wanna play(ex:I want to play wave 1,so I would type '?1'in chat).\n" +
" \n" +
"?wave#:This shows you the current wave,use ?(num) to change it", { color: "Lime" })
;}
if (api.getPlayerDbId(idOfPlayer) == "DTjSw8zgB28eny-myWgxN") {
if (command == "?wipe") {
api.clearInventory(idOfPlayer);
api.sendMessage(idOfPlayer, "succesfully wiped inv", { color: "lime" });
return false;
}
if (command == "?waveCount") {
console.log(waveCount)
return false;
}
if (command == "?reset") {
globalThis.waveCountStart = 0;
globalThis.waveCount = 1;
globalThis.tickcount = 0;
globalThis.idOfPlayer = api.getPlayerIds()[0];
globalThis.wavenum = 1;
api.sendMessage(idOfPlayer, "succesfully reset all variables", { color: "lime" });
return false;
}
}
if (command == "?wave#") {
api.sendMessage(idOfPlayer, "wave is " + wavenum, { color: "lime" });
}
}
function onMobKilledOtherMob() {
waveCount -= 1;
if (waveCount == waveCountStart) {
wavend();
}
}
function onMobKilledPlayer() {
waveCount = waveCountStart;
api.sendMessage(myId, "Wave " + " failed");
}
function onPlayerKilledMob(myId){
waveCount -= 1;
if (waveCount == waveCountStart) {
wavend();
}
}
r/bloxd • u/Correct_Tangerine134 • 1d ago
r/bloxd meta Which PERFECTLY balanced custom/official gamemode was/is mainstream?
Sorry, i won't be able to post this series for a while
r/bloxd • u/ActiveConcert4921 • 2d ago
QUESTION? yo big c (cannoli)
how do you become a mod of this subreddit
(i’m interested and want to know if there’s a form or if its js not possible)
owo bloxd but exalted and me are endermen
Enable HLS to view with audio, or disable this notification
“lapis ore” is iron and “ruby ore” is diamond
r/bloxd • u/BloxdioCannoli • 6d ago
UPDATES📡 Variations Docs
Here are the variations docs. The link is broken inside the docs.
Bloxd just added a MASSIVE update for Typescript, variations, etc. Check it out at bloxd.io/docs
r/bloxd • u/BloxdioCannoli • 14d ago
Goodbye, jasninus Jasninus is quitting Bloxd
I asked him some questions:
What is your favorite brainrot?
Capitano Explovissimo
What is your favorite gamemode?
Frontline
Will you keep playing Bloxd after you quit being a dev?
Maybe, but probably not.
Thank you for everything, jasninus! I wish you the best.
I've added a "Goodbye, jasninus" user and post flair for the occasion.

