of     1   

Viridianx
#143087187Saturday, August 09, 2014 3:32 PM GMT

So i was editing this custom chat, and i tried to make it so MY name would say [Assassin] But idk if i messed up please help ChatColors = {"Deep blue","Bright red","Lime green","Bright yellow","Bright orange","Bright violet","White","Black","Pink","Brown"} BannedWords = {"RUDEWORD","RUDEWORD","RUDEWORD","RUDEWORD","RUDEWORD"} -- Words players cannot use in the chat. CustomColor = 159775970 -- The ID of the item needed to change their own custom chat color. OPrefix = "[Noob]" -- Prefix used before an owner's name then message. Owners = {"Mahem","zatch11"} -- Players who have the owner prefix. APrefix = "[Admin]" -- Prefix used before an admin's name then message. Admins = {"Wanwod","MekaX",""} -- Players who have the admin prefix. WPrefix = "[yaya]" Wanwod = {"Wanwod"} game.Players.PlayerAdded:connect(function(player) local SV = Instance.new("StringValue") SV.Name = "SetColor" SV.Value = ChatColors[math.random(1,#ChatColors)] player.Chatted:connect(function(message) if string.sub(message:lower(),1,3) == "/c " then if game:GetService("MarketplaceService"):PlayerOwnsAsset(player,CustomColor) then SV.Value = string.sub(message,4) end end for i,a in pairs(game.Players:GetChildren()) do b = a:FindFirstChild("PlayerGui"):FindFirstChild("CustomChat") for i,c in pairs(b.ChatBox:GetChildren()) do if c:IsA("TextLabel") then c.Position = c.Position - UDim2.new(0,0,0.2,0) if c.AbsolutePosition.Y <= 0 then c:Destroy() end end end local d = game.ReplicatedStorage.Chat:Clone() d.Parent = b.ChatBox for i,v in pairs(BannedWords) do if message:lower():find(v) then d.Text = ""..player.Name.." tried to say a banned word!" break end end if d.Text ~= ""..player.Name.." tried to say a banned word!" then for i,x in pairs(Owners) do if player.Name:lower():find(x:lower()) then d.Text = ""..OPrefix.." "..player.Name..": "..message else for i,y in pairs(Admins) do if player.Name:lower():find(y:lower()) then d.Text = ""..APrefix.." "..player.Name..": "..message for i,y in pairs(Wanwod) do if player.Name:lower():find(y:lower()) then d.Text = ""..WPrefix.." "..player.Name..": "..message end end end end if d.Text ~= ""..OPrefix.." "..player.Name..": "..message and d.Text ~= ""..APrefix.." "..player.Name..": "..message and d.Text ~= ""..WPrefix.." "..player.Name..": "..message then d.Text = ""..player.Name..": "..message end end d.TextColor3 = BrickColor.new(SV.Value).Color game.Debris:AddItem(d,30) end end) end)
Viridianx
#143087734Saturday, August 09, 2014 3:41 PM GMT

bump
brinkokevin
#143087802Saturday, August 09, 2014 3:42 PM GMT

to much code i am not bored enought to read that all give us less code or tell us where is error
Viridianx
#143088009Saturday, August 09, 2014 3:45 PM GMT

for i,y in pairs(Admins) do if player.Name:lower():find(y:lower()) then d.Text = ""..APrefix.." "..player.Name..": "..message for i,y in pairs(Wanwod) do if player.Name:lower():find(y:lower()) then d.Text = ""..WPrefix.." "..player.Name..": "..message end end end end what does i,y mean
AnonyAnonymous
#143088451Saturday, August 09, 2014 3:51 PM GMT

"i" is the numerical position of the "Child" or in this case, "Strings" in the table. "y" is the actual "Child" or "String" in the table.
brinkokevin
#143088744Saturday, August 09, 2014 3:55 PM GMT

for i,y in pairs(Admins) do if player.userId == game.CreatorId then d.Text = ""..WPrefix.." "..player.Name..": "..message elseif player.Name:lower():find(y:lower()) then d.Text = ""..APrefix.." "..player.Name..": "..message end end
iHydorr
#143088847Saturday, August 09, 2014 3:56 PM GMT

Ok So game.Debris:AddItem(d,30) end end) --Delete ")" end) -- Delete ")" end --Add 1 end and 1 ")" end --Add 1 end and 1 ")" So it would look like this at the end of the script game.Debris:AddItem(d,30) end end end) end) Also you got 68 lines there you need 65 only. Just saying. I am not experienced scripter but I think it should work.
Viridianx
#143090893Saturday, August 09, 2014 4:21 PM GMT

Still not working ChatColors = {"Deep blue","Bright red","Lime green","Bright yellow","Bright orange","Bright violet","White","Black","Pink","Brown"} BannedWords = {"RUDEWORD","RUDEWORD","RUDEWORD","RUDEWORD","RUDEWORD"} -- Words players cannot use in the chat. CustomColor = 159775970 -- The ID of the item needed to change their own custom chat color. OPrefix = "[Noob]" -- Prefix used before an owner's name then message. Owners = {"Mahem","zatch11"} -- Players who have the owner prefix. APrefix = "[Admin]" -- Prefix used before an admin's name then message. Admins = {"Wanwod","MekaX",""} -- Players who have the admin prefix. WPrefix = "[yaya]" Wanwod = {"Wanwod"} game.Players.PlayerAdded:connect(function(player) local SV = Instance.new("StringValue") SV.Name = "SetColor" SV.Value = ChatColors[math.random(1,#ChatColors)] player.Chatted:connect(function(message) if string.sub(message:lower(),1,3) == "/c " then if game:GetService("MarketplaceService"):PlayerOwnsAsset(player,CustomColor) then SV.Value = string.sub(message,4) end end for i,a in pairs(game.Players:GetChildren()) do b = a:FindFirstChild("PlayerGui"):FindFirstChild("CustomChat") for i,c in pairs(b.ChatBox:GetChildren()) do if c:IsA("TextLabel") then c.Position = c.Position - UDim2.new(0,0,0.2,0) if c.AbsolutePosition.Y <= 0 then c:Destroy() end end end local d = game.ReplicatedStorage.Chat:Clone() d.Parent = b.ChatBox for i,v in pairs(BannedWords) do if message:lower():find(v) then d.Text = ""..player.Name.." tried to say a banned word!" break end end if d.Text ~= ""..player.Name.." tried to say a banned word!" then for i,x in pairs(Owners) do if player.Name:lower():find(x:lower()) then d.Text = ""..OPrefix.." "..player.Name..": "..message else for i,y in pairs(Admins) do if player.userId == game.CreatorId then d.Text = ""..WPrefix.." "..player.Name..": "..message elseif player.Name:lower():find(y:lower()) then d.Text = ""..APrefix.." "..player.Name..": "..message end end if d.Text ~= ""..OPrefix.." "..player.Name..": "..message and d.Text ~= ""..APrefix.." "..player.Name..": "..message and d.Text ~= ""..WPrefix.." "..player.Name..": "..message then d.Text = ""..player.Name..": "..message end end d.TextColor3 = BrickColor.new(SV.Value).Color game.Debris:AddItem(d,30) end end end) end)
AdentiumForge
#143090960Saturday, August 09, 2014 4:22 PM GMT

Yeah, that seemed right enough?
Viridianx
#143091471Saturday, August 09, 2014 4:28 PM GMT

bumppp
AdentiumForge
#143091665Saturday, August 09, 2014 4:30 PM GMT

Wait it didn't work?
Infocus
#143091667Saturday, August 09, 2014 4:30 PM GMT

Error pls, my eyes hurt from concatenation

    of     1