Add round stages, respawn protection and match highlights

This commit is contained in:
Leshyi committed 2026-11-29 23:29:29 +05:00
1 parent b87a3770a1
commit d1c42a36b8
28 files changed
+753 -45

No files matched your search

+2 -1
View File
@@ -1,12 +1,13 @@
--!strict
local Types = require(script.Parent.Types)
local Scoring = {}
function Scoring.new(state: Instance, onAdd: ((Types.Side, number, string?, Player?) -> ())?): Types.Scoring
function Scoring.new(state: Instance, onAdd: ((Types.Side, number, string?, Player?) -> ())?, finalMultiplier: number?): Types.Scoring
local score: {[Types.Side]: number} = {Blue = 0, Orange = 0}
state:SetAttribute("BlueScore", 0)
state:SetAttribute("OrangeScore", 0)
return {
add = function(side, points, reason, credit)
if state:GetAttribute("RoundStage") == "FinalPush" then points *= finalMultiplier or 1 end
score[side] += points
state:SetAttribute(side .. "Score", score[side])
if onAdd then onAdd(side, points, reason, credit) end