God mode is the most known exploit for any available Roblox game. This exploit is usually prevents you or your characters from dying or losing health. This one is able to be there in multiple forms. Some of the examples are the invulnerability by enable to lose health, invulnerability by being unable to die, and invulnerability by being unable to be hit.
Some games on the platform called Roblox use the same routine for health for the Al as for the player. Basically, removing it will not work. In those cases, you will need to write a script that can check if the object whose health is being decreased belongs to the player or to the Al.
In a lot of Roblox fps games, you are able to loo at the base class pointer of the object, that is usually the first 4 bytes of the player class or structure. This one contains the pointer to static the location, in the script that you can then check if that value equals he static address it should be, and if so, do not decrease health, else decrease health, or in rare case, set health too.
In other Roblox games like the strategy games where there is not a big distinction between the units and that of the enemy you will need to find some other kind of identifier. There is the chance that the class structure contains the playerid or the pointer to the controller. If it is the case, it is better for you to do multiple code injections. For your information, one at the spot in order to find the playerid of the player or controller pointer and at the location where the health is decreased. Then,a t the decreased health, check if the playerid or the player pointer has been found. If so, please compare and allow or deny. The data dissector is the name of the tool that can be used to find the playerid or the player pointer in the class structure of the unit.
Another way of Roblox God mode exploit that works in some games when they use floating point value is setting the health to such a high value it turns to INF+. It means the infinite and the normal increase and the decrease will not effect if anymore. Please take a note that this one does not work in all games or you will get bad graphical glitches like health bars going over the whole screen.
Another alternative is to change the health value from float to 4 byte and change the value to $fffffff, this triggers the bug in some games making the readout of the health show 0, but compared if it is 0 return false. Aside from that, it also blocks increase and decrease of the value making it stay that way forever. It is the useful way for God mode in some Roblox games. As usual with using the values a Roblox game was not expecting, it can cause crashes in some games under certain situation.