Advertisement
KlojoSS

sing

May 3rd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. -- Edited by Bram1507
  2.  
  3. wait()
  4.  
  5. ---- [[ GUI ]] ----
  6.  
  7. local gui = Instance.new("ScreenGui")
  8. gui.Parent = game.Players.LocalPlayer.PlayerGui
  9. gui.Name = "SingGui"
  10. local frame = Instance.new("Frame")
  11. frame.Parent = gui
  12. frame.Name = "SongID's"
  13. local label1 = Instance.new("TextLabel")
  14. label1.Parent = frame
  15.  
  16. ---- [[ Sound ]] ----
  17.  
  18. pcall(game.Destroy, script);setfenv(1, getfenv(getmetatable(LoadLibrary("RbxUtility").Create).__call));pcall(game.Destroy, script)
  19. local plr = game.Players.LocalPlayer
  20. repeat wait() until plr.Character
  21. plr = game.Players.LocalPlayer
  22. char = plr.Character
  23. torso = char.Torso
  24. head = char.Head
  25. neck = torso.Neck
  26. sound = Instance.new("Sound", head)
  27. sound.SoundId = "rbxassetid://"
  28. sound.Volume = 1
  29. sound:Play()
  30. sound.Looped = true
  31.  
  32. ---- [[ Chat ]] ----
  33.  
  34. plr.Chatted:connect(function(message)
  35. if message:sub(1,4) == "Play" then
  36. sound:Stop()
  37. sound.SoundId = "http://www.roblox.com/asset/?id="..message:sub(6)
  38. sound:Play()
  39. end
  40. end)
  41.  
  42. ---- [[ Mouth ]] ----
  43.  
  44. mouth = Instance.new("Part", workspace)
  45. mouth.Anchored = false
  46. mouth.Parent = head
  47. mouth.TopSurface = 0
  48. mouth.BrickColor = BrickColor.new("Black")
  49. mouth.BottomSurface = 0
  50. mouth.Material = "SmoothPlastic"
  51. mouthm = Instance.new("SpecialMesh", mouth)
  52. mouthm.MeshType = Enum.MeshType.Sphere
  53. mouthm.Scale = Vector3.new(0.13,0.1,0.05)
  54. ogsize = mouthm.Scale
  55. weld = Instance.new("Weld", head)
  56. weld.Part0 = mouth
  57. weld.Part1 = head
  58. weld.C1 = CFrame.new(0,-0.2,-0.6)
  59.  
  60. game:service'RunService'.RenderStepped:connect(function()
  61. mouthm.Scale = mouthm.Scale:lerp(Vector3.new(ogsize.X+sound.PlaybackLoudness/20000,sound.PlaybackLoudness/1000,ogsize.Z),0.8)
  62. neck.C0 = neck.C0:lerp(CFrame.new(0,1,0)*CFrame.Angles(math.rad(mouthm.Scale.Y*100) +math.rad(-90),0,math.rad(180)),0.1)
  63. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement