Files
chaos-twist-system.sk
Code
1 394
chaos-twist-system.sk
############################################################
# TWISTLABS CHAOS TWIST SYSTEM (Skript 1.21.11 + SkBee)
############################################################
options:
twist-interval: 900 seconds
bounty-duration: 180 seconds
############################################################
# GLOBAL VARIABLES
############################################################
# {twist.current} = active twist name
# {bounty.active}, {bounty.target}, {bounty.time}
# {juggernaut} = current juggernaut player
# {hotpotato.holder} = current hot potato holder
# {king.current} = current king player
############################################################
# STARTUP
############################################################
on load:
set {twists::*} to "lifesteal", "flash_hulk", "one_heart", "robin_hood", "hunters_runners", "juggernaut", "hot_potato", "double_damage", "marksman", "magnet_mode", "king"
set {twist.current} to "none"
execute console command "/gamerule keepInventory true"
broadcast "&b[TwistLabs] &fChaos Twist System loaded."
############################################################
# TWIST ROTATION LOOP
############################################################
every {@twist-interval}:
execute console command "/twist.next"
command /twist.next:
permission: op
trigger:
# Clear previous effects
loop all players:
remove all potion effects from loop-player
delete {juggernaut}
delete {hotpotato.holder}
delete {king.current}
set {_t} to random element out of {twists::*}
set {twist.current} to {_t}
if {_t} is "lifesteal":
broadcast "&c[Twist] &fLifesteal Mode activated! Kill players to gain health."
stop
if {_t} is "flash_hulk":
broadcast "&c[Twist] &fFlash vs Hulk! Speed runners vs strength tanks."
set {_players::*} to all players
loop {_players::*}:
if random integer between 1 and 2 is 1:
apply speed 2 to loop-value for 9999 seconds
send "&eYou are FLASH (Speed)" to loop-value
else:
apply strength 2 to loop-value for 9999 seconds
send "&aYou are HULK (Strength)" to loop-value
stop
if {_t} is "one_heart":
broadcast "&c[Twist] &fOne Heart Mode! Everyone reduced to 1 heart."
loop all players:
set health of loop-player to 2
stop
if {_t} is "robin_hood":
broadcast "&c[Twist] &fRobin Hood! Archers vs Warriors."
set {_players::*} to all players
set {_half} to size of {_players::*} / 2
loop {_players::*}:
if loop-index <= {_half}:
give bow to loop-value
give 64 arrows to loop-value
apply speed 1 to loop-value for 9999 seconds
send "&6You are an ARCHER" to loop-value
else:
give iron sword to loop-value
apply resistance 1 to loop-value for 9999 seconds
send "&7You are a WARRIOR" to loop-value
stop
if {_t} is "hunters_runners":
broadcast "&c[Twist] &fHunters vs Runners! 25%% become hunters."
set {_players::*} to all players
loop {_players::*}:
remove all potion effects from loop-value
set {_count} to size of {_players::*}
set {_hunters} to round({_count} * 0.25)
if {_hunters} < 1:
set {_hunters} to 1
loop {_hunters} times:
set {_p} to random element out of {_players::*}
give compass to {_p}
apply strength 1 to {_p} for 9999 seconds
send "&cYou are a HUNTER" to {_p}
remove {_p} from {_players::*}
loop {_players::*}:
apply speed 1 to loop-value for 9999 seconds
send "&aYou are a RUNNER" to loop-value
stop
if {_t} is "juggernaut":
broadcast "&c[Twist] &fJuggernaut! One player becomes unstoppable."
set {_p} to random player out of all players
if {_p} is set:
apply strength 3 to {_p} for 9999 seconds
apply resistance 3 to {_p} for 9999 seconds
apply glowing to {_p} for 9999 seconds
set {juggernaut} to {_p}
broadcast "&c%{_p}% &fis the JUGGERNAUT!"
stop
############################################################
# HOT POTATO TWIST
############################################################
if {_t} is "hot_potato":
broadcast "&c[Twist] &fHot Potato! Pass it or take damage!"
set {_p} to random player out of all players
if {_p} is set:
set {hotpotato.holder} to {_p}
apply glowing to {_p} for 9999 seconds
apply speed 1 to {_p} for 9999 seconds
broadcast "&e%{_p}% &fis the Potato Holder!"
# Hot potato timer loop
while {twist.current} is "hot_potato":
wait 30 seconds
if {twist.current} is not "hot_potato":
stop
# Damage current holder
if {hotpotato.holder} is set:
if {hotpotato.holder} is online:
damage {hotpotato.holder} by 12
send "&c&lOUCH! The potato burned you!" to {hotpotato.holder}
# Select new holder
set {_old} to {hotpotato.holder}
set {_newHolder} to random player out of all players
if {_newHolder} is set:
set {hotpotato.holder} to {_newHolder}
# Clear old effects
if {_old} is online:
remove glowing from {_old}
remove speed from {_old}
# Apply new effects
apply glowing to {_newHolder} for 9999 seconds
apply speed 1 to {_newHolder} for 9999 seconds
broadcast "&e%{_newHolder}% &fis now the Potato Holder!"
stop
############################################################
# DOUBLE DAMAGE TWIST
############################################################
if {_t} is "double_damage":
broadcast "&c[Twist] &fDouble Damage! All damage is doubled!"
stop
############################################################
# MARKSMAN TWIST
############################################################
if {_t} is "marksman":
broadcast "&c[Twist] &fMarksman Mode! Bow combat only."
loop all players:
give bow to loop-player
give 64 arrows to loop-player
apply speed 1 to loop-player for 9999 seconds
send "&6You received a bow and arrows!" to loop-player
stop
############################################################
# MAGNET MODE TWIST
############################################################
if {_t} is "magnet_mode":
broadcast "&c[Twist] &fMagnet Mode! Players are pulled together!"
# Magnet pull loop
while {twist.current} is "magnet_mode":
wait 15 seconds
if {twist.current} is not "magnet_mode":
stop
loop all players:
set {_p1} to loop-player
set {_nearest} to null
set {_minDist} to 999999