local itemTable = {
"Grass",
"Diamond",
"Gold",
"Dirt",
}
local part = script.Parent
local click = part.Clicker
local db = false
click.MouseClick:Connect(function(clicked)
if clicked.Parent:FindFirstChild("Humanoid") then
local plr = clicked.Parent
if not db then
if plr.leaderstats.Coins.Value >= 500 then
local item = itemTable[math.random(1,#itemTable)]
wait(2)
print(item)
end
end
end
end)
there are 0 errors but i want it to be where if you have over 500 then you are able to click a button then it chooses a random item? can someone help?

1 comment
You can always change who you accepted, that is if you want though..