var scriptVersion = 1.0; 
var scriptName = "FlashyWorld"; 
var scriptAuthor = "soulplexis";

var flashyWorld = new FlashyWorld();
var flashyWorldClient;

function FlashyWorld() {
	var ticks = 0;
    this.getName = function() {
        return "WorldFlash";
    };

    this.getDescription = function() {
        return "Makes the world flash slowly";
    };

    this.getCategory = function() {
        return "Render";
    };
    this.onEnable = function() {
    }

    this.onUpdate = function() {
     ticks++;
     if(ticks <= 80) {
    	 mc.gameSettings.gammaSetting = mc.gameSettings.gammaSetting + 0.04;
     } if(ticks >= 80) {
    	 mc.gameSettings.gammaSetting = mc.gameSettings.gammaSetting - 0.04;
     } 
     if(ticks == 160) {
    	 ticks = 0;
     }	
    }
    this.onDisable = function() {
    }
}


function onLoad() {
};

function onEnable() {
    flashyWorldClient = moduleManager.registerModule(flashyWorld);
};

function onDisable() {
    moduleManager.unregisterModule(flashyWorldClient);
};