local plr = game.Players.LocalPlayer
local leader = plr.leaderstats.Kills
local price = script.Parent.Cost.Value
local tool = game.Lighting.Sword
function buy()
if leader.Value >= price then
leader.Value = leader.Value - price
local a = tool:Clone()
a.Parent = plr.Backpack
local b = tool:Clone()
b.Parent = plr.StarterGear
end
end
script.Parent.MouseButton1Click:Connect(buy)
I did a leaderstats shop but it doesn’t work and it gives this error: Players.Leone984.PlayerGui.ScreenGui.Frame.TextButton.LocalScript:7: Expected ‘then’ when parsing if statement got ‘=’ and I don’t know how to fix it. Could you help me? Thank you.