Solved Skript not working (no effect happen)

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

RedDiamond

Member
Nov 30, 2020
21
0
1
23
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 :/
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 :emoji_slight_smile: thank you, owh and im using this skript on minehut (idk, maybe u need that info)
 
Status
Not open for further replies.