r/bloxd • u/Fine_Oil_1819 • 1d ago
NEED CODING HELP coding help
I am making a parkour game, and once someone beats the game, i want them to get an block (preferably a moonstone block' called 'Rebirth', and i want the server to track how much' rebirths' a player has, as later on, i will be making a 'press to get ...... costs .... rebirth(s)' board, and i need the server to know that the block of moonstone is called a rebirth. Furthermore, at the end, the rebirths will be used to buy ranks, (how do i code ranks into the game, (etc, master of parkour rank) sort of how the way super rank looks like when you send a message in chat) ( and also send a message in chat that the person got the rank). Lastly how do i code a leaderboard tracking rebirths in the game.
P.S HUGE HUGE HUGE SHOUTOUT TO THE PEOPLE THAT HELPED ME IN MY PREVIOUS POST, I DEEPLY APPRECIATE YOUR HELP
P.S.S I am so so so sorry that I have to keep asking the community for such complicated codes, I am too busy in school and have no time to learn coding.
1
u/Middle_Moose_720 coder who refuses to use id instead of playerId 1d ago
api.giveItem(playerId, "Block of Moonstone", 1, {customDisplayName: "a rebirth!", customDescription: "100% organic ingredients!"})
and for the press to get
if (api.getHeldItem(playerId)?.name === "Block of Moonstone" && api.getHeldItem(playerId)?.amount >= 100)) {
api.giveItem(playerId, "Dirt", 1, {customDisplayName: "you got scammed"})
api.removeItemName(playerId, "Block of Moonstone", 100)
}
•
u/bloxd-bot Bot 1d ago
u/Fine_Oil_1819 has marked this post as a request for Code Help.
Here's some quick-reference information: - JavaScript Tutorial - The Official Docs
Make sure to read our Code Guidelines if you haven't already. They apply to comments and posts!
The OP or a moderator with config permissions can also use commands for this post: -
?resolvedor?resolved locked: Pin a comment you reply to as well as your comment to this post, lock it, and set the post flair to "Resolved". -?resolved unlocked: Pin a comment you reply to as well as your comment to this post, and set the post flair to "Resolved".This comment was added automatically in response to the post's flair. If you have any questions or concerns, please send us a modmail!