Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a gamepass car?

Asked by 9 years ago

Like to where when somebody doesnt have a gamepass and it ends up kicking them out. Or killing them. I need a fast answer.

2 answers

Log in to vote
0
Answered by 9 years ago

This isn't an ask and get service... However, this should do the trick.

local PassID = --Insert Gamepass ID here 


local seat = script.Parent
function auth(plr)
return game:GetService("GamePassService"):PlayerHasPass(plr, PassID)
end 
function OnTouched(hit)
if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
if  auth(game.Players:GetPlayerFromCharacter(hit.Parent)) then
seat.Transparency = 0
else hit.Parent.Health = 0 -- Feel free to change it to make the player jump instead.
end end end
seat.Touched:connect(OnTouched)

Basically, this is JUST like a Gamepass VIP door.

If the user has the gamepass, they can drive. Otherwise they will be killed. This script goes into the drivers seat.

Feel free to change the kill line to a jump if you don't want then killed.

0
I know this is old, but will this still work if “GamePassService” is changed to the “MarketPlaceService”? ABK2017 406 — 5y
Ad
Log in to vote
0
Answered by 4 years ago

It does not work.

Answer this question