Guest User

Untitled

a guest
Sep 8th, 2021
35
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local laser1 = Material("effects/blueblacklargebeam")
  2. local laser2 = Material( "effects/bluelaser2" )
  3.  
  4.  
  5. function EFFECT:Init(data)
  6.     if data:GetEntity():IsValid() then
  7.         self.Start = data:GetStart()
  8.         self.Weapon = data:GetEntity()
  9.         self.End = self.Weapon:GetOwner():GetEyeTrace().HitPos
  10.         self.Attach = data:GetAttachment()
  11.         self.StartPos = self:GetTracerShootPos(self.Start, self.Weapon, self.Attach) + self.Weapon:GetOwner():EyeAngles():Forward() * 13
  12.         self:SetRenderBoundsWS(self.Start, self.End)
  13.     end
  14. end
  15.  
  16. function EFFECT:Render()
  17.     if self.StartPos then
  18.         render.SetMaterial(laser1)
  19.         render.DrawBeam(self.StartPos, self.End, math.sin(CurTime()*15)*10, 0, 20, Color(0, 50, 220, 255))
  20.         render.SetMaterial(laser2)
  21.         render.DrawBeam(self.StartPos, self.End, math.sin(CurTime()*20)*5, 0, 20, Color(0, 50, 220, 255))
  22.     end
  23. end
  24.  
  25.  
RAW Paste Data