-- everything below was written by washy, just reused here from bauernhof --function OnWaveStart() -- waveActive = true -- timer.Simple(0.5,function() -- end) --end function OnGameTick() for _, player in pairs(ents.GetAllPlayers()) do if player:IsRealPlayer() then if player.m_bUsingActionSlot == 1 and player.InteractCooldown ~= true then player.HoldTime = player.HoldTime + 1 if player.HoldTime > 33 and player.InteractWith ~= "nothing" then Interact(player) player.InteractCooldown = true player.HoldTime = 0 timer.Simple(1, function() player.InteractCooldown = false end) end else player.holdTime = 0 end end end end function Interact(player) if player.InteractWith == "revive_button" then -- trigger_multiple attached to reanimator ents.FindByName("revive_button"):AcceptInput("Press",_,player) timer.Simple(1, function() player.InteractCooldown = true end) timer.Simple(2.3, function() player.InteractCooldown = false end) end end -- and everything below is written by Sntr function spawn_revive_marker(_,activator) for k, marker in pairs(ents.FindAllByClass("entity_revive_marker")) do if marker.m_hOwner == activator then templateEnts = ents.SpawnTemplate("Revivemarker", {parent = marker}) ents.FindByName("revive_trigger"):AddCallback(ON_START_TOUCH, function(_, player) if player:IsRealPlayer() and player:IsAlive() then -- IsAlive is so dead people somehow don't interact with the button player.InteractWith = "revive_button" end end) ents.FindByName("revive_trigger"):AddCallback(ON_END_TOUCH, function(_, player) if player:IsRealPlayer() then player.InteractWith = "nothing" player:Print(2,"") end end) end end end function revivelogic(_,activator) activator:TauntFromItem("Laugh Taunt") timer.Simple(0.65, function() for _, reanimator in pairs(ents.FindInSphere(activator:GetAbsOrigin(), 150)) do if reanimator:GetClassname() == "entity_revive_marker" then reanimator.m_hOwner:ForceRespawnDead() reanimator.m_hOwner:PlaySoundToSelf("mvm/mvm_revive.wav") reanimator.m_hOwner:SpeakResponseConcept("TLK_RESURRECTED") activator:PlaySoundToSelf("mvm/mvm_revive.wav") reanimator.m_hOwner:Teleport(activator:GetAbsOrigin()) reanimator.m_hOwner:AddCond(51,2) -- give invulnerability to revived players reanimator.m_hOwner:RemoveCond(129) activator:StunPlayer(0.2,1,TF_STUNFLAG_BONKSTUCK) end end end) end