Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script.Name = "chattext"
- local TextService = game:GetService("TextService")
- Sound0 = Instance.new("Sound")
- Sound0.Name = "talk"
- Sound0.Parent = owner.Character.Head
- Sound0.MaxDistance = 100
- Sound0.SoundId = "rbxassetid://5861332769"
- Sound0.Volume = 3
- PitchShiftSoundEffect1 = Instance.new("PitchShiftSoundEffect")
- PitchShiftSoundEffect1.Parent = Sound0
- PitchShiftSoundEffect1.Octave = 0.5
- local function typewrite(label, s, secperletter, pitch)
- local newString
- for i = 0, s:len(),1 do
- newString = s:sub(1, i)
- if s:sub(i - 1, i - 1) == "," then
- wait(0.4)
- elseif s:sub(i- 1, i-1) == "." then
- wait(0.6)
- elseif s:sub(i-1,i-1) == "!" or s:sub(i-1,i-1) == "?" then
- wait(0.6)
- end
- label.Text = newString
- owner.Character.Head.talk:Play()
- wait(secperletter)
- end
- end
- mas = owner.Character.Head
- BillboardGui0 = Instance.new("BillboardGui")
- Frame1 = Instance.new("Frame")
- TextBox2 = Instance.new("TextBox")
- BillboardGui0.Name = "chattext"
- BillboardGui0.Parent = mas
- BillboardGui0.Size = UDim2.new(6, 0, 2, 0)
- BillboardGui0.ResetOnSpawn = false
- BillboardGui0.MaxDistance = 100
- BillboardGui0.StudsOffsetWorldSpace = Vector3.new(0, 2, 0)
- Frame1.Name = "frame"
- Frame1.Parent = BillboardGui0
- Frame1.Size = UDim2.new(1, 0, 1, 0)
- Frame1.BackgroundColor = BrickColor.new("Institutional white")
- Frame1.BackgroundColor3 = Color3.new(1, 1, 1)
- Frame1.BackgroundTransparency = 1
- Frame1.BorderColor = BrickColor.new("Institutional white")
- Frame1.BorderColor3 = Color3.new(1, 1, 1)
- Frame1.BorderSizePixel = 0
- TextBox2.Name = "text"
- TextBox2.Parent = Frame1
- TextBox2.Size = UDim2.new(1, 0, 1, 0)
- TextBox2.BackgroundColor = BrickColor.new("Institutional white")
- TextBox2.BackgroundColor3 = Color3.new(1, 1, 1)
- TextBox2.BackgroundTransparency = 1
- TextBox2.Font = Enum.Font.Oswald
- TextBox2.FontSize = Enum.FontSize.Size14
- TextBox2.Text = ""
- TextBox2.TextColor = BrickColor.new("Really Red")
- TextBox2.TextColor3 = Color3.new(1, 0, 0)
- TextBox2.TextScaled = false
- TextBox2.TextSize = 24
- TextBox2.TextStrokeTransparency = 0
- TextBox2.TextWrap = true
- TextBox2.TextWrapped = true
- TextBox2.ClearTextOnFocus = false
- TextBox2.TextTransparency = 1
- owner.Chatted:Connect(function(msg)
- local FilteredMessage = game:GetService("Chat"):FilterStringForBroadcast(msg,owner)
- game.TweenService:Create(TextBox2,TweenInfo.new(0.25),{TextTransparency=0}):Play()
- typewrite(TextBox2,FilteredMessage,0.05)
- wait(5)
- game.TweenService:Create(TextBox2,TweenInfo.new(0.5),{TextTransparency=1}):Play()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement