--https://glot.io/snippets/gfmpv7ej4u
local HTTPService = game:GetService("HttpService")
local Debris = game:GetService("Debris")
local Song = "his-theme.mid"
function GetSongName(Song)
local SongName = ""
for _, Str in Song:sub(1, #Song - 4):split("-") do
SongName = SongName .. Str:sub(1,1):upper()..Str:sub(2).." "
end
return SongName
end
local SongName = GetSongName(Song)
local AllSongs = {
"megalo-strike-back.mid",
"his-theme.mid",
"bad-apple.mid",
"big-shot.mid",
"scp-final-flash-of-existence.mid",
"megalovania.mid",
"finale.mid",
"fallen-down.mid",
"among-us-drip.mid",
"your-best-nightmare.mid",
"darker-darker-yet-darker.mid",
"hopes-and-dreams.mid",
"dire-dire-docks.mid",
"here-i-come.mid"
}
local MidiData = HTTPService:JSONDecode(HTTPService:GetAsync("https://raw.githubusercontent.com/saturdayscandal/roblox/main/VSB/midi/"..Song))
function notetopitch(note, offset)
return (440 / 32) * math.pow(2, ((note + (offset or 0)) / 12)) / 440
end
local UseDamping = true
local snap = 12222140
local ping = 12221990
local bass = 12221831
local button = 12221967
local clickf = "rbxasset://sounds//clickfast.wav"
local clunk = "rbxasset://sounds//flashbulb.wav"
local url = "http://www.roblox.com/asset/?id="
-- M_INS
-- sound, pitchbend, notemin, notemax, volume, have no idea, still no idea, looped
local Inst = {
{{"12857654",0.3,0,66,0.5},{"12857804",-7,67,71,0.5},{"12857664",-11.5,72,127,0.8}}, -- Banjo
{{"12857637",-3.9,0,64,0.5},{"12857660",-8.4,65,127,0.5}}, -- Banjo 2
{{"13114759",-6,0,127,1}}, -- ding
{{"19344667",-8.6,0,127,0.5}}, -- bell
{{"15666462",-13.5,0,127,0.4}}, -- Beep
{{"13424334",-23.2,0,127,0.5,0,0.5}}, -- piccolo
{{"1089407",8.2,0,57,0.5},{"1089403",3.2,58,127,1}}, -- Electric Guitar
{{"13032199",8.2,0,57,0.5},{"13032178",3.2,58,127,1}}, -- Space Guitar
{{"60661796",-2.5,0,127,0.5,0.3,0.2}}, -- Metal Guitar
{{"13019281",11.2,0,127,0.5}}, -- Ninja Guitar (Twang Twang!)
{{"13019300",11.3,0,127,0.5}}, -- Ninja Guitar (T-T-Twang Twang!)
{{"12892216",-7,0,127,0.5}}, -- Jungle Guitar
{{"10209668",6.5,0,127,0.5}}, -- synth sound 1
{{"11998777",12,0,127,0.5}}, -- synth sound 2
{{"11998796",4.8,0,127,0.5,0,0.15}}, -- synth sound 3
{{bass,11.8,0,127,0.5}}, -- Bass
{{"rbxasset://sounds//uuhhh.wav",0.2,0,127,0.5}}, -- Robloxian Death
{{button,6.7,0,127,0.4}}, -- Button
{{ping,-21.7,0,127,0.5,0,0.2}}, -- Ping!
{{"rbxasset://sounds//Kid saying Ouch.wav",0.9,0,127,0.5}}, -- 'Ouch'
{{"11984351",16.8,0,127,0.3,0.02,0.2}}, -- Long Destructive Synth
-- v V Drumset V v
{{"rbxasset://music//ufofly.wav",59,1,1,0.5},{"13114759",39.7,26,26,0.5},{snap,37,27,27,0.5,0,0.25},
{"108553903",38,28,28,0.5,0,0,0},
{"18426149",41,29,29,0.4,0,0.25},{"18426149",34,30,30,0.4,0,0.25},{snap,37,31,31,0.2},
{clickf,40,31,31,0.7},{clunk,40,32,32,0.5},{clickf,38,33,34,0.5},
{"56524816",24,34,34,0.3},{"31173820",20,35,35,0.5},{"31173820",24,36,36,0.5},
{"14863866",16,37,37,1},{"31173799",20,38,38,0.7},{"2101148",54,39,39,0.7},{"31173799",20,40,40,0.5},
{"31173881",17,41,41,0.5},
{snap,45,42,42,0.25,0,0.25},{"31173881",19,43,43,0.5},{snap,52,44,44,0.25,0,0.25},
{"31173881",21,45,45,0.5},{"31173735",14,46,46,0.5},{"31173881",23,47,47,0.5},{"31173844",13,48,48,0.5},
{"31173771",14,49,49,0.5},{"31173844",15,50,50,0.5},{"31173898",8,51,51,0.5},{"31173771",5,52,52,0.5},
{"11113679",9.5,53,53,0.5},{snap,34,54,54,0.15,0,0.25},{"31173771",24,55,55,0.5},{snap,14,56,56,0.2},{"57802055",1,56,56,0.3},
{"31173771",7,57,57,0.5},{"31173898",1,59,59,0.5},{"57801983",3,60,60,0.5,0,0.25},{"57801983",-10,61,61,0.5,0,0.25}, -- tuning was -5
{"101088307",24,62,62,0.5,0,0,0},{"57802055",-16,63,63,0.5,0,0.25},{"57802055",-22,64,64,0.5,0,0.25},{"57801983",-15,65,65,0.5,0,0.25}
,{"57801983",-21,66,66,0.5,0,0.25},
{"13114759",-8,67,67,0.5,0,0.25},{"13114759",-14,68,68,0.5,0,0.25},
{snap,22,69,69,0.4},
{snap,32,70,70,0.5,0,0.25},{"28510547",-14.4,71,71,0.4,0,0.25},{"28510547",-18.4,72,72,0.4,0,0.25},{"101180005",-3.4,73,73,0.3,0,0,0},
{"100391463",-4,74,74,0.4,0,0,0},{"15666462",8,75,75,0.4},{"57802055",-2,76,76,0.4},{"57802055",-5,77,77,0.4},{"75338648",-13,78,78,0.6,0,1,0},{"75338648",-31.7,79,79,0.5,0,0,0},
{"19344667",2.5,80,80,0.25,0,0.25},{"19344667",1.5,81,81,0.2},{snap,12,82,82,0.3,0,0.25},{"101093314",-22,83,83,0.4,0,0.25},
{"13061809",-4,84,84,0.4},{"57802055",8,85,85,0.4},{"31173844",-35,86,86,0.4},{"31173844",-36,87,87,0.4}},
-- Horror SFX v v v
{{"13061809",-2,56,64,0.5},{"13061802",-10,65,74,0.5},{"13061810",-23,75,84,0.5},{"11984254",-34,85,127,0.5},
{"rbxasset://sounds//HalloweenThunder.wav",8,48,55,0.5},{"rbxasset://sounds//HalloweenGhost.wav",27,0,47,0.5}},
{{"21338895",0,0,127,0.5}}, -- Maraca
{{"11949128",10,0,127,0.5}}, -- Big Drum (Even though it isn't.)
{{"10209888",13.4,0,127,0.3},{"10209888",14.2,61,127,0.3}}, -- Popcorn
{{"45885030",1.4,0,127,0.3}}, -- KatanaSlash
{{"75421988",33.75,0,80,0.3,0,0.2,1},{"75338648",-24.7,81,127,0.5,0,0.4,1},
{"75338648",-0.7,81,127,0.4,0,0.4,1},{"75338648",11.4,81,127,0.5,0,0.4,1}}, -- ChargeSynth
{{"15666462",52.2,0,127,0.4,0.5,0.5,1}}, -- Hard Synth Bass
{{"11944350",-9.6,0,127,0.5}}, -- Pew
{{"79236960",0,0,127,0.3,0}}, -- Bass Drum
{{"81146867",16,0,127,0.3,0}}, -- Saber Sound
{{"75338648",-13,0,127,0.7,0,0.1,1}}, -- Beep sound
{{"11949128",43,0,127,0.5,0,0.25,1}}, -- Growly Thing
{{"11998796",4.8,0,127,1,0,0.25},{"75421988",33.8,0,80,0.2,0.4,0.4,1},{"75421988",33.9,0,80,0.2,0.4,0.4,1},
{"75338648",-24.7,81,127,0.5,0,0.4,1},{"75338648",-0.7,81,127,0.4,0,0.4,1},{"75338648",11.4,81,127,0.5,0,0.4,1}}, -- Nice Synth
{{"58479648",15.2,0,127,0.5,0,0.25}}, -- 035 Spitsy Bass
{{"58479648",15.2,0,127,0.5,0,0.15,1}}, -- 036 Spitsy Bass/Beep (Loops)
{{"69446845",13.5,0,127,0.5,0,0.15,1}}, -- 037 Dead Synth Strings
{{"75421988",33.7,0,80,0.2,0.4,0.4,1},{"75421988",33.8,0,80,0.2,0.4,0.4,1},{"75338648",-24.7,81,127,0.5,0,0.4,1},{"75338648",-0.7,81,100,0.4,0,0.4,1},{"75338648",11.4,81,86,0.5,0,0.4,1}}, -- 038 Charge Synth Smooth
{{"57802055",-2,0,127,0.5}}, -- 039 Noted Congo
{{bass,23.8,0,127,0.5}}, -- 040 Bass Octave Higher
{{"25641508",-9.5,0,127,0.5}}, -- 041 "Oof!"
-- 42 Fake Piano V2
{{bass,23.8,42,50,0.07},{"12857664",-11.6,36,80,0.6},
{ping,-21.7,82,127,0.5,0,0.15},
{"12857664",-11.6,87,127,0.18},{"12857664",-11.6,81,86,0.3},{bass,23.8,0,41,0.2},
{ping,-21.7,0,81,0.8,0,0.2}},
{{"75338648",-24.7,0,127,0.7,0,0.1,1}}, -- Soft Whistle (Octave lower)
{{"89357191",21.5,0,127,0.7,0,0.1,1}}, -- Lightsaber Hum
{{"13417380",-18.3,0,127,0.7,0,0.1}}, -- Clarinet
{{"13418521",-8,0,127,0.7,0,0.2}}, -- Sax
{{"13414759",4,0,127,0.7,0.5,0.5}}, -- Bagpipe Bass
{{"13414758",14,0,127,0.7,0,0.1,1}}, -- Bagpipes (beeps loop)
{{"13414749",19,0,127,0.7,0,0.1,1}}, -- Bagpipes (beeps2 loop)
{{"75338648",-24.7,0,127,0.5,0,0.1,1},{"75338648",-12.7,0,127,0.5,0,0.1,1},{"75338648",-5.7,0,127,0.7,0,0.1,1},{"75338648",-0.7,0,127,0.5,0,0.1,1}}, -- Ahhh
{{"75338648",-24.7,0,127,0.6,0,0.5,1},{"75338648",-12.7,0,127,0.6,0,0.5,1},{"75338648",-5.7,0,127,0.5,0,0.5,1}}, -- Synth
{{"75338648",-24.7,0,90,0.5,0,0.1,1},{"75338648",-5.7,0,90,0.4,0,0.1,1},{"75338648",-0.7,0,90,0.5,0,0.1,1},
{"75338648",-24.7,91,127,0.25,0,0.1,1},{"75338648",-5.7,91,127,0.15,0,0.1,1},{"75338648",-0.7,91,127,0.25,0,0.1,1}}, -- Organ?
{{"75338648",-24.7,0,127,0.5,0,0.1,1},{"75338648",-0.7,0,127,0.4,0,0.1,1},{"75338648",11.4,0,127,0.5,0,0.1,1}}, -- Organ?
{{ping,-21.7,0,127,0.3,0,0.1},{ping,4.7,0,127,0.2,0,0.1},{ping,14.7,0,127,0.2,0,0.1}}, -- Xylaphone
{{ping,-21.7,0,127,0.5,0,0.25},{ping,14.4,0,127,0.2,0,0.25},{"13114759",6,0,127,0.2,0,0.25}}, -- Marimba
{{bass,23.8,0,127,0.5,0,0.5}}, -- 040 Bass (Quick Rel)
{{"55741744",2.8,54,127,0.5,0,0.5},{"55741275",13.8,0,53,0.5,0,0.5}}, -- Jaw Harp
{{"60871617",-13,0,127,0.5,0,0.5}}, -- Cat Meow
{{"56524816",-13.8,0,127,0.5,0,0.5}}, -- Wizard Wand Ding
{{"31173844",2,0,127,0.5}}, -- Synth Drum
{{"75421988",33.6,0,80,0.2,0.05,0.4,1},{"75421988",33.7,0,80,0.2,0.05,0.4,1},{"75338648",-24.7,81,127,0.5,0.05,0.4,1},{"75338648",-0.7,81,100,0.4,0.05,0.4,1},{"75338648",11.4,81,86,0.5,0.05,0.4,1}}, -- 038 Charge Synth Slow (More Smooth)
{{"57802055",-14,0,127,0.5,0,0.1},{"11949128",10,0,127,0.3,0,0.1}}, -- 062 Pluck
{{"99190550",7.6,0,127,0.3,0,0.1}}, -- 063 E Chug
{{"99170481",8,0,49,0.5,0,0.1},{"99170583",5.1,50,56,0.5,0,0.1},{"99190216",-4,57,66,0.5,0,0.1},{"99170403",-14,67,127,0.5,0,0.1}}, -- EGuitar 4
{{"99666917",2,0,127,0.5,0,0.1}}, -- Sacatto Organ
{{"13414749",-5,0,127,0.4,0,0.2,0},{"75338648",-24.7,0,127,0.5,0,0.1,1}}, -- Dr. Solo
{{"10209257",0,57,127,0.2,0,0,0},{"10209257",0,47,56,0.15,0,0,0},{"10209257",0,0,46,0.1,0,0,0}}, -- Gunshot
{{"106708146",20,0,127,0.4,0.1,0,1}}, -- Applause
{{"75338648",-24.7,0,127,1,0.5,0.1,1},{"75338648",-5.7,0,127,0.2,0.5,0.1,1},{"75338648",-12.7,0,127,0.15,0.5,0.1,1}}, -- Loop flute
{{"75338648",-24.7,0,127,0.7,0,0.1,1},{"75338648",23.8,0,127,0.01,0,0.1,1},{"75338648",-12.7,0,127,0.1,0,0,1}}, -- EPiano 1
{{"108553955",17.1,0,127,0.5,0,0,1},{"75338648",-24.7,46,127,0.4,0,0.1,1},{"75338648",-24.7,0,45,0.7,0,0.1,1}}, -- Whispery Bass Synth
{{"109618842",-24,70,127,0.4,0,0,0},{"109618754",-14,0,56,0.4,0,0,0},{"109618435",-18.8,66,69,0.4,0,0,0},{"109619047",-23,57,59,0.4,0,0,0},{"109618940",-11.9,60,65,0.4,0,0,0}}, -- Celtic Harp
{{"109618842",-24,86,127,0.4,0,0,0},{"109618754",-14,0,59,0.4,0,0,0},{"109618940",-11.9,60,85,0.4,0,0,0}}, -- Piano/Harp
{{"109618435",-18.8,0,127,0.6,0,0.1,0}}, -- Fake Guitar
{{"109619047",-23,0,127,0.4,0,0.1,0}}, -- Fake Guitar 2
}
local NotFound = {}
local Speed = 1
local Volume = 1
local NoteOffset = -2
local Playing = true
-- Gui to Lua
-- Version: 3.2
-- Instances:
local BillboardGui = Instance.new("BillboardGui")
local ImageLabel = Instance.new("ImageLabel")
local TextLabel = Instance.new("TextBox")
local TextLabel_2 = Instance.new("TextBox")
local bar = Instance.new("Frame")
local bar2 = Instance.new("Frame")
--Properties:
BillboardGui.Parent = owner.Character.Head
BillboardGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
BillboardGui.Active = true
BillboardGui.StudsOffset = Vector3.new(2, 2, 0)
BillboardGui.Size = UDim2.new(12, 0, 2.5, 0)
ImageLabel.Parent = BillboardGui
ImageLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
ImageLabel.BackgroundTransparency = 1.000
ImageLabel.Size = UDim2.new(0.200000003, 0, 1, 0)
ImageLabel.Image = "rbxassetid://470648206"
ImageLabel.ScaleType = Enum.ScaleType.Fit
TextLabel.Parent = BillboardGui
TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
TextLabel.BackgroundTransparency = 1.000
TextLabel.Position = UDim2.new(0.200000003, 0, 0.100000001, 0)
TextLabel.Size = UDim2.new(0.800000012, 0, 0.270000011, 0)
TextLabel.Font = Enum.Font.SourceSansBold
TextLabel.Text = SongName
TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
TextLabel.TextScaled = true
TextLabel.TextSize = 14.000
TextLabel.TextWrapped = true
TextLabel.TextXAlignment = Enum.TextXAlignment.Left
TextLabel_2.Parent = BillboardGui
TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
TextLabel_2.BackgroundTransparency = 1.000
TextLabel_2.Position = UDim2.new(0.200000003, 0, 0.349999994, 0)
TextLabel_2.Size = UDim2.new(0.800000012, 0, 0.100000001, 0)
TextLabel_2.Font = Enum.Font.SourceSansItalic
TextLabel_2.Text = Song
TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
TextLabel_2.TextScaled = true
TextLabel_2.TextSize = 14.000
TextLabel_2.TextWrapped = true
TextLabel_2.TextXAlignment = Enum.TextXAlignment.Left
bar.Name = "bar"
bar.Parent = BillboardGui
bar.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
bar.BorderSizePixel = 0
bar.Position = UDim2.new(0.200000003, 0, 0.649999976, 0)
bar.Size = UDim2.new(0.300000012, 0, 0.0599999987, 0)
bar2.Name = "bar2"
bar2.Parent = BillboardGui
bar2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
bar2.BorderSizePixel = 0
bar2.Position = UDim2.new(0.200000003, 0, 0.649999976, 0)
bar2.Size = UDim2.new(0, 0, 0.0599999987, 0)
bar2.ZIndex = 2
local SongID = 0
local Threads = {}
local Parts = {}
local VPart = Instance.new("Part")
VPart.CanCollide = false
VPart.Massless = true
VPart.Transparency = 1
VPart.Parent = script
local VWeld = Instance.new("Motor6D")
VWeld.Part0 = owner.Character.HumanoidRootPart
VWeld.Part1 = VPart
VWeld.Parent = VPart
local PlaybackLoudness = 0
local VRot = 0
local VRotValue = 0
local PlaybackRemote = Instance.new("RemoteEvent", owner.Character.Head)
PlaybackRemote.OnServerEvent:Connect(function(owner, PL)
PlaybackLoudness = PL
end)
NLS([[
local PL = 0
while true do
task.wait(1/30)
local PL = 0
local A = 0
for _, Child in next, script.Parent.Parent:GetChildren() do
if Child.Name == "SFX" then
Child.RollOffMaxDistance = math.huge
PL = PL + Child.PlaybackLoudness
A = A + 1
end
end
PL = PL / 2
if A > 0 then
script.Parent:FireServer(PL)
end
end
]], PlaybackRemote)
local LastAt
for i = 1, 50 do
local Part = Instance.new("Part")
Part.CanCollide = false
Part.Massless = true
Part.Transparency=1
Part.Material = Enum.Material.Neon
Part.Size = Vector3.new(0.3,0,1)
Part.CFrame = VPart.CFrame * CFrame.Angles(0, math.rad(360 * (i / 50)), 0) * CFrame.new(0,0,-5)
local Weld = Instance.new("Motor6D")
Weld.Part0 = VPart
Weld.Part1 = Part
Weld.C0 = Part.CFrame:ToObjectSpace(VPart.CFrame):Inverse() * CFrame.Angles(math.pi/2,0,0)
Weld.Parent = Part
Part.Parent = script
local Attach = Instance.new("Attachment")
Attach.Position = Vector3.new(0,0,-0.5)
Attach.CFrame = Attach.CFrame * CFrame.Angles(math.pi/2,0,0)
Attach.Parent = Part
if LastAt then
local Beam = Instance.new("Beam")
Beam.Attachment0 = Attach
Beam.Attachment1 = LastAt
Beam.FaceCamera = true
Beam.Width0 = 0.15
Beam.LightEmission = 1
Beam.Width1 = 0.15
Beam.Parent = Part
end
LastAt = Attach
table.insert(Parts, Part)
end
local Beam = Instance.new("Beam")
Beam.Attachment0 = Parts[1].Attachment
Beam.Attachment1 = Parts[#Parts].Attachment
Beam.FaceCamera = true
Beam.Width0 = 0.15
Beam.LightEmission = 1
Beam.Width1 = 0.15
Beam.Parent = Parts[1]
function Lerp(a, b, c)
return a + (b - a) * c
end
task.defer(function()
while true do
local DT = task.wait()
local A = 1 - (0.001 ^ DT)
VRotValue = Lerp(VRotValue, PlaybackLoudness / 70000, A * 2.5)
VRot = VRot + (DT / 15) + VRotValue
VWeld.C0 = CFrame.Angles(0, VRot, 0)
local Index = math.ceil((PlaybackLoudness / 30)%50 + 1)
for i, part in Parts do
if i == Index then
local V = (PlaybackLoudness / 100) * 2
part.Size = part.Size:Lerp(Vector3.new(0.3,0,1 + V),A * 2)
--part.Color = part.Color:Lerp(Color3.new(1,1,1):Lerp(Color3.new(1,1,1), math.clamp(V/2, 0, 1)), A)
else
--part.Color = part.Color:Lerp(Color3.new(0.4,0.4,0.4), A)
part.Size = part.Size:Lerp(Vector3.new(0.3,0,1), A)
end
part.Beam.CurveSize0 = part.Size.Z * 0.1
part.Beam.CurveSize1 = part.Size.Z * 0.1
part.Beam.Color = ColorSequence.new(Color3.fromHSV(((i / 50) + (VRot * 4))%1, 1, 1))
part.Attachment.Position = Vector3.new(0,0,-part.Size.Z/2)
part.Motor6D.C1 = CFrame.new(0, 0, (math.sin((VRot * 15) + (i * 0.8)) * 0.3))
end
end
end)
function PlayMIDI()
for _, Thread in Threads do
task.cancel(Thread)
end
SongID = SongID + 1
local CurrentId = SongID
local Length
local Duration = 0
task.spawn(function()
while CurrentId == SongID do
Duration = 0
for _, Track in MidiData.tracks do
local TrackInstrument = Track.instrument
local TrackNotes = Track.notes
local Instrument
for _, Base in Inst do
for _, T in Base do
if TrackInstrument.number >= T[3] and TrackInstrument.number <= T[4] then
Instrument = T
break
end
end
end
if not Instrument then
if TrackInstrument.number and not NotFound[TrackInstrument.number] then
NotFound[TrackInstrument.number] = true
--warn(TrackInstrument.number.." ("..TrackInstrument.name..") failed to load")
end
end
if Instrument then
local ExtraOffset = Instrument[2]
local InstrumentSound = Instrument[1]
table.insert(Threads, task.spawn(function()
for Index, Note in TrackNotes do
if Note.time > (Length or 0) then
Length = Note.time + Note.duration
end
table.insert(Threads, task.delay(Note.time, function()
local Vol = (Note.velocity * Volume)
local SFX = Instance.new("Sound")
SFX.SoundId = "rbxassetid://"..InstrumentSound
SFX.Volume = Vol * (0.6 + (Instrument[5] or 1))
SFX.PlaybackSpeed = notetopitch(Note.midi, NoteOffset + ExtraOffset)
SFX.Looped = true
SFX.RollOffMaxDistance = 55
SFX.Name = "SFX"
SFX.Playing = true
SFX.Parent = owner.Character.Head
Debris:AddItem(SFX, math.max(Note.duration,0.25))
end))
end
end))
end
end
task.wait(Length)
end
end)
task.spawn(function()
repeat task.wait() until Length ~= nil
while CurrentId == SongID do
local DT = task.wait()
Duration = Duration + DT
bar2.Size = UDim2.fromScale(0.3 * (Duration / Length),0.0599999987)
BillboardGui.Size = BillboardGui.Size:Lerp(UDim2.fromScale(12,2.5), 1 - (0.00001 ^ DT))
end
end)
task.spawn(function()
repeat task.wait() until Length ~= nil
local BPM = MidiData.header.tempos[1].bpm
for _, Tempo in MidiData.header.tempos do
task.delay(Tempo.ticks/100, function()
BPM = Tempo.bpm
end)
end
while CurrentId == SongID do
task.wait(60 / BPM)
BillboardGui.Size = UDim2.fromScale(12,2.7)
end
end)
end
owner.Chatted:Connect(function(m)
local Args = m:split("/")
if Args[1] == "midi" then
if Args[2] == "play" then
local New = Args[3]..".mid"
MidiData = HTTPService:JSONDecode(HTTPService:GetAsync("https://raw.githubusercontent.com/saturdayscandal/roblox/main/VSB/midi/"..New))
SongName = MidiData.header.songname or GetSongName(New)
Song = New
TextLabel.Text = SongName
TextLabel_2.Text = Song
PlayMIDI()
end
if Args[2] == "damping" then
UseDamping = Args[3] == "true" and true or false
end
if Args[2] == "vol" then
Volume = tonumber(Args[3])
end
if Args[2] == "get" then
for _, Str in AllSongs do
print(Str:sub(1, #Str - 4))
end
end
end
end)