Just so you know, we don't know the file format for every file. If it's just a bunch of random characters, it's probably a .zip or .jar.
#----------------------------------------
# SKGifts:
# Give fancy presents to your players!
# Made by: Sharpjaws
# Version: 1.0
#----------------------------------------
options:
Mode: 0
#Mode 0 = Opens a chest gui which lets you select a item from a row of random items as your gift. (All the randomly chosen item IDs are in the configurable GItems alias)
#Mode 1 = Instantly gives the player a random item ID from the (GItems alias)
aliases:
GItems = 33, 355, 19, 46, 50, 323, 66, 65, 69, 330, 61, 354, 360, 364, 369, 371, 373, 357, 398, 417, 418, 419, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 96
#All the item IDs that the script selects are defined in this alias. Modify it to your needs
command /gift <player>:
trigger:
if the player has permission "gifts.give":
if event-player is not player:
give player a player head with nbt "{display:{Name:""&a&l%player%'s Gift"",Lore:[""&e&lFrom %event-player%!"",""&b&lRightclick to open""]}, SkullOwner:{Id:""cc5fdd1a-60f8-40d6-b667-a197e39f3bae"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZjBhZmE0ZmZmZDEwODYzZTc2YzY5OGRhMmM5YzllNzk5YmNmOWFiOWFhMzdkODMxMjg4MTczNDIyNWQzY2EifX19""}]}}}"
launch ball firework colored red and yellow and lime at player's position timed 0
message "&e&l[Gifts] &a&lYou have received a gift from %event-player%!" to player
else:
message "&e&l[Gifts] &a&lYou have given yourself a gift!" to event-player
give player a player head with nbt "{display:{Name:""&a&l%player%'s Gift"",Lore:[""&e&lFrom Santa Claus!"",""&b&lRightclick to open""]}, SkullOwner:{Id:""cc5fdd1a-60f8-40d6-b667-a197e39f3bae"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZjBhZmE0ZmZmZDEwODYzZTc2YzY5OGRhMmM5YzllNzk5YmNmOWFiOWFhMzdkODMxMjg4MTczNDIyNWQzY2EifX19""}]}}}"
launch ball firework colored red and yellow and lime at player's position timed 0
else:
message "&e&l[Gifts] &c&lYou dont have permission to use this command" to the player
on rightclick:
if tag "SkullOwner" of nbt of player's tool is set:
name of player's tool is "&a&l%player%'s Gift"
cancel event
if {@Mode} is 0:
open chest with 3 rows named "&c&lClaim your gift" to player
wait 1 tick
set {_slots} to 8
add GItems to {_items::*}
wait 1 tick
inventory name of player's current inventory is "&c&lClaim your gift"
format slot 0 of player with light green glass pane named "&f" to be unstealable
format slot 18 of player with light green glass pane to be unstealable
format slot 17 of player with {_item1} named "&a&l%{_item1}%" to close then run [message "Cool mate" to all players]
loop {_slots} times:
inventory name of player's current inventory is "&c&lClaim your gift"
format slot loop-number of player with light green glass pane named "&f" to be unstealable
format slot loop-number + 18 of player with light green glass pane named "" to be unstealable
loop {_slots} + 1 times:
inventory name of player's current inventory is "&c&lClaim your gift"
set {_item1} to random item out of {_items::*}
evaluate "format slot %loop-number% + 8 of player with shiny %{_item1}% named ""&a&l%{_item1}%"" with lore ""&b&lChoose this gift"" to close then run [give %{_item1}% to player]->[remove 1 of player's tool from player's inventory]->[message ""&e&l[Gifts] &a&lYou unwrapped %{_item1}%"" to player]"
wait 1 tick
remove id of {_item1} from {_items::*}
loop {_slots} + 1 times:
inventory name of player's current inventory is "&c&lClaim your gift"
format slot loop-number -1 of player with red glass pane named "&f" to be unstealable
format slot loop-number + 18 -1 of player with red glass pane named "&f" to be unstealable
inventory name of player's current inventory is "&c&lClaim your gift"
format slot loop-number -1 of player with light green glass pane named "&f" to be unstealable
format slot loop-number + 18 -1 of player with light green glass pane named "&f" to be unstealable
else if {@Mode} is 1:
set {_item2} to a random item out of GItems
message "&e&l[Gifts] &a&lYou unwrapped %{_item2}%" to player
remove 1 of player's tool from player's inventory
give {_item2} to player