AddCSLuaFile("shared.lua") include("shared.lua") ENT.MODEL = "models/winningrook/gtav/meth/meth_ziplock/meth_ziplock_small.mdl" ENT.MASS = 2; ENT.LASTINGEFFECT = 30; ENT.SPEEDSCALE = 1.2; function ENT:High(activator,caller) local duration=self.LASTINGEFFECT local sayings = { "Jesse, it's time to cook.", "I FEEL GREAT! I CAN WIN! I. CAN. DO. THIS!", "CRAAAAAAAAAAWLING IIIIIIIIIIN MYYY SKIIIIIIIIIIIIIIIIIIIIN", "Can you see the puddle? Is your puddle green, bro?" } if not self:Realistic() then if(math.random(0,10) == 0)then activator:Ignite(5,0) self:Say(activator, "OHOHOHOH THE GOING GETS HOT WHEN THE GLASS GETS HOT OHOHOHOH") -- 1 in 10 chance of burning yourself on the glass and blowing your buzz; otherwise we buff HP + drain elseif(activator:Health() <= 500)then activator:SetHealth(activator:Health()+50) if timer.Exists("durgz_meth_health") then duration=duration+timer.RepsLeft("durgz_meth_health");timer.Adjust("durgz_meth_health",1,duration) else timer.Create( "durgz_meth_health", 1, -- delay interval duration, function() if not IsValid(activator) then return end activator:SetHealth(activator:Health()-3) if activator:Alive() and activator:Health()<=0 then activator.DURGZ_MOD_DEATH = "durgz_meth" activator.DURGZ_MOD_OVERRIDE = activator:Nick().." collapsed and died of a sudden heart attack (methamphetamine overdose)."; activator:Kill() end end ) end end if activator:GetWalkSpeed() < 597 and activator:GetRunSpeed() < 1194 then activator:SetWalkSpeed(activator:GetWalkSpeed()*self.SPEEDSCALE) activator:SetRunSpeed(activator:GetRunSpeed()*self.SPEEDSCALE) end; activator:SetGravity(1.5); self:Say(activator, sayings) end end function ENT:AfterHigh(activator, caller) end hook.Add("Think", "durgz_meth_high_reset", function() for id,pl in pairs(player.GetAll())do if(pl:GetNWFloat("durgz_meth_high_end")-0.5CurTime())then if timer.Exists("durgz_meth_health") then timer.Destroy("durgz_meth_health") end pl:SetGravity(DEFAULT_GRAVITY) pl:SetWalkSpeed(DEFAULT_WALK_SPEED) pl:SetRunSpeed(DEFAULT_RUN_SPEED) end end end)