Click for Point 2

ServerScriptService

local function onPlayerJoin(player)

local leaderstats = Instance.new('Folder')

leaderstats.Name = 'leaderstats'

leaderstats.Parent = player

local points = Instance.new('IntValue')

points.Name = 'Points'

points.Value = 0

points.Parent = leaderstats

end


game.Players.PlayerAdded:Connect(onPlayerJoin)

Part Script

local part = script.Parent

local click = part.ClickDetector

local canClick = true


local function onClick(player)

if canClick then

player.leaderstats.Points.Value = player.leaderstats.Points.Value + 1

part.Transparency = part.Transparency + 0.1

end

if part.Transparency >= 1 then

canClick = false

wait(2)

part.Transparency = 0

canClick = true

end

end



click.MouseClick:Connect(onClick)