Hello, so i made a gens (kinda) skript and for now i made the gold and diamond one using music disc, so whe i tested it the gold one is working all of the effect is working including the part when it give player gold block, but somehow the diamond gen one is not working at all not a single effect and its using the same code just diffrent variable name, option, music disc type,item name, and item lore. So maybe someone here can help me with this, maybe there's an error? idk, when i reload the skript it didnt show any error message. sorry if my english is really bad :/
If u need more info about it that can help fixing the skript u can ask me thank you, owh and im using this skript on minehut (idk, maybe u need that info)
Code:
#====[GOLD]====
on right click:
if player is holding a music disc pigstep named "&6Gold &7Generator" with lore "{@goldl}" and "&7Status: &cOff":
if {gensgold.%player%} is false:
set {gensgold.%player%} to true
set line 2 of lore of player's tool to "&7Status: &aOn"
send "{@p} {@on}"
else if {gensgold.%player%} is true:
send "{@p} {@only1}"
else if player is holding a music disc pigstep named "&6Gold &7Generator" with lore "{@goldl}" and "&7Status: &aOn":
send "{@p} {@alreadyon}"
on left click:
if player is holding a music disc pigstep named "&6Gold &7Generator" with lore "{@goldl}" and "&7Status: &aOn":
set {gensgold.%player%} to false
set line 2 of lore of player's tool to "&7Status: &cOff"
send "{@p} {@off}"
else if player is holding a music disc pigstep named "&6Gold &7Generator" with lore "{@goldl}" and "&7Status: &cOff":
send "{@p} {@alreadyoff}"
set {gensgold.%player%} to false
every 4 seconds:
loop all players:
if {gensgold.%loop-player%} is true:
if loop-player is online:
if loop-player has music disc pigstep:
give loop-player 1 gold Block
else if loop-player is not online:
stop
else if {gensgold.%loop-player%} is false:
stop
on drop of music disc pigstep:
cancel event
send "{@p} {@drop}" to player
#====[Diamond]====
on right click:
if player is holding a music disc wait named "&bDiamond &7Generator" with lore "{@diamondl}" and "&7Status: &cOff":
if {gensdm.%player%} is false:
set {gensdm.%player%} to true
set line 2 of lore of player's tool to "&7Status: &aOn"
send "{@p} {@on}"
else if {gensdm.%player%} is true:
send "{@p} {@only1}"
else if player is holding a music disc wait named "&bDiamond &7Generator" with lore "{@diamondl}" and "&7Status: &aOn":
send "{@p} {@alreadyon}"
on left click:
if player is holding a music disc wait named "&bDiamond &7Generator" with lore "{@diamondl}" and "&7Status: &aOn":
set {gensdm.%player%} to false
set line 2 of lore of player's tool to "&7Status: &cOff"
send "{@p} {@off}"
else if player is holding a music disc wait named "&bDiamond &7Generator" with lore "{@diamondl}" and "&7Status: &cOff":
send "{@p} {@alreadyoff}"
set {gensdm.%player%} to false
every 5.5 seconds:
loop all players:
if {gensdm.%loop-player%} is true:
if loop-player is online:
if loop-player has music disc wait:
give loop-player 1 diamond Block
else if loop-player is not online:
stop
else if {gensdm.%loop-player%} is false:
stop
on drop of music disc wait:
cancel event
send "{@p} {@drop}" to player
If u need more info about it that can help fixing the skript u can ask me thank you, owh and im using this skript on minehut (idk, maybe u need that info)