Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on load:
- set {killeffects::*} to "blood", "flame", "smoke", "magic", "lightning", "tnt", "fireworks", "spiral", "rainbow", "headrocket", "finalsmash", "xporb" and "corpse"
- function breakEffect(id: number, data: number, loc: location):
- set {_packet} to new play_server_world_event packet
- set location pinfo 0 of {_packet} to {_loc}
- set int pnum 0 of {_packet} to 2001
- set int pnum 1 of {_packet} to {_data}*4096+{_id}
- loop all players:
- loop-player's world is {_loc}'s world
- send loop-player packet {_packet}
- function showKillEffect(p: player, victim: player):
- set {_loc} to location of {_victim}
- set yaw of {_loc} to 0
- set pitch of {_loc} to 0
- set {_uuid} to UUID of {_p}
- {killeffect.%{_uuid}%} is set
- if {killeffect.%{_uuid}%} is "blood":
- breakEffect(152, 0, {_loc})
- breakEffect(152, 0, location 1 meter above {_loc})
- else if {killeffect.%{_uuid}%} is "flame":
- execute console command "execute %{_p}% ~ ~ ~ particle flame %x-coordinate of {_loc}% %y-coordinate of location 0.75 meter above {_loc}% %z-coordinate of {_loc}% 0.3 0.5 0.3 0.1 500 force"
- else if {killeffect.%{_uuid}%} is "smoke":
- execute console command "execute %{_p}% ~ ~ ~ particle smoke %x-coordinate of {_loc}% %y-coordinate of location 0.75 meter above {_loc}% %z-coordinate of {_loc}% 0.3 0.5 0.3 0.1 500 force"
- else if {killeffect.%{_uuid}%} is "magic":
- execute console command "execute %{_p}% ~ ~ ~ particle witchMagic %x-coordinate of {_loc}% %y-coordinate of location 0.75 meter above {_loc}% %z-coordinate of {_loc}% 0.3 0.5 0.3 0.1 500 force"
- else if {killeffect.%{_uuid}%} is "lightning":
- strike lightning effect at {_loc}
- else if {killeffect.%{_uuid}%} is "tnt":
- spawn a primed tnt at {_loc}
- add "{Tags:[""tnteffect""],Fuse:21s,Motion:[0.0d,0.0d,0.0d]}" to nbt of last spawned tnt
- push last spawned tnt upwards with speed 0.5
- else if {killeffect.%{_uuid}%} is "fireworks":
- spawn a firework rocket at location 1.5 meter above {_loc}
- add "{Tags:[""nodamage""],LifeTime:1,FireworksItem:{id:fireworks,Count:1,tag:{Fireworks:{Explosions:[{Type:0,Colors:[I;%randomColor()%]}]}}}}" to nbt of last spawned firework rocket
- else if {killeffect.%{_uuid}%} is "spiral":
- spiralEffect({_loc})
- else if {killeffect.%{_uuid}%} is "rainbow":
- execute console command "execute %{_p}% ~ ~ ~ particle reddust %x-coordinate of {_loc}% %y-coordinate of location 0.75 meter above {_loc}% %z-coordinate of {_loc}% 0.3 0.5 0.3 0.1 500 force"
- else if {killeffect.%{_uuid}%} is "headrocket":
- set yaw of {_loc} to yaw of {_victim}
- spawn an armor stand at {_loc}
- add "{NoGravity:1b,Invisible:1b,Marker:1b,ArmorItems:[{},{},{},{id:""minecraft:skull"",Count:1b,Damage:3s,tag:{SkullOwner:%{_victim}%}}]}" to nbt of last spawned armor stand
- play sound "entity.firework.launch" to all players at {_loc} with volume 2 pitch 1
- set {_armorstand} to last spawned armor stand
- set {_armorstanduuid} to UUID of {_armorstand}
- loop 30 times:
- add 10 to yaw of {_loc}
- set {_loc} to location 0.3 meter above {_loc}
- teleport {_armorstand} to {_loc}
- execute console command "execute %{_armorstanduuid}% ~ ~ ~ particle cloud ~ ~1 ~ 0 0 0 0 1"
- wait 1 tick
- breakEffect(152, 0, location of head of {_armorstand})
- kill {_armorstand}
- else if {killeffect.%{_uuid}%} is "finalsmash":
- set yaw of {_loc} to yaw of {_victim}
- set {_yaw} to yaw of {_victim}
- set {_loc2} to {_loc}
- set yaw of {_loc2} to yaw of {_p}
- set pitch of {_loc2} to random number between -10 and -30
- spawn an armor stand at {_loc}
- add "{NoGravity:1b,NoBasePlate:1b,Marker:1b,ArmorItems:[{id:""minecraft:leather_boots"",Count:1b,Damage:0s},{id:""minecraft:leather_leggings"",Count:1b,Damage:0s},{id:""minecraft:leather_chestplate"",Count:1b,Damage:0s},{id:""minecraft:skull"",Count:1b,Damage:3s,tag:{SkullOwner:%{_victim}%}}]}" to nbt of last spawned armor stand
- set {_armorstand} to last spawned armor stand
- set {_armorstanduuid} to UUID of {_armorstand}
- play sound "entity.firework.launch" to all players at {_loc} with volume 2 pitch 1
- loop 70 times:
- set {_distance} to loop-number/1.5
- add 10 to {_yaw}
- set {_loc} to location {_distance} meter forwards {_loc2}
- set yaw of {_loc} to {_yaw}
- teleport {_armorstand} to {_loc}
- execute console command "execute %{_armorstanduuid}% ~ ~ ~ particle cloud ~ ~ ~ 0 0 0 0 1"
- wait 1 tick
- spawn a firework rocket at {_loc}
- add "{Tags:[""nodamage""],LifeTime:1,FireworksItem:{id:fireworks,Count:1,tag:{Fireworks:{Explosions:[{Type:1,Trail:1,Colors:[I;16711680]}]}}}}" to nbt of last spawned firework rocket
- kill {_armorstand}
- else if {killeffect.%{_uuid}%} is "xporb":
- loop 100 times:
- loop 10 times:
- spawnFakeXPOrb(location random number between -1 and 1 meter east location (random number between 0 and 0.5)+2 meter above location random number between -1 and 1 meter south {_loc}, 30)
- wait 1 tick
- else if {killeffect.%{_uuid}%} is "corpse":
- set {_id} to random integer between 1 and 2147483647
- set {_packet1} to new play_server_named_entity_spawn packet
- set int pnum 0 of {_packet1} to {_id}
- set {_uuid} to UUID of {_victim}
- set "UUID" pinfo 0 of {_packet1} to {_uuid}
- set double pnum 0 of {_packet1} to x-coordinate of {_loc}
- set double pnum 1 of {_packet1} to y-coordinate of {_loc}
- set double pnum 2 of {_packet1} to z-coordinate of {_loc}
- set byte pnum 0 of {_packet1} to floor((yaw of {_loc})*256/360)
- set byte pnum 1 of {_packet1} to floor((pitch of {_loc})*256/360)
- set {_packet2} to new play_server_bed packet
- set int pnum 0 of {_packet2} to {_id}
- set location pinfo 0 of {_packet2} to {_loc}
- set {_packet3} to new play_server_entity_teleport packet
- set int pnum 0 of {_packet3} to {_id}
- set double pnum 0 of {_packet3} to x-coordinate of {_loc}
- set double pnum 1 of {_packet3} to y-coordinate of {_loc}
- set double pnum 2 of {_packet3} to z-coordinate of {_loc}
- set {_packet4} to new play_server_entity_destroy packet
- set int array pnum 0 of {_packet4} to {_id}
- loop all players:
- loop-player's world is {_loc}'s world
- send loop-player packet {_packet1}
- send loop-player packet {_packet2}
- send loop-player packet {_packet3}
- wait 5 second
- loop all players:
- send loop-player packet {_packet4}
- function spiralEffect(loc: location):
- set {_firstdegree} to (random integer between 0 and 35)*10
- set {_radius} to 0.2
- loop 5 times:
- set pitch of {_loc} to 0
- set yaw of {_loc} to {_firstdegree}
- loop 107 times:
- show 1 fireworks spark particles at location {_radius} meter forwards {_loc} offset by 0, 0, 0 with speed 0
- add 0.002 to {_radius}
- add 10/3 to yaw of {_loc}
- set {_loc} to location 1/108 meter above {_loc}
- function spawnFakeXPOrb(loc: location, delay: integer):
- set {_packet1} to new play_server_spawn_entity_experience_orb packet
- set {_id} to random integer between 0 and 2147483647
- set int pnum 0 of {_packet1} to {_id}
- set int pnum 1 of {_packet1} to 2147483647
- set double pnum 0 of {_packet1} to x-coordinate of {_loc}
- set double pnum 1 of {_packet1} to y-coordinate of {_loc}
- set double pnum 2 of {_packet1} to z-coordinate of {_loc}
- loop all players:
- loop-player's world is {_loc}'s world
- send loop-player packet {_packet1}
- {_delay} > 0
- loop {_delay} times:
- wait 1 tick
- set {_packet2} to new play_server_entity_destroy packet
- set int array pnum 0 of {_packet2} to {_id}
- loop all players:
- loop-player's world is {_loc}'s world
- send loop-player packet {_packet2}
- function randomColor() :: integer:
- set {_colorpattern} to random integer between 1 and 8
- if {_colorpattern} is 1:
- set {_r} to 255
- set {_g} to random integer between 0 and 255
- set {_b} to 0
- if {_colorpattern} is 2:
- set {_r} to 0
- set {_g} to 255
- set {_b} to random integer between 0 and 255
- if {_colorpattern} is 3:
- set {_r} to random integer between 0 and 255
- set {_g} to 0
- set {_b} to 255
- if {_colorpattern} is 4:
- set {_r} to random integer between 0 and 255
- set {_g} to 255
- set {_b} to 0
- if {_colorpattern} is 5:
- set {_r} to 0
- set {_g} to random integer between 0 and 255
- set {_b} to 255
- if {_colorpattern} is 6:
- set {_r} to 255
- set {_g} to 0
- set {_b} to random integer between 0 and 255
- if {_colorpattern} is 7:
- set {_r} to 0
- set {_g} to 0
- set {_b} to 0
- if {_colorpattern} is 8:
- set {_r} to 255
- set {_g} to 255
- set {_b} to 255
- return "%{_r}*65536+{_g}*256+{_b}%" parsed as integer
- on explosion prime:
- event-entity is tnt
- event-entity has scoreboard tag "tnteffect"
- cancel event
- play sound "entity.generic.explode" to all players at event-entity with volume 4 pitch 0.7
- execute console command "execute %UUID of event-entity% ~ ~ ~ particle hugeexplosion %x-coordinate of event-entity% %y-coordinate of event-entity% %z-coordinate of event-entity% 0 0 0 0 1 force"
- kill event-entity
- on damage:
- damage was caused by entity explosion
- "%attacker%" is "firework rocket"
- attacker has scoreboard tag "nodamage"
- cancel event
- command /buykilleffect <player> <text>:
- executable by: console
- trigger:
- {killeffects::*} contain arg-2
- {killeffects.%UUID of arg-1%::*} do not contain arg-2
- add arg-2 to {killeffects.%UUID of arg-1%::*}
- send "&aキルエフェクト&e%arg-2%&aのご購入ありがとうございます!" to arg-1
- send "&e&n/killeffect&aからキルエフェクトを選択できます" to arg-1
- play sound "ENTITY_PLAYER_LEVELUP" to arg-1 with volume 1 and pitch 15
- command /killeffect:
- aliases: /ke
- trigger:
- open chest with 5 row named "&aKill Effect Menu" to player
- wait 1 tick
- set slot 11 of player's current inventory to barrier named "&7None"
- set line 1 of lore of slot 11 of player's current inventory to "&a開放済"
- set line 2 of lore of slot 11 of player's current inventory to "&eクリックで選択"
- set slot 12 of player's current inventory to coal named "&8Smoke"
- set line 1 of lore of slot 12 of player's current inventory to "&c未開放"
- set slot 13 of player's current inventory to eye of ender named "&5Magic"
- set line 1 of lore of slot 13 of player's current inventory to "&c未開放"
- set slot 14 of player's current inventory to nether star named "&cR&6a&ei&an&3b&9o&5w"
- set line 1 of lore of slot 14 of player's current inventory to "&c未開放"
- set slot 15 of player's current inventory to blaze powder named "&cFlame"
- set line 1 of lore of slot 15 of player's current inventory to "&c未開放"
- set slot 20 of player's current inventory to redstone named "&4Blood"
- set line 1 of lore of slot 20 of player's current inventory to "&c未開放"
- set slot 21 of player's current inventory to string named "&bSpiral"
- set line 1 of lore of slot 21 of player's current inventory to "&c未開放"
- set slot 22 of player's current inventory to firework rocket named "&6Fireworks"
- set line 1 of lore of slot 22 of player's current inventory to "&c未開放"
- set slot 23 of player's current inventory to plain glass block named "&eLightning"
- set line 1 of lore of slot 23 of player's current inventory to "&c未開放"
- set slot 24 of player's current inventory to tnt named "&cTNT"
- set line 1 of lore of slot 24 of player's current inventory to "&c未開放"
- set slot 29 of player's current inventory to skeleton head named "&3Head Rocket"
- set line 1 of lore of slot 29 of player's current inventory to "&c未開放"
- set slot 30 of player's current inventory to armor stand named "&6Final Smash"
- set line 1 of lore of slot 30 of player's current inventory to "&c未開放"
- set slot 31 of player's current inventory to bottles o' enchanting named "&aXP Orb"
- set line 1 of lore of slot 31 of player's current inventory to "&c未開放"
- set slot 32 of player's current inventory to rotten flesh named "&4Corpse"
- set line 1 of lore of slot 32 of player's current inventory to "&c未開放"
- if {killeffects.%UUID of player%::*} contain "smoke":
- set line 1 of lore of slot 12 of player's current inventory to "&a開放済"
- set line 2 of lore of slot 12 of player's current inventory to "&eクリックで選択"
- if {killeffects.%UUID of player%::*} contain "magic":
- set line 1 of lore of slot 13 of player's current inventory to "&a開放済"
- set line 2 of lore of slot 13 of player's current inventory to "&eクリックで選択"
- if {killeffects.%UUID of player%::*} contain "rainbow":
- set line 1 of lore of slot 14 of player's current inventory to "&a開放済"
- set line 2 of lore of slot 14 of player's current inventory to "&eクリックで選択"
- if {killeffects.%UUID of player%::*} contain "flame":
- set line 1 of lore of slot 15 of player's current inventory to "&a開放済"
- set line 2 of lore of slot 15 of player's current inventory to "&eクリックで選択"
- if {killeffects.%UUID of player%::*} contain "blood":
- set line 1 of lore of slot 20 of player's current inventory to "&a開放済"
- set line 2 of lore of slot 20 of player's current inventory to "&eクリックで選択"
- if {killeffects.%UUID of player%::*} contain "spiral":
- set line 1 of lore of slot 21 of player's current inventory to "&a開放済"
- set line 2 of lore of slot 21 of player's current inventory to "&eクリックで選択"
- if {killeffects.%UUID of player%::*} contain "fireworks":
- set line 1 of lore of slot 22 of player's current inventory to "&a開放済"
- set line 2 of lore of slot 22 of player's current inventory to "&eクリックで選択"
- if {killeffects.%UUID of player%::*} contain "lightning":
- set line 1 of lore of slot 23 of player's current inventory to "&a開放済"
- set line 2 of lore of slot 23 of player's current inventory to "&eクリックで選択"
- if {killeffects.%UUID of player%::*} contain "tnt":
- set line 1 of lore of slot 24 of player's current inventory to "&a開放済"
- set line 2 of lore of slot 24 of player's current inventory to "&eクリックで選択"
- if {killeffects.%UUID of player%::*} contain "headrocket":
- set line 1 of lore of slot 29 of player's current inventory to "&a開放済"
- set line 2 of lore of slot 29 of player's current inventory to "&eクリックで選択"
- if {killeffects.%UUID of player%::*} contain "finalsmash":
- set line 1 of lore of slot 30 of player's current inventory to "&a開放済"
- set line 2 of lore of slot 30 of player's current inventory to "&eクリックで選択"
- if {killeffects.%UUID of player%::*} contain "xporb":
- set line 1 of lore of slot 31 of player's current inventory to "&a開放済"
- set line 2 of lore of slot 31 of player's current inventory to "&eクリックで選択"
- if {killeffects.%UUID of player%::*} contain "corpse":
- set line 1 of lore of slot 32 of player's current inventory to "&a開放済"
- set line 2 of lore of slot 32 of player's current inventory to "&eクリックで選択"
- if {killeffect.%UUID of player%} is not set:
- set line 2 of lore of slot 11 of player's current inventory to "&e選択済"
- else if {killeffect.%UUID of player%} is "smoke":
- set line 2 of lore of slot 12 of player's current inventory to "&e選択済"
- else if {killeffect.%UUID of player%} is "magic":
- set line 2 of lore of slot 13 of player's current inventory to "&e選択済"
- else if {killeffect.%UUID of player%} is "rainbow":
- set line 2 of lore of slot 14 of player's current inventory to "&e選択済"
- else if {killeffect.%UUID of player%} is "flame":
- set line 2 of lore of slot 15 of player's current inventory to "&e選択済"
- else if {killeffect.%UUID of player%} is "blood":
- set line 2 of lore of slot 20 of player's current inventory to "&e選択済"
- else if {killeffect.%UUID of player%} is "spiral":
- set line 2 of lore of slot 21 of player's current inventory to "&e選択済"
- else if {killeffect.%UUID of player%} is "fireworks":
- set line 2 of lore of slot 22 of player's current inventory to "&e選択済"
- else if {killeffect.%UUID of player%} is "lightning":
- set line 2 of lore of slot 23 of player's current inventory to "&e選択済"
- else if {killeffect.%UUID of player%} is "tnt":
- set line 2 of lore of slot 24 of player's current inventory to "&e選択済"
- else if {killeffect.%UUID of player%} is "headrocket":
- set line 2 of lore of slot 29 of player's current inventory to "&e選択済"
- else if {killeffect.%UUID of player%} is "finalsmash":
- set line 2 of lore of slot 30 of player's current inventory to "&e選択済"
- else if {killeffect.%UUID of player%} is "xporb":
- set line 2 of lore of slot 31 of player's current inventory to "&e選択済"
- else if {killeffect.%UUID of player%} is "corpse":
- set line 2 of lore of slot 32 of player's current inventory to "&e選択済"
- on inventory click:
- if inventory type of player's current inventory is "CHEST":
- "%player's current inventory%" is "inventory of <none>"
- inventory name of player's current inventory is "&aKill Effect Menu"
- cancel event
- inventory type of clicked inventory is "CHEST"
- "%clicked inventory%" is "inventory of <none>"
- inventory name of clicked inventory is "&aKill Effect Menu"
- if line 2 of lore of clicked item is "&e選択済":
- send "&cそのキルエフェクトは既に選択しています"
- play sound "ENTITY_ENDERMEN_TELEPORT" to player with volume 1 and pitch 0
- close player's inventory
- else if line 1 of lore of clicked item is "&c未開放":
- send "&cそのキルエフェクトは開放していません"
- play sound "ENTITY_ENDERMEN_TELEPORT" to player with volume 1 and pitch 0
- close player's inventory
- else if name of clicked item is "&7None":
- delete {killeffect.%UUID of player%}
- send "&aキルエフェクトを%name of clicked item%&aに設定しました"
- play sound "BLOCK_NOTE_PLING" to player with volume 1 and pitch 5
- close player's inventory
- else if name of clicked item is "&8Smoke":
- set {killeffect.%UUID of player%} to "smoke"
- send "&aキルエフェクトを%name of clicked item%&aに設定しました"
- play sound "BLOCK_NOTE_PLING" to player with volume 1 and pitch 5
- close player's inventory
- else if name of clicked item is "&5Magic":
- set {killeffect.%UUID of player%} to "magic"
- send "&aキルエフェクトを%name of clicked item%&aに設定しました"
- play sound "BLOCK_NOTE_PLING" to player with volume 1 and pitch 5
- close player's inventory
- else if name of clicked item is "&cR&6a&ei&an&3b&9o&5w":
- set {killeffect.%UUID of player%} to "rainbow"
- send "&aキルエフェクトを%name of clicked item%&aに設定しました"
- play sound "BLOCK_NOTE_PLING" to player with volume 1 and pitch 5
- close player's inventory
- else if name of clicked item is "&cFlame":
- set {killeffect.%UUID of player%} to "flame"
- send "&aキルエフェクトを%name of clicked item%&aに設定しました"
- play sound "BLOCK_NOTE_PLING" to player with volume 1 and pitch 5
- close player's inventory
- else if name of clicked item is "&4Blood":
- set {killeffect.%UUID of player%} to "blood"
- send "&aキルエフェクトを%name of clicked item%&aに設定しました"
- play sound "BLOCK_NOTE_PLING" to player with volume 1 and pitch 5
- close player's inventory
- else if name of clicked item is "&bSpiral":
- set {killeffect.%UUID of player%} to "spiral"
- send "&aキルエフェクトを%name of clicked item%&aに設定しました"
- play sound "BLOCK_NOTE_PLING" to player with volume 1 and pitch 5
- close player's inventory
- else if name of clicked item is "&6Fireworks":
- set {killeffect.%UUID of player%} to "fireworks"
- send "&aキルエフェクトを%name of clicked item%&aに設定しました"
- play sound "BLOCK_NOTE_PLING" to player with volume 1 and pitch 5
- close player's inventory
- else if name of clicked item is "&eLightning":
- set {killeffect.%UUID of player%} to "lightning"
- send "&aキルエフェクトを%name of clicked item%&aに設定しました"
- play sound "BLOCK_NOTE_PLING" to player with volume 1 and pitch 5
- close player's inventory
- else if name of clicked item is "&cTNT":
- set {killeffect.%UUID of player%} to "tnt"
- send "&aキルエフェクトを%name of clicked item%&aに設定しました"
- play sound "BLOCK_NOTE_PLING" to player with volume 1 and pitch 5
- close player's inventory
- else if name of clicked item is "&3Head Rocket":
- set {killeffect.%UUID of player%} to "headrocket"
- send "&aキルエフェクトを%name of clicked item%&aに設定しました"
- play sound "BLOCK_NOTE_PLING" to player with volume 1 and pitch 5
- close player's inventory
- else if name of clicked item is "&6Final Smash":
- set {killeffect.%UUID of player%} to "finalsmash"
- send "&aキルエフェクトを%name of clicked item%&aに設定しました"
- play sound "BLOCK_NOTE_PLING" to player with volume 1 and pitch 5
- close player's inventory
- else if name of clicked item is "&aXP Orb":
- set {killeffect.%UUID of player%} to "xporb"
- send "&aキルエフェクトを%name of clicked item%&aに設定しました"
- play sound "BLOCK_NOTE_PLING" to player with volume 1 and pitch 5
- close player's inventory
- else if name of clicked item is "&4Corpse":
- set {killeffect.%UUID of player%} to "corpse"
- send "&aキルエフェクトを%name of clicked item%&aに設定しました"
- play sound "BLOCK_NOTE_PLING" to player with volume 1 and pitch 5
- close player's inventory
Add Comment
Please, Sign In to add comment