This commit is contained in:
Leshyi committed 2026-11-29 19:48:57 +05:00
1 parent 82eecfda06
commit bdf5eca81f
10 files changed
+287 -94

No files matched your search

+7 -5
View File
@@ -45,7 +45,7 @@ local function update()
local nextPoint = match:GetAttribute("HotPointNextPosition")
local deadline = match:GetAttribute("HotPointMovesAt")
if player:GetAttribute("InArena") ~= true or match:GetAttribute("Ruleset") ~= "HotPoint"
or match:GetAttribute("Phase") ~= "Round" or typeof(point) ~= "Vector3"
or match:GetAttribute("Phase") ~= "Round"
or not root or not root:IsA("BasePart") or not humanoid or humanoid.Health <= 0 or not camera then
gui.Enabled = false
lastPoint, lastCharacter, heardDeadline = nil, nil, nil
@@ -53,13 +53,15 @@ local function update()
end
local now = workspace:GetServerTimeNow()
if point ~= lastPoint or character ~= lastCharacter then
local activePoint = if typeof(point) == "Vector3" then point else nil
if activePoint ~= lastPoint or character ~= lastCharacter then
guideUntil = now + GUIDE_SECONDS
lastPoint, lastCharacter = point, character
lastPoint, lastCharacter = activePoint, character
end
local remaining = if typeof(deadline) == "number" then deadline - now else math.huge
local moving = remaining > 0 and remaining <= WARNING_SECONDS and typeof(nextPoint) == "Vector3"
local target = if moving and typeof(nextPoint) == "Vector3" then nextPoint else point
local target = if moving and typeof(nextPoint) == "Vector3" then nextPoint else activePoint
if not target then gui.Enabled = false; return end
local delta = target - root.Position
local flat = Vector3.new(delta.X, 0, delta.Z)
local summary = playerGui:FindFirstChild("ArenaResults")
@@ -79,7 +81,7 @@ local function update()
arrow.TextColor3 = tint
local localDirection = camera.CFrame:VectorToObjectSpace(flat)
arrow.Rotation = math.deg(math.atan2(localDirection.X, -localDirection.Z))
title.Text = if moving then ("СМЕНА ТОЧКИ · %d С"):format(math.ceil(remaining)) else "К ГОРЯЧЕЙ ТОЧКЕ"
title.Text = if moving then ("НОВАЯ ТОЧКА · %d С"):format(math.ceil(remaining)) else "К ГОРЯЧЕЙ ТОЧКЕ"
local floor = if delta.Y > 8 then " · ВЫШЕ" elseif delta.Y < -8 then " · НИЖЕ" else ""
detail.Text = ("%d СТУДОВ%s"):format(math.floor(delta.Magnitude + .5), floor)
end