So basically, when a player god modes themselves, their health is "1.#INF" in Humanoid. I tested this and it didn't work. Any problems with it? Nothing came up on the dev console.
local infHealth = "1.#INF"
game.Workspace.ChildAdded:connect(function(Child)
local Humanoid = Child:FindFirstChild("Humanoid")
local Player = game.Players:FindFirstChild(Child.Name)
if Humanoid then
Humanoid.Changed:connect(function()
if Player and Humanoid.MaxHealth == infHealth then
Player:Kick("You have lost connection to the game")
end
end)
end
end)

2 comments
Suggest to just check if its bigger then 1000 or so.
Really you could just check if it is greater than 100.