I have tried to make a GUI button that gives you an item when you click on it, works pretty well, until I noticed that the ClassicSword or LinkedSword does not function properly after cloning it. Basically, you can only hold the sword, and it does nothing else.
Here is my giver script:
local p = game.Players.LocalPlayer script.Parent.MouseButton1Click:connect (function() local tool = script.Parent.LinkedSword:clone() tool.Parent = p.Backpack end)
In the ReplicatedStorage insert a RemoteEvent and your sword. Next, insert a Script inside of the ServerScriptService and in it type the following code.
local event = game.ReplicatedStorage.RemoteEvent event.OnServerEvent:Connect(function(player) game.ReplicatedStorage.ClassicSword:Clone().Parent = player.Backpack end)
Inside your button insert a LocalScript and in it type the following code.
local event = game.ReplicatedStorage.RemoteEvent script.Parent.MouseButton1Click:Connect(function() event:FireServer() end)