So Far I Have Made A Script And All I Need Is For It To Give Me The Item :/:
local debounce = false
function getPlayer(humanoid)
local players = game.Players:children()
local user = game.Players.LocalPlayer
local player = game.Players.LocalPlayer
for i = 1, #players do
if players[i].Character.Humanoid == humanoid then return players[i] end
end
return nil
end
script.Parent.MouseButton1Click:connect(function()
local gold = game.Players.LocalPlayer.leaderstats.Cash -- Replace MONEY with the name of currency name your leaderboard uses
if gold.Value >= 100 then -- Replace 100 with your price
gold.Value = gold.Value - 100 -- Replace 100 with your price
local m = Instance.new("Message")
m.Text = "You just bought a Laser Gun!" -- Replace TOOL with your weapon
m.Parent = game.Players.LocalPlayer.PlayerGui
wait(3)
m:Destroy()
wait(1)
local Gear1 = script.Parent.LaserGun
Gear1:Clone()
Gear1:Clone()
Gear1:Clone()
Gear1:Clone()
Gear1:Clone()
Gear1:Clone()
Gear1:Clone()
Gear1:Clone()
Gear1:Clone()
Gear1:Clone()
Gear1:Clone()
Gear1:Clone()
Gear1:Clone()
Gear1:Clone()
Gear1:Clone()
Gear1.Parent = game.Players.LocalPlayer
wait(2)
m.Parent = nil
else
m = Instance.new("Message")
m.Text = "You don't have enough for that!"
m:Destroy()
m.Parent = game.Players.LocalPlayer.PlayerGui
wait(3)
m.Parent = nil
end
wait(2)
debounce = false
end)
Please Help

1 comment
Is This A Local Script? If so, what is it under?