I am trying to make a shop similar to Slap Battles.
I have the purchasing down, but I am trying to figure out how to make it save, and to make the prompt turn into an Equip
instead of Purchase
.
Here’s a basic script that is in the workspace, under a pedestal part, I have 24 of these so it might take some time to change them lol
script.Parent.Triggered:Connect(function(plr)
local points = plr.leaderstats.points
if points.Value >= 50 then
points.Value = points.Value - 50
local storage = game:GetService("ServerStorage")
for _, tool in pairs(plr.Backpack:GetChildren()) do
if tool:IsA("Tool") then
tool:Destroy()
end
end
for _, tool in pairs(plr.StarterGear:GetChildren()) do
if tool:IsA("Tool") then
tool:Destroy()
end
end
storage["Weapon"]:Clone().Parent = plr.Backpack
storage["Weapon"]:Clone().Parent = plr.StarterGear
end
end)
I’m sorry I’ve been making so many posts recently I am just trying to figure many things out.