#gamepass only shirt
1 messages · Page 1 of 1 (latest)
ServerScriptService will have ShirtGamepassScript
but i don't know how to code it
also gamepass doors are exploitable i aint doing that
local MarketPlaceService = game:GetService("MarketplaceService")
local GamepassID = 1317920454
local ItemName = "M4A1"
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
if MarketPlaceService:UserOwnsGamePassAsync(player.UserId, GamepassID) then
script[ItemName]:Clone().Parent = player.Backpack
end
end)
end)```
** i made this script before but how do i change it to a hat and shirt and pants?**
you’re using script[ItemName]:Clone().Parent = player.Backpack
which works for tools or items stored in the StarterPack or as children of the script. But shirts and pants aren’t tools, so you need to create Shirt and Pants instances, set their template IDs, and parent them directly to the player’s Character, not the Backpack. Hats are Accessory objects that you clone and parent to the player’s Character as well
any type of code can i do?
i don't know nothin about those
i only know how to script items and other stuff
Oh
By shirt you mean like 2d flat shirt
ye
You have the shirt instance stored somewhere?
id?
Uh sure
i got ts
Alright give it rq
rbxassetid://1455700959 shirt
rbxassetid://1455701461 pant
u want gamepass id?
k
1317920454
One sec
k
** You are now Level 8! **
local Players = game:GetService("Players")
local MarketPlaceService = game:GetService("MarketplaceService")
local GamepassID = 1317920454
local ShirtID = "rbxassetid://1455700959"
local PantID = "rbxassetid://1455701461"
Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
if MarketPlaceService:UserOwnsGamePassAsync(Player.UserId, GamepassID) then
for _, Clothing in Character:GetChildren() do
if Clothing:IsA("Shirt") or Clothing:IsA("Pants")
Clothing:Destroy()
end
end
local Shirt = Instance.new("Shirt")
Shirt.ShirtTemplate = ShirtID
Shirt.Parent = Character
local Pants = Instance.new("Pants")
Pants.PantsTemplate = PantID
Pants.Parent = Character
end
end)
end)
@patent jewel
Lmk if any errors
aight
I typed on mobile so yh
Open
and i do have the gamepass
Its not there?
the shirt gamepass and the gun gamepass are the same gamepass
not there
im trying to make a swat gamepass
the gun is working
but the shirts ain
aint*
yo error!
ServerScriptService.ShirtGamepass:13: Expected 'then' when parsing if statement, got 'Clothing' -
shirtgamepass is the script u gave me
local Players = game:GetService("Players")
local MarketPlaceService = game:GetService("MarketplaceService")
local GamepassID = 1317920454
local ShirtID = "rbxassetid://1455700959"
local PantID = "rbxassetid://1455701461"
Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
if MarketPlaceService:UserOwnsGamePassAsync(Player.UserId, GamepassID) then
for _, Clothing in Character:GetChildren() do
if Clothing:IsA("Shirt") or Clothing:IsA("Pants") then
Clothing:Destroy()
end
end
local Shirt = Instance.new("Shirt")
Shirt.ShirtTemplate = ShirtID
Shirt.Parent = Character
local Pants = Instance.new("Pants")
Pants.PantsTemplate = PantID
Pants.Parent = Character
end
end)
end)
Try
yo guess what
it worked!
tysm brotha
luv u
also
if u are avaible
is it possible to make a hat too?
or nvm
i dont need
but
ty bro again!