Hello, I have a testing script that is supposed to prompt you with a marketplaceservice prompt then you can drive it. But it doesnt work. My friend could drive the car just fine without the gamepass.
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local gamePassID = 10098895 -- 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 == false then
print(player.Name .. " does not own the game pass with ID " .. gamePassID)
script.Parent.ClickDetector.MouseClick:connect(function(player)
MarketplaceService:PromptPurchase(game.Players.LocalPlayer, 10098895)
end)
end
if hasPass == true then
print(player.Name .. " owns the game pass with ID " .. gamePassID)
local speed = game.Workspace.Values.ElectricPower
local tuneindicator = script.Parent.Electric_shock
script.Parent.ClickDetector.MouseClick:connect(function(player)
workspace.P406.Shell.Velocity = workspace.P406.Shell.CFrame.LookVector * speed.Value
if speed.Value > 100 then
tuneindicator:Play()
end
end)
end
end
-- Connect "PlayerAdded" events to the "onPlayerAdded()" function
Players.PlayerAdded:Connect(onPlayerAdded)

2 comments
no, i wanted to help you
Nice. :PP