This script is a local script thats inside a local script thats inside a gui. The script is testing if you have a sword if its true then it will disable the shop script so it you can't buy it twice.
while true do
wait(0.01)
if game.Players.LocalPlayer.BackPack.LongSword == nil or game.Players.LocalPlayer.Character.LongSword == nil then
script.Parent.Disabled = true
script.Parent.Parent.Text = "Own"
end
end

1 comment
You cannot wait 1/100th of a second. I suggest removing line 2 and changing line 1 to "while wait() do"