My script is about 150 lines but I shortened it to 15 for an example
if
is random [100,100]
then
setblock [rel:x,y,z] [dirt]
endif
if
isblock [rel:x,y,z] [dirt] [true]
then
inventory [actor] [add] [goldpieces] [100]
notify [100gp] [local] [9,9,9]
setpower [rel:x,y,z] [on]
wait [3000]
setpower [rel:x,y,z] [off]
endif
"Optional" commit
the block should appear but is invisable somtimes it works right away sometimes it doesnt should glitch within 5 trys.