factory = game.Lighting
local ting = 0
Upgradecost = script.Parent.Parent.Value.Value
local shirt = "http://www.roblox.com/asset/?id=161319468"
function onTouched(hit)
if ting == 0 then
ting = 1
local h = hit.Parent:FindFirstChild("Humanoid")
local stats = game.Players:GetPlayerFromCharacter(hit.Parent):FindFirstChild("leaderstats")
if h ~= nil then
if hit.Parent:FindFirstChild("Shirt Graphic") ~= nil then
if hit.Parent:FindFirstChild("Shirt Graphic").Graphic == shirt then
local cash = stats:FindFirstChild("Money")
if cash.Value > (Upgradecost-1) then
car = factory.Car1:Clone()
car.Parent = game.Workspace
car:MakeJoints()
ting = 0
end
end
end
end
end
end
script.Parent.Touched:connect(onTouched)
is there a way i could change this script so that the players dont have to wear the VIP shirt to buy this car. so basically if they own this VIP shirt they dont have to wear it in the game to buy the car. please help me. Thank you!

5 comments
Use a gamepass if you want the car to cost, not a shirt graphic.
Use PlayerOwnsAsset of MarketplaceService
m39 is there an artical on roblox wiki about playerownasset?
@MHaven1 http://wiki.roblox.com/index.php?title=Game_pass#Giving_the_Game_Pass_an_effect
ty i dont it. thank you @M39a9am3R