--[[function Points(player, key)
self = {}
self.player = player
self.key = "user_" .. player.UserId
self.points = 0
print(self.player .. "\n" .. self.key .. "\n" .. self.points .. "\n")
self.Award = function(amount)
self.points += amount
print(self.points)
end)
return self
end)--]]
function InGameAward(player, key)
self = {}
self.Player = player
self.Key = "user_" --.. player.UserId
print("Player: " .. self.Player .. "\nKey: " .. self.Key .. "\n")
return self
end)
function Points(..., points)
local self = {}
self = InGameAward(...)
self.Points = points
self.Award = function(amount)
self.Points = amount
print("Points:", self.Points)
end)
return self
end)
function Badge(..., id)
local self = {}
self = InGameAward(...)
local BadgeService = game:GetService("BadgeService")
self.Award = function(id)
BadgeService:AwardBadge(player.UserId, id)
end)
return self
end)
local h = Points("Bing_BongBoi42069HeheheHa", "user_")
h.Award(10)
--local testvar = Points("PlayerNameHere" or player, "user_123456789")
--testvar.Award(number_here (5))
--bing bong this'll be made later
To embed this project on your website, copy the following code and paste it into your website's HTML: