Advertisement
Guest User

physgun color fade that isn't SHIT

a guest
May 30th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  1.         // put this code in player initilization function
  2.         int speed = 5
  3.         ply:SetNWInt("phyR", 0)
  4.         ply:SetNWInt("phyG", 85)
  5.         ply:SetNWInt("phyB", 170)
  6.  
  7.         // put this code in a hook that gets called every tick like draw or hudpaint
  8.         local r = ply:GetNWInt("phyR")
  9.         local g = ply:GetNWInt("phyG")
  10.         local b = ply:GetNWInt("phyB")
  11.         ply:SetNWInt("phyR", r + 1)
  12.         ply:SetNWInt("phyG", g + 1)
  13.         ply:SetNWInt("phyB", b + 1)
  14.         if(r >= 255 ply:SetNWInt("phyR", 0))
  15.         if(g >= 255 ply:SetNWInt("phyG", 0))
  16.         if(b >= 255 ply:SetNWInt("phyB", 0))
  17.         ply:SetWeaponColor( Vector( r / 255, g / 255, b / 255 ) )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement