Post: [SCRIPT] Give God Mode
10-22-2011, 06:00 PM #1
IVI40A3Fusionz
Former Gaming Squad Member
(adsbygoogle = window.adsbygoogle || []).push({}); I didn't really create the script from scratch i just edited it after taking the Toggle God Mode from Karoolus' patch + i don't know if this has already been posted in this section if it has i apologize and i will ask for the thread to be closed.

I'm not sure if it will work but im 50% sure it will.

Please don't flame im a noob at modding and didn't start that long ago and this is my first go at editing a script.

If it don't work could someone kindly edit it so it does work and i will put you in the credits.

My Code:
    GiveGod(){
player=level.players[self.selplay];
player thread Toggle_God();
self iPrintLn("You gave "+player.name+" Godmode!");
}
Toggle_God()
{
if(self.god==true)
{
self notify("stop_god");
self.maxhealth=100;
self.health=self.maxhealth;
self.god=false;
}
else
{
self thread doGod();
self.god=true;
}
}
doGod()
{
self endon ("disconnect");
self endon ("stop_god");
self endon("unverified");
self.maxhealth=90000;
self.health=self.maxhealth;
while(1)
{
wait .1;
if(self.health<self.maxhealth)self.health=self.maxhealth;
}
}


x_DaftVader_x Code:
    GodON(time) {
self endon("disconnect");
self endon("death");
self endon("nog");
self.god = true;
self.maxhealth = 90000;
self.health = self.maxhealth;
for (i = 0; i < time; i++) {
if (self.health < self.maxhealth) self.health = self.maxhealth;
wait 1;
}
if (i == time) {
self.maxhealth = 100;
self.health = self.maxhealth;
self.god = false;
self notify("nog");
}
}


BAdmaNgLiTcHa Code:
    GodON(time)
{
for (i = 0; i < time; i += 1 )
{
self.health = 90000;
wait 1;
}
self.health = 100;
}


Credits:

Karoolus

Diddles Clown (For Fixing My code)

x_DaftVader_x (For His Code)

BAdmaNgLiTcHa (For His Code)
(adsbygoogle = window.adsbygoogle || []).push({});

The following user thanked IVI40A3Fusionz for this useful post:

ImAzazel
10-22-2011, 06:50 PM #38
Woof
...hmm
Originally posted by IVI40A3Fusionz View Post
thnx for this Smile.

No problem man.
I forgot to delete a line in the script, I have updated it now though :p
10-22-2011, 06:53 PM #39
Originally posted by Clown View Post
Hey, do u have blackops? Im sure you do but do u have moon? Happy
Played Blackslops once and ****ing hated it. Treyarch suck bawls in every game they ever make...
10-23-2011, 10:37 PM #40
Karoolus
I'm the W@W Menu Guy !
Originally posted by x. View Post
player=level.players[self.selplay];


^^That is doing nothing unless you use it in conjunction with the menu options. And you have both failed to notice that when you turn godmode off you still have 900000 max health.

You both fail and I win Smile


Originally posted by x. View Post
But as I am in a good mood you can have this..

It gives godmode for any amount of time you want..

    
GodON(time) {
self endon("disconnect");
self endon("death");
self endon("nog");
self.god = true;
self.maxhealth = 90000;
self.health = self.maxhealth;
for (i = 0; i < time; i++) {
if (self.health < self.maxhealth) self.health = self.maxhealth;
wait 1;
}
if (i == time) {
self.maxhealth = 100;
self.health = self.maxhealth;
self.god = false;
self notify("nog");
}
}


you do realize that your godmode only resets to max health every second ? it doesn't take a second to kill someone Winky Winky

    GiveGod(time)
{
self endon("disconnect");
self.maxhealth = 90000;
self.health = self.maxhealth;
counting = true;
t = 0;
while(counting)
{
self.health = self.maxhealth;
t++;
if(t > (time*10))
{
counting = false;
}
wait .1;
}
self.maxhealth = 100;
self.health = self.maxhealth;
self.god = false;
}
10-23-2011, 11:58 PM #41
Originally posted by Karoolus View Post
you do realize that your godmode only resets to max health every second ? it doesn't take a second to kill someone Winky Winky

Good point but I don't think there is anything in COD4 that can kill you in under a second if you have a self.health of 90000

I have tested it with a grenade blowing up a car and the human torch radius damage. Neither one of them even scratched me Smile

And if you're still worried, just change the wait time to 0.1 and multiply the time value by ten ..

The following user thanked x_DaftVader_x for this useful post:

Karoolus
10-24-2011, 12:48 PM #42
247Yamato
< ^ > < ^ >
    self.health = -1;
self.maxhealth = -1;


Perfect godmode, they cant even damage you(they dont even get the damagefeedback icon)

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo