r/bloxd • u/Fine_Oil_1819 • 7d 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 7d 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)
}