function onKeyPressed() { if (keydown2(getkeycode("g"), true)) { if (this.delay == NULL) { this.delay = .5; //SHOOT STUFF sleep(this.delay); this.delay = 0; } } }