You are not logged in. Please log in if you wish to participate in all discussions on the website, chat with friends, and use everything we've got to offer.

Click Register below to, well, register. Derp. Enjoy your stay. ;)

If you do not have an account and wish to create one, please follow the link below.

http://www.robloxtoday.net/register

You are not connected. Please login or register

Goto page : 1, 2  Next

View previous topic View next topic Go down  Message [Page 1 of 2]

1 GUI Admin Controls on 5/29/2010, 6:42 pm

Gravyerd


Telamon
I made an editable Gui Admin! Where you can put you own actions ;p
The script delete-it-self Gui, then you can just disable and re-able or put 2 scripts, just one will work ;pī
This script is super simple! there are obj_ arr_ int_ denominations and you know what is what ;p easy to edit!
To edit more actions just put a item in "arr_Actions" array.
To edit the action when click in a item, you need go to GuiPlayerSelect function;

To edit when a action that dont need a player is selected, edit the "GuisActionsSelect" function;

Everything in this script is simple ;p easy to edit,study and understand!

The script is just a "Anti-Bug", nothing that you do, or others people edit will make this raise a error (well... it have a way or two, only);

Actions button are made for every object in the array "arr_Action";

Sorry i dint finished event when arr_sActions is clicked ._. i'm bored =]

I loved the GuiHint effect i made ;p that makes the message floats up w/ acceleration ;p

Obs: it starts invisible, go top middle for open buttons =]

Code:
-------- Public Gravyerd Gui Admin --------

arr_Admins = {"Gravyerd","Gravyerd1","Gravyerd2","Gravyerd3","Boneco","Player","Guspadler"};
arr_Stupids = {} -- Banneds =]
arr_AdmInGame = {}; -- To tell when a noob tryes to join =]
arr_Actions = {"Kill", "Explode", "FF", "unFF", "Give BTools", "Give Axe", "Give Spear", "Remove all tools", "Set MaxHealth", "Set Health", "Sit", "UnSit", "Trip", "Walkspeed","Invisible","Visible","Freeze","Unfreeze","Mute","UnMute", "Tele to him", "Tele to you","Kick","Ban","Admin"}
str_talks = "People talks =]";
arr_sActions = {"Create a Car","Create a Castle"," Create a Building Set","Create Admin Brick", "Train Set","HayHayHay"}
int_talkcount = 0;
int_action = 0;
obj_plsel = game;
arr_Hint = {}
arr_HNumber = {};



function GetGameMain()
local arr_find = game:GetChildren();
local lp1 = 0;
local str_txt = "";
   for lp1 = 1, #arr_find do
      if (type(arr_find[lp1]) == "userdata") then
      str_txt = arr_find[lp1].className;
         if (str_txt == "Workspace") then
         Wo = arr_find[lp1];
         elseif (str_txt == "Players") then
         Pl = arr_find[lp1];
         elseif (str_txt == "Lighting") then
         Li = arr_find[lp1];
         elseif (str_txt == "Teams") then
         Te = arr_find[lp1];
         end;
      end;
   end;
end;

GetGameMain()

function CleanMessages()
local arr_find1 = Wo:GetChildren();
local lp1 = 1;
   for lp1 = 1,#arr_find1 do
   local obj_curr1 = arr_find1[lp1];
      if (type(obj_curr1) == "userdata") then
         if (obj_curr1.className == "Message") or (obj_curr1.className == "Hint") then
         obj_curr1:Remove();
         end;
      end;
   local arr_find2 = obj_curr1:GetChildren();
      for lp2 = 1,#arr_find2 do
      local obj_curr2 = arr_find2[lp2];
         if (type(obj_curr2) == "userdata") then
            if (obj_curr2.className == "Message") or (obj_curr2.className == "Hint") then
            obj_curr2:Remove();
            end;
         end;
      end;
   end;
end;

function GuiHint(obj_who,str_value)
print("taw");
   if (type(obj_who) == "userdata") and (obj_who.className == "Player") and (type(str_value) == "string") then
   local pg = obj_who:FindFirstChild("PlayerGui");
      if (type(pg) == "userdata") and (pg.className == "PlayerGui") then
      local gga = pg:FindFirstChild("Gravyerd Gui Admin");
         if (type(gga) == "userdata") and (gga.className == "GuiMain") then
         local obj_h = Instance.new("TextLabel");
         obj_h.Name = "Gui Hint";
         obj_h.Parent = gga;
         obj_h.Position = UDim2.new(0.5,0,0.5);
         obj_h.Text = str_value;
         obj_h.TextColor3 = Color3.new(0,0,0)   
         table.insert(arr_Hint,obj_h);
         end;
      end;
   end;
end;

function GetPlayerSelector(obj_who)
   if (type(obj_who) == "userdata") and (obj_who.className == "Player") then
   local pg = obj_who:FindFirstChild("PlayerGui");
      if (type(pg) == "userdata") and (pg.className == "PlayerGui") then
      local gga = pg:FindFirstChild("Gravyerd Gui Admin");
         if (type(gga) == "userdata") and (gga.className == "GuiMain") then
         local res = gga:FindFirstChild("Player Selector");
            if (type(res) == "userdata") and (res.className == "ImageButton") then
            return res;
            end;
         end;
      end;
   end;
end;

function GetActionSelector(obj_who)
   if (type(obj_who) == "userdata") and (obj_who.className == "Player") then
   local pg = obj_who:FindFirstChild("PlayerGui");
      if (type(pg) == "userdata") and (pg.className == "PlayerGui") then
      local gga = pg:FindFirstChild("Gravyerd Gui Admin");
         if (type(gga) == "userdata") and (gga.className == "GuiMain") then
         local res = gga:FindFirstChild("Action Selector");
            if (type(res) == "userdata") and (res.className == "ImageButton") then
            return res;
            end;
         end;
      end;
   end;
