Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Model0 = Instance.new("Model")
- Part1 = Instance.new("Part")
- Beam2 = Instance.new("Beam")
- Sound3 = Instance.new("Sound")
- Script4 = Instance.new("Script")
- Camera5 = Instance.new("Camera")
- Model0.Parent = mas
- Part1.Name = "TrumpetBoy"
- Part1.Parent = Model0
- Part1.CFrame = CFrame.new(-7.05000496, 4.00003099, -16.4200058, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part1.Position = Vector3.new(-7.05000496, 4.00003099, -16.4200058)
- Part1.Transparency = 1
- Part1.Size = Vector3.new(2.79999948, 8, 2.79999948)
- Part1.Anchored = true
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Beam2.Parent = Part1
- Beam2.Attachment0 = nil
- Beam2.Attachment1 = nil
- Beam2.FaceCamera = true
- Beam2.LightInfluence = 1
- Beam2.Texture = "rbxassetid://1719105308"
- Beam2.TextureSpeed = 0
- Beam2.Transparency = NumberSequence.new(0,0)
- Beam2.Width0 = 4
- Beam2.Width1 = 4
- Sound3.Name = "Music"
- Sound3.Parent = Part1
- Sound3.Looped = true
- Sound3.TimePosition = 56.417160268623
- Sound3.Playing = true
- Sound3.SoundId = "rbxassetid://1754990502"
- Sound3.Volume = 1
- Script4.Name = "TrumpetBoyScript"
- Script4.Parent = Part1
- table.insert(cors,sandbox(Script4,function()
- local RunService = game:GetService("RunService")
- local trumpetBoy = script.Parent
- local music = trumpetBoy:WaitForChild("Music")
- local head = trumpetBoy:WaitForChild("Head")
- local beam = trumpetBoy:WaitForChild("Beam")
- local lastLoudness = 0
- local rng = Random.new()
- local function update()
- local loudness = music.PlaybackLoudness / 1000
- local diff = math.abs(lastLoudness - loudness)
- local size = trumpetBoy.Size
- local rngX = rng:NextNumber(-1,1) * loudness * 100
- local rngZ = rng:NextNumber(-1,1) * loudness * 100
- local height = (1 + loudness)*size.Y
- local goalCF = CFrame.new(rngX, height/2, rngZ)
- head.CFrame = head.CFrame:Lerp(goalCF,diff)
- lastLoudness = loudness
- end
- RunService.Heartbeat:Connect(update)
- end))
- Camera5.Name = "ThumbnailCamera"
- Camera5.Parent = Model0
- 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)
- Camera5.CameraType = Enum.CameraType.Scriptable
- 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)
- Camera5.Focus = CFrame.new(0.382560015, 6.49979401, 0.950033844, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Camera5.focus = CFrame.new(0.382560015, 6.49979401, 0.950033844, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = workspace
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement