I am working on a points system for a group and I am trying to figure out the best and most secure way to award points for promotions.
function plusPoint(plr)
local MarketServ = game:GetService("MarketplaceService")
local Event = script.RemoteEvent
if MarketServ:PlayerOwnsAsset(10536995) then
Event.OnServerEvent:Connect(function(plr)
plr.leaderstats.points.Value = plr.leaderstats.points.Value + 2
end)
elseif MarketServ:PlayerOwnsAsset(10537070) then
Event.OnServerEvent:Connect(function(plr)
plr.leaderstats.points.Value = plr.leaderstats.points.Value + 5
end)
elseif MarketServ:PlayerOwnsAsset(10537070) and MarketServ:PlayerOwnsAsset(10536995) then
Event.OnServerEvent:Connect(function(plr)
plr.leaderstats.points.Value = plr.leaderstats.points.Value + 7
end)
else
Event.OnServerEvent:Connect(function(plr)
plr.leaderstats.points.Value = plr.leaderstats.points.Value + 1
end)
end
end