end;

function GetsActionSelector(obj_who)
   if (type(obj_who) == "userdata") and (obj_who.className == "Player") then
   local pg = obj_who:FindFirstChild("PlayerGui");
      if (type(pg) == "userdata") and (pg.className == "PlayerGui") then
      local gga = pg:FindFirstChild("Gravyerd Gui Admin");
         if (type(gga) == "userdata") and (gga.className == "GuiMain") then
         local res = gga:FindFirstChild("Static Action Selector");
            if (type(res) == "userdata") and (res.className == "ImageButton") then
            return res;
            end;
         end;
      end;
   end;
end;

function GetStaticActionSelector(obj_who)
   if (type(obj_who) == "userdata") and (obj_who.className == "Player") then
   local pg = obj_who:FindFirstChild("PlayerGui");
      if (type(pg) == "userdata") and (pg.className == "PlayerGui") then
      local gga = pg:FindFirstChild("Gravyerd Gui Admin");
         if (type(gga) == "userdata") and (gga.className == "GuiMain") then
         local res = gga:FindFirstChild("Static Action Selector");
            if (type(res) == "userdata") and (res.className == "ImageButton") then
            return res;
            end;
         end;
      end;
   end;
end;

function GetNumberSelector(obj_who)
   if (type(obj_who) == "userdata") and (obj_who.className == "Player") then
   local pg = obj_who:FindFirstChild("PlayerGui");
      if (type(pg) == "userdata") and (pg.className == "PlayerGui") then
      local gga = pg:FindFirstChild("Gravyerd Gui Admin");
         if (type(gga) == "userdata") and (gga.className == "GuiMain") then
         local res = gga:FindFirstChild("Number Selector");
            if (type(res) == "userdata") and (res.className == "ImageButton") then
            return res;
            end;
         end;
      end;
   end;
end;

