Text not changing and you cannot receive sword

You know what i will make it easier for you but you have to know that you need to change the name of the ScreenGui

local Shop =  script.Parent.Parent.Parent
local player = game.Players.LocalPlayer
local stats = player:WaitForChild("leaderstats")
local button = Shop.Shop.Sword1
local Kills = stats.Kills
Kills.Changed:Connect(function()
if Kills.Value >= 5 then
         Shop.Shop.Sword1.Text = "Equip"
button.MouseButton1Click:Connect(function()
       game.ReplicatedStorage.GetSword:FireServer("AzureSword", script.Parent)
end)
end
end)
-- to check once the player enters 
if Kills.Value >= 5 then
         Shop.Shop.Sword1.Text = "Equip"
button.MouseButton1Click:Connect(function()
       game.ReplicatedStorage.GetSword:FireServer("AzureSword", script.Parent)
end)
end

You dont need to change the name with this one but the reason the others werent working was you didnt change the name of the screengui

Make a local script and paste this code

local Shop =  game.Players.LocalPlayer.PlayerGui:WaitForChild("Shop")
local player = game.Players.LocalPlayer
local stats = player:WaitForChild("leaderstats")
local button = Shop.Shop.Sword1
local Kills = stats.Kills
local RemoteFunction = game.ReplicatedStorage.RemoteFunction

button.MouseButton1Click:Connect(function()
	game.ReplicatedStorage.RemoteFunction:InvokeServer(Kills)
	
	if RemoteFunction == true then
		game.ReplicatedStorage.GetSword:FireServer("AzureSword", script.Parent)
	else
		return false
	end
end)

then make a remote function in replicated storage

then paste the server code

game.ReplicatedStorage.RemoteFunction.OnServerInvoke = function(plr, Kills)
	if Kills.Value >= 5 then
		return true
	else
		return false
	end
end

so exploiters cant exploit the system

Oh you didn’t have to… I already marked your post as the solution

So Did it Work and if it didn’t show me what happens

It did work! Thank you! (30 chars)

No Problem Happy To Help (30 Chars)