--Script Created by CarloMagnificient

local songs = script.Parent
local tablee = {}
local lastsong = nil
 
for i,v in pairs(songs:GetChildren()) do
    if v:IsA("Sound") then
        table.insert(tablee,v)
    end
end
 
while true do
    for a,c in pairs(tablee) do
        local chosensong = tablee[math.random(1,#tablee)]
        repeat wait() chosensong = tablee[math.random(1,#tablee)] until chosensong ~= lastsong
        lastsong = chosensong
        chosensong:Play()
        chosensong.Ended:Wait()
        chosensong:Stop()
    end
    wait()
end
