script.Parent.MouseButton1Click:connect(function()
if game.Players.LocalPlayer.leaderstats.Money.Value == 650 or game.Players.LocalPlayer.leaderstats.Money.Value > 650 then
if game.Players.LocalPlayer.Backpack:FindFirstChild("Heal Spell") == nil then
game.Players.LocalPlayer.leaderstats.Money.Value = game.Players.LocalPlayer.leaderstats.Money.Value - 650
local c = game.ServerStorage["Heal Spell"]:Clone()
c.Parent = game.Players.LocalPlayer.Backpack
end
end
end)
This script is supposed to clone you a heal spell if you have enough money, and if you don't already own it. The problem is it only works in studio. This is a localscript inside a Textbutton.

1 comment
Try putting this in replicated storage, then cloning it from there.