Advertisement
Guest User

Untitled

a guest
Dec 15th, 2017
334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. SWEP.Author = "Uriel Diaz"
  2. SWEP.Contact = "artodiaz12@SWEPail.com"
  3. SWEP.Purpose = "It allows you to transform in 10 different aliens, and it is from Ben 10."
  4. SWEP.Instructions = "Slap yo Wrist"
  5.  
  6. SWEP.Category = "Ben 10"
  7. SWEP.AnimPrefix = "idle";
  8. SWEP.Spawnable = true
  9. SWEP.AdminSpawnable = false
  10. SWEP.ViewModel = "models/artonym/ben10/omnitrix/omnimatrix.mdl"
  11. SWEP.WorldModel = "models/artonym/ben10/omnitrix/omnimatrix.mdl"
  12. SWEP.DrawAmmo = false
  13. SWEP.DrawCrosshair = false
  14. SWEP.Slot = 3
  15. SWEP.SlotPos = 4
  16. SWEP.AutoSwitchTo = true
  17. SWEP.AutoSwitchFrom = true
  18. SWEP.Primary.ClipSize = -1
  19. SWEP.Primary.DefaultClip = -1
  20. SWEP.Primary.Automatic = false
  21. SWEP.Primary.Ammo = "none"
  22. SWEP.Secondary.ClipSize = -1
  23. SWEP.Secondary.DefaultClip = -1
  24. SWEP.Secondary.Automatic = false
  25. SWEP.Secondary.Ammo = "none"
  26. SWEP.PrintName = "Omnitrix"
  27. SWEP.HoldType = "self"
  28.  
  29.  
  30. function SWEP:Initialize()
  31.  
  32. self.Models = {}
  33. self.Models[1] = Model("models/artonym/ben10/aliens/heatblast_player_model.mdl")
  34. self.Models[2] = Model("models/artonym/ben10/aliens/upgraded.mdl")
  35. self:SetWeaponHoldType( self.HoldType )
  36.  
  37. end
  38.  
  39. sound.Add( {
  40. name = "omnitrix.b.push",
  41. channel = CHAN_STATIC,
  42. volume = 1.0,
  43. level = 100,
  44. pitch = { 100 },
  45. sound = "artonym/ben10/omnitrix/omnitrix_button_push.wav"
  46. } )
  47.  
  48. sound.Add( {
  49. name = "omnitrix.activate",
  50. channel = CHAN_STATIC,
  51. volume = 1.0,
  52. level = 100,
  53. pitch = { 100 },
  54. sound = "artonym/ben10/omnitrix/omnitrix_activate.wav"
  55. } )
  56.  
  57.  
  58.  
  59. function SWEP:PrimaryAttack()
  60.  
  61. print("PrimaryAttack Calling...")
  62. self:EmitSound( "omnitrix.activate" )
  63. print("Sound Played")
  64. self.Owner:SetModel(self.Models[math.random(1, 2)])
  65. print("Model Selected and Set, "..tostring(self.Models[math.random(1, 2)]))
  66. self:SetNextPrimaryFire(CurTime()+1)
  67. print("PrimaryFire Finished.")
  68. self:GetOwner():ScreenFade( SCREENFADE.IN, Color( 0, 255, 0, 255 ), 1, 0.1 )
  69. self:SetNextPrimaryFire(CurTime()+10)
  70. end
  71.  
  72. function SWEP:SecondaryAttack()
  73. self:EmitSound( "omnitrix.b.push" )
  74. self:SetNextSecondaryFire(CurTime()+10)
  75. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement