Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local mx = 100
- function cpart(anc,trans)
- local part = Instance.new("Part")
- part.Anchored = anc or true
- part.Transparency = trans or 0
- part.Material = Enum.Material.SmoothPlastic
- part.Parent = script
- return part
- end
- local inc = 1
- local offset = Vector3.new(30,mx/2,30)
- local cords = {}
- local mon = Instance.new("Sound")
- for x = 1,mx do
- local t = os.clock()
- local cord = cpart(true,0)
- cord.Size = Vector3.new(1,1,1)
- cord.Position = offset+Vector3.new(x,0,0)
- if x == 1 then
- mon.SoundId = 'rbxassetid://3929730934'
- mon.Volume = 0.5
- mon.Looped = true
- mon.Parent = cord
- mon:Play()
- end
- cords[x] = cord
- end
- while true do
- for x = 1,mx do
- local t = os.clock()
- local max = 10
- local y = 1000*math.pow(50,-1*(1+t%1))+math.sin(max*math.pi*t)
- mon.Volume = math.clamp(y/(max*2),0,1)*2
- local beat = cords[x]
- beat.Position = offset+Vector3.new(x,y,0)
- game:GetService("TweenService"):Create(beat,TweenInfo.new(0),{
- Transparency = 0,
- }):Play()
- beat.Transparency = 0
- game:GetService("TweenService"):Create(beat,TweenInfo.new(1),{
- Transparency = 1,
- }):Play()
- game:GetService("RunService").Stepped:Wait()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement