Heres the script that is in the button to activate the script in ServerScriptService:
script.Parent.MouseButton1Click:connect(function()
game.ReplicatedStorage.EquipEvents.Equip1:FireServer()
end)
Then heres the script that gives it to you in ServerScriptService:
game.ReplicatedStorage.EquipEvents.Equip1.OnServerEvent:connect(function(player)
local char = player.Character
local item = game.ReplicatedStorage.Items:FindFirstChild("Pizza")
if player.leaderstats.Pounds.Value >= 25 then
if not player.Backpack:FindFirstChild("Pizza" ) then
if not char:FindFirstChild("Pizza") then
item:Clone().Parent = player.Backpack
end
end
end
end)