function GuiPlayerSelect(obj_who,obj_thing,obj_target,int_number)
   if (type(obj_who) == "userdata") and (obj_who.className == "Player") and (type(obj_thing) == "userdata") and (obj_thing.className == "TextButton") and (type(obj_target) == "userdata") and (obj_target.className == "Player") and (type(int_number) == "number") then
   -- TextButton Clicked = obj_thing
   -- Target Player = obj_target
   -- Target Number = int_number
   -- Who sends command = obj_who
   -- print("Action = " .. arr_Actions[int_action] .. " -- Target = " .. obj_target.Name .. " -- Click in the button " .. obj_thing.Name)

      if (int_action == 1) then
         if (type(obj_target.Character) == "userdata") then
         obj_target.Character:BreakJoints();
         GuiHint(obj_who,"Finish: Action = " .. arr_Actions[int_action] .. " -- Target = " .. obj_target.Name .. "");
         else
         GuiHint(obj_who,"Error: Character not found");
         end;
      elseif (int_action == 2) then
         if (type(obj_target.Character) == "userdata") and (type(obj_target.Character:FindFirstChild("Torso")) == "userdata") then
         local exp = Instance.new("Explosion");
         exp.Position = obj_target.Character.Torso.Position;
         exp.BlastPressure = 50000;
         exp.BlastRadius = 3;
         exp.Parent = Wo;
         GuiHint(obj_who,"Finish: Action = " .. arr_Actions[int_action] .. " -- Target = " .. obj_target.Name .. "");
         else
         GuiHint(obj_who,"Error: Character not found or Torso not found");
         end;
      elseif (int_action == 3) then
         if (type(obj_target.Character) == "userdata") then
         local arr_find = obj_target.Character:GetChildren();
         local l12 = 0;
            for l12 = 1,#arr_find do
               if (type(arr_find[l12]) == "userdata") and (arr_find[l12].className == "ForceField") then
               arr_find[l12]:Remove();
               end;
            end;
         ff = Instance.new("ForceField");
         ff.Name = "Gravyerd's Gui Admin ForceField";
         ff.Parent = obj_target.Character;
         GuiHint(obj_who,"Finish: Action = " .. arr_Actions[int_action] .. " -- Target = " .. obj_target.Name .. "");
         else
         GuiHint(obj_who,"Error: Character not found");
         end;   
      elseif (int_action == 4) then
         if (type(obj_target.Character) == "userdata") then
         local arr_find = obj_target.Character:GetChildren();
         local l12 = 0;
            for l12 = 1,#arr_find do
               if (type(arr_find[l12]) == "userdata") and (arr_find[l12].className == "ForceField") then
               arr_find[l12]:Remove();
               end;
            end;
         GuiHint(obj_who,"Finish: Action = " .. arr_Actions[int_action] .. " -- Target = " .. obj_target.Name .. "");
         else
         GuiHint(obj_who,"Error: Character not found");
         end;
      elseif (int_action == 5) then
      local obj_bp = obj_target:FindFirstChild("Backpack");
         if (type(obj_bp) == "userdata") and (obj_bp.className == "Backpack") then
         local tgrab = Instance.new("HopperBin") tgrab.Name = "Grab"; tgrab.BinType = Enum.BinType.GameTool;
         local tcopy = Instance.new("HopperBin") tcopy.Name = "Copy"; tcopy.BinType = Enum.BinType.Clone;
         local tdele = Instance.new("HopperBin") tdele.Name = "Delete"; tdele.BinType = Enum.BinType.Hammer;
         tgrab.Parent = obj_bp;
         tcopy.Parent = obj_bp;
         tdele.Parent = obj_bp;
         GuiHint(obj_who,"Finish: Action = " .. arr_Actions[int_action] .. " -- Target = " .. obj_target.Name .. "");
         else
         GuiHint(obj_who,"Error: Backpack is a fake or not found.");
         end;
      elseif (int_action == 6) then
      local obj_bp = obj_target:FindFirstChild("Backpack");
         if (type(obj_bp) == "userdata") and (obj_bp.className == "Backpack") then
         local obj_axet = Instance.new("Tool");
         obj_axet.Name = "Axe (20 dmg)";
            function onHit(obj_hit)
               if (type(obj_hit) == "userdata") and (obj_hit.className == "Part") and (type(obj_hit.Parent) == "userdata") and (obj_hit.Parent.className == "Model") and (type(obj_hit.Parent:FindFirstChild("Humanoid")) == "userdata") and (obj_hit.Parent:FindFirstChild("Humanoid").className == "Humanoid") then
               obj_hit.Parent:FindFirstChild("Humanoid").Health = obj_hit.Parent:FindFirstChild("Humanoid").Health-20;               
               end;
            end;
         obj_axet.Parent = obj_bp;
         local obj_ah = Instance.new("Part");
         obj_ah.Name = "Handle";
         obj_ah.Anchored = false;
         obj_ah.Position = Vector3.new(0,100,0)
         obj_ah.formFactor = 0
         obj_ah.Size = Vector3.new(1,5,1);
         obj_ah.Parent = obj_axet;
         obj_ah.Touched:connect(onHit);
         obj_axet.Equipped:connect(function () obj_axet.Name = "By Gravyerd"; end);
         obj_axet.Unequipped:connect(function () obj_axet.Name = "Axe (20 dmg)"; end);
         GuiHint(obj_who,"Finish: Action = Give Axe Tool (20dmg) -- Target = " .. obj_target.Name .. "");
         else
         GuiHint(obj_who,"Error: Backpack is a fake or not found.");   
         end;
      elseif (int_action == 7) then
      local obj_bp = obj_target:FindFirstChild("Backpack");
         if (type(obj_bp) == "userdata") and (obj_bp.className == "Backpack") then
         local obj_axet = Instance.new("Tool");
         obj_axet.Name = "Spear (30 dmg)";
            function onHit(obj_hit)
               if (type(obj_hit) == "userdata") and (obj_hit.className == "Part") and (type(obj_hit.Parent) == "userdata") and (obj_hit.Parent.className == "Model") and (type(obj_hit.Parent:FindFirstChild("Humanoid")) == "userdata") and (obj_hit.Parent:FindFirstChild("Humanoid").className == "Humanoid") then
               obj_hit.Parent:FindFirstChild("Humanoid").Health = obj_hit.Parent:FindFirstChild("Humanoid").Health-20;               
               end;
            end;
         obj_axet.Parent = obj_bp;
         local obj_ah = Instance.new("Part");
         obj_ah.Name = "Handle";
         obj_ah.Anchored = false;
         obj_ah.Position = Vector3.new(0,100,0)
         obj_ah.formFactor = 0
         obj_ah.Size = Vector3.new(1,1,8);
         obj_ah.BrickColor = BrickColor.new(111);
         obj_ah.Material = Enum.Material.Wood;
         obj_ah.Parent = obj_axet;
         obj_ah.Touched:connect(onHit);
         obj_axet.Equipped:connect(function () obj_axet.Name = "By Gravyerd"; end);
         obj_axet.Unequipped:connect(function () obj_axet.Name = "Spear (30 dmg)"; end);
         GuiHint(obj_who,"Finish: Action = Give Spear Tool (30dmg) -- Target = " .. obj_target.Name .. "");
         else
         GuiHint(obj_who,"Error: Backpack is a fake or not found.");   
         end;
      elseif (int_action == 8) then
      local obj_bp = obj_target:FindFirstChild("Backpack");
         if (type(obj_bp) == "userdata") and (obj_bp.className == "Backpack") then
         local l13 = 0;
         local arr_find = obj_bp:GetChildren();
            for l13 = 1,#arr_find do
               if (type(arr_find[l13]) == "userdata") then
               arr_find[l13]:Remove();
               end;
            end;
         GuiHint(obj_who,"Finish: Action = " .. arr_Actions[int_action] .. " -- Target = " .. obj_target.Name .. "");
         else
         GuiHint(obj_who,"Error: Backpack is a fake or not found.");   
         end;
      elseif (int_action == 9) then
      obj_main = obj_thing.Parent.Parent;      
         if (type(obj_main) == "userdata") and (obj_main.className == "GuiMain") then
         local obj_ns = GetNumberSelector(obj_who);
            if (type(obj_ns) == "userdata") then
            local obj_txtbox = obj_ns:FindFirstChild("EditMain");
               if (type(obj_txtbox) == "userdata") and (obj_txtbox.className == "TextBox") then
               obj_txtbox.Text = "100";
               obj_plsen = obj_target;
               obj_ns.Position = obj_thing.Parent.Position + UDim2.new(0,125,0,0);
               obj_ns.Visible = true;
               else
               GuiHint(obj_who,"Error: Edit Main (Writer) not found");
               end;
            else
            GuiHint(obj_who,"Error: GuiMain not found");
            end;
         else
         GuiHint(obj_who,"Error: Number Selector not found");
         end;
      elseif (int_action == 10) then
      obj_main = obj_thing.Parent.Parent;      
         if (type(obj_main) == "userdata") and (obj_main.className == "GuiMain") then
         local obj_ns = GetNumberSelector(obj_who);
            if (type(obj_ns) == "userdata") then
            local obj_txtbox = obj_ns:FindFirstChild("EditMain");
               if (type(obj_txtbox) == "userdata") and (obj_txtbox.className == "TextBox") then
               obj_txtbox.Text = "100";
               obj_plsen = obj_target;
               obj_ns.Position = obj_thing.Parent.Position + UDim2.new(0,125,0,0);
               obj_ns.Visible = true;
               else
               GuiHint(obj_who,"Error: Edit Main (Writer) not found");
               end;
            else
            GuiHint(obj_who,"Error: GuiMain not found");
            end;
         else
         GuiHint(obj_who,"Error: Number Selector not found");
         end;
      elseif (int_action == 11) then
         if (type(obj_target.Character) == "userdata") then
         local obj_hum = obj_target.Character:findFirstChild("Humanoid");
            if (type(obj_hum) == "userdata") then
            obj_hum.Sit = true;
            GuiHint(obj_who,"Finish: Action = " .. arr_Actions[int_action] .. " -- Target = " .. obj_target.Name .. "");
            else
            GuiHint(obj_who,"Error: Humanoid not found");   
            end;
         else
         GuiHint(obj_who,"Error: Character not found");   
         end;
      elseif (int_action == 12) then
         if (type(obj_target.Character) == "userdata") then
         local obj_hum = obj_target.Character:findFirstChild("Humanoid");
            if (type(obj_hum) == "userdata") then
            obj_hum.Sit = false;
            GuiHint(obj_who,"Finish: Action = " .. arr_Actions[int_action] .. " -- Target = " .. obj_target.Name .. "");
            else
            GuiHint(obj_who,"Error: Humanoid not found");   
            end;
         else
         GuiHint(obj_who,"Error: Character not found");   
         end;
      elseif (int_action == 13) then
         if (type(obj_target.Character) == "userdata") and (type(obj_target.Character:FindFirstChild("Torso")) == "userdata") then
         local obj_tor = obj_target.Character:FindFirstChild("Torso");
         obj_tor.CFrame = CFrame.new(obj_tor.Position.X,obj_tor.Position.Y,obj_tor.Position.Z,0, 0, 1, 0, -1, 0, 1, 0, 0);
         GuiHint(obj_who,"Finish: Action = " .. arr_Actions[int_action] .. " -- Target = " .. obj_target.Name .. "");
         else
         GuiHint(obj_who,"Error: Character not found or Torso not found");
         end;
      elseif (int_action == 14) then
      obj_main = obj_thing.Parent.Parent;      
         if (type(obj_main) == "userdata") and (obj_main.className == "GuiMain") then
         local obj_ns = GetNumberSelector(obj_who);
            if (type(obj_ns) == "userdata") then
            local obj_txtbox = obj_ns:FindFirstChild("EditMain");
               if (type(obj_txtbox) == "userdata") and (obj_txtbox.className == "TextBox") then
               obj_txtbox.Text = "16";
               obj_plsen = obj_target;
               obj_ns.Position = obj_thing.Parent.Position + UDim2.new(0,125,0,0);
               obj_ns.Visible = true;
               else
               GuiHint(obj_who,"Error: Edit Main (Writer) not found");
               end;
            else
            GuiHint(obj_who,"Error: GuiMain not found");
            end;
         else
         GuiHint(obj_who,"Error: Number Selector not found");
         end;
      elseif (int_action == 15) then
         if (type(obj_target.Character) == "userdata") then
         local arr_find = obj_target.Character:GetChildren();
         local l12 = 0;
            for l12 = 1,#arr_find do
               if (type(arr_find[l12]) == "userdata") and (arr_find[l12].className == "Part") then
               arr_find[l12].Transparency = 1;
               end;
            end;
         GuiHint(obj_who,"Finish: Action = " .. arr_Actions[int_action] .. " -- Target = " .. obj_target.Name .. "");
         else
         GuiHint(obj_who,"Error: Character not found");
         end;
      elseif (int_action == 16) then
         if (type(obj_target.Character) == "userdata") then
         local arr_find = obj_target.Character:GetChildren();
         local l12 = 0;
            for l12 = 1,#arr_find do
               if (type(arr_find[l12]) == "userdata") and (arr_find[l12].className == "Part") then
               arr_find[l12].Transparency = 0;
               end;
            end;
         GuiHint(obj_who,"Finish: Action = " .. arr_Actions[int_action] .. " -- Target = " .. obj_target.Name .. "");
         else
         GuiHint(obj_who,"Error: Character not found");
         end;
      elseif (int_action == 17) then
         if (type(obj_target.Character) == "userdata") then
         local arr_find = obj_target.Character:GetChildren();
         local l12 = 0;
            for l12 = 1,#arr_find do
               if (type(arr_find[l12]) == "userdata") and (arr_find[l12].className == "Part") then
               arr_find[l12].Anchored = true;
               arr_find[l12].Reflectance = 0.45;
               elseif (type(arr_find[l12]) == "userdata") and (arr_find[l12].className == "Humanoid") then
               arr_find[l12].WalkSpeed = 0;
               end;
            end;
         GuiHint(obj_who,"Finish: Action = " .. arr_Actions[int_action] .. " -- Target = " .. obj_target.Name .. "");
         else
         GuiHint(obj_who,"Error: Character not found");
         end;
      elseif (int_action == 18) then
         if (type(obj_who.Character) == "userdata") then
         local arr_find = obj_who.Character:GetChildren();
         local l12 = 0;
            for l12 = 1,#arr_find do
               if (type(arr_find[l12]) == "userdata") and (arr_find[l12].className == "Part") then
               arr_find[l12].Anchored = false;
               arr_find[l12].Reflectance = 0;
               elseif (type(arr_find[l12]) == "userdata") and (arr_find[l12].className == "Humanoid") then
               arr_find[l12].WalkSpeed = 16;
               end;
            end;
         GuiHint(obj_who,"Finish: Action = " .. arr_Actions[int_action] .. " -- Target = " .. obj_target.Name .. "");
         else
         GuiHint(obj_who,"Error: Character not found");
         end;
      elseif (int_action == 19) then
      obj_target.SuperSafeChat = true;
      elseif (int_action == 20) then
      obj_target.SuperSafeChat = false;
      elseif (int_action == 21) then
         if (type(obj_target.Character) == "userdata") and (type(obj_target.Character:FindFirstChild("Torso")) == "userdata") and (type(obj_who.Character) == "userdata")  and (type(obj_who.Character:FindFirstChild("Torso")) == "userdata") then
         local obj_tor1 = obj_who.Character:FindFirstChild("Torso");
         local obj_tor2 = obj_target.Character:FindFirstChild("Torso");
         obj_tor1.CFrame = obj_tor2.CFrame;
         GuiHint(obj_who,"Works: You teleported to " .. obj_target.Name);
         else
         GuiHint(obj_who,"Error: Character not found or Torso not found");
         end;   
      elseif (int_action == 22) then
         if (type(obj_target.Character) == "userdata") and (type(obj_target.Character:FindFirstChild("Torso")) == "userdata") and (type(obj_who.Character) == "userdata")  and (type(obj_who.Character:FindFirstChild("Torso")) == "userdata") then
         local obj_tor1 = obj_who.Character:FindFirstChild("Torso");
         local obj_tor2 = obj_target.Character:FindFirstChild("Torso");
         obj_tor2.CFrame = obj_tor1.CFrame;
         GuiHint(obj_who,"Works: " .. obj_Target.Name .. " teleported to you");
         else
         GuiHint(obj_who,"Error: Character not found or Torso not found");
         end;   
      elseif (int_action == 23) then
      obj_target:Remove();
      elseif (int_action == 24) then
      obj_target:Remove();   
      table.insert(arr_Stupids,obj_target.Name);
      end;
   end;
