------------------------DO NOT EDIT------------------------

local click = Instance.new("ClickDetector", script.Parent)
local g = Instance.new("BillboardGui", script.Parent)
g.Size = UDim2.new(4, 0, 2, 0)
g.AlwaysOnTop = true
local c = Instance.new("TextLabel", script.Parent:WaitForChild("BillboardGui"))
c.BackgroundColor3 = Color3.new(255, 255, 255)
c.BorderColor3 = Color3.new(27, 42, 53)
c.Size = UDim2.new(1, 0, 1, 0)
c.Font = "Cartoon"
c.Text = "buy "..ITEM_NAME.." for "..ITEM_PRICE.." cash"
c.TextScaled = true
c.TextStrokeTransparency = 0
c.TextColor3 = Color3.new(255, 255, 255)
c.BackgroundTransparency = 1
c.Visible = false
local s = Instance.new("Sound", script)
s.Name = "cash"
s.SoundId = "rbxassetid://4525871712"
s.Volume = 1
script.Parent.ClickDetector.MouseHoverEnter:Connect(function()
	script.Parent.BillboardGui.TextLabel.Visible = true
end)
script.Parent.ClickDetector.MouseHoverLeave:Connect(function()
	script.Parent.BillboardGui.TextLabel.Visible = false
end)
script.Parent.ClickDetector.MouseClick:Connect(function(p)
	local plr = p
	if game.Players:FindFirstChild(p.Name).leaderstats:FindFirstChild(CURRENCY_NAME).Value >= ITEM_PRICE then
		script.cash:Play()
		local ppa = game.Players:FindFirstChild(p.Name)
		ppa.leaderstats.Cash.Value = ppa.leaderstats:FindFirstChild(CURRENCY_NAME).Value-ITEM_PRICE
		local c = game.ReplicatedStorage:FindFirstChild(ITEM_NAME):Clone()
		c.Parent = ppa.Backpack
	end
end)
