Hello, good morning! So I was creating a Jetski spawn, but with a gamepass system! I won’t place some walls that require you to buy the gamepass, because if someone leaves the game someone else could take the Jetski. I want it to do this:
When I get on the Jetski, the script should execute and check if I own the gamepass, if I don’t the jetski shouldn’t move.
You could use this, but I don’t really know how to help ya with the Jetski moving or not moving part:
-- CONFIGS
GamepassId = 0000; -- change to whatever Id
-- VARS
local Player = game:GetService("Players").LocalPlayer
local MarketPlaceService = game:GetService("MarketPlaceService")
-- CODE
game.Players.PlayerAdded:Connect(function(Player))
if MarketPlaceService:UserOwnsGamePassAsync(Player.UserId, GamepassId ) then
print("User owns Gamepass { "..GamepassId.." } and can use the Jetski!")
end
end)