end;

function GuiActionSelect(obj_who,obj_thing,int_id)
   if (type(obj_who) == "userdata") and (obj_who.className == "Player") and (type(obj_thing) == "userdata") and (type(int_id) == "number") and (type(arr_Actions[int_id]) == "string") then
   -- TextButton Clicked = obj_thing
   -- Action Number = int_id
   -- Who sends command = obj_who
   -- print("Action = " .. arr_Actions[int_action] .. " -- Target = " .. obj_target.Name .. " -- Click in the button " .. obj_thing.Name)

   print("Action = " .. arr_Actions[int_id]);
   int_action = int_id;
   local m = GetPlayerSelector(obj_who);
      if (type(m) == "userdata") then
      m:Remove();
      end;

obj_main = obj_thing.Parent.Parent;      
   if (type(obj_main) == "userdata") and (obj_main.className == "GuiMain") then
   local obj_ns = GetNumberSelector(obj_who);
      if (type(obj_ns) == "userdata") then
      obj_ns.Visible = false;
      end;
   end;
   obj_main = obj_thing.Parent.Parent;
      if (type(obj_main) == "userdata") and (obj_main.className == "GuiMain") then
      local obj_ps = Instance.new("ImageButton");
      obj_ps.Position = obj_thing.Position + UDim2.new(0,59,0,50);
      obj_ps.Size = UDim2.new(0,125,0,30);
      obj_ps.Visible = true;
      obj_ps.Parent = obj_main;
      obj_ps.Name = "Player Selector";
      local obj_lm = Instance.new("TextLabel");
      obj_lm.Parent = obj_ps;
      obj_lm.Name = "Label Main";
      obj_lm.Text = "Player Selector";
      obj_lm.Position = UDim2.new(0.5,0,0,10);
      local int_sizem = 30;
      local lp0 = 0;
      local arr_find = Pl:GetChildren();
      for lp0 = 1,#arr_find do
         if (type(arr_find[lp0]) == "userdata") and (arr_find[lp0].className == "Player") then
         int_sizem = int_sizem+15;
         local obj_bt = Instance.new("TextButton");
         obj_bt.Parent = obj_ps;
         obj_bt.Name = "Player " .. lp0;
            if obj_who ~= arr_find[lp0] then
            obj_bt.Text = "[" .. lp0 .. "] " .. arr_find[lp0].Name;
            else
            obj_bt.Text = "[" .. lp0 .. "] Yourself";         
            end;
         obj_bt.Position = UDim2.new(0.1,0,0,-25+int_sizem);
         obj_bt.Size = UDim2.new(0.8,0,0,15);
         obj_bt.MouseButton1Click:connect(function () GuiPlayerSelect(obj_who,obj_bt,arr_find[lp0],lp0) end);
         end;
      end;
      local btn_canc = Instance.new("TextButton");
      btn_canc.Parent = obj_ps;
      btn_canc.Name = "Cancel";
      btn_canc.Text = "Cancel Action";
      btn_canc.Position = UDim2.new(0.1,0,0,-05+int_sizem);
      btn_canc.Size = UDim2.new(0.8,0,0,15);
      btn_canc.MouseButton1Click:connect(function () obj_ps.Visible = false; end);
      obj_ps.Size = UDim2.new(0,125,0,int_sizem+20);
      end;
   end;
