var scriptName="MurderMystery";var scriptAuthor="Soulplexis";var scriptVersion=1.0;var Swords=Java.type('net.minecraft.item.ItemSword');var Axes=Java.type("net.minecraft.item.ItemAxe");var EntityPlayer=Java.type('net.minecraft.entity.player.EntityPlayer');script.import("lib/glFunctions.js");script.import("lib/systemFunctions.js")
function randomIntFrom(min,max)
{return Math.floor(Math.random()*(max-min+1)+min);}
function Module(){var CheckSprinting=value.createBoolean("Sprint",false);this.getName=function(){return "MurderMystery";}
this.getCategory=function(){return "Misc";}
this.getDescription=function(){return "Reveals the murderer in Murder Mystery.";}
this.onEnable=function(){var murderer;var reason="Error";}
var time=0;this.onUpdate=function(){time++;if(time>=20){for(var x in mc.theWorld.loadedEntityList){var entities=mc.theWorld.loadedEntityList[x];if(entities!=null&&entities!=mc.thePlayer&&entities instanceof EntityPlayer){if(entities.getHeldItem().getItem()instanceof Swords||entities.getHeldItem().getItem()instanceof Axes){murderer=entities;reason="Held Weapon";}
if(CheckSprinting.get()&&entities.isSprinting()){murderer=entities;reason="Sprints";}}}
time=0;}}
this.onRender2D=function(){var mcHeight=getScaledHeight();var mcWidth=getScaledWidth();if(murderer!=null||murderer!=undefined){mc.fontRendererObj.drawStringWithShadow("Murderer: "+murderer.getName()+" §c("+reason+")",5,mcHeight/3,0x7CFC00);}else{mc.fontRendererObj.drawStringWithShadow("Murderer: "+"No murderer found",5,mcHeight/2,0x7CFC00);}}
this.addValues=function(soul){soul.add(CheckSprinting);}}
var module=new Module();var moduleClient;function onEnable(){moduleClient=moduleManager.registerModule(module);}
function onDisable(){moduleManager.unregisterModule(moduleClient);}