Alright,the script doesn't work at all... I use a second message to show when the script breaks, it never shows up (t, I mean)
The script is supposed to put a period at the end of the sentance if one isn't there, capitalize the second letter after each period, make it all lowercase, capitalize the first letter, capitalize all the i's in the message, and put the player's name before the message
it then removes any other messages by this admin before putting this new message in the workspace, if one is there.
Here is the script, please mind the unnecessary length, I do like to make my scripts as best as I can; yet apparently I can't.
game.Players.PlayerAdded:connect(function(p)
p.Chatted:connect(function(q)
local t=Instance.new("Message",game.Workspace)
local m=q:lower()
t.Text=q
wait(3)
if m:sub(1,2)=="m/"then
for i=3,100 do
if m:sub(m:len())~="."then
pcall(function()m:sub(m:len()+1)="."end)
t.Text=m
wait(3)
end
pcall(function()m:sub(1)=m:sub(1):upper()end)
t.Text=m
wait(3)
if m:sub(i,i)=="."and i~=m:len()and i+1==" "and i+2 then
pcall(function()m:sub(i+2)=m:sub(i+2):upper()end)
t.Text=m
wait(3)
end
if m:sub(i,i)=="i"then
pcall(function()m:sub(i)=m:sub(i):upper()end)
t.Text=m
wait(3)
t:Remove()
end
local f=Instance.new("Message",game.Workspace)
if game:GetService("Workspace"):FindFirstChild("AnameNoBoDyElSeWillHAVe")then
pcall(function()game:GetService("Workspace"):FindFirstChild("AnameNoBoDyElSeWillHAVe"):Remove()end)
end
pcall(function()f.Text=p.Name..": "..m end)
pcall(function()f.Name="AnameNoBoDyElSeWillHAVe"end)
pcall(function()game:GetService("Debris"):AddItem(f,5)end)
end
end
end)
end) |