Why does this not prompt people that do not have the gamepass or are not in the admin list?
SubmitSound.MouseButton1Click:Connect(function()
for i, v in pairs(game.ReplicatedStorage.Admins:GetChildren()) do
if player.UserId == v.Value then
local userInputText = MusicId.Text
if userInputText then
local fullID = "http://www.roblox.com/asset/?id="..userInputText
print(fullID)
repStor.ChangeBoothInfo:FireServer("ChangeMusic", fullID)
end
end
if not player.UserId == v.Value and game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, 27351930) then
local userInputText = MusicId.Text
if userInputText then
local fullID = "http://www.roblox.com/asset/?id="..userInputText
print(fullID)
repStor.ChangeBoothInfo:FireServer("ChangeMusic", fullID)
end
else
if not player.UserId == v.Value and not game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, 27351930) then
game:GetService("MarketplaceService"):PromptGamePassPurchase(player,27351930)
end
end
end
end)