KITS AND TELEPORT GUI MAKE SURE YOU USE THE /SETTEST COMMAND TO SET TP

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Lynxszn

Member
Apr 25, 2025
27
0
1
command /settest:
permission: op
trigger:
set {_pitch} to player's pitch
set {_yaw} to player's yaw
set {test} to location at player
set {test}'s yaw to {_yaw}
set {test}'s pitch to {_pitch}
send "&6Test has been set!"





command /testgui:
trigger:
open chest inventory with 1 row named "&1Test GUI" to player
wait 1 tick
set slot 4 of player's current inventory to paper named "&aClick to teleport!!" with lore "&6Test"




on inventory click:
if name of event-inventory is "&1Test GUI":
cancel event
if index of event-slot is 4:
teleport player to {test}




command /testkits:
cooldown: 1 hour
cooldown message: wait 1 hour to use this command again
cooldown bypass: op
trigger:
open chest inventory with 3 row named "&6Kits GUI" to player
wait 1 tick
set slot 11 of player's current inventory to iron sword named "&fIron Kit" with lore "&6Click to get iron gear"
set slot 13 of player's current inventory to diamond sword named "&1Diamond Kit" with lore "&1Click to get diamond gear"
set slot 15 of player's current inventory to netherite sword named "&4Netherite Kit" with lore "&4Click to get netherite gear"





on inventory click:
if name of event-inventory is "&6Kits GUI":
cancel event
if index of event-slot is 11:
give player iron helmet, iron chestplate, iron leggings, iron boots, iron sword, iron pickaxe, iron axe, iron shovel




on inventory click:
if name of event-inventory is "&6Kits GUI":
cancel event
if index of event-slot is 13:
give player diamond helmet, diamond chestplate, diamond leggings, diamond boots, diamond sword, diamond pickaxe, diamond axe, diamond shovel



on inventory click:
if name of event-inventory is "&6Kits GUI":
cancel event
if index of event-slot is 15:
give player netherite helmet, netherite chestplate, netherite leggings, netherite boots, netherite sword, netherite pickaxe, netherite axe, netherite shovel
 
command /settest:
permission: op
trigger:
set {_pitch} to player's pitch
set {_yaw} to player's yaw
set {test} to location at player
set {test}'s yaw to {_yaw}
set {test}'s pitch to {_pitch}
send "&6Test has been set!"





command /testgui:
trigger:
open chest inventory with 1 row named "&1Test GUI" to player
wait 1 tick
set slot 4 of player's current inventory to paper named "&aClick to teleport!!" with lore "&6Test"




on inventory click:
if name of event-inventory is "&1Test GUI":
cancel event
if index of event-slot is 4:
teleport player to {test}




command /testkits:
cooldown: 1 hour
cooldown message: wait 1 hour to use this command again
cooldown bypass: op
trigger:
open chest inventory with 3 row named "&6Kits GUI" to player
wait 1 tick
set slot 11 of player's current inventory to iron sword named "&fIron Kit" with lore "&6Click to get iron gear"
set slot 13 of player's current inventory to diamond sword named "&1Diamond Kit" with lore "&1Click to get diamond gear"
set slot 15 of player's current inventory to netherite sword named "&4Netherite Kit" with lore "&4Click to get netherite gear"





on inventory click:
if name of event-inventory is "&6Kits GUI":
cancel event
if index of event-slot is 11:
give player iron helmet, iron chestplate, iron leggings, iron boots, iron sword, iron pickaxe, iron axe, iron shovel




on inventory click:
if name of event-inventory is "&6Kits GUI":
cancel event
if index of event-slot is 13:
give player diamond helmet, diamond chestplate, diamond leggings, diamond boots, diamond sword, diamond pickaxe, diamond axe, diamond shovel



on inventory click:
if name of event-inventory is "&6Kits GUI":
cancel event
if index of event-slot is 15:
give player netherite helmet, netherite chestplate, netherite leggings, netherite boots, netherite sword, netherite pickaxe, netherite axe, netherite shovel
You can combine your if statements and use a loop to make your code a lot shorter (For giving the player items). Also, there isn't really any purpose to start a new line with the same event/functionality as that only adds lines to your code and longer code does not mean good code.