@@ -91,7 +91,9 @@ return function(Vargs, env)
9191 plr .Character .Humanoid .Sit = false
9292 plr .Character .Humanoid .Jump = true
9393 end
94- wait ()
94+ Variables .ReturnPoints [plr ] = plr .Character .HumanoidRootPart .CFrame
95+
96+ task.wait ()
9597 plr .Character :PivotTo (plr .Character :GetPivot () * CFrame .new (0 , 0 , - 5 ))
9698 end
9799 end
@@ -4638,10 +4640,12 @@ return function(Vargs, env)
46384640 FlightPos .Position = root .Position
46394641 FlightGyro .CFrame = root .CFrame
46404642 end
4641-
4643+
4644+ Variables .ReturnPoints [v ] = root .CFrame
4645+
46424646 task.wait ()
46434647
4644- if root then
4648+ if root then
46454649 root .CFrame = CFrame .new (point )
46464650 if FlightPos and FlightGyro then
46474651 FlightPos .Position = root .Position
@@ -4685,7 +4689,9 @@ return function(Vargs, env)
46854689 FlightPos .Position = root .Position
46864690 FlightGyro .CFrame = root .CFrame
46874691 end
4688-
4692+
4693+ Variables .ReturnPoints [v ] = root .CFrame
4694+
46894695 task.wait ()
46904696
46914697 root .CFrame = CFrame .new (Vector3 .new (tonumber (x ), tonumber (y ), tonumber (z )))
@@ -4728,7 +4734,9 @@ return function(Vargs, env)
47284734 FlightPos .Position = root .Position
47294735 FlightGyro .CFrame = root .CFrame
47304736 end
4731-
4737+
4738+ Variables .ReturnPoints [v ] = root .CFrame
4739+
47324740 task.wait ()
47334741
47344742 root .CFrame = (target .Character .HumanoidRootPart .CFrame * CFrame .Angles (0 , math.rad (90 / # players * 1 ), 0 )* CFrame .new (5 + .2 * # players , 0 , 0 ))* CFrame .Angles (0 , math.rad (90 ), 0 )
@@ -4773,7 +4781,9 @@ return function(Vargs, env)
47734781 FlightPos .Position = root .Position
47744782 FlightGyro .CFrame = root .CFrame
47754783 end
4776-
4784+
4785+ Variables .ReturnPoints [v ] = root .CFrame
4786+
47774787 task.wait ()
47784788
47794789 if root and targ_root then
@@ -4826,6 +4836,22 @@ return function(Vargs, env)
48264836 Commands .Teleport .Function (plr , {`@{plr .Name }` , if args [1 ] then args [1 ] else "me" })
48274837 end
48284838 };
4839+
4840+ Return = {
4841+ Prefix = Settings .Prefix ;
4842+ Commands = {"return" };
4843+ Args = {"player" };
4844+ Description = "Returns the player to their original position" ;
4845+ AdminLevel = "Moderators" ;
4846+ Function = function (plr : Player , args : {string })
4847+ for i , player in service .GetPlayers (plr , args [1 ]) do
4848+ if Variables .ReturnPoints [player ] then
4849+ player .Character .HumanoidRootPart .CFrame = Variables .ReturnPoints [player ]
4850+ Variables .ReturnPoints [player ] = nil ;
4851+ end
4852+ end
4853+ end
4854+ };
48294855
48304856 MassBring = {
48314857 Prefix = Settings .Prefix ;
@@ -4868,6 +4894,8 @@ return function(Vargs, env)
48684894 task.wait ()
48694895
48704896 local rootPart = char :FindFirstChild ("HumanoidRootPart" )
4897+ Variables .ReturnPoints [players [i ]] = rootPart .CFrame
4898+
48714899 if rootPart then
48724900 rootPart .CFrame = (
48734901 plrRootPart .CFrame
@@ -4902,6 +4930,8 @@ return function(Vargs, env)
49024930 task.wait ()
49034931
49044932 local rootPart = char :FindFirstChild ("HumanoidRootPart" )
4933+ Variables .ReturnPoints [players [i ]] = rootPart .CFrame
4934+
49054935 if rootPart then
49064936 rootPart .CFrame = (
49074937 plrRootPart .CFrame
@@ -5977,7 +6007,7 @@ return function(Vargs, env)
59776007 scr .Name = "ADONIS_FLIGHT"
59786008
59796009 for i , v in service .GetPlayers (plr , args [1 ]) do
5980- local part = v .Character :FindFirstChild ("HumanoidRootPart" )
6010+ local part = v .Character and v . Character :FindFirstChild ("HumanoidRootPart" )
59816011 if part then
59826012 local oldp = part :FindFirstChild ("ADONIS_FLIGHT_POSITION" )
59836013 local oldpa = part :FindFirstChild ("ADONIS_FLIGHT_POSITION_ATTACHMENT" )
@@ -5988,33 +6018,33 @@ return function(Vargs, env)
59886018 if oldpa then oldpa :Destroy () end
59896019 if oldg then oldg :Destroy () end
59906020 if oldga then oldga :Destroy () end
5991- if olds then olds :Destroy () end
6021+ if olds then Remote . Send ( v , "Function" , "Unfly" ) olds :Destroy () end
59926022
59936023 local new = scr :Clone ()
5994- local flightPositionAttachment : Attachment = service .New ("Attachment" )
5995- local flightGyroAttachment : Attachment = service . New ( "Attachment" )
5996- local flightPosition : AlignPosition = service . New ( "AlignPosition" )
5997- local flightGyro : AlignOrientation = service . New ( "AlignOrientation" )
5998-
5999- flightPositionAttachment . Name = "ADONIS_FLIGHT_POSITION_ATTACHMENT"
6000- flightPositionAttachment . Parent = part
6001-
6002- flightGyroAttachment . Name = "ADONIS_FLIGHT_GYRO_ATTACHMENT"
6003- flightGyroAttachment . Parent = part
6004-
6005- flightPosition . Name = "ADONIS_FLIGHT_POSITION"
6006- flightPosition . MaxForce = 0
6007- flightPosition . Position = part . Position
6008- flightPosition . Attachment0 = flightPositionAttachment
6009- flightPosition . Mode = Enum.PositionAlignmentMode.OneAttachment
6010- flightPosition . Parent = part
6011-
6012- flightGyro . Name = "ADONIS_FLIGHT_GYRO"
6013- flightGyro . MaxTorque = 0
6014- flightGyro . CFrame = part . CFrame
6015- flightGyro . Attachment0 = flightGyroAttachment
6016- flightGyro . Mode = Enum.OrientationAlignmentMode.OneAttachment
6017- flightGyro . Parent = part
6024+ local flightPositionAttachment : Attachment = service .New ("Attachment" , {
6025+ Name = "ADONIS_FLIGHT_POSITION_ATTACHMENT" ,
6026+ Parent = part
6027+ } )
6028+ local flightGyroAttachment : Attachment = service . New ( "Attachment" , {
6029+ Name = "ADONIS_FLIGHT_GYRO_ATTACHMENT" ,
6030+ Parent = part
6031+ })
6032+ local flightPosition : AlignPosition = service . New ( "AlignPosition" , {
6033+ Name = "ADONIS_FLIGHT_POSITION" ,
6034+ MaxForce = 0 ,
6035+ Position = part . Position ,
6036+ Attachment0 = flightPositionAttachment ,
6037+ Mode = Enum.PositionAlignmentMode.OneAttachment ,
6038+ Parent = part
6039+ })
6040+ local flightGyro : AlignOrientation = service . New ( "AlignOrientation" , {
6041+ Name = "ADONIS_FLIGHT_GYRO" ,
6042+ MaxTorque = 0 ,
6043+ CFrame = part . CFrame ,
6044+ Attachment0 = flightGyroAttachment ,
6045+ Mode = Enum.OrientationAlignmentMode.OneAttachment ,
6046+ Parent = part
6047+ })
60186048
60196049 new .Parent = part
60206050 new .Disabled = false
@@ -6060,7 +6090,7 @@ return function(Vargs, env)
60606090 AdminLevel = "Moderators" ;
60616091 Function = function (plr : Player , args : {string })
60626092 for _ , v in service .GetPlayers (plr , args [1 ]) do
6063- local part = v .Character :FindFirstChild ("HumanoidRootPart" )
6093+ local part = v .Character and v . Character :FindFirstChild ("HumanoidRootPart" )
60646094 if part then
60656095 local oldp = part :FindFirstChild ("ADONIS_FLIGHT_POSITION" )
60666096 local oldpa = part :FindFirstChild ("ADONIS_FLIGHT_POSITION_ATTACHMENT" )
@@ -6071,7 +6101,7 @@ return function(Vargs, env)
60716101 if oldpa then oldpa :Destroy () end
60726102 if oldg then oldg :Destroy () end
60736103 if oldga then oldga :Destroy () end
6074- if olds then olds :Destroy () end
6104+ if olds then Remote . Send ( v , "Function" , "Unfly" ) olds :Destroy () end
60756105 end
60766106 end
60776107 end
@@ -7140,5 +7170,83 @@ return function(Vargs, env)
71407170 })
71417171 end
71427172 };
7173+
7174+ StarterHealth = {
7175+ Prefix = Settings .Prefix ;
7176+ Commands = {"starterhealth" , "starthealth" , "persisthealth" };
7177+ Args = {"player" , "health" };
7178+ Description = "Sets the target player(s)'s starting health" ;
7179+ AdminLevel = "Moderators" ;
7180+ Function = function (plr : Player , args : {string })
7181+ local health = tonumber (args [2 ])
7182+ assert (health , "Invalid health value" )
7183+ local plrs = service .GetPlayers (plr , args [1 ])
7184+ for _ , v in plrs do
7185+ server .Variables .Starter .Health [tostring (v .UserId )] = health
7186+ end
7187+ Functions .Hint (`Your starter health was set to {health }` , plrs )
7188+ if Settings .CommandFeedback then
7189+ Functions .Hint (`You set {# plrs } players starter health to {health }` , {plr })
7190+ end
7191+ end
7192+
7193+ },
7194+
7195+ UnStarterHealth = {
7196+ Prefix = Settings .Prefix ;
7197+ Commands = {"unstarterhealth" , "unstarthealth" , "resetstarterhealth" , "unpersisthealth" };
7198+ Args = {"player" };
7199+ Description = "Removes the target player(s)'s custom starting health" ;
7200+ AdminLevel = "Moderators" ;
7201+ Function = function (plr : Player , args : {string })
7202+ local plrs = service .GetPlayers (plr , args [1 ])
7203+ for _ , v in plrs do
7204+ server .Variables .Starter .Health [tostring (v .UserId )] = nil
7205+ end
7206+ Functions .Hint (`Your starter health was reset` , plrs )
7207+ if Settings .CommandFeedback then
7208+ Functions .Hint (`You reset {# plrs } players starter health` , {plr })
7209+ end
7210+ end
7211+ };
7212+
7213+ StarterSpeed = {
7214+ Prefix = Settings .Prefix ;
7215+ Commands = {"starterspeed" , "startspeed" , "persistspeed" };
7216+ Args = {"player" , "speed" };
7217+ Description = "Sets the target player(s)'s starting speed" ;
7218+ AdminLevel = "Moderators" ;
7219+ Function = function (plr : Player , args : {string })
7220+ local speed = tonumber (args [2 ])
7221+ assert (speed , "Invalid speed value" )
7222+ local plrs = service .GetPlayers (plr , args [1 ])
7223+ for _ , v in plrs do
7224+ server .Variables .Starter .Speed [tostring (v .UserId )] = speed
7225+ end
7226+
7227+ Functions .Hint (`Your starter speed was set to {speed }` , plrs )
7228+ if Settings .CommandFeedback then
7229+ Functions .Hint (`You set {# plrs } players starter speed to {speed }` , {plr })
7230+ end
7231+ end
7232+ };
7233+
7234+ UnStarterSpeed = {
7235+ Prefix = Settings .Prefix ;
7236+ Commands = {"unstarterspeed" , "unstartspeed" , "resetstarterspeed" , "unpersistspeed" };
7237+ Args = {"player" };
7238+ Description = "Removes the target player(s)'s custom starting speed" ;
7239+ AdminLevel = "Moderators" ;
7240+ Function = function (plr : Player , args : {string })
7241+ local plrs = service .GetPlayers (plr , args [1 ])
7242+ for _ , v in plrs do
7243+ server .Variables .Starter .Speed [tostring (v .UserId )] = nil
7244+ end
7245+ Functions .Hint (`Your starter speed was reset` , plrs )
7246+ if Settings .CommandFeedback then
7247+ Functions .Hint (`You reset {# plrs } players starter speed` , {plr })
7248+ end
7249+ end
7250+ };
71437251 }
71447252end
0 commit comments