SHARE
TWEET

Untitled

a guest Jan 22nd, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local GodMode = {
  2.     Settings = {
  3.         Length = 25
  4.     }
  5. }
  6.  
  7.  
  8. function GodMode:PlayerSpawn(ply)
  9.     if !IsValid(ply) then return end
  10.    
  11.     ply:GodEnable()
  12.     ply.GodEnabled = true
  13.     ply:ChatPrint("Votre protection anti-spawnkill est activée.")
  14.  ply:SetMaterial("models/alyx/emptool_glow")
  15.  
  16.    
  17.     timer.Simple(self.Settings.Length, function()
  18.         if !IsValid(ply) then return end
  19.         ply:ChatPrint("Votre protection anti-spawnkill est maintenant désactivée.")
  20.         ply:GodDisable()
  21.         ply.GodEnabled = false
  22.   ply:SetMaterial("")
  23.     end)
  24. end
  25. hook.Add("PlayerSpawn", "GE.PlayerSpawn", function(...) GodMode:PlayerSpawn(...) end)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top