-- Compiled with roblox-ts v1.2.7 local TS = _G[script] local ZrInstanceUserdata = TS.import(script, TS.getModule(script, "@rbxts", "zirconium").out.Data.Userdata).ZrInstanceUserdata local OptionalValidator = TS.import(script, script.Parent, "OptionalValidator").OptionalValidator local StatefulZirconValidator = TS.import(script, script.Parent.Parent, "StatefulZirconValidator").StatefulZirconValidator local ZirconFuzzyPlayerValidator do local super = StatefulZirconValidator ZirconFuzzyPlayerValidator = setmetatable({}, { __tostring = function() return "ZirconFuzzyPlayerValidator" end, __index = super, }) ZirconFuzzyPlayerValidator.__index = ZirconFuzzyPlayerValidator function ZirconFuzzyPlayerValidator.new(...) local self = setmetatable({}, ZirconFuzzyPlayerValidator) return self:constructor(...) or self end function ZirconFuzzyPlayerValidator:constructor() super.constructor(self, "Player") end function ZirconFuzzyPlayerValidator:Validate(value) if type(value) == "string" then local _exp = game:GetService("Players"):GetPlayers() local _arg0 = function(player) local _name = player.Name local _arg1 = #value return string.lower(string.sub(_name, 1, _arg1)) == string.lower(value) end -- ▼ ReadonlyArray.find ▼ local _result = nil for _i, _v in ipairs(_exp) do if _arg0(_v, _i - 1, _exp) == true then _result = _v break end end -- ▲ ReadonlyArray.find ▲ local existingPlayer = _result if existingPlayer then self.playerRef = existingPlayer return true end elseif type(value) == "number" then local player = game:GetService("Players"):GetPlayerByUserId(value) if player then self.playerRef = player return true end elseif TS.instanceof(value, ZrInstanceUserdata) and value:isA("Player") then self.playerRef = value:value() return true end return false end function ZirconFuzzyPlayerValidator:Transform() local _playerRef = self.playerRef assert(_playerRef, "Transform called before Validate, perhaps?") return self.playerRef end end local ZirconFuzzyPlayer = ZirconFuzzyPlayerValidator.new() local OptionalZirconFuzzyPlayer = OptionalValidator.new(ZirconFuzzyPlayer) return { ZirconFuzzyPlayerValidator = ZirconFuzzyPlayerValidator, ZirconFuzzyPlayer = ZirconFuzzyPlayer, OptionalZirconFuzzyPlayer = OptionalZirconFuzzyPlayer, }