Jump to content

Sudo [SKRIPT]


Recommended Posts

Was bored so I made this ūüėĄ



command /sudo [<player>] [<text>] [<text>]:

  1.     trigger:
  2.         if arg 1 is not set:
  3.             message "Arg 1 not set!"
  4.             stop
  5.         else:
  6.             if arg 2 is not set:
  7.                 message "Arg 2 is not set!"
  8.                 stop
  9.             if arg 2 is "c:":
  10.                 if arg 3 is not set:
  11.                     message "Arg 3 is not set!"
  12.                     stop
  13.                 else:
  14.                     # This needs to be your chat format
  15.                     broadcast "&7[&c%arg 1%&7] &f> %arg 3%"
  16.                     stop
  17.             if arg 2 is set:
  18.                 make arg 1 execute command "/%arg 2%"
  19.                 stop

 

 

image.png.6b83388bece6fb7d874e120f33c8dd96.png


IGN¬†‚ě£¬†Pickey¬†( Soon )¬†
Joined MineHut ‚ě£ January 7th 2019
Joined Forums¬†‚ě£ January 11th 2021
 
Admin on NotedGens
Manager on NotedGens
Developer on Cropied
Developer on Gennow (Genable)

==========================================
Best Job: Badlion ( Client Moderator [ Failed Trial / Demoted] )
Retired From: InvadedLands ( Moderator )
Retired From:  MineTime ( Sr.Moderator )
Retired From: Hero Mines ( Helper )
Link to comment
Share on other sites

This is not a good way to do this at all. All those stops are not needed. If you are using an if else statement, the skript will just not go to the else statement part anyways. And you can just do make arg-1 say arg-2. That will make it you  can make them say something in chat or execute commands.

command /sudo <player> <text>:
  	usage: /sudo <player> <text>
  	permission: sudo.use
  	trigger:
  		make arg-1 say arg-2

With this you can just do /sudo _Tarna_ hello to make them say hello or /sudo _Tarna_ /hello to make them execute a command. 

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 - 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

‚̧ԳŹ - 5/17/21 - 12/20/22

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

  • 1 month later...
Guest
This topic is now closed to further replies.
√ó
√ó
  • Create New...