Jump to content

Skript


Zthll

Recommended Posts

On 6/14/2022 at 10:42 AM, Zthll said:

Hey im kinda new to scripts can someone one help me make a tpa function and /spawn function please?

 

options:
	AcceptTime: 30 seconds
	Spawn: location(0, 0, 0, world("world"))

command /tpa <offline player>:
	trigger:
		if {TPA::%player%} is set:
			send "&cYou have an active TPA request already!" to player
		else:
			set {TPA::%player%} to "%arg-1%"
			send "&eYou sent a tpa request to &6%arg-1%&e!" to player
			send "&6%player% &ehas asked to teleport to you. Type &6/TPAccept &eto accept or &6/TPDeny &eto deny." to arg-1
			wait {@AcceptTime}
			send "&cTPA request expired." to player

command /tpaccept <offline player>:
	trigger:
		if {TPA::%arg-1%} is not "%player%":
			send "&4%arg-1% &chas not sent you a teleport request!" to player
		else:
			teleport arg-1 to player
			clear {TPA::%arg-1%}
			send "&eAccepted &6%arg-1%&e's teleport request." to player
			send "&6%player% &eaccepted your teleport request." to arg-1

command /tpdeny <offline player>:
	trigger:
		if {TPA::%arg-1%} is not "%player%":
			send "&4%arg-1% &chas not sent you a teleport request!" to player
		else:
			clear {TPA::%arg-1%}
			send "&eDenied &6%arg-1%&e's teleport request." to player
			send "&4%player% &cdenied your teleport request." to arg-1

on disconnect:
	clear {TPA::%player%}

command /spawn:
	trigger:
		teleport player to {@Spawn}

 

  • Like 1

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Owner of Lifestealed, Exploratory, Encore, UNOfficially and Observed
 

OG [VIP] 12/26/20 - 10/27/2021
OG [PRO] 12/27/21 - 11/18/2022
OG [LEGEND] 11/18/2022 - 3/14/2023
[DEFAULT] 3/14/2023 - 5/8/2024

[MOD] 5/8/2024 - Present

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...