Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- P: &8[&cTrapGame&8]&7
- command /trapgame <text> [<number>]:
- usage: /trapgame <start/stop/lives/pspawnset/bspawnset/info>...
- permission: skript.op
- trigger:
- if arg 1 is "start" or "begin" or "on":
- {trapgame} is set:
- send "&cA game is already running!"
- stop
- else:
- set {trapgame} to true
- disable pvp in all worlds
- set {_c} to 0
- loop all players:
- console command "/minecraft:clear %loop-player%"
- console command "/heal %loop-player%"
- apply saturation 1 to loop-player for 999 days
- apply resistance 10 to loop-player for 15 seconds
- apply blindness 1 to loop-player for 10 seconds
- apply slowness 10 to loop-player for 10 seconds
- apply jump boost -10 to loop-player for 10 seconds
- add 1 to {_c}
- broadcast "{@P} &a%loop-player%&f is Player %{_c}%!"
- teleport loop-player to {tg.pspawn::%{_c}%}
- console command "/spawnpoint %loop-player%"
- set loop-player's gamemode to adventure
- set loop-player's level to 0
- set {tg.life::%loop-player%} to {tg.lives}
- console command "/scoreboard objectives add Lives dummy"
- console command "/scoreboard players set @a Lives %{tg.lives}%"
- console command "/scoreboard teams join TrapGame @a"
- console command "/scoreboard objectives setdisplay sidebar Lives"
- wait 5 seconds
- broadcast "{@P} &7Starting in &45 &7seconds..."
- loop all players:
- play raw sound "random.orb" at loop-player with pitch 0 volume 1
- wait 1 second
- broadcast "{@P} Starting in &c4 &7seconds..."
- loop all players:
- play raw sound "random.orb" at loop-player with pitch 0 volume 1
- wait 1 second
- broadcast "{@P} Starting in &e3 &7seconds..."
- loop all players:
- play raw sound "random.orb" at loop-player with pitch 0 volume 1
- wait 1 second
- broadcast "{@P} Starting in &a2 &7seconds..."
- loop all players:
- play raw sound "random.orb" at loop-player with pitch 1 volume 1
- wait 1 second
- broadcast "{@P} Starting in &21 &7second..."
- loop all players:
- play raw sound "random.orb" at loop-player with pitch 2 volume 1
- stop
- if arg 1 is "stop" or "end" or "off":
- {trapgame} is not set:
- message "&cThere is no game running!"
- stop
- else:
- delete {trapgame}
- enable pvp in all worlds
- console command "/scoreboard objectives remove Lives"
- console command "/scoreboard teams leave @a"
- loop all players:
- console command "/heal %loop-player%"
- console command "/minecraft:fill -995 71 496 -995 100 496 minecraft:air"
- stop
- if arg 1 is "lives":
- {trapgame} is set:
- message "&cCan't do this while game is running!"
- stop
- if arg 2 is not set:
- send "&cplease include number dumbass"
- stop
- set {tg.lives} to arg 2
- send "&7Set Lives to &a%arg 2%"
- stop
- if arg 1 is "pspawnset":
- if arg 2 is not set:
- send "&cplease include number dumbass"
- stop
- else:
- set {tg.pspawn::%arg 2%} to location of player
- send "&7Set &aPlayerSpawn%arg 2%&7 to your current location"
- stop
- if arg 1 is "bspawnset":
- if arg 2 is not set:
- send "&cplease include number dumbass"
- stop
- else:
- set {tg.bspawn::%arg 2%} to location of player
- send "&7Set &aBoosterSpawn%arg 2%&7 to your current location"
- stop
- if arg 1 is "info":
- send "&aPlayerSpawns: &7%{tg.pspawn::*}%"
- send "&aBoosterSpawns: &7%{tg.bspawn::*}%"
- send "&aLives: &7%{tg.lives}%"
- stop
- # ON DEATH, REMOVE LIFE
- on death of player:
- {trapgame} is set
- remove 1 from {tg.life::%victim%}
- console command "/scoreboard players remove %victim% Lives 1"
- broadcast "{@P} &a%victim% &7has %{tg.life::%victim%}% lives!"
- if {tg.life::%victim%} is less than 1:
- broadcast "{@P} &a%victim%&7 is eliminated!"
- console command "/scoreboard teams join Spectator %victim%"
- console command "/scoreboard players reset %victim% Lives"
- console command "/gmsp %victim%"
- # ON RESPAWN, PUT EFFECTS BACK ON
- on respawn:
- {trapgame} is set
- wait 1 tick
- apply saturation 1 to player for 999 days
- apply resistance 10 to player for 3 seconds
- set the player's level to 0
- teleport the player to a random location of {tg.pspawn::*}
- # MICHAEL
- on projectile hit:
- projectile is ender pearl
- loop all players in radius 1 of event-location:
- push the loop-player upwards at speed 1
- # DISPENSERS
- on rightclick on dispenser:
- player's gamemode is adventure
- cancel event
- # DESPAWN ARROW
- on projectile hit:
- projectile is arrow
- delete projectile
- # BOOSTERS
- # _____________________________________________________________________
- #EVERY MINUTE
- every 30 seconds:
- {trapgame} is set
- chance of 50%:
- broadcast "{@P} &7A &a&lPOWERUP &r&7has spawned somewhere on map!"
- set {_b} to a random integer between 0 and 13
- if {_b} is 1:
- drop a sugar named "&bSpeed Boost" at a random location of {tg.bspawn::*}
- stop
- if {_b} is 2:
- drop a red dye named "&cHealing" at a random location of {tg.bspawn::*}
- stop
- if {_b} is 3:
- drop a light gray dye named "&7Invisibility" at a random location of {tg.bspawn::*}
- stop
- if {_b} is 4:
- drop a ender pearl named "&5Teleport Away" at a random location of {tg.bspawn::*}
- stop
- if {_b} is 5:
- drop a player head named "&6Toggle Michael" at a random location of {tg.bspawn::*}
- stop
- if {_b} is 6:
- drop a fermented spider eye named "&8Hinder Enemy" at a random location of {tg.bspawn::*}
- stop
- if {_b} is 7:
- drop a purple dye named "&dTeleport Enemy" at a random location of {tg.bspawn::*}
- stop
- if {_b} is 8:
- drop a clock named "&4Find Enemy" at a random location of {tg.bspawn::*}
- if {_b} is 9:
- drop a gunpowder named "&2Call Tactical Nuke" at a random location of {tg.bspawn::*}
- if {_b} is 10:
- drop a ink sack named "&0Blind Enemy" at a random location of {tg.bspawn::*}
- if {_b} is 11:
- drop a cyan dye named "&3Resistance" at a random location of {tg.bspawn::*}
- if {_b} is 12:
- drop a light green dye named "&aGain Life" at a random location of {tg.bspawn::*}
- if {_b} is 13:
- drop a water bottle named "Laboratory" at a random location of {tg.bspawn::*}
- on drop:
- {trapgame} is set
- cancel event
- on pickup of sugar, red dye, light gray dye, ender pearl, player head, fermented spider eye, gunpowder, purple dye, ink sack, cyan dye, light green dye, or water bottle:
- {trapgame} is set
- broadcast "{@P} &7Somebody has picked up a &a&lPOWERUP &r&7!"
- on pickup of clock:
- {trapgame} is set
- player has 1 clock:
- send "&ccant have 2 of those powerups noob"
- cancel event
- stop
- player has 1 compass:
- send "&ccant have 2 of those powerups noob"
- cancel event
- stop
- broadcast "{@P} &7Somebody has picked up a &a&lPOWERUP &r&7!"
- #SPEED BOOST
- on rightclick holding sugar:
- name of player's weapon is "&bSpeed Boost"
- remove 1 sugar named "&bSpeed Boost" from player
- apply speed 1 to player for 999 days
- if {trapgame} is set:
- broadcast "{@P} %player% has used &b&lSPEED BOOST"
- #HEALING
- on rightclick holding red dye:
- name of player's weapon is "&cHealing"
- remove 1 red dye named "&cHealing" from player
- apply regeneration 5 to player for 2 seconds
- if {trapgame} is set:
- broadcast "{@P} %player% has used &c&lHEALING"
- #INVISBILITY
- on rightclick holding light gray dye:
- name of player's weapon is "&7Invisibility"
- remove 1 light gray dye named "&7Invisibility" from player
- apply invisibility 1 to player for 10 seconds
- if {trapgame} is set:
- broadcast "{@P} %player% has used &7&lINVISIBILITY"
- #TELEPORT AWAY
- on rightclick holding ender pearl:
- name of player's weapon is "&5Teleport Away"
- cancel event
- remove 1 ender pearl named "&5Teleport Away" from player
- chance of 50%:
- teleport player to a random location of {tg.pspawn::*}
- else:
- teleport player to a random location of {tg.bspawn::*}
- if {trapgame} is set:
- broadcast "{@P} %player% has used &5&lTELEPORT"
- #TOGGLE MICHAEL
- on rightclick holding player head:
- name of player's weapon is "&6Toggle Michael"
- remove 1 player head named "&6Toggle Michael" from player
- console command "/setblock -1007 66 546 minecraft:redstone_block"
- if {trapgame} is set:
- broadcast "{@P} %player% has used &6&lTOGGLE MICHAEL"
- #HINDER ENEMY
- on rightclick holding fermented spider eye on player:
- name of player's weapon is "&8Hinder Enemy"
- target player is set
- remove 1 fermented spider eye named "&8Hinder Enemy" from player
- apply slowness 1 to target player for 999 days
- if {trapgame} is set:
- broadcast "{@P} %player% has used &8&lHINDER &r&7on &a%target player%"
- #TELEPORT ENEMY
- on rightclick holding purple dye on player:
- name of player's weapon is "&dTeleport Enemy"
- target player is set
- remove 1 purple dye named "&dTeleport Enemy" from player
- if {trapgame} is set:
- broadcast "{@P} %player% has used &d&lTELEPORT &r&7on &a%target player%"
- chance of 50%:
- teleport target player to a random location of {tg.pspawn::*}
- else:
- teleport target player to a random location of {tg.bspawn::*}
- #FIND ENEMY
- on rightclick holding clock:
- name of player's weapon is "&4Find Enemy"
- remove 1 clock named "&4Find Enemy" from player
- set {_d} to 1000
- loop all players:
- loop-player is not the player
- loop-player's gamemode is adventure
- if the distance between player and loop-player is less than {_d}:
- set {_closest} to loop-player
- set {_d} to the distance between player and loop-player
- if {trapgame} is set:
- broadcast "{@P} %player% has used &4&lFIND ENEMY"
- give player a compass named "&7Tracking &a%{_closest}%"
- loop 15 times:
- set the compass target of player to {_closest}'s location
- send "&c%{_closest}% is %the distance between player and {_closest}% blocks away. Y: %y-coordinate of {_closest}%"
- wait 2 seconds
- remove 1 compass from player
- on click holding compass:
- cancel event
- #TACTICAL NUKE
- on rightclick holding gunpowder:
- name of player's weapon is "&2Call Tactical Nuke"
- remove 1 gunpowder named "&2Call Tactical Nuke" from player
- console command "/setblock -1036 76 541 minecraft:redstone_block"
- wait 1 second
- console command "/setblock -1036 76 541 minecraft:air"
- wait 4 seconds
- if {trapgame} is set:
- broadcast "{@P} %player% has used &2&lTACTICAL NUKE"
- #BLIND ENEMY
- on rightclick holding ink sack on player:
- name of player's weapon is "&0Blind Enemy"
- target player is set
- remove 1 ink sack named "&0Blind Enemy" from player
- apply blindness 1 to target player for 5 seconds
- apply night vision 1 to target player for 5 seconds
- if {trapgame} is set:
- broadcast "{@P} %player% has used &0&lBLINDNESS &r&7on &a%target player%"
- #RESISTANCE
- on rightclick holding cyan dye:
- name of player's weapon is "&3Resistance"
- remove 1 cyan dye named "&3Resistance" from player
- apply resistance 1 to player for 999 days
- if {trapgame} is set:
- broadcast "{@P} %player% has used &3&lRESISTANCE"
- #GAIN LIFE
- on rightclick holding light green dye:
- name of player's weapon is "&aGain Life"
- remove 1 light green dye named "&aGain Life" from player
- if {trapgame} is set:
- console command "/scoreboard players add %player% Lives 1"
- add 1 to {tg.life::%player%}
- broadcast "{@P} %player% has used &a&lGAIN LIFE"
- #LABORATORY
- on right click with water bottle:
- name of player’s weapon is “Laboratory”
- remove 1 water bottle named “Laboratory” from player
- if {trapgame} is set:
- console command “/setblock -995 82 496 minecraft:gravel”
- RAW Paste Data
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement