Hello! I am struggling with attempting to make a gamepass that grants VIP commands in Kohl’s Admin to anyone who buys it.
HD Admin is easier to make an admin gamepass for, but it is not suitable what-so-ever for the game I am adding it into (Megalodon Survival). Kohl’s Admin is trickier but I would think someone here would know what to do. I am not a good programmer, so do not expect me to be able to write out any code that you give me. Please provide me with exact lines and where it needs to go if you are able to find a solution for me.
YouTube tutorials on this exact topic are outdated and one of my friends who can code hasn’t tampered with this kind of stuff before.
Please comment if you have any questions for me. I hope you can help.
You can do this by firing a bindableevent in ServerScriptService.
My method is checking if the user owns the Id, and if they do, it will fire the remote with their user Id and the VIP rank (1)
local players = game:GetService('Players') -- Incase you change the name of players.
local marketPlace = game:GetService('MarketplaceService') -- game.MarketPlaceService is weird
local serverScripts = game:GetService("ServerScriptService") -- Incase you change the name of serverscriptservice
local id = 12711446 -- your id here
players.PlayerAdded:Connect(function(plr)
if marketPlace:UserOwnsGamePassAsync(plr.UserId,id) then -- checks if they own the gamepass
serverScripts.setPower:Fire(plr.UserId, 1)
end
end)