end;

function GuisActionsSelect(obj_who,int_id)
   if (type(obj_who) == "userdata") and (type(int_id) == "number") and (obj_who.className == "Player") and (type(arr_sActions[int_id]) == "string") then
   -- Action number = int_id
   -- Who sends command = obj_who
   print("Action = " .. arr_sActions[int_id] .. " -- C--ommand from = " .. obj_who.Name);
   end;
end;

function CreateGui(obj_who)
   if (type(obj_who) == "userdata") and (obj_who.className == "Player") then
   local PlayerGui = obj_who:FindFirstChild("PlayerGui");
   local int_GuiCount = 0;
   local arr_find = Pl:GetChildren();
      if ( type(PlayerGui:FindFirstChild("Gravyerd Gui Admin")) == "userdata") then
      PlayerGui:FindFirstChild("Gravyerd Gui Admin"):Remove();
      end;

   
local obj_main = Instance.new("GuiMain");
obj_main.Parent = PlayerGui;
obj_main.Name = "Gravyerd Gui Admin";

------------- Open Close Button (Actions) ---------------
local obj_asv = Instance.new("TextButton");
obj_asv.Parent = obj_main;
obj_asv.Text = "Open Actions";
obj_asv.Name = "Actions Button";
obj_asv.Position = UDim2.new(0,500,0,-20)
obj_asv.BackgroundTransparency = 0.4;
obj_asv.BackgroundColor3 = Color3.new(-150,-150,-150);
obj_asv.Size = UDim2.new(0,70,0,20);
obj_asv.BorderSizePixel = 0;
obj_asv.MouseButton1Click:connect(
function ()
local gas = GetActionSelector(obj_who);
local gps = GetPlayerSelector(obj_who);
local gns = GetNumberSelector(obj_who);
   if (type(gas) == "userdata") and (type(gps) == "userdata") and (type(gns) == "userdata") then
   gas.Visible = not(gas.Visible);
      if not gas.Visible then
      gps.Visible = false;
      gns.Visible = false;
      end;
      if (gas.Visible) then
      obj_asv.Text = "Close Actions";
      else
      obj_asv.Text = "Open Actions";
      end;
   end;
end);
------------ Player Selector ------------
local obj_ps = Instance.new("ImageButton");
obj_ps.Size = UDim2.new(0,125,0,30);
obj_ps.Visible = false;
obj_ps.Parent = obj_main;
obj_ps.Name = "Player Selector";
-- Maybe its only a start =]
------------ Action Selector ------------
local obj_as = Instance.new("ImageButton");
obj_as.Position = UDim2.new(0,50,0,50);
obj_as.Size = UDim2.new(0,125,0,30);
obj_as.Parent = obj_main;
obj_as.Name = "Action Selector";
obj_as.Visible = false;
local obj_lm = Instance.new("TextLabel");
obj_lm.Parent = obj_as;
obj_lm.Name = "Label Main";
obj_lm.Text = "Action Selector";
obj_lm.Position = UDim2.new(0.5,0,0,10);
local int_sizem = 30;
local lp0 = 0;
for lp0 = 1, #arr_Actions do
   if (arr_Actions ~= nil) and (type(arr_Actions[lp0]) == "string") then
   int_sizem = int_sizem+15;
   local btn_act = Instance.new("TextButton");
   btn_act.Parent = obj_as;
   btn_act.Name = "Action " .. lp0
   btn_act.Text = "[" .. lp0 .. "] " .. arr_Actions[lp0]
   btn_act.Position = UDim2.new(0.1,0,0,20+15*(lp0-1));
   btn_act.Size = UDim2.new(0.8,0,0,15);
   btn_act.MouseButton1Click:connect(function () GuiActionSelect(obj_who,btn_act,lp0) end);
   end;
