It only gives the normal sword and if you own a gamepass it doesnt give you the sword
local ServerStorage=game.ServerStorage local idA=1122 local idB=645646 local idC=615165 local service=game:GetService("MarketplaceService") for i, plr in pairs(plrs) do if plr then character = plr.Character if character then character:FindFirstChild("HumanoidRootPart").CFrame = AvailableSpawnPoints[1].CFrame + Vector3.new(0,10,0) table.remove(AvailableSpawnPoints,1) local havesword=false if service:UserOwnsGamePassAsync(plr.UserId, idA) then --pass stuff local TrailSword = ServerStorage.TrailSword:Clone() TrailSword.Parent = plr.Backpack --by puting it in back pack the player will always have it even when the respawn havesword=true --if sword end if service:UserOwnsGamePassAsync(plr.UserId, idB) then local Boombox = ServerStorage.Boombox:Clone() Boombox.Parent = plr.Backpack end if service:UserOwnsGamePassAsync(plr.UserId, idC) then local BurningSword = ServerStorage.BurningSword:Clone() BurningSword.Parent = plr.Backpack havesword=true --if sword end if havesword==false then local Sword = ServerStorage.Sword:Clone() Sword.Parent = plr.Backpack local GameTag = Instance.new("BoolValue") GameTag.Name = "GameTag" GameTag.Parent = plr.Character end else if not plr then table.remove(plrs,i) end end end end
plrs
is not defined, so an error should be being generated. If not, that implies that the script isn't running at all. Make sure it's a normal Script in the Workspace/ServerScriptService (as documented here: https://developer.roblox.com/en-us/api-reference/class/Script)
Even if you define plrs
, your code doesn't connect to any events, so it will only check for players that are in the server when the server starts. Use https://developer.roblox.com/en-us/api-reference/event/Players/PlayerAdded instead so that you can check each player as they enter the server.
I think one issue may be with the way you've used clone(), maybe try defining each gear like you have, but cut off the clone() part at the end. Then try doing (for example, the line after you have defined TrailSword): Trailsword:Clone(), then the line below as you have done, Trailsword.Parent = plr.backpack.
Let me know if this has any effect!