#gamepass only shirt

1 messages · Page 1 of 1 (latest)

patent jewel
#

dumb question but i don't know how to make this for my game. Basically there will be a classic shirt and a classic pant that is automaticly equipped when you own the gamepass.

#

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?**
long cedar
# patent jewel ```local Players = game:GetService("Players") local MarketPlaceService = game:Ge...

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

patent jewel
#

any type of code can i do?

#

i don't know nothin about those

#

i only know how to script items and other stuff

west harness
#

Oh

patent jewel
#

well

#

a code u got?

west harness
#

By shirt you mean like 2d flat shirt

patent jewel
#

ye

west harness
#

You have the shirt instance stored somewhere?

patent jewel
#

id?

west harness
#

Uh sure

patent jewel
#

i got ts

west harness
#

Alright give it rq

patent jewel
#

rbxassetid://1455700959 shirt

#

rbxassetid://1455701461 pant

#

u want gamepass id?

#

k

#

1317920454

west harness
#

One sec

patent jewel
#

k

real ironBOT
#

studio** You are now Level 8! **studio

west harness
#
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

patent jewel
#

aight

west harness
#

I typed on mobile so yh

patent jewel
#

np

#

i get u

#

also

#

this wont be exploitable right

west harness
#

Gamepass checking on server side

patent jewel
#

yo

#

didnt work

#

no errors

west harness
#

Isn't exploitable

#

Do you have the GP?

patent jewel
#

yea

#

im in studiio

west harness
#

Open

patent jewel
#

and i do have the gamepass

west harness
#

Workspace

#

Check your character

#

And tell me if there's clothing inside it

patent jewel
#

i also have the gun that is given when you have the same gamepass

#

nope

west harness
#

Its not there?

patent jewel
#

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

west harness
#

Ok good thing there's an error lol

#

Ok lemem fix

patent jewel
#

ye lel

#

k

west harness
#
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

patent jewel
#

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!

west harness
#

✌️

#

Goodluck on your game

patent jewel