Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- [FE] Simple Music Player
- LPlayer = game:GetService('Players').LocalPlayer
- function PlaySound(id)
- local b = Instance.new('Sound', workspace)
- b.SoundId = 'rbxassetid://' .. id
- b:Play()
- repeat wait(1)
- until
- LPlayer.Chatted:Wait() == ":stop"
- b:Stop()
- b:Destroy()
- end
- LPlayer.Chatted:connect(function(msg)
- if msg:sub(1,6) == ":find " then
- local b = game:HttpGet("https://search.roblox.com/catalog/json?SortType=Relevance&ResultsPerPage=1&Category=Audio&Keyword=" .. msg:sub(7) .. "/", true)
- local a = b:match('Id"+%S+,'):match('%d+')
- PlaySound(a)
- end
- end)
Add Comment
Please, Sign In to add comment