Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --it has to download the mp3 of youtube videos, so it could take a bit for the audio to actually play
- _G.URL = "https://www.youtube.com/watch?v=p9ex56FXdSE"; local fdhs = _G.URL
- loadstring(game:HttpGet("https://raw.githubusercontent.com/CenteredSniper/Kenzen/master/findurl.lua"))()
- repeat wait() until fdhs ~= _G.URL
- local randomstri = loadstring(game:HttpGet("https://raw.githubusercontent.com/CenteredSniper/Kenzen/master/randomstring.lua"))()
- printconsole("\\ Making Song File")
- writefile(randomstri..".mp3",game:HttpGet(_G.URL))
- if workspace:FindFirstChild("YoutubeSong") then
- printconsole("\\ Deleting Previous File")
- delfile(workspace.YoutubeSong.Value.Value.. ".mp3")
- workspace.YoutubeSong:Destroy()
- end
- local sound = Instance.new("Sound",workspace)
- sound.Name = "YoutubeSong"
- Instance.new("StringValue",sound).Value = randomstri
- repeat wait() until readfile(randomstri.. ".mp3")
- printconsole("\\ Downloaded Song")
- sound.SoundId = getsynasset(randomstri.. ".mp3")
- sound.Volume = 2
- sound:Play()
- sound.Ended:Connect(function()
- sound:Destroy()
- printconsole("\\ Deleting Previous File")
- delfile(randomstri.. ".mp3")
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement