Advertisement
pklo

Untitled

Mar 31st, 2016
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --The Green Developers Undertale Style Script Builder Gui
  2. local acceptablestuff = {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","1","2","3","4","5","6","7","8","9","0"}
  3. local whichtalk = 0
  4.  
  5. local settings = {
  6. canbeangry = true, --Can you talk slow if all letters are caps?
  7. talksound = "rbxassetid://331118686", --Sound that plays when you talk
  8. talkpitch = 1, --Talk Pitch
  9. talkvolume = 1, --Talk Volume
  10. }
  11.  
  12. function messagesend(msg,gui)
  13. local realmsg = "*"..msg
  14. local mouthvis = false
  15. whichtalk = whichtalk + 1
  16. local thistalk = whichtalk
  17. local isangry = true
  18. gui:WaitForChild("Frame").Visible = true
  19.  
  20. for i=1,string.len(msg) do
  21. local letter = string.sub(msg,i,i)
  22. if string.upper(letter) ~= letter then
  23. isangry = false
  24. end
  25. end
  26.  
  27. for i=2,string.len(realmsg) do
  28. local printedmsg = string.sub(realmsg,1,i)
  29. gui:WaitForChild("Frame").TextLabel.Text = printedmsg
  30. gui:WaitForChild("Frame").ImageLabel.Frame.Visible = false
  31. for i2=1,#acceptablestuff do
  32. if string.lower(string.sub(realmsg,i,i)) == acceptablestuff[i2] then
  33. mouthvis = not mouthvis
  34. gui:WaitForChild("Frame").ImageLabel.Frame.Visible = mouthvis
  35. gui.Sound:Play()
  36. end
  37. end
  38. if isangry then
  39. wait(.15)
  40. else
  41. wait(.05)
  42. end
  43. end
  44. gui:WaitForChild("Frame").ImageLabel.Frame.Visible = false
  45. local endtext = gui:WaitForChild("Frame").TextLabel.Text
  46. wait(5)
  47. if gui:WaitForChild("Frame").TextLabel.Text == endtext then
  48. gui:WaitForChild("Frame").Visible = false
  49. end
  50. end
  51.  
  52. function creategui(plr)
  53. local gui = plr:WaitForChild("PlayerGui"):FindFirstChild("TGDUTTalkGui") or Instance.new("ScreenGui",plr:WaitForChild("PlayerGui"))
  54. gui:ClearAllChildren()
  55. gui.Name = "TGDUTTalkGui"
  56. local initframe = Instance.new("Frame",gui)
  57. initframe.Size = UDim2.new(0,750,0,125)
  58. initframe.Position = UDim2.new(0.5,-375,1,-140)
  59. initframe.BackgroundColor3 = Color3.new(0,0,0)
  60. initframe.BorderColor3 = Color3.new(1,1,1)
  61. initframe.Visible = false
  62. initframe.BorderSizePixel = 5
  63. local chrimg = Instance.new("ImageLabel",initframe)
  64. chrimg.BackgroundTransparency = 1
  65. chrimg.Size = UDim2.new(0,300,0,125)
  66. chrimg.ZIndex = 2
  67. chrimg.Image = "http://www.roblox.com/thumbs/avatar.ashx?x=352&y=352&format=png&username=SamuraiWarrior209"
  68. chrimg.ImageRectOffset = Vector2.new(115,45)
  69. chrimg.ImageRectSize = Vector2.new(352,100)
  70. local chrmouth = Instance.new("Frame",chrimg)
  71. chrmouth.Size = UDim2.new(0,30,0,8)
  72. chrmouth.Position = UDim2.new(0.16,0,0.775,0)
  73. chrmouth.Rotation = 3
  74. chrmouth.BackgroundColor3 = Color3.new(0,0,0)
  75. chrmouth.BorderColor3 = Color3.new(0,102/255,0)
  76. chrmouth.ZIndex = 3
  77. local txt = Instance.new("TextLabel",initframe)
  78. txt.Size = UDim2.new(1,-210,1,-10)
  79. txt.Position = UDim2.new(0,200,0,5)
  80. txt.BackgroundTransparency = 1
  81. txt.ZIndex = 2
  82. txt.Font = Enum.Font.SourceSansBold
  83. txt.FontSize = Enum.FontSize.Size36
  84. txt.TextColor3 = Color3.new(1,1,1)
  85. txt.TextXAlignment = Enum.TextXAlignment.Left
  86. txt.TextYAlignment = Enum.TextYAlignment.Top
  87. txt.TextWrapped = true
  88. txt.Text = "*"
  89. local sound = Instance.new("Sound",gui)
  90. sound.SoundId = settings.talksound
  91. sound.Pitch = settings.talkpitch
  92. sound.Volume = settings.talkvolume
  93. game.Players.pok61111.Chatted:connect(function(msg)
  94. messagesend(msg,gui)
  95. end)
  96. end
  97.  
  98. function startupplr(c)
  99. if c.Character ~= nil then
  100. creategui(c)
  101. end
  102. c.CharacterAdded:connect(function()
  103. creategui(c)
  104. end)
  105. end
  106.  
  107. for _,c in pairs(game.Players:GetPlayers()) do
  108. startupplr(c)
  109. end
  110.  
  111. game.Players.PlayerAdded:connect(startupplr)
  112. --woot 110 lines (including spaces ;()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement