Cash = script.Parent.Parent.Parent.Parent.Parent.leaderstats.Coins
mcost = script.Parent.Cost.Value
function onClick()
if Cash.Value >= mcost then
Cash.Value = Cash.Value - mcost
game.Players.LocalPlayer.Character.Humanoid.MaxHealth = 150
end
end
script.Parent.MouseButton1Click:connect(onClick)
it works with subtracting the amount of cash it cost but it's not changing the maxhealth to 150

1 comment
thank you my friend made the script for a sword shop so I just copied and pasted it for a armor shop I would've done otherwise