Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- P: &8[&7PotionSwap&8]&7
- command /potionswap <text>:
- usage: /potionswap <enable/disable>
- permission: skript.op
- trigger:
- if arg-1 is "enable" or "on":
- if {potionswap} is true:
- send "{@P} PotionSwap is already enabled!"
- else:
- set {potionswapeffects::*} to "Speed 1", "Strength 1", "Haste 1", "Jump boost 1", "Invisibility 2", "Resistance 1", and "Fire Resistance 1"
- set {potionswap} to true
- send "{@P} PotionSwap is now enabled!"
- set {potionswaptimer} to 300
- loop all players:
- remove speed from the loop-player
- remove strength from the loop-player
- remove haste from the loop-player
- remove jump boost from the loop-player
- remove invisibility from the loop-player
- remove resistance from the loop-player
- remove fire resistance from the loop-player
- set {potionswapplayereffect::%loop-player%} to a random element of {potionswapeffects::*}
- if {potionswapplayereffect::%loop-player%} is "Speed 1":
- apply speed 1 to loop-player for 999 days
- else if {potionswapplayereffect::%loop-player%} is "Strength 1":
- apply strength 1 to loop-player for 999 days
- else if {potionswapplayereffect::%loop-player%} is "Haste 1":
- apply haste 1 to loop-player for 999 days
- else if {potionswapplayereffect::%loop-player%} is "Jump Boost 1":
- apply jump boost 1 to loop-player for 999 days
- else if {potionswapplayereffect::%loop-player%} is "Invisibility 2":
- apply invisibility 2 to loop-player for 999 days
- else if {potionswapplayereffect::%loop-player%} is "Resistance 1":
- apply resistance 1 to loop-player for 999 days
- else if {potionswapplayereffect::%loop-player%} is "Fire Resistance 1":
- apply fire resistance 1 to loop-player for 999 days
- set {potionswap.haseffect::%loop-player%} to true
- message "{@P} Your potion effect is now &8%{potionswapplayereffect::%loop-player%}%&7!" to loop-player
- else if arg-1 is "disable" or "off":
- if {potionswap} is false:
- send "{@P} PotionSwap is already disabled!"
- else:
- send "{@P} PotionSwap is now disabled!"
- set {potionswap} to false
- set {potionswapfallprevent} to true
- loop all players:
- remove speed from the loop-player
- remove strength from the loop-player
- remove haste from the loop-player
- remove jump boost from the loop-player
- remove invisibility from the loop-player
- remove resistance from the loop-player
- remove fire resistance from the loop-player
- delete {potionswap.haseffect::%loop-player%}
- wait 3 seconds
- set {potionswapfallprevent} to false
- delete {potionswappreviouseffect::*}
- every 30 seconds:
- {potionswap} is true
- remove 30 from {potionswaptimer}
- if {potionswaptimer} is 0:
- set {potionswaptimer} to 300
- delete {potionswap.haseffect::*}
- set {potionswapfallprevent} to true
- loop all players:
- remove speed from the loop-player
- remove strength from the loop-player
- remove haste from the loop-player
- remove jump boost from the loop-player
- remove invisibility from the loop-player
- remove resistance from the loop-player
- remove fire resistance from the loop-player
- set {potionswappreviouseffect::%loop-player%} to {potionswapplayereffect::%loop-player%}
- set {potionswapplayereffect::%loop-player%} to a random element of {potionswapeffects::*}
- if {potionswapplayereffect::%loop-player%} is "Speed 1":
- apply speed 1 to loop-player for 999 days
- else if {potionswapplayereffect::%loop-player%} is "Strength 1":
- apply strength 1 to loop-player for 999 days
- else if {potionswapplayereffect::%loop-player%} is "Haste 1":
- apply haste 1 to loop-player for 999 days
- else if {potionswapplayereffect::%loop-player%} is "Jump Boost 1":
- apply jump boost 1 to loop-player for 999 days
- else if {potionswapplayereffect::%loop-player%} is "Invisibility 2":
- apply invisibility 2 to loop-player for 999 days
- else if {potionswapplayereffect::%loop-player%} is "Resistance 1":
- apply resistance 1 to loop-player for 999 days
- else if {potionswapplayereffect::%loop-player%} is "Fire Resistance 1":
- apply fire resistance 1 to loop-player for 999 days
- set {potionswap.haseffect::%loop-player%} to true
- message "{@P} Your potion effect is now &8%{potionswapplayereffect::%loop-player%}%&7!" to loop-player
- wait 3 seconds
- set {potionswapfallprevent} to false
- delete {potionswappreviouseffect::*}
- on join:
- if {potionswap.haseffect::%player%} is true:
- remove speed from the player
- remove strength from the player
- remove haste from the player
- remove jump boost from the player
- remove invisibility from the player
- remove resistance from the player
- remove fire resistance from the player
- {potionswap} is true
- if {potionswapplayereffect::%player%} is "Speed 1":
- apply speed 1 to player for 999 days
- else if {potionswapplayereffect::%player%} is "Strength 1":
- apply strength 1 to player for 999 days
- else if {potionswapplayereffect::%player%} is "Haste 1":
- apply haste 1 to player for 999 days
- else if {potionswapplayereffect::%player%} is "Jump Boost 1":
- apply jump boost 1 to player for 999 days
- else if {potionswapplayereffect::%player%} is "Invisibility 2":
- apply invisibility 2 to player for 999 days
- else if {potionswapplayereffect::%player%} is "Resistance 1":
- apply resistance 1 to player for 999 days
- else if {potionswapplayereffect::%player%} is "Fire Resistance 1":
- apply fire resistance 1 to player for 999 days
- else:
- {potionswap} is true
- set {potionswapplayereffect::%player%} to a random element of {potionswapeffects::*}
- if {potionswapplayereffect::%player%} is "Speed 1":
- apply speed 1 to player for 999 days
- else if {potionswapplayereffect::%player%} is "Strength 1":
- apply strength 1 to player for 999 days
- else if {potionswapplayereffect::%player%} is "Haste 1":
- apply haste 1 to player for 999 days
- else if {potionswapplayereffect::%player%} is "Jump Boost 1":
- apply jump boost 1 to player for 999 days
- else if {potionswapplayereffect::%player%} is "Invisibility 2":
- apply invisibility 2 to player for 999 days
- else if {potionswapplayereffect::%player%} is "Resistance 1":
- apply resistance 1 to player for 999 days
- else if {potionswapplayereffect::%player%} is "Fire Resistance 1":
- apply fire resistance 1 to player for 999 days
- set {potionswap.haseffect::%player%} to true
- message "{@P} Your potion effect is now &8%{potionswapplayereffect::%player%}%&7!" to player
- on damage:
- damage was caused by fall
- {potionswap} is true
- if {potionswapplayereffect::%victim%} is "Jump Boost 1":
- cancel the event
- if {potionswappreviouseffect::%victim%} is "Jump Boost 1":
- {potionswapfallprevent} is true
- cancel the event
Advertisement
Add Comment
Please, Sign In to add comment