15 lines
578 B
Luau
15 lines
578 B
Luau
--!strict
|
|
return function(scoring: any)
|
|
local state = Instance.new("Folder")
|
|
local observed: number? = nil
|
|
local score = scoring.new(state, function(side: string, points: number, reason: string)
|
|
assert(side == "Blue" and reason == "Test")
|
|
observed = points
|
|
end)
|
|
assert(state:GetAttribute("BlueScore") == 0 and state:GetAttribute("OrangeScore") == 0)
|
|
score.add("Blue", 3, "Test")
|
|
assert(observed == 3 and score.get("Blue") == 3 and state:GetAttribute("BlueScore") == 3)
|
|
assert(score.get("Orange") == 0 and state:GetAttribute("OrangeScore") == 0)
|
|
state:Destroy()
|
|
end
|