So i got help a bit with the following script.
game:GetService("Players").PlayerAdded:Connect(function(Player)
local MarketPlaceService = game:GetService("MarketplaceService")
local GamepassID = 5761882 -- Put your gamepass ID
if MarketPlaceService:UserOwnsGamePassAsync(Player.UserId, GamepassID) == false then -- If player does not own the gamepass
Player:Kick("Car Slot Game Pass is Mandatory") -- Kick the player with the specified reason.
end
end)
but when i put it into a script in the workplace and open the game to new servers it still lets people without the game-pass enter.

1 comment
Your script needs to be a normal script not a local script