function anticheat.location(player: Player, id: number): boolean
local minVector, maxVector = SETTINGS.positions[id][1], SETTINGS.positions[id][2]
local character = player.Character or player.CharacterAdded:Wait()
local humanoidRootPart = character:FindFirstChild("HumanoidRootPart") :: BasePart
local playerVector = humanoidRootPart.Position
if minVector.X > playerVector.X or minVector.Z > playerVector.Z then
return false
end
if maxVector.X < playerVector.X or maxVector.Z < playerVector.Z then
return false
end
if not profileStore.GetData(player).dialoguesAvailable[id] then
return false
end
print("returning true")
return true
end
function tracker.request(player: Player, id: number): boolean
print(`printing returned value: {anticheat(player, id)}`)
if not anticheat(player, id) then
return false
end
task.spawn(function()
tracker.players[player.Name] = id
end)
return true
end