So, everything is fine and I get the tool but when I die I lose the tool, please help.
SCRIPT:
local player = game.Players.LocalPlayer
local rs = game:GetService("ReplicatedStorage")
local tool = rs:WaitForChild("Sword")
local stats = player:WaitForChild("leaderstats")
local button = script.Parent
cost = 100
script.Parent.MouseButton1Click:Connect(function()
if stats.Cash.Value >= cost then
button.Text = 'ItemOwned'
stats.Cash.Value = stats.Cash.Value - cost
local clone = tool:Clone()
clone.Parent = player.Backpack
local clone2 = tool:Clone()
clone2.Parent = player.StarterGear
else
button.Text = 'Need More Cash!'
wait(1)
button.Text = 'Buy Sword - $100'
end
end)

3 comments
Tis is the magic of using gamepasses.
See if it’s actually getting parented to StarterGear, run a Print, I wouldn’t clone the tool again, I’d clone the clone but that’s just me.
holy jesus a chicken can indent better then you