I'm making a blox fruits like server. On a fruit called "air" i'm having problems. Here is my code:
on click with air:
if player is sneaking:
if {fruit.%player's uuid%} is "inferno":
if {cooldown.%player's uuid%} is not set:
apply fire resistance to player for 20 seconds
send "&aUsed ability 1, now you have fire resistance for 20 seconds!" to player
set {cooldown.%player's uuid%} to 60
while {cooldown.%player's uuid%} > 0:
wait 1 second
subtract 1 from {cooldown.%player's uuid%}
else if {cooldown.%player's uuid%} is 0:
apply fire resistance to player for 20 seconds
send "&aUsed ability 1, now you have fire resistance for 20 seconds!" to player
set {cooldown.%player's uuid%} to 60
while {cooldown.%player's uuid%} > 0:
wait 1 second
subtract 1 from {cooldown.%player's uuid%}
else:
send "&cYou can't use this fruit yet! Wait %{cooldown.%player's uuid%}% seconds!" to player
else if {fruit.%player's uuid%} is "air":
if {cooldown2.%player's uuid%} is not set:
send "&aUsed ability 2, now you can fly for 5 seconds!" to player
set {cooldown2.%player's uuid%} to 60
make player fly
wait 5 seconds
unmake player fly
while {cooldown2.%player's uuid%} > 0:
wait 1 second
subtract 1 from {cooldown2.%player's uuid%}
else if {cooldown2.%player's uuid%} is 0:
send "&aUsed ability 2, now you can fly for 5 seconds!" to player
set {cooldown2.%player's uuid%} to 60
make player fly
wait 5 seconds
unmake player fly
else:
send "&cYou can't use this fruit yet! Wait %{cooldown2.%player's uuid%}% seconds!" to player
else if {fruit.%player's uuid%} is "glow":
send "" to player
How can i make it so i can make the player stop flying after 5 seconds? Also, using SkBee.
on click with air:
if player is sneaking:
if {fruit.%player's uuid%} is "inferno":
if {cooldown.%player's uuid%} is not set:
apply fire resistance to player for 20 seconds
send "&aUsed ability 1, now you have fire resistance for 20 seconds!" to player
set {cooldown.%player's uuid%} to 60
while {cooldown.%player's uuid%} > 0:
wait 1 second
subtract 1 from {cooldown.%player's uuid%}
else if {cooldown.%player's uuid%} is 0:
apply fire resistance to player for 20 seconds
send "&aUsed ability 1, now you have fire resistance for 20 seconds!" to player
set {cooldown.%player's uuid%} to 60
while {cooldown.%player's uuid%} > 0:
wait 1 second
subtract 1 from {cooldown.%player's uuid%}
else:
send "&cYou can't use this fruit yet! Wait %{cooldown.%player's uuid%}% seconds!" to player
else if {fruit.%player's uuid%} is "air":
if {cooldown2.%player's uuid%} is not set:
send "&aUsed ability 2, now you can fly for 5 seconds!" to player
set {cooldown2.%player's uuid%} to 60
make player fly
wait 5 seconds
unmake player fly
while {cooldown2.%player's uuid%} > 0:
wait 1 second
subtract 1 from {cooldown2.%player's uuid%}
else if {cooldown2.%player's uuid%} is 0:
send "&aUsed ability 2, now you can fly for 5 seconds!" to player
set {cooldown2.%player's uuid%} to 60
make player fly
wait 5 seconds
unmake player fly
else:
send "&cYou can't use this fruit yet! Wait %{cooldown2.%player's uuid%}% seconds!" to player
else if {fruit.%player's uuid%} is "glow":
send "" to player
How can i make it so i can make the player stop flying after 5 seconds? Also, using SkBee.