Skript teleports player to specific world only in one world

  • 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!

Status
Not open for further replies.

aviatest

Member
Apr 16, 2021
2
0
1
on rightclick with compass:
set {_gui} to a new chest inventory with 4 row with name "&b&lNavigator"
set slot 12 of {_gui} to red bed named "&eBedwars"
set slot 13 of {_gui} to eye of ender named "&eSkywars [COMING SOON!]"
set slot 10 of {_gui} to bookshelf named "&dHub"
open {_gui} to player
play sound "entity.experience_orb.pickup" with volume 0.5 to the player
on inventory click:
if name of event-inventory is "&b&lNavigator":
if index of event-slot = 0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or 17 or 9 or 18 or 19 or 20 or 21 or 22 or 23 or 24 or 25 or 26:
cancel event

on inventory click:
if name of event-inventory is "&b&lNavigator":
if index of event-slot = 12:
cancel event
teleport player to location at 20.5, 117, -21.5 in world "bedwarsLobby"
play sound "entity_endermen_teleport" with volume 0.5 to the player

on inventory click:
if name of event-inventory is "&b&lNavigator":
if index of event-slot = 13:
cancel event

on inventory click:
if name of event-inventory is "&b&lNavigator":
if index of event-slot = 10:
cancel event
teleport player to location at 0.5, 32, 0.5 in world "Hub"


--------------------------------------------------------------------------------
Why does when I try when i'm in world "Hub" it teleports the player and works and when i'm in the world "bedwarsLobby" it won't teleport the player back to world "Hub" but keep in mind that in world "Hub" I can teleport to the world "bedwarsLobby"...
 
Status
Not open for further replies.