Advertisement
_Thanh_Thy_Cute_

PLAY YOUTUBE MUSIC INSIDE ROBLOX - CLIENT SIDED

Sep 22nd, 2021
372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. --it has to download the mp3 of youtube videos, so it could take a bit for the audio to actually play
  2. _G.URL = "https://www.youtube.com/watch?v=p9ex56FXdSE"; local fdhs = _G.URL
  3.  
  4. loadstring(game:HttpGet("https://raw.githubusercontent.com/CenteredSniper/Kenzen/master/findurl.lua"))()
  5. repeat wait() until fdhs ~= _G.URL
  6. local randomstri = loadstring(game:HttpGet("https://raw.githubusercontent.com/CenteredSniper/Kenzen/master/randomstring.lua"))()
  7. printconsole("\\ Making Song File")
  8. writefile(randomstri..".mp3",game:HttpGet(_G.URL))
  9. if workspace:FindFirstChild("YoutubeSong") then
  10. printconsole("\\ Deleting Previous File")
  11. delfile(workspace.YoutubeSong.Value.Value.. ".mp3")
  12. workspace.YoutubeSong:Destroy()
  13. end
  14. local sound = Instance.new("Sound",workspace)
  15. sound.Name = "YoutubeSong"
  16. Instance.new("StringValue",sound).Value = randomstri
  17. repeat wait() until readfile(randomstri.. ".mp3")
  18. printconsole("\\ Downloaded Song")
  19. sound.SoundId = getsynasset(randomstri.. ".mp3")
  20. sound.Volume = 2
  21. sound:Play()
  22. sound.Ended:Connect(function()
  23. sound:Destroy()
  24. printconsole("\\ Deleting Previous File")
  25. delfile(randomstri.. ".mp3")
  26. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement