Solved Elytra and fireworks problem

  • 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!

Jun 30, 2022
17
1
3
40
Republic of Korea
I want to make a infinite firework with skript. with this skript, if player is aiming void, the firework doubled. can you guys help me?
here is my code:
on rightclick holding firework:
→if name of player's tool contains "&cfirework":
→→give 1 firework named "&cfirework" to player
(→=tab)
 
I believe the firework is duplicating because when you don't click on a block the firework isn't used.

try this it should only give the firework when it is used as an elytra boost or on a block.

i didn't test this code so it might not work

Code:
on rightclick holding firework:
  if name of player's tool contains "&cfirework":
    if player is gliding:
      give 1 firework named "&cfirework" to player
    else if clicked block is set:
      give 1 firework named "&cfirework" to player
 
I believe the firework is duplicating because when you don't click on a block the firework isn't used.

try this it should only give the firework when it is used as an elytra boost or on a block.

i didn't test this code so it might not work

Code:
on rightclick holding firework:
  if name of player's tool contains "&cfirework":
    if player is gliding:
      give 1 firework named "&cfirework" to player
    else if clicked block is set:
      give 1 firework named "&cfirework" to player

it is good, but it says player can't compare with 'gliding'.
[doublepost=1656672200,1656672156][/doublepost]I want to make it like using firework at creative mode
[doublepost=1656701804][/doublepost]I solved problem with this code!
code_language.skript:
on elytra boost:
    if name of player's tool contains "&cFirework":
        give 1 firework named "&cFirework"to player
        remove firework named ""&cFirework" from the player
on rightclick holding firework:
    if clicked block is set:
        if name of player's tool contains "&cFirework":
            cancel event
 
  • Like
Reactions: Iroh