0% found this document useful (0 votes)
12 views5 pages

Custom Shop Items and Commands Guide

Uploaded by

u.g.yt.gaming
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views5 pages

Custom Shop Items and Commands Guide

Uploaded by

u.g.yt.gaming
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

let q=0,onBlockStandTickCounter={};const customShopItems={"Maple Log":

{apiName:"Maple Log",buyPrice:5,sellPrice:1},"Messy Stone":{apiName:"Messy


Stone",buyPrice:2,sellPrice:0},"Snowy Messy Stone":{apiName:"Snowy Messy
Stone",buyPrice:2,sellPrice:0},"Mossy Messy Stone":{apiName:"Mossy Messy
Stone",buyPrice:2,sellPrice:0},Stone:
{apiName:"Stone",buyPrice:2,sellPrice:.5},Obsidian:
{apiName:"Obsidian",buyPrice:100,sellPrice:30},Coal:
{apiName:"Coal",buyPrice:15,sellPrice:3},"Iron Bar":{apiName:"Iron
Bar",buyPrice:20,sellPrice:3},"Gold Bar":{apiName:"Gold
Bar",buyPrice:30,sellPrice:5},Diamond:
{apiName:"Diamond",buyPrice:50,sellPrice:15},Moonstone:
{apiName:"Moonstone",buyPrice:50,sellPrice:15},Melon:
{apiName:"Melon",buyPrice:20,sellPrice:2},Watermelon:
{apiName:"Watermelon",buyPrice:20,sellPrice:1},"Iron Watermelon":{apiName:"Iron
Watermelon",buyPrice:2e4,sellPrice:1e4},Wheat:
{apiName:"Wheat",buyPrice:5,sellPrice:3},Rice:
{apiName:"Rice",buyPrice:5,sellPrice:3},"Chili Pepper":{apiName:"Chili
Pepper",buyPrice:20,sellPrice:1},Cotton:
{apiName:"Cotton",buyPrice:20,sellPrice:4},Cranberries:
{apiName:"Cranberries",buyPrice:20,sellPrice:5},Bone:
{apiName:"Bone",buyPrice:50,sellPrice:20},Fireball:
{apiName:"Fireball",buyPrice:500,sellPrice:0},Iceball:
{apiName:"Iceball",buyPrice:500,sellPrice:0},Cactus:
{apiName:"Cactus",buyPrice:50,sellPrice:2},"Fat Cactus":{apiName:"Fat
Cactus",buyPrice:50,sellPrice:3},"Red Mushroom":{apiName:"Red
Mushroom",buyPrice:30,sellPrice:1},"Brown Mushroom":{apiName:"Brown
Mushroom",buyPrice:30,sellPrice:1},Net:
{apiName:"Net",buyPrice:10,sellPrice:1},Cobweb:
{apiName:"Cobweb",buyPrice:5e3,sellPrice:1500},Corn:
{apiName:"Corn",buyPrice:30,sellPrice:2},Vines:
{apiName:"Vines",buyPrice:30,sellPrice:4},Fur:
{apiName:"Fur",buyPrice:200,sellPrice:32},"Knight Heart":{apiName:"Knight
Heart",buyPrice:300,sellPrice:40},"Golem Eye":{apiName:"Golem
Eye",buyPrice:200,sellPrice:35},"Rotten Flesh":{apiName:"Rotten
Flesh",buyPrice:50,sellPrice:20}},ytbers=["PRO_M4LIK_"],Premium=["PRO_M4LIK_YT","Bl
oxdDevsAreTheBest","SharponeTM","dr3g","ELITE_HEROIC_WOLF","OGHerobrine","PinkPengu
in65116","CrypticX","fractal_engine","bebiscool","TheFlamed","Cubiam","NatkaBloxd_Y
T"],OG=["hi_109458674","OGHerobrine","TheHungryDolphin","chillguy_bruh","Kingtyler2
isbackYT","AwesomeDonut_playz","primeeeeeeey","TheFlamed","WinterFlames"],Dedicated
=["OGHerobrine","hi_109458674","bloxdio_NotCholly","yt_Clown_Pierce","P0T4T0_P13","
_Genie"],Rich=["PRO_M4LIK_YT","SharponeTM","knify0_1","TheFlamed","CrypticX","XxRio
tX","GRANDMA_SO_HT_2","Unnknowwnn","gnuffaddmutedrank","Cubiam","grasefer_","OrcaVi
be","CapybaraV2","1XXX1_OG_1XXX1","bloxdio_NotChollyYT","yt_Clown_Pierce","P0T4T0_P
13","Q_Skywars","tenniskid24","babp_","_Genie","Saadrekt","bebiscool"],Moderators=[
"Cubiam","NatkaBloxd_YT","hi_109458674","Khat"],BASE_CARPET_MESH_ID="player_rank_ca
rpet";function ilv(e){[Link](e,"lobbyLeaderboardInfo",{pfp:{},name:
{displayName:"Name",sortPriority:2},kills:
{displayName:"Kills",sortPriority:0},deaths:
{displayName:"Deaths",sortPriority:1},money:
{displayName:"Money",sortPriority:3},playtime:
{displayName:"Playtime",sortPriority:4}}),ulv(e)}function ulv(e){let
t=[Link](e)?.[0]?.attributes?.customAttributes||
{kills:0,deaths:0,money:0,playtime:0},o=[Link](([Link]||0)/6e4),s=`$
{[Link](o/60)}h ${o
%60}m`;[Link](e,"lobbyLeaderboardValues",{kills:
([Link]||0).toString(),deaths:([Link]||0).toString(),money:([Link]||
0).toString(),playtime:s})}function onPlayerOpenedChest(e,t,o,s,i)
{try{i&&([Link](e,0)||
([Link](e,0,"Dirt",1,{customAttributes:
{money:0,shards:0,kills:0,deaths:0,playtime:0}}),[Link](e,"Your stats have
been initialized. Type ?bal, ?shards, ?kills, deaths, and ?playtime to see them at
any time. They include money, shards, kills, deaths, and
playtime.")),[Link](e,4, -450, 82),[Link](e,"You have been
teleported to the main area!",{color:"#00ff00"}),[Link](e,!
1,"Utility"),[Link](e,!0,"Utility"))}catch{}}function onBlockStand(e,t,o,s,i)
{try{if(onBlockStandTickCounter[e]=(onBlockStandTickCounter[e]||0)+1,10!
==onBlockStandTickCounter[e])return;onBlockStandTickCounter[e]=0,"Patterned Purple
Glass"!==i||[Link](e,0)&&"Air"!
==[Link](e,0).name||[Link](e,0, -452,
82)}catch{}}function onPlayerChangeBlock(e,t,o,s,i,r,l,a,n)
{try{[Link]("Moonstone Chest|
meta|")&&([Link](t,o,s,"Air"),[Link](e,"Moonstone chests are not
allowed!"))}catch{}}function ppcc(e,t){if("?help"===t)[Link](e,"These
custom commands will help you navigate the server!\n -?rtp: Randomly teleport to a
location within 1000 blocks (requires 5s stand still)!\n -?bal: Shows your current
amount of money.\n -?shop: Opens the server shop to see the buyable items and see
their price!\n -?buy: Use this to buy items from the shop. Make sure to type out
item with correct capitalization, name, and optional quantity (e.g., ?buy5 Diamond
Sword).\n -?sell: Use this to sell items to the shop. Make sure to type out item
with correct capitalization, name, and optional quantity (e.g., ?sell3 Diamond
Sword).\n -?info: See information about the server!\n -?playtime: Shows your total
accumulated playtime.\n -?kills: Shows your total kills.\n -?deaths: Shows your
total deaths.\n -?kdr: Shows your Kill/Death Ratio.\n -?pay <playername> <amount>:
Pay another online player a specified amount of money (e.g., ?pay JohnDoe 100).\n
-?players: Shows the total players online.",{color:"red"});else if("?
info"===t)[Link](e,"This is a Bloxd survival server made by Gnuff_Gnuff
where there are many things like a shop, currencies, shards, cosmetics, and much
more. Type ?help for a list of the custom commands to navigate the server.",
{color:"red"});else if("?
rtp"===t)rtpc[e]={startTime:[Link](),originalPos:[Link](e),destinationPo
s:[[Link](951*[Link]())+50,50,[Link](951*[Link]())
+50,],lastMessageTime:[Link]()},[Link](e,"Teleporting in 5 seconds... Do
not move!",{color:"#FFAA00"});else if("?
bal"===t&&[Link](e,0)){let
o=[Link](e,0).[Link];[Link](e,
"Your balance is $"+String([Link]),{color:"#00ff00"})}else if("?
playtime"===t&&[Link](e,0)){let
s=[Link]([Link](e,0).[Link]
e/1e3),i=`${[Link](s/3600).toString().padStart(2,"0")}h ${[Link](s
%3600/60).toString().padStart(2,"0")}m`;[Link](e,`Your playtime is ${i}.`,
{color:"#00ff00"})}else if("?kills"===t&&[Link](e,0)){let
r=[Link](e,0).[Link];[Link](e,
`Your kills: ${[Link]||0}`,{color:"#00ff00"})}else if("?
deaths"===t&&[Link](e,0)){let
l=[Link](e,0).[Link];[Link](e,
`Your deaths: ${[Link]||0}`,{color:"#00ff00"})}else if("?
kdr"===t&&[Link](e,0)){let
a=[Link](e,0).[Link],n=[Link]||
0,u=[Link]||0,c=0===u?[Link](2):(n/u).toFixed(2);[Link](e,`Your KDR:
${c}`,{color:"#00ff00"})}else if("?shop"===t){let m="Available items:\n";for(let $
in customShopItems){let y=customShopItems[$];m+=` - ${$} (Buy: $${[Link]} /
Sell: $${[Link]})
`}[Link](e,m,{color:"#00FFFF"})}else if([Link]("?buy")){let
d=[Link](4).trim(),f=1,h=d,p=[Link](/^(\d+)\
s*(.*)/);if(p&&(f=parseInt(p[1]),h=p[2].trim()),f<=0){[Link](e,"Please
specify a quantity greater than 0.",{color:"#ff0000"});return}let
b=customShopItems[h];if(b){let
g=[Link](e,0);if(g&&[Link]&&[Link]
tes){let
P=[Link],M=[Link],S=[Link]*f;if("number"==typeof
M&&M>=S){let
C=[Link](e,[Link]);[Link](e,[Link],f);let
_=[Link](e,[Link])-C;_>=f?([Link]-
=S,[Link](e,0,"Dirt",1,
{customAttributes:P}),ulv(e),[Link](e,`You bought ${f}x ${h} for $${S}!
Your new balance is $${[Link]}.`,{color:"#00ff00"})):
(_>0&&[Link](e,[Link],_),[Link](e,`Your inventory is full
or unable to receive ${f}x ${h}. No money was deducted.`,
{color:"#ffaa00"}))}else"number"!=typeof M?[Link](e,"Error: Your money
data is corrupted. Please contact an admin.",
{color:"#ff0000"}):[Link](e,`You dont have enough money for ${f}x ${h}.
You need $${S} but only have $${M}.`,{color:"#ff0000"})}else
[Link](e,"Your stats are not initialized. Please open a Moonstone Chest
first.",{color:"#ff0000"})}else [Link](e,`"${h}" is not a valid item in
the shop.`,{color:"#ff0000"})}else if([Link]("?sell")){let
N=[Link](5).trim(),I=1,A=N,k=[Link](/^(\d+)\
s*(.*)/);if(k&&(I=parseInt(k[1]),A=k[2].trim()),I<=0){[Link](e,"Please
specify a quantity greater than 0.",{color:"#ff0000"});return}let
F=customShopItems[A];if(F){let
v=[Link](e,0);if(v&&[Link]&&[Link]
tes){let T=[Link];[Link];let
D=[Link](e,[Link]);D>=I?
([Link](e,[Link],I),[Link]+=[Link]*I,[Link]
Slot(e,0,"Dirt",1,{customAttributes:T}),ulv(e),[Link](e,`You sold ${I}x $
{A} for $${[Link]*I}! Your new balance is $${[Link]}.`,
{color:"#00ff00"})):[Link](e,`You dont have ${I}x ${A} to sell. You only
have ${D}.`,{color:"#ff0000"})}else [Link](e,"Your stats are not
initialized. Please open a Moonstone Chest first.",{color:"#ff0000"})}else
[Link](e,`"${A}" is not a valid item to sell.`,{color:"#ff0000"})}else
if([Link]("?pay")){let w=[Link](4).trim().split(" ");if(2===[Link])
{let Y=w[0],x=parseInt(w[1]);if(isNaN(x)||x<=0){[Link](e,"Usage: ?pay
<playername> <amount>. Amount must be a positive number.",{color:"red"});return}let
B=[Link](Y);if(!B){[Link](e,`Player '${Y}' is not online or does
not exist.`,{color:"#ff0000"});return}if(B===e){[Link](e,"You cant pay
yourself.",{color:"#ff0000"});return}let
R=[Link](e,0),G=[Link](B,0);if(!R||!
[Link]||![Link]){[Link](e,"Your stats are not
initialized. Please open a Moonstone Chest first.",{color:"#ff0000"});return}if(!
G||![Link]||![Link]){[Link](e,`Player '${Y}'s
stats are not initialized. They need to open a Moonstone Chest first.`,
{color:"#ff0000"});return}let
W=[Link],O=[Link],z=[Link];if("numbe
r"!=typeof z||z<x){[Link](e,`You dont have enough money to pay ${Y} $${x}.
Your balance is $${z}.`,{color:"#ff0000"});return}[Link]-
=x,[Link]+=x,[Link](e,0,"Dirt",1,
{customAttributes:W}),[Link](B,0,"Dirt",1,
{customAttributes:O}),ulv(e),ulv(B),[Link](e,`You paid ${Y} $${x}. Your
new balance is $${[Link]}.`,{color:"#00ff00"}),[Link](B,`You received $$
{x} from ${[Link](e)}. Your new balance is $${[Link]}.`,
{color:"#00ff00"})}else [Link](e,"Usage: ?pay <playername> <amount>",
{color:"red"})}else if("?players"===t){let
E=[Link]();[Link](e,`There are ${E} players online.`,
{color:"#00FFFF"})}else{let H=[Link](e);if([Link](H)||
[Link](H)||[Link](H)||[Link](H)||[Link](H)||
[Link](H)){let
X=[],K="lightgray";[Link](H)&&([Link]({str:"[Moderator] ",style:
{color:"darkgreen",fontWeight:"bold"}}),K="darkgreen"),[Link](H)&&([Link]({str
:"[OG] ",style:
{color:"#800080"}}),"lightgray"===K&&(K="#9932CC")),[Link](H)&&([Link]({st
r:"[YT] ",style:
{color:"red"}}),"lightgray"===K&&(K="red")),[Link](H)&&([Link]({str:"[D
edicated] ",style:
{color:"orange"}}),"lightgray"===K&&(K="orange")),[Link](H)&&([Link]({str:"[
Rich] ",style:
{color:"lime"}}),"lightgray"===K&&(K="lightgreen")),[Link](H)&&([Link]({s
tr:"[Premium] ",style:{color:"gold"}}),"lightgray"===K&&(K="yellow"));let U=[...X,
{str:`${H} : `,style:{color:"white"}},{str:t,style:{color:K}},];return
[Link](U),!
1}}}pltt={},rtpc={},pput={},onPlayerJoin=e=>{[Link](e,"Moonsto
ne Chest",[]),ilv(e);let
t=[Link](e),o=null,s=[{names:Moderators,carpet:"Green Carpet"},
{names:OG,carpet:"Purple Carpet"},{names:ytbers,carpet:"R Carpet"},
{names:Dedicated,carpet:"Orange Carpet"},{names:Rich,carpet:"Li Carpet"},
{names:Premium,carpet:"Yellow Carpet"},];if("Gnuff_Gnuff"===t)o="Red Carpet";else
for(let i of s)if([Link](t))
{o=[Link];break}o&&[Link](e,"TorsoNode","BloxdBlock",
{blockName:o,size:.5,meshOffset:[0,0,0]},[0,.35,-.3],
[-.4,3.15,1.6])},onPlayerChangeBlock=(e,t,o,s,i,r,l,a,n)=>{try{[Link]("Moonst
one Chest|meta|")&&([Link](t,o,s,"Air"),[Link](e,"Moonstone chests
are not allowed!"))}catch{}},onPlayerKilledOtherPlayer=(e,t)=>{try{let
o=[Link](e,0);if(o&&[Link]&&[Link]
tes){let s=[Link];[Link]=([Link]||
0)+1,[Link](e,0,"Dirt",1,
{customAttributes:s}),ulv(e)}}catch{}},onRespawnRequest=e=>{try{let
t=[Link](e,0);if(t&&[Link]&&[Link]
tes){let o=[Link];[Link]=([Link]||
0)+1,[Link](e,0,"Dirt",1,
{customAttributes:o}),ulv(e)}}catch{}},onPlayerChat=(e,t,o)=>ppcc(e,t,o),tick=()=>{
if(4!=++q)return;q=0;let e=[Link](),t=[Link]();for(let o of t){if(!
[Link](o))continue;if(rtpc[o]){let s=e-
rtpc[o].startTime,i=[Link]((5e3-s)/1e3),r=[Link](o),l=rtpc[o].originalP
os;if(r[0]!==l[0]||r[1]!==l[1]||r[2]!==l[2]){[Link](o,"Teleport cancelled:
You moved!",{color:"#ff0000"}),delete rtpc[o];continue}s>=5e3?
([Link](o,...rtpc[o].destinationPos),[Link](o,"Teleported!",
{color:"#00ff00"}),delete rtpc[o]):i>0&&e-rtpc[o].lastMessageTime>=1e3?
([Link](o,`Teleporting in ${i} seconds...`,
{color:"#FFAA00"}),rtpc[o].lastMessageTime=e):i<=0&&!
rtpc[o].finalMessageSent&&([Link](o,"Teleporting now!",
{color:"#FFAA00"}),rtpc[o].finalMessageSent=!0)}pltt[o]||
(pltt[o]=e),pltt[o],pltt[o]=e;let a=[{str:"",style:
{color:"#ffffff",fontWeight:"bold",fontSize:"12px"}},],n=[Link]
lot(o,0);if(n&&[Link]&&[Link]){let
u=[Link],c=[Link];(!pput[o]||e-
pput[o]>=6e4)&&([Link]=([Link]||
0)+6e4,[Link](o,0,"Dirt",1,
{customAttributes:u}),pput[o]=e,ulv(o)),[Link](o,"Moonstone
Chest",[]);let
m=[Link]([Link]/1e3),$=`${[Link](m/3600).toString().padStart(2,"0")}h $
{[Link](m%3600/60).toString().padStart(2,"0")}m`,y=[Link]||0,d=[Link]||
0,f=0===d?[Link](2):(y/d).toFixed(2);"number"==typeof c&&[Link]({str:"\uD83D\
uDCB2Money: ",style:{color:"#ffffff",fontWeight:"bold",fontSize:"15px"}},
{str:"$"+c+"\n",style:{fontWeight:"bold",color:"#FFFF00",fontSize:"15px"}},{str:"\
uD83D\uDD52Playtime: ",style:{color:"#ffffff",fontWeight:"bold",fontSize:"15px"}},
{str:$+"\n",style:{fontWeight:"bold",color:"#FFD700",fontSize:"15px"}},
{str:"⚔️Kills: ",style:{color:"#ffffff",fontWeight:"bold",fontSize:"15px"}},
{str:y+"\n",style:{fontWeight:"bold",color:"#00FF00",fontSize:"15px"}},{str:"\
uD83D\uDC80Deaths: ",style:{color:"#ffffff",fontWeight:"bold",fontSize:"15px"}},
{str:d+"\n",style:{fontWeight:"bold",color:"#FF0000",fontSize:"15px"}},{str:"\
uD83E\uDEA6KDR: ",style:{color:"#ffffff",fontWeight:"bold",fontSize:"15px"}},
{str:f,style:
{fontWeight:"bold",color:"#00BFFF",fontSize:"15px"}})}[Link](o,"RightI
nfoText",a)}};

You might also like