Files
Hunter/scripts/ArenaClient/HintProviders/TrophyHunt.luau
T

23 lines
881 B
Luau

--!strict
local rs=game:GetService("ReplicatedStorage")
local S=require(rs.Hunter.Strings).trophyHints
local H=require(rs.Hunter.Hints)
local Provider={}
function Provider.candidates(_match: Instance, player: Player): {H.Hint}
local count=player:GetAttribute("ArenaTokens")
if typeof(count)=="number" and count>=3 then
return {{key="th_bank",text=string.format(S.carry,count),priority=70,ttl=.4}}
end
local root=player.Character and player.Character.PrimaryPart
local world=workspace:FindFirstChild("ProceduralArena")
local folder=world and world:FindFirstChild("MatchObjectives")
if not root or not folder then return {} end
for _,token in folder:GetChildren() do
if token.Name=="Tokens" and token:IsA("BasePart") and (root.Position-token.Position).Magnitude<18 then
return {{key="th_near",text=S.near,priority=30,ttl=.4}}
end
end
return {}
end
return Provider