Polish Team Deathmatch streaks and comeback hints

This commit is contained in:
Leshyi committed 2026-11-30 00:07:25 +05:00
1 parent 7a1c80c22a
commit 6bb5fba771
8 files changed
+56 -4

No files matched your search

@@ -1,11 +1,19 @@
--!strict
local Types = require(script.Parent.Parent.Types)
local Common = require(script.Parent.Parent.Common)
local Hunter=game.ReplicatedStorage.Hunter
local Rules=require(Hunter.TeamDeathmatchRules)
local Kinds=require(Hunter.EventKinds)
local function start(ctx: Types.ModeContext): Types.ModeInstance
return Common.instance(ctx, {kill = function(player: Player)
local side = Common.sideOf(player)
if side then ctx.scoring.add(side, 1, "Elimination", player) end
if not side then return end
ctx.scoring.add(side, 1, "Elimination", player)
local streak=player:GetAttribute("StreakKills")
if typeof(streak)=="number" and Rules.announce(streak) then
ctx.events.fire(Kinds.Streak,{side=side,userId=player.UserId,text=player.DisplayName,value=streak})
end
end})
end