local a=script.Parent local u=false a.Touched:connect(function(O)if O.Parent==nil or u==true then return end local C=game.Players:GetPlayerFromCharacter(O.Parent)if C~=nil then u=true pcall(function()_G.awardPoints(C,math.random(5))end)a:remove()end end)

local coin = script.Parent;
local enabled = false;

coin.Touched:connect(function(part)
	if (part.Parent == nil or enabled == true) then
		return;
	end
	
	local player = game.Players:GetPlayerFromCharacter(part.Parent);
	
	if (player ~= nil) then
		enabled = true;
		
		pcall(function()
			_G.awardPoints(player, math.random(5));
		end);
		
		coin:remove();
	end
end);
