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:35 PM #29
Originally posted by x. View Post
x_DaftVader_x_the_fool Now I haz four Winky Winky
Im duhhhn...
10-22-2011, 06:36 PM #30
Blackstorm
Veni. Vidi. Vici.
Originally posted by x. View Post
You just make your stuff look good by putting loads of [[[[[ ]]]] round everything Winky Winky


Gotta love arrays xD

The following user thanked Blackstorm for this useful post:

Woof
10-22-2011, 06:36 PM #31
Originally posted by Blackstorm View Post
Tsss, you know what it is
Yep. A majestic light stick from runescape :carling:
10-22-2011, 06:43 PM #32
Originally posted by Blackstorm View Post
Gotta love arrays xD
**waits to see god mode toggle made with lots of arrays..
10-22-2011, 06:44 PM #33
Woof
...hmm
Originally posted by x. View Post
.


Im pretty sure this script can be shortened.
Endon "disconnect" + "death" is not needed as you can not die via in godmode and self.health is reset when connecting to a game.
Doing the checking if the variable = the set time is pointless as a script does not continue reading intill the loop has ended.
Why have you set a int to the variable self.maxhealth, why not set it straight to self.health?

Simples Smile
    
GodON(time)
{
for (i = 0; i < time; i += 1 )
{
self.health = 90000;
wait 1;
}
self.health = 100;
}
10-22-2011, 06:46 PM #34
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by BAdmaNgLiTcHa View Post
Im pretty sure this script can be shortened.
Endon "disconnect" + "death" is not needed as you can not die via in godmode and self.health is reset when connecting to a game.
Doing the checking if the variable = the set time is pointless as a script does not continue reading intill the loop has ended.
Why have you set a int to the variable self.maxhealth, why not set it straight to self.health?

Simples Smile
    
GodON(time)
{
self.health = self.maxhealth;
for (i = 0; i < time; i += 1 )
{
self.health = 90000;
wait 1;
}
self.health = 100;
}


thnx for this Smile.
10-22-2011, 06:48 PM #35
Originally posted by x. View Post
**waits to see god mode toggle made with lots of arrays..
Badman 1; Vader 1; Diddles 0;
OWNED.
10-22-2011, 06:48 PM #36
Originally posted by BAdmaNgLiTcHa View Post
Im pretty sure this script can be shortened.
Endon "disconnect" + "death" is not needed as you can not die via in godmode and self.health is reset when connecting to a game.
Doing the checking if the variable = the set time is pointless as a script does not continue reading intill the loop has ended.
Why have you set a int to the variable self.maxhealth, why not set it straight to self.health?

Simples Smile
    
GodON(time)
{
self.health = self.maxhealth;
for (i = 0; i < time; i += 1 )
{
self.health = 90000;
wait 1;
}
self.health = 100;
}


You can die with godmode if someone has an aimbot ..
I made it to protect the player in my roll the dice so you can't die whilst rolling a number and screw the game up.
I used it more than once for different functions which is why I used a variable for time.

( and the time variable works as I wanted it to btw )
10-22-2011, 06:49 PM #37
Originally posted by x. View Post
**waits to see god mode toggle made with lots of arrays..
Hey, do u have blackops? Im sure you do but do u have moon? Happy

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo