Heres the code since the vid was a bit blury.

local price = script.Parent.Parent.Price local tools = game.ReplicatedStorage:WaitForChild("Tools") local tool = script.Parent.Parent.ItemName local player = script.Parent.Parent.Parent.Parent.Parent.Parent

local function GiveTool() local ToolName = script.Parent.Parent.ItemName local ToolName1 = game.ReplicatedStorage.Tools local SearchTool = ToolName1:FindFirstChild(ToolName.Value) local clonedTool = SearchTool:Clone() clonedTool.Parent = player.Backpack end

script.Parent.MouseButton1Click:connect(function() if player.leaderstats:FindFirstChild("ObbyBucks<|>").Value >= price.Value then --your Currency player.leaderstats:FindFirstChild("ObbyBucks<|>").Value = player.leaderstats:FindFirstChild("ObbyBucks<|>").Value - price.Value GiveTool() end end)

2 comments

0

why do u think u can just say "while do:"

0

Ah the new developer duo, toolbox open and output closed.