Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game.Players.LocalPlayer int1 = 0 msgnew = "" player.Chatted:connect(function(msg) local bill = Instance.new("BillboardGui",player.Character.Head) bill.Size = UDim2.new(0,350,0,50) bill.StudsOffset = Vector3.new(0,3,0) local txtlabel = Instance.new("TextLabel",bill) txtlabel.Text = "There was an error while processing your request. Please try again." txtlabel.TextScaled = true txtlabel.Size = UDim2.new(1,0,1,0) txtlabel.TextWrapped = true txtlabel.Transparency = 0.25 print(msg) for w in string.gmatch(msg, "[%w.:'!?~*,-()@#$&/]+") do local sound = Instance.new("Sound",game.Workspace) sound.Volume = 1 sound.SoundId = "http://www.roblox.com/asset/?id=358280695" sound:Play() txtlabel.BackgroundColor = BrickColor.Random() int1 = int1 + 1 print(int1.." >> "..w) msgnew = (msgnew.." "..w) txtlabel.Text = msgnew wait(0.25) end local length = string.len(msgnew) int1 = 0 print(player.Name.." chatted "..msgnew.." which is "..length - 1 .." characters long.") msgnew = "" wait(3) bill:Destroy() end) function msg(msg) local bill = Instance.new("BillboardGui",player.Character.Head) bill.Size = UDim2.new(0,350,0,50) bill.StudsOffset = Vector3.new(0,3,0) local txtlabel = Instance.new("TextLabel",bill) txtlabel.Text = "There was an error while processing your request. Please try again." txtlabel.TextScaled = true txtlabel.Size = UDim2.new(1,0,1,0) txtlabel.TextWrapped = true txtlabel.Transparency = 0.25 print(msg) for w in string.gmatch(msg, "[%w.:'!?~*,-()@#$&/]+") do local sound = Instance.new("Sound",game.Workspace) sound.Volume = 1 sound.SoundId = "http://www.roblox.com/asset/?id=358280695" sound:Play() txtlabel.BackgroundColor = BrickColor.Random() int1 = int1 + 1 print(int1.." >> "..w) msgnew = (msgnew.." "..w) txtlabel.Text = msgnew wait(0.25) end local length = string.len(msgnew) int1 = 0 print(player.Name.." chatted "..msgnew.." which is "..length - 1 .." characters long.") msgnew = "" wait(3) bill:Destroy() end local screen = Instance.new("ScreenGui",player.PlayerGui) local txtbox = Instance.new("TextBox",screen) txtbox.Size = UDim2.new(0,350,0,50) txtbox.Position = UDim2.new(0,300,0,0) txtbox.Text = "Click here to chat a message privately." local gbutton = Instance.new("TextButton",screen) gbutton.Size = UDim2.new(0,50,0,50) gbutton.Position = UDim2.new(0,650,0,0) gbutton.Text = "Go!" gbutton.BackgroundColor = BrickColor.Green() txtbox.TextScaled = true gbutton.MouseButton1Down:connect(function() msg(txtbox.Text) txtbox.Text = "Click here to chat a message privately!" end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement