I am working on a anticheat that makes it so no type of exploits are possible. Even Btools! I seem to be getting an error in my module that says attempted to index nil with 'FindFirstChild' on line 29. Any help would be greatly appreciated.
local module = {} ValidKeys = {} GUiNumber = {} game.Players.PlayerAdded:Connect(function(plr) player = plr end) ValidGui1 = game.StarterGui.ValidGui function module.Store(key, UiNumber) table.insert(ValidKeys, key) table.insert(GUiNumber, UiNumber) end function module.GetFullPath(Ui) partPath = Ui:GetFullName() local appendStr = "game." end function module.GiveGuiKey(Ui) local key = Instance.new("StringValue") local hasgivenkey = nil module.GetFullPath(Ui) key.Parent = Ui key.Name = "key" key.Value = math.random(154122412, 521532125) hasgivenkey = true module.Store(key.Value, partPath) end function module.CheckForExploits() for i,v in pairs(ValidKeys) do local guinumber = GUiNumber[v] local iskey = guinumber:FindFirstChild("key") if iskey then local key = GUiNumber[v]:FindFirstChild("key") if key.Value ~= v then script.RemoteEvent:FireServer(plr) end else script.RemoteEvent:FireServer(plr) end end end function module.DistributeKeys(get) for i, v in pairs(get:GetChildren()) do if v:IsA("ScreenGui") and not v:FindFirstChild("key") then module.GiveGuiKey(v) end end print(GUiNumber) end return module