end;
obj_as.Size = UDim2.new(0,125,0,int_sizem);

------------ Number Selector ------------
local obj_ns = Instance.new("ImageButton");
obj_ns.Position = UDim2.new(0,125,0,125);
obj_ns.Size = UDim2.new(0,90,0,65);
obj_ns.Parent = obj_main;
obj_ns.Name = "Number Selector";
obj_ns.Visible = false;
local obj_lm = Instance.new("TextLabel");
obj_lm.Parent = obj_ns;
obj_lm.Name = "Label Main";
obj_lm.Text = obj_ns.Name;
obj_lm.Position = UDim2.new(0.5,0,0,10);
local obj_tb = Instance.new("TextBox");
obj_tb.Parent = obj_ns;
obj_tb.Name = "EditMain";
obj_tb.Text = "100";
obj_tb.Position = UDim2.new(0.2,0,0,20);
obj_tb.Size = UDim2.new(0.6,0,0,14);
local obj_bt = Instance.new("TextButton");
obj_bt.Parent = obj_ns;
obj_bt.Name = "Number Action Button";
obj_bt.Text = "Change!";
obj_bt.Position = UDim2.new(0.2,0,0,40);
obj_bt.Size = UDim2.new(0.6,0,0,14);
obj_bt.MouseButton1Click:connect(
function()
   if (type(int_action) == "number") and (type(obj_plsen) == "userdata") and (obj_plsen.className == "Player") then
      if (int_action == 9) then
         if (type(obj_plsen.Character) == "userdata") then
         local obj_hum = obj_plsen.Character:FindFirstChild("Humanoid");
            if (type(obj_hum) == "userdata") and (obj_hum.className == "Humanoid") then
               if (type(tonumber(obj_tb.Text)) == "number") then
               obj_hum.MaxHealth = tonumber(obj_tb.Text);
                  if obj_hum.Health > obj_hum.MaxHealth then
                  obj_hum.Health = obj_hum.MaxHealth;
                  end;
               GuiHint(obj_who,"Finish: Action = Set Health of " .. obj_plsen.Name .. " to " .. tonumber(obj_tb.Text) .. " hp");
               obj_ns.Visible = false;
               else
               GuiHint(obj_who,"Error: "" .. obj_tb.Text .. "" is not a number");
               end;
            else
            GuiHint(obj_who,"Error: Humanoid is a fake or not found");
            end;
         else
         GuiHint(obj_who,"Error: Character not found");
         end;
      elseif (int_action == 10) then
         if (type(obj_plsen.Character) == "userdata") then
         local obj_hum = obj_plsen.Character:FindFirstChild("Humanoid");
            if (type(obj_hum) == "userdata") and (obj_hum.className == "Humanoid") then
               if (type(tonumber(obj_tb.Text)) == "number") then
               obj_hum.Health = tonumber(obj_tb.Text);
               GuiHint(obj_who,"Works: Successfuly changed health of " .. obj_plsen.Name .. " to " .. tonumber(obj_tb.Text));
               obj_ns.Visible = false;
               else
               GuiHint(obj_who,"Error: "" .. obj_tb.Text .. "" is not a number");
               end;
            else
            GuiHint(obj_who,"Error: Humanoid is a fake or not found");
            end;
         else
         GuiHint(obj_who,"Error: Character not found");
         end;
      elseif (int_action == 14) then
         if (type(obj_plsen.Character) == "userdata") then
         local obj_hum = obj_plsen.Character:FindFirstChild("Humanoid");
            if (type(obj_hum) == "userdata") and (obj_hum.className == "Humanoid") then
               if (type(tonumber(obj_tb.Text)) == "number") then
               obj_hum.WalkSpeed = tonumber(obj_tb.Text);
               GuiHint(obj_who,"Finish: Changed walkspeed of " .. obj_plsen.Name .. " to " .. tonumber(obj_tb.Text));
               obj_ns.Visible = false;
               else
               GuiHint(obj_who,"Error: "" .. obj_tb.Text .. "" is not a number");
               end;
            else
            GuiHint(obj_who,"Error: Humanoid is a fake or not found");
            end;
         else
         GuiHint(obj_who,"Error: Character not found");
         end;
      end;
   end;
end);


