function onClick()
game.Lighting["Card"]:Clone().Parent = game.Players.LocalPlayer.StarterGear
game.Lighting["Card"]:Clone().Parent = game.Players.LocalPlayer.Backpack
end
script.Parent.MouseButton1Click:connect(onClick)
It is a SurfaceGui TextButton script.

3 comments
LocalPlayer can ONLY be used in a LocalScript.
I put it in LocalScript, but it won't work.
LocalScripts will only work in a player's character, backpack, playergui, or playerscripts. You would need to modify your code to find the SurfaceGui.