Advertisement
sawgamer1

Untitled

Jul 26th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.10 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Model0 = Instance.new("Model")
  20. Part1 = Instance.new("Part")
  21. Beam2 = Instance.new("Beam")
  22. Sound3 = Instance.new("Sound")
  23. Script4 = Instance.new("Script")
  24. Camera5 = Instance.new("Camera")
  25. Model0.Parent = mas
  26. Part1.Name = "TrumpetBoy"
  27. Part1.Parent = Model0
  28. Part1.CFrame = CFrame.new(-7.05000496, 4.00003099, -16.4200058, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  29. Part1.Position = Vector3.new(-7.05000496, 4.00003099, -16.4200058)
  30. Part1.Transparency = 1
  31. Part1.Size = Vector3.new(2.79999948, 8, 2.79999948)
  32. Part1.Anchored = true
  33. Part1.BottomSurface = Enum.SurfaceType.Smooth
  34. Part1.TopSurface = Enum.SurfaceType.Smooth
  35. Beam2.Parent = Part1
  36. Beam2.Attachment0 = nil
  37. Beam2.Attachment1 = nil
  38. Beam2.FaceCamera = true
  39. Beam2.LightInfluence = 1
  40. Beam2.Texture = "rbxassetid://1719105308"
  41. Beam2.TextureSpeed = 0
  42. Beam2.Transparency = NumberSequence.new(0,0)
  43. Beam2.Width0 = 4
  44. Beam2.Width1 = 4
  45. Sound3.Name = "Music"
  46. Sound3.Parent = Part1
  47. Sound3.Looped = true
  48. Sound3.TimePosition = 56.417160268623
  49. Sound3.Playing = true
  50. Sound3.SoundId = "rbxassetid://1754990502"
  51. Sound3.Volume = 1
  52. Script4.Name = "TrumpetBoyScript"
  53. Script4.Parent = Part1
  54. table.insert(cors,sandbox(Script4,function()
  55. local RunService = game:GetService("RunService")
  56.  
  57. local trumpetBoy = script.Parent
  58. local music = trumpetBoy:WaitForChild("Music")
  59. local head = trumpetBoy:WaitForChild("Head")
  60. local beam = trumpetBoy:WaitForChild("Beam")
  61.  
  62. local lastLoudness = 0
  63. local rng = Random.new()
  64.  
  65. local function update()
  66. local loudness = music.PlaybackLoudness / 1000
  67. local diff = math.abs(lastLoudness - loudness)
  68.  
  69. local size = trumpetBoy.Size
  70. local rngX = rng:NextNumber(-1,1) * loudness * 100
  71. local rngZ = rng:NextNumber(-1,1) * loudness * 100
  72. local height = (1 + loudness)*size.Y
  73.  
  74. local goalCF = CFrame.new(rngX, height/2, rngZ)
  75. head.CFrame = head.CFrame:Lerp(goalCF,diff)
  76.  
  77. lastLoudness = loudness
  78. end
  79.  
  80. RunService.Heartbeat:Connect(update)
  81. end))
  82. Camera5.Name = "ThumbnailCamera"
  83. Camera5.Parent = Model0
  84. Camera5.CFrame = CFrame.new(0.350225955, 6.65165615, 1.9379065, 0.99946475, 0.00496793957, -0.0323340632, -0, 0.988401771, 0.151862159, 0.0327134803, -0.151780874, 0.987872779)
  85. Camera5.CameraType = Enum.CameraType.Scriptable
  86. Camera5.CoordinateFrame = CFrame.new(0.350225955, 6.65165615, 1.9379065, 0.99946475, 0.00496793957, -0.0323340632, -0, 0.988401771, 0.151862159, 0.0327134803, -0.151780874, 0.987872779)
  87. Camera5.Focus = CFrame.new(0.382560015, 6.49979401, 0.950033844, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  88. Camera5.focus = CFrame.new(0.382560015, 6.49979401, 0.950033844, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  89. for i,v in pairs(mas:GetChildren()) do
  90. v.Parent = workspace
  91. pcall(function() v:MakeJoints() end)
  92. end
  93. mas:Destroy()
  94. for i,v in pairs(cors) do
  95. spawn(function()
  96. pcall(v)
  97. end)
  98. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement