Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2017
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.27 KB | None | 0 0
  1. --- Pictures And Sounds are taken from Youtube and Google. Voice Acting by OwnedbyCube
  2.  
  3. ///////////////
  4. ////CREDITS////
  5. ///////////////
  6. ///Thanks to///
  7. ///Gamefreak///
  8. //for helping//
  9. //me with Lua//
  10. ///////////////
  11. ///Some Code///
  12. ///is taken////
  13. ///from////////
  14. ///Gamefreak///
  15. ///////////////
  16.  
  17. SWEP.Primary.Delay = 10
  18. SWEP.Primary.Recoil = 0
  19. SWEP.Primary.Automatic = false
  20. SWEP.Primary.NumShots = 1
  21. SWEP.Primary.Damage = 0
  22. SWEP.Primary.Cone = 0
  23. SWEP.Primary.Ammo = nil
  24. SWEP.Primary.ClipSize = -1
  25. SWEP.Primary.ClipMax = -1
  26. SWEP.Primary.DefaultClip = -1
  27. SWEP.AmmoEnt = nil
  28. SWEP.Base               = "weapon_tttbase"
  29. SWEP.HoldType           = "slam"
  30. SWEP.AutoSpawnable      = false
  31. SWEP.CanBuy             = { ROLE_TRAITOR }
  32. SWEP.LimitedStock       = true
  33. SWEP.InLoadoutFor       = nil
  34. SWEP.HeadshotMultiplier = 0
  35. SWEP.AllowDrop          = true
  36. SWEP.IsSilent           = false
  37. SWEP.ViewModel          = "models/weapons/c_csgo_c4.mdl"
  38. SWEP.WorldModel         = "models/weapons/w_c4_planted.mdl"
  39. SWEP.AdminSpawnable     = true
  40. SWEP.Primary.Ammo       = "none"
  41. SWEP.AmmoEnt            = "none"
  42. SWEP.NoSights           = true
  43. SWEP.UseHands           = true
  44. SWEP.Author             = "OwnedbyCube (&Gamefreak)"
  45. SWEP.PrintName          = "Armageddon"
  46. SWEP.Spawnable          = true
  47. SWEP.AutoSpawnable      = false
  48. SWEP.AdminSpawnable     = true
  49. SWEP.AutoSwitchTo       = false
  50. SWEP.AutoSwitchFrom     = false
  51. SWEP.Kind               = WEAPON_EQUIP2
  52.  
  53.  
  54. if SERVER then
  55.   AddCSLuaFile()
  56.   resource.AddFile("materials/vgui/TTT/icon_worms.vmt")
  57.   resource.AddFile("materials/vgui/TTT/icon_worms.vmt")
  58.   resource.AddFile( "materials/models/weapons/c_csgo_c4.mdl" )
  59.   resource.AddFile( "materials/models/weapons/w_c4_planted.mdl" )
  60.   util.AddNetworkString( "CALLINGWORM" )
  61.   function ArmageddonBroadcast(...)
  62.       local msg = {...}
  63.     net.Start("CALLINGWORM")
  64.     net.WriteTable(msg)
  65.     net.Broadcast()
  66.   end
  67. end
  68.  
  69.  
  70. if CLIENT then
  71. SWEP.PrintName     = "Armageddon"
  72. SWEP.Slot          = "7"
  73. SWEP.SlotPos       = "8"
  74. SWEP.Icon          = "vgui/TTT/icon_worms.vmt"
  75. SWEP.Instructions  = "Left Mouse-Click to call it!"
  76. SWEP.Weight        = "5"
  77. SWEP.ViewModelFOV  = 60
  78. SWEP.ViewModelFlip = false
  79.  
  80. SWEP.EquipMenuData = {
  81.      type = "Weapon",
  82.      desc = "Meteorites incoming! LM: To Call the Armageddon - Based on Worms"
  83.     };
  84.     net.Receive("CALLINGWORM",function(len)
  85.       local msg = net.ReadTable()
  86.       chat.AddText(unpack(msg))
  87.       chat.PlaySound()
  88.       surface.PlaySound("weapons/wormsarmageddon/funkspruch.wav")
  89.     end)
  90. end
  91.  
  92.  
  93.        
  94.           function OneUpPlayer()    
  95.    local effectdata = EffectData()
  96.     timer.Create("ArmageddonExe", 14, 1, function()
  97.         local aliveplayer = {}
  98.         for k,v in pairs(aliveplayer.GetAll()) do
  99.           if v:IsTerror() then table.insert(aliveplayer,v) end
  100.         end
  101.         local randomply = aliveplayer[math.random(#aliveplayer)]
  102.         randomply:EmitSound( Sound ("ambient/explosions/explode_4.wav") )
  103.         util.BlastDamage( randomply, randomply, randomply:GetPos() , 300 , 150 )
  104.         effectdata:SetStart( randomply:GetPos() + Vector(0,0,10) )
  105.         effectdata:SetOrigin( randomply:GetPos() + Vector(0,0,10) )
  106.         effectdata:SetScale( 1 )
  107.         util.Effect( "HelicopterMegaBomb", effectdata )
  108.       end )
  109.     hook.Add("TTTPrepareRound", "TTTArmageddonExe", function() timer.Remove("ArmageddonExe") end)
  110.     hook.Add("TTTEndRound", "TTTArmageddonExe", function() timer.Remove("ArmageddonExe") end)
  111.       end
  112.        
  113.  
  114. function SWEP:PrimaryAttack()
  115.  
  116.       if SERVER then
  117.       //original code taken from Gamefreak\\
  118.       ArmageddonBroadcast("Armageddon: ", Color(255,0,0), net.ReadEntity():Nick().. ", is calling an Armageddon!")
  119.       DamageLog("ARMAGEDDON: " .. self.Owner:Nick() .. " [" .. self.Owner:GetRoleString() .. "] called an Armageddon" )
  120.       PrintMessage( HUD_PRINTCENTER, "ATTENTION! Armageddon incoming!")
  121.     end
  122.  
  123.    
  124. function OneUpPlayer()
  125.  
  126. end
  127.  
  128. function OneUpPlayer()
  129.  
  130. end
  131.  
  132. function OneUpPlayer()
  133.  
  134. end
  135.  
  136. function OneUpPlayer()
  137.  
  138. end
  139.    
  140.          
  141.      
  142.       --ENDE--
  143.                  
  144.      
  145.     end
  146.  
  147.  
  148.  
  149. if CLIENT then
  150.  
  151. net.Receive("CALLINGWORM", function()
  152.         chat.AddText("Armageddon: ", Color(255,0,0), net.ReadEntity():Nick().. ", is calling an Armageddon!")
  153.         chat.PlaySound()   
  154. end)
  155.  
  156.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement