of     1   

CaptainSource
#140975502Sunday, July 20, 2014 7:55 PM GMT

so i continue my commands no error again what is wrong and why its so confusing :p Moderators = {"CaptainSource"} function tableContains(t, value) for _, v in pairs(t) do if v == value then return true end end return false end function findPlayer(name) for _, player in ipairs(game.Players:GetPlayers()) do if player.Name:lower() == name:lower() then return player end end end function progressCommand(player,message) if Moderators[player.Name] and message:sub(1, 5) == "kill/" then victim = findPlayer(message:sub(6)) if victim and victim.Character then victim.Character:BreakJoints() end end end game.Players.PlayerAdded:connect(function(player) for i,v in pairs(Moderators) do if v == player.Name then player.Chatted:connect(function(message) progressCommand(player,message) end) end end end)
CaptainSource
#140976036Sunday, July 20, 2014 8:01 PM GMT

Bump.
e_Scriph
#140977124Sunday, July 20, 2014 8:13 PM GMT

More coding!
e_Scriph
#140977326Sunday, July 20, 2014 8:15 PM GMT

1. There is alot different from the wiki script and this, but I can tell you have some glitches from wiki 2. Use string.sub 3. It is not gonna be like kill/me till you make it that way. 4. Admin takes a LONG time and a lot of coding.
CaptainSource
#140977480Sunday, July 20, 2014 8:17 PM GMT

uhhhhhhhhhh I love scripting xD
e_Scriph
#140977629Sunday, July 20, 2014 8:19 PM GMT

For example you use Moderators[player.Name], thats must have a mod value like this local Moderators = {("Name")=true}
CaptainSource
#140977720Sunday, July 20, 2014 8:20 PM GMT

but there is no mod value in kohl's ?
e_Scriph
#140977844Sunday, July 20, 2014 8:21 PM GMT

Kohls uses alot different coding
CaptainSource
#140977997Sunday, July 20, 2014 8:23 PM GMT

lol ok :(
e_Scriph
#140978272Sunday, July 20, 2014 8:27 PM GMT

see take a look at my code Also, this does not use string.sub yet --[==[ Copyright xXScriptzXx (INC.) Don't you dare copy! This will be re-write in 2.0 --]==] local isAdmin = {"wtfsamcrap"} --[[ Commands: kill/me --]] function tableContains(t, value) for _, v in pairs(t) do if v == value then return true end end return false end function findPlayer(name, player1) if name == "me" then return player1 else for _, player in ipairs(game.Players:GetPlayers()) do if player.Name:lower() == name:lower() then return player end end end end function onChatted(message, player) if message:sub(1, 5) == "kill/" and tableContains(isAdmin, player.Name) then victim = findPlayer(message:sub(6), player) if victim and victim.Character then victim.Character:BreakJoints() end end if message:sub(1, 5) == "kick/" and tableContains(isAdmin, player.Name) then victim = findPlayer(message:sub(6), player) if victim and victim.Character then victim:Kick() end end if message:sub(1, 7) == "freeze/" and tableContains(isAdmin, player.Name) then victim = findPlayer(message:sub(8), player) a = victim.Character:findFirstChild("Left Leg") b = victim.Character:findFirstChild("Right Leg") c = victim.Character:findFirstChild("Left Arm") d = victim.Character:findFirstChild("Right Arm") if victim and victim.Character then victim.Character.Torso.Anchored = true victim.Character.Head.Anchored = true a.Anchored = true b.Anchored = true c.Anchored = true d.Anchored = true end end if message:sub(1, 9) == "unfreeze/" and tableContains(isAdmin, player.Name) then victim = findPlayer(message:sub(10), player) a = victim.Character:findFirstChild("Left Leg") b = victim.Character:findFirstChild("Right Leg") c = victim.Character:findFirstChild("Left Arm") d = victim.Character:findFirstChild("Right Arm") if victim and victim.Character then victim.Character.Torso.Anchored = false victim.Character.Head.Anchored = false a.Anchored = false b.Anchored = false c.Anchored = false d.Anchored = false end end if message:sub(1, 4) == "god/" and tableContains(isAdmin, player.Name) then victim = findPlayer(message:sub(5), player) if victim and victim.Character then victim.Character.Humanoid.MaxHealth = math.huge victim.Character.Humanoid.Health = math.huge end end if message == "disco" and tableContains(isAdmin, player.Name) then script.disco.Disabled = false end if message == "undisco" and tableContains(isAdmin, player.Name) then script.disco.Disabled = true game.Lighting.Ambient = Color3.new(0, 0, 0) game.Lighting.Brightness = 1 end if message == "fix" then script.fix.Disabled = false end if message:sub(1, 11) == "brightness/" and tableContains(isAdmin, player.Name) then game.Lighting.Brightness = message:sub(12) end if message:sub(1, 5) == "time/" and tableContains(isAdmin, player.Name) then game.Lighting.TimeOfDay = message:sub(6) end if message:sub(1, 4) == "msg/" and tableContains(isAdmin, player.Name) then script.messages.Value = script.messages.Value+1 msg = Instance.new("Message", game.Workspace) v = script.messages.Value msg.Name = "xXScriptzXx"..v p = player.Name m = message:sub(5) msg.Text = p..": "..m wait(3) msg:Destroy() end if message:sub(1, 5) == "hint/" and tableContains(isAdmin, player.Name) then script.messages.Value = script.messages.Value+1 msg = Instance.new("Hint", game.Workspace) v = script.messages.Value msg.Name = "xXScriptzXx"..v p = player.Name m = message:sub(6) msg.Text = p..": "..m wait(3) msg:Destroy() end end game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(message) onChatted(message, player) end) end)

    of     1