local MarketplaceService = game:GetService("MarketplaceService") local Players = game:GetService("Players") local Racer = script.Parent.Parent.Workspace["Pod Racer 1"]
local gamePassID = 8328613 -- Change this to your game pass ID local function onPlayerAdded(player)
local hasPass = false
-- Check if the player already owns the game pass local success, message = pcall(function() hasPass = MarketplaceService:UserOwnsGamePassAsync(player.UserId, gamePassID) end)
-- If there's an error, issue a warning and exit the function if not success then warn("Error while checking if player has pass: " .. tostring(message)) return end
if hasPass == true then print(player.Name .. " owns the game pass with ID " .. gamePassID) -- Assign this player the ability or bonus related to the game pass
end end
-- Connect "PlayerAdded" events to the "onPlayerAdded()" function Players.PlayerAdded:Connect(onPlayerAdded)
This is the script to check if they have the gamepass but I don't know how to allow them to use the vehicle if they have it, and how to kick them out if they don't have it.

1 comment
stolen script and code block pls