I'm working on a script for dj's to play music but i have no idea how to add a custom check to it and if there is anything wrong with the script, please let me know.
UnrefinedRank = player:GetRankInGroup(GroupId) set['Prefix'] = "-" if a=='Prefix' then local orig=set.Prefix set[a]=b for i,v in pairs(set.Commands) do if v.Prefix==orig then v.Prefix=set.Prefix end set.ScriptMusicList={ {n='heybrother',id=143786134}; {n='loseyourself',id=153480949}; {n='diamonds',id=142533681}; {n='happy',id=146952916}; {n='clinteastwood',id=148649589}; {n='freedom',id=130760592}; {n='seatbelt',id=135625718}; {n='tempest',id=135554032}; {n="focus",id=136786547}; {n="azylio",id=137603138}; {n="caramell",id=2303479}; {n="epic",id=27697743}; {n="rick",id=2027611}; {n="crystallize",id=143929751}; {n="halo",id=1034065}; {n="pokemon",id=1372261}; {n="cursed",id=1372257}; {n="extreme",id=11420933}; {n="harlemshake",id=142468820}; {n="tacos",id=142295308}; {n="wakemeup",id=147632133}; {n="awaken",id=27697277}; {n="alone",id=27697392}; {n="mario",id=1280470}; {n="choir",id=1372258}; {n="chrono",id=1280463}; {n="dotr",id=11420922}; {n="entertain",id=27697267}; {n="fantasy",id=1280473}; {n="final",id=1280414}; {n="emblem",id=1372259}; {n="flight",id=27697719}; {n="banjo",id=27697298}; {n="gothic",id=27697743}; {n="hiphop",id=27697735}; {n="intro",id=27697707}; {n="mule",id=1077604}; {n="film",id=27697713}; {n="nezz",id=8610025}; {n="angel",id=1372260}; {n="resist",id=27697234}; {n="schala",id=5985787}; {n="organ",id=11231513}; {n="tunnel",id=9650822}; {n="spanish",id=5982975}; {n="venom",id=1372262}; {n="wind",id=1015394}; {n="guitar",id=5986151}; {n="selfie1",id=148321914}; {n="selfie2",id=151029303}; {n="fareast",id=148999977}; {n="ontopoftheworld",id=142838705}; {n="mashup",id=143994035}; {n="getlucky",id=142677206}; {n="dragonborn",id=150015506}; {n="craveyou",id=142397454}; {n="weapon",id=142400410}; {n="derezzed",id=142402620}; {n="burn",id=142594142}; {n="workhardplayhard",id=144721295}; {n="royals",id=144662895}; {n="pompeii",id=144635805}; {n="powerglove",id=152324067}; {n="pompeiiremix",id=153519026}; {n="sceptics",id=153251489}; {n="pianoremix",id=142407859}; {n="antidote",id=145579822}; {n="takeawalk",id=142473248}; {n="countingstars",id=142282722}; {n="turndownforwhat",id=143959455}; {n="overtime",id=145111795}; {n="fluffyunicorns",id=141444871}; {n="gaspedal",id=142489916}; {n="bangarang",id=142291921}; {n="talkdirty",id=148952593}; {n="bad",id=155444244}; {n="demons",id=142282614}; {n="roar",id=148728760}; {n="letitgo",id=142343490}; {n="finalcountdown",id=142859512}; {n="tsunami",id=152775066}; {n="animals",id=142370129}; {n="partysignals",id=155779549}; {n="finalcountdownremix",id=145162750}; {n="mambo",id=144018440}; {n="stereolove",id=142318819}; {n='minecraftorchestral',id=148900687}} coroutine.wrap(function() for i,v in pairs(set.ScriptMusicList) do table.insert(set['MusicList'],{Name=v.n,Id=v.id}) end end)() set.MakeCommand('Start Music',2,set.Prefix,{'music','song','playsong'},{'id'},1,function(plr,args) coroutine.wrap(function() for i, v in pairs(game.Workspace:children()) do if v:IsA("Sound") then v:Destroy() end end local id = args[1]:lower() local pitch = 1 local mp = game:service('MarketplaceService') local volume = 1 for i,v in pairs(set['MusicList']) do if id==v.Name:lower() then id=v.Id end if v.Pitch then pitch=v.Pitch end if v.Volume then volume=v.Volume end end local name = 'Invalid ID ' pcall(function() if mp:GetProductInfo(id).AssetTypeId==3 then name = 'Now playing '..mp:GetProductInfo(id).Name end end) local s = Instance.new("Sound", game.Workspace) s.SoundId = "http://www.roblox.com/asset/?id=" .. id s.Volume = volume s.Pitch = pitch s.Looped = true s.archivable = false pcall(function() s:Play()end) set.Hint(name..' ('..id..')',game.Players:children()) end)() end) set.MakeCommand('Stop Music',2,set.Prefix,{'stopmusic','musicoff'},{},0,function(plr,args) for i, v in pairs(game.Workspace:children()) do if v:IsA("Sound") then v:Destroy() end end end) set.MakeCommand('Music List',2,set.Prefix,{'musiclist','listmusic','songs'},{},0,function(plr,args) local listforclient={} for i, v in pairs(set['MusicList']) do table.insert(listforclient,v.Name) end set.Remote(plr,'SetSetting','MusicList',listforclient) set.Remote(plr,'Function','ListGui','Music List','MusicList') end)