Advertisement
tyridge77

Untitled

Jul 6th, 2015
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. script.Parent = game.Debris
  2. local Chat_Frame = true;
  3. local Name_Functions = {
  4. ["Closed"] = "http://www.roblox.com/asset/?id=95158894",
  5. ["Open"] = "http://www.roblox.com/asset/?id=95158905",
  6. ["Talking"] = "http://www.roblox.com/asset/?id=95158901",
  7. ["Blink"] = "http://www.roblox.com/asset/?id=95284852"
  8. }
  9. local R_W_T = {
  10. 10,15,20,25,30,35}
  11. local Blink_Time = .2
  12. function WaitFor(p)
  13. while(p.Character.Parent == nil) do wait(0) print("[WAIT]") end
  14. print("[CHARACTER LOADED IN]"..p.Character.Parent.Name)
  15. end
  16. local players = game:GetService("Players")
  17. function RunAnim(p)
  18. local player = p
  19. coroutine.resume(coroutine.create(function()
  20. while wait(0) do
  21. wait(R_W_T[math.random(1,#R_W_T)])
  22. if player then WaitFor(player)
  23. player.Character.Head.face.Texture = Name_Functions["Blink"]
  24. wait(Blink_Time)
  25. player.Character.Head.face.Texture = Name_Functions["Closed"]
  26. end
  27. end
  28. end))
  29. player.Chatted:connect(function(msg)
  30. WaitFor(player)
  31. local face = player.Character.Head.face
  32. for l,w in msg:gmatch(".%s?") do wait(.1)
  33. face.Texture = Name_Functions["Closed"]
  34. if l:match("[ou]") then
  35. face.Texture = Name_Functions["Open"]
  36. elseif l:match("[mgintskyafesn]") then
  37. face.Texture = Name_Functions["Talking"]
  38. end
  39. end
  40. face.Texture = Name_Functions["Closed"]
  41. if gui then gui:Destroy() end
  42. end)
  43. end
  44. for _, v in pairs(players:GetPlayers()) do
  45. RunAnim(v)
  46. end
  47. players.PlayerAdded:connect(function(p)
  48. RunAnim(p)
  49. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement