Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- do
- local filteredMessages = { ['___'] = '___' };
- local onPropertyChanged = function (obj)
- if (obj:isDescendantOf (workspace)) then
- local objText = obj.Text;
- if (objText ~= '___' and objText:find '(%S)') then
- if (filteredMessages [objText] and filteredMessages [objText] ~= objText) then
- obj.Text = filteredMessages [objText];
- elseif (not filteredMessages [objText]) then
- obj.Text = '___';
- local filtered = game:service 'Chat':FilterStringForBroadcast (objText, game:service 'Players'.localPlayer);
- filteredMessages [objText] = filtered;
- filteredMessages [filtered] = filtered;
- obj.Text = filtered;
- end;
- end;
- end;
- end;
- local newInstance = Instance.new;
- Instance = {
- new = function (class, parent)
- local obj = newInstance (class, parent);
- if (pcall (function()return obj.Text;end)) then
- obj:getPropertyChangedSignal ('Parent'):connect (function () onPropertyChanged (obj) end);
- obj:getPropertyChangedSignal ('Text'):connect (function() onPropertyChanged (obj) end);
- end;
- return obj;
- end;
- };
- end;
- local plr = game.Players.LocalPlayer
- base = Instance.new("ScreenGui",plr.PlayerGui)
- bbg = Instance.new("BillboardGui",plr.Character.Head)
- bbg.Size = UDim2.new(0,200,0,50)
- bbg.StudsOffset = Vector3.new(0,2,0)
- bbgTl = Instance.new("TextLabel",bbg)
- bbgTl.BackgroundTransparency = 1
- bbgTl.Size = UDim2.new(10,0,1,0)
- bbgTl.Position = UDim2.new(-4.5,-3,0,0)
- bbgTl.Font = "SourceSansBold"
- bbgTl.Text = " "
- bbgTl.TextSize = 38
- bbgTl.TextStrokeColor3 = Color3.new(1,0,1)
- bbgTl.TextColor3 = Color3.new(1,1,1)
- bbgTl.TextStrokeTransparency = 0
- bbgTl.TextWrapped = true
- plr.Chatted:connect(function(msg)
- bbgTl.Text = msg
- wait(9)
- if bbgTl.Text == msg then
- bbgTl.Text = " "
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement