Advertisement
iiDeadzone

Xeno - Commands

Sep 28th, 2015
343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. return {
  2.     {Name = "Playlist", Desc = "Show the music playlist", Command = "Plist", Rank = 2, Function = function(plr,msg)
  3.         Functions.Mlist(plr)
  4.     end};
  5.     {Name = "Ping", Desc = "Ping a message to yourself", Command = "P", Rank = 1, Function = function(plr,msg)
  6.         Functions.Tablet(plr, "random", msg, "exit", nil)
  7.     end};
  8.     {Name = "AFK", Desc = "Tell others you are AFK", Command = "Afk", Rank = 0, Function = function(plr,msg)
  9.         for i=1,5 do
  10.         Functions.Tablet(plr, "random", plr.Name.." is AFK", "exit", nil)
  11.         end
  12.         Functions.Tablet(plr, "Really red", "Dismiss", function()
  13.             Functions.Dismiss(plr,"All")
  14.         end)
  15.     end};
  16.     {Name = "Dismiss", Desc = "Remove your tablets", Command = "Dt", Rank = 0, Function = function(plr,msg)
  17.         Functions.Dismiss(plr, "All")
  18.     end};
  19.     {Name = "Dismiss all", Desc = "Remove everyone\'s tablets", Command = "dta", Rank = 1, Function = function(plr,msg)
  20.         for _,Player in next,Services.Players:GetPlayers() do
  21.             Functions.Dismiss(Player, "All")
  22.         end
  23.     end};
  24.     {Name = "Commands", Desc = "Shows the commands on this admin", Command = "Cmds", Rank = 1, Function = function(plr,msg)
  25.         local UserRank = Functions.GetData(plr.Name, "Rank") or 0
  26.         OpenCommands = function()
  27.             Functions.Dismiss(plr, "All")
  28.             Functions.Tablet(plr, "Really red", "Dismiss",function()
  29.                 Functions.Dismiss(plr,"All")
  30.             end)
  31.             for _,v in next,Thorium.Commands do
  32.                 if UserRank >= v.Rank then
  33.                     Functions.Tablet(plr, "random", v.Name, function()
  34.                         Functions.Dismiss(plr, "All")
  35.                         Functions.Tablet(plr, "random", "Name: "..v.Name, "exit", nil)
  36.                         Functions.Tablet(plr, "random", "Command: "..v.Command, "exit", nil)
  37.                         Functions.Tablet(plr, "random", "Rank: "..v.Rank, "exit", nil)
  38.                         Functions.Tablet(plr, "random", "Desc: "..v.Desc, "exit", nil)
  39.                         Functions.Tablet(plr, "random", "Back", OpenCommands, nil)
  40.                     end, nil)
  41.                 end
  42.             end
  43.         end;OpenCommands()
  44.     end};
  45.  
  46.     {Name = "Update", Desc = "Updates the admin.", Command = "updt", Rank = 5, Function = function(plr,msg)
  47.         pcall(function()
  48.             Functions.LoadDatabase()
  49.         end)
  50.         local Result = Functions.DatabaseResult()
  51.         if string.lower(tostring(Result)) ~= "true" then
  52.             Functions.Tablet(plr, "Really red","Database update failed!", "exit", nil)
  53.         else
  54.             Functions.Tablet(plr, "Lime green","Database updated!", "exit", nil)           
  55.         end
  56.         Functions.ServiceBans()
  57.     end};
  58.     {Name = "Search-Music", Desc = "Search music from HTTP", Command = "/sm", Rank = 2, Function = function(plr,msg)
  59.         local Http = Services.HttpService
  60.         local KeyWords = Http:UrlEncode(msg)
  61.         local Url = "http://frednet.ftp.sh/api/musicSearch.php?param="..tostring(KeyWords)
  62.         local Assets = Http:JSONDecode(Http:GetAsync(Url))
  63.  
  64.         local ShowMusic = function()
  65.             Functions.Dismiss(plr, "All")
  66.                 Functions.Tablet(plr, "Really red", "Dismiss", function()
  67.                     Functions.Dismiss(plr, "All")
  68.                 end)
  69.             for _,a in next,Assets do
  70.                 Functions.Tablet(plr, "random", a.Name, function()
  71.                     Functions.Dismiss(plr, "All")
  72.                     Functions.Tablet(plr, "random", "Play - Local", function() Functions.PlayMusic(a.AssetId, true) end, nil)
  73.                     Functions.Tablet(plr, "random", "Play - Server", function() Functions.PlayMusic(a.AssetId, false) end, nil)
  74.                     Functions.Tablet(plr, "random", "Name : "..a.Name, "exit", nil)
  75.                     Functions.Tablet(plr, "random", "Sales : "..a.Sales, "exit", nil)
  76.                     Functions.Tablet(plr, "random", "AssetID : "..a.AssetId, "exit", nil)
  77.                     Functions.Tablet(plr, "random", "Back", ShowMusic, nil)
  78.                     Functions.Tablet(plr, "random", "Dismiss", function() Functions.Dismiss(plr, "All") end, nil)
  79.                 end, nil)
  80.             end
  81.         end;ShowMusic()
  82.     end};
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement