Q:

How to make a block that gives you points in Roblox

I have a leaderboard in one script. This is my code:
print("Cash Leaderboard Loaded")

function onPlayerEntered(newPlayer)

    local stats = Instance.new("IntValue")
    stats.Name = "leaderstats"

    local cash = Instance.new("IntValue")
    cash.Name = "Money"       --name of currency (e.g. cash, money,     resources, bucks, etc.)
    cash.Value = 50      --starting money.

    cash.Parent = stats
    stats.Parent = newPlayer
end
game.Players.ChildAdded:connect(onPlayerEntered)

I am trying to make it so when you click a block, it gives you more money.
The code is in a different script.  
Does anyone know how to make this work?

A:

Sure!
local CD = script.Parent
local Amount_To_Give = 10
CD.MouseClick:Connect(function(plr)
    plr:WaitForChild('leaderstats').Money.Value = plr:WaitForChild('leaderstats').Money.Value + Amount_To_Give
end)