------------ sActions Selector ------------
local obj_cs = Instance.new("ImageButton");
obj_cs.Position = UDim2.new(0,376,0,50);
obj_cs.Size = UDim2.new(0,150,0,37+#arr_sActions*15);
obj_cs.Parent = obj_main;
obj_cs.Name = "Static Action Selector";
obj_cs.Visible = false;

local obj_lm = Instance.new("TextLabel");
obj_lm.Position = UDim2.new(0.5,0,0,10);
obj_lm.Parent = obj_cs;
obj_lm.Name = "Label Main";
obj_lm.Text = obj_cs.Name;

local lp0 = 0;
for lp0 = 1, #arr_sActions do
   if (arr_sActions ~= nil) and (type(arr_sActions[lp0]) == "string") then
   local obj_btn = Instance.new("TextButton");
   obj_btn.Parent = obj_cs;
   obj_btn.Name = "sAction " .. lp0;
   obj_btn.Position = UDim2.new(0.1,0,0,7+lp0*15)
   obj_btn.Size = UDim2.new(0.8,0,0,15);
   obj_btn.Text = arr_sActions[lp0];
   obj_btn.MouseButton1Click:connect(function () GuisActionsSelect(obj_who,lp0) end);
   end;
end;

------------- Open Close Button (sActions) ---------------
local obj_asv2 = Instance.new("TextButton");
obj_asv2.Parent = obj_main;
obj_asv2.Text = "Open sActions";
obj_asv2.Name = "Static Actions Button";
obj_asv2.Position = UDim2.new(0,500,0,0)
obj_asv2.BackgroundTransparency = 0.4;
obj_asv2.BackgroundColor3 = Color3.new(-150,-150,-150);
obj_asv2.Size = UDim2.new(0,70,0,20);
obj_asv2.BorderSizePixel = 0;


obj_asv2.MouseButton1Click:connect(
function ()
local obj_gsas = GetStaticActionSelector(obj_who)
   if (type(obj_gsas) == "userdata") then
   obj_gsas.Visible = not(obj_gsas.Visible);
      if (obj_gsas.Visible) then
      obj_asv2.Text = "Close sActions";
      else
      obj_asv2.Text = "Open sActions";
      end;
   end;
end);
   end;
end;

function PeopleTalk(str_msg,obj_who)
--   str_talks = obj_who.Name " says:  "+string.sub(str_msg,4,string.len(str_msg))+"\n"; -- just a control =]
--   end;
--   If you want detects when players says... (even you too)
int_talkcount = int_talkcount+1;
end


function NewPlayer(obj_who)
obj_who.Chatted:connect(function(str_msg, obj_who)
if (type(str_msg) == "string") and (type(obj_who) == "userdata") and (obj_who.className == "Player") then
PeopleTalk(str_msg,obj_who) end end);

local lp2 = 0;
for lp2 = 1, #arr_Admins do
   if obj_who.Name == arr_Admins[lp2] then
   print("Gravyerd Gui Detected an Admin: ""..obj_who.Name .. """);
   CreateGui(obj_who);   
   obj_who.CharacterAdded:connect(function () CreateGui(obj_who) end);
   table.insert(arr_AdmInGame,obj_who);
   end;
end;

local lp3 = 0;
   for lp3 = 1, #arr_Stupids do
      if (obj_who.Name == arr_Stupids[lp6]) then
      local obj_banhint = Instance.new("Hint")
      obj_banhint.Text = "Youre banned! Get outta here!";
      obj_banhint.Parent = obj_who;
      wait(0.1);
      obj_who.Remove();
      local lp4 = 0;
         for lp4 = 1,#arr_AdmInGame do
         GuiHint(arr_AdmInGame[lp4],"The banned " .. obj_who.Name .. " tryed to join right now in this game.");
         end;
      end;
   end;
end;

function AllEntered()
local arr_find = Pl:GetChildren();
local lp4 = 1;
   for lp4 = 1, #arr_find do
      if (type(arr_find[lp4]) == "userdata") and (arr_find[lp4].className == "Player") then
      NewPlayer(arr_find[lp4]);
      end;
   end;
end;

Pl.ChildAdded:connect(function(obj_player) if (type(obj_player) == "userdata") and (obj_player.className == "Player") then
NewPlayer(obj_player) end end);

function CheckNoobs()
local arr_find = Pl:GetChildren()
local lp5 = 1;
local lp6 = 1;
   for lp5 = 1,#arr_find do
      if (type(arr_find[lp5]) == "userdata") and (arr_find[lp5].className == "Player") then
         for lp6 = 1, #arr_Stupids do
            if (obj_who.Name == arr_Stupids[lp6]) then
            local obj_banhint = Instance.new("Hint")
            obj_banhint.Text = "Youre banned! Get outta here!";
            obj_banhint.Parent = arr_find[lp5];
            wait(0.1);
            arr_find[lp5].Remove();
            end;
         end;
      end;
   end;
end;

CheckNoobs();

AllEntered();

while true do
wait(0.05);
local l13 = 0;
   for l13 = 1,#arr_Hint do
      if (type(arr_Hint[l13]) == "userdata") and (arr_Hint[l13].className == "TextLabel") then
      local v = arr_Hint[l13].TextTransparency+0.025;
      arr_Hint[l13].TextTransparency = v
      local v = arr_Hint[l13].Position - UDim2.new(0,0,0,arr_Hint[l13].TextTransparency*5);
      arr_Hint[l13].Position = v;
         if (arr_Hint[l13].TextTransparency >= 1) then
         table.remove(arr_Hint,l13);
         end;
      end;
   end;
end;

View user profile

2 Re: GUI Admin Controls on 5/29/2010, 11:36 pm

Alex


Special
Special
Jesus! Thats great :D


____________________________
Evening, Guest Welcome to the Roblox Today Forums!
Hello, I am Alex. The Forum's Head Moderator.



I joined ROBLOX, December 29th, 2007!
I was one of the first to join this lovely forum, invited by Clayton himself. The memories. Ah.
Administrators have too much power, therefore my position suits me just fine!
View user profile http://www.robloxtoday.com

3 Re: GUI Admin Controls on 5/30/2010, 3:28 pm

DAMAGED


Moderator
Moderator
It is! Very well made! I am guessing multiple tests to get it working that well.


____________________________
Spoiler:

~Skills ~
Scripting level - ADVANCED
Building level - EBR acceptable
'06er
Skype: Refit.
View user profile

4 Re: GUI Admin Controls on 5/30/2010, 3:32 pm

scripttester123


Site Owner
Site Owner
Wow, nice.

The thing that really strikes me about you isn't the scripting (don't get me wrong, you're an amazing scripter), but the design. Just the way you set that up, it's so organized and orderly, which personally, I suck at;P

Very nice job.

P.S. The game in your sig - epic :D


____________________________
When in doubt, Google it.

ZOMG!!1!11 SCRIPTESTER123 HAS YOUTUBE?!?!?

Yes sir. www.youtube.com/clabowman (Plus you getta see what I actually look like.. No. Wai.)
Oh yeah, add me on Facebook while you're at it! It automatically makes you super cool. www.facebook.com/clabowman
View user profile http://www.robloxtoday.com

5 Re: GUI Admin Controls on 5/30/2010, 6:26 pm

Gravyerd


Telamon
;p thx lol
i dint liked design o.O
i like windows app ._. easyest to organize and design ;p
i script lots on my life ._. i can organize a NASA moon bot ._. xD joke ;p
i'm working a explorer ._. well, edit like the main explorer we cant... but read scripts,copy or delete/disable gonna be usefull

View user profile

6 Re: GUI Admin Controls on 5/30/2010, 7:15 pm

Yoshislayer


Experienced Robloxian
Experienced Robloxian
Aughh, Now I'm going to go hide in a corner and feel sorry for myself xD

View user profile http://www.roblox.com/User.aspx?ID=1174617

7 Re: GUI Admin Controls on 7/18/2010, 4:50 am

Alex


Special
Special
JESUS!? What is this? 1000 lines of code in, what was that? FIVE MINUTES?! MY GOD.


____________________________
Evening, Guest Welcome to the Roblox Today Forums!
Hello, I am Alex. The Forum's Head Moderator.



I joined ROBLOX, December 29th, 2007!
I was one of the first to join this lovely forum, invited by Clayton himself. The memories. Ah.
Administrators have too much power, therefore my position suits me just fine!
View user profile http://www.robloxtoday.com

8 Re: GUI Admin Controls on 7/18/2010, 5:27 am

Gravyerd


Telamon
i have a gui explorer ready here, god i ever forget some small projects!
lol i'm a scripter, i like to test myself :o

but you need understand that script is SOOO SIMPLE!

View user profile

9 Re: GUI Admin Controls on 7/18/2010, 5:34 am

Alex


Special
Special
JESUS! Why you up so late, or so early? Wut.


____________________________
Evening, Guest Welcome to the Roblox Today Forums!
Hello, I am Alex. The Forum's Head Moderator.



I joined ROBLOX, December 29th, 2007!
I was one of the first to join this lovely forum, invited by Clayton himself. The memories. Ah.
Administrators have too much power, therefore my position suits me just fine!
View user profile http://www.robloxtoday.com

10 Re: GUI Admin Controls on 7/23/2010, 9:43 pm

Mage11


Telamon
I want to marry your intelligence. I script GUI's and this gave me an idea.
Thanks :)

View user profile

View previous topic View next topic Back to top  Message [Page 1 of 2]

Goto page : 1, 2  Next

Permissions in this forum:
You cannot reply to topics in this forum