Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.56 KB | None | 0 0
  1.  
  2. EXP = EXP or {}
  3. EXP.BaseNeed = 200
  4.  
  5. function GodKingColor(ply)
  6. local vector = Vector(ply:GetNWVector("tabcolor","1 1 1"))
  7. return vector:ToColor()
  8. end
  9.  
  10. EXP.Ranks = {
  11. {need = 1, title = "Newbie", color = Color(192, 192, 192) },
  12. {need = 2, title = "Beginner", color = Color(255, 187, 255) },
  13. {need = 3, title = "Rookie", color = Color(255, 0, 0)},
  14. {need = 4, title = "Criminal", color = Color(0, 0, 68)},
  15. {need = 5, title = "Decent", color = Color(68, 187, 255)},
  16. {need = 6, title = "Average", color = Color(255, 136, 255)},
  17. {need = 7, title = "Thug", color = Color(51, 51, 102)},
  18. {need = 8, title = "Intermediate", color = Color(0, 68, 0)},
  19. {need = 9, title = "Semi-Pro", color = Color(0, 187, 68)},
  20. {need = 10, title = "Skilled", color = Color(0, 0, 136)},
  21. {need = 11, title = "Adept", color = Color(136, 0, 68)},
  22. {need = 12, title = "Pro", color = Color(226, 255, 82)},
  23. {need = 13, title = "Impressive", color = Color(187, 68, 0)},
  24. {need = 14, title = "Awesome", color = Color(0, 68, 255)},
  25. {need = 15, title = "Hardcore", color = Color(0, 187, 136)},
  26. {need = 16, title = "Prestigious", color = Color(255, 68, 255)},
  27. {need = 17, title = "Veteran", color = Color(0, 136, 68)},
  28. {need = 18, title = "Expert", color = Color(255, 187, 0)},
  29. {need = 19, title = "Beast", color = Color(136, 0, 0)},
  30. {need = 20, title = "Addict", color = Color(136, 0, 0)},
  31. {need = 21, title = "Epic", color = Color(0, 187, 255)},
  32. {need = 22, title = "Supreme", color = Color(255,102,125)},
  33. {need = 23, title = "Insane", color = Color(255, 0, 0)},
  34. {need = 24, title = "Elite", color = Color(255, 68, 0)},
  35. {need = 25, title = "Master", color = Color(136, 0, 136)},
  36. {need = 26, title = "Criminal Mastermind", color = Color(0, 255, 0)},
  37. {need = 27, title = "Nightmare", color = Color(68, 0, 0)},
  38. {need = 28, title = "Phenomenon", color = Color(0, 0, 255)},
  39. {need = 29, title = "Stoner", color = Color(0,112,0 )},
  40. {need = 30, title = "Mythic", color = Color(153, 204, 255)},
  41. {need = 30, title = "Unreal", color = Color(166, 0, 0)},
  42. {need = 31, title = "Demonic", color = Color(255,128,0 ), glow = true},
  43. {need = 32, title = "Emperor", color = Color(0, 255, 255), glow = true},
  44. {need = 33, title = "Satanic", color = Color(255, 0, 0), glow = true},
  45. {need = 34, title = "Phantom", color = Color(140, 66, 244), glow = true},
  46. {need = 35, title = "Marvelous", color = Color(244, 116, 66), glow = true},
  47. {need = 36, title = "Daemon", color = Color(2, 137, 255), glow = true},
  48. {need = 37, title = "Monarch", color = Color(86, 86, 86), glow = true},
  49. {need = 38, title = "Fanatic", color = Color(255, 255, 0), glow = true},
  50. {need = 39, title = "Bloodthirsty", color = Color(168, 12, 12), glow = true},
  51. {need = 40, title = "Merciless", color = Color(9, 108, 156), glow = true},
  52. {need = 41, title = "Ace", color = Color(57, 9, 155), glow = true},
  53. {need = 42, title = "Fearless", color = Color(233, 0, 0), glow = true},
  54. {need = 43, title = "Unpredictable", color = Color(170, 108, 159), glow = true},
  55. {need = 44, title = "Impracticable", color = Color(0, 141, 14), glow = true},
  56. {need = 45, title = "Psychopath", color = Color(105, 105, 105), glow = true},
  57. {need = 46, title = "Maniac", color = Color(29, 29, 135), glow = true},
  58. {need = 47, title = "Dangerous", color = Color(79, 0, 169), glow = true},
  59. {need = 48, title = "Godlike", color = Color(0, 255, 128), glow = true},
  60. {need = 49, title = "Demi-God", color = Color(163, 0, 163), glow = true},
  61. {need = 50, title = "GodKing", color = "dezmond is shit", glow = true}
  62. }
  63.  
  64. EXP.Unlocks = {
  65. ---Prestige 1
  66. {name = "Default Skin", model = "models/weapons/w_crowbar.mdl", vmmodel = "models/weapons/c_crowbar.mdl", rank = 1, giveweapon = false},
  67. {name = "Diamond Sword", model = "models/weapons/w_diamond_mc_sword.mdl", vmmodel = "models/weapons/v_diamond_mc_sword.mdl", rank = 5, giveweapon = false},
  68. {name = "Master Sword", model = "models/weapons/v_masters.mdl", vmmodel = "models/weapons/v_masters.mdl", rank = 10, giveweapon = false},
  69. {name = "Default T Knife", model = "models/weapons/w_csgo_default_t.mdl", vmmodel = "models/weapons/v_csgo_default_t.mdl", rank = 15, giveweapon = true, class = "csgo_default_t"},
  70. {name = "Sparda Sword", model = "models/tiggomods/weapons/DmC4/w_Sparda.mdl", vmmodel = "models/tiggomods/weapons/DmC4/v_Sparda.mdl", rank = 20, giveweapon = false},
  71. {name = "Redqueen Sword", model = "models/tiggomods/weapons/DmC4/w_redqueen.mdl", vmmodel = "models/tiggomods/weapons/DmC4/v_redqueen.mdl", rank = 25, giveweapon = false},
  72. {name = "Arbiter Sword", model = "models/tiggomods/weapons/DmC5/w_arbiter.mdl", vmmodel = "models/tiggomods/weapons/DmC5/v_arbiter.mdl", rank = 30, giveweapon = false},
  73. {name = "Thors Hammer(Mjölnir)", model = "models/Rottweiler/v_thor.mdl", vmmodel = "models/Rottweiler/v_thor.mdl", rank = 35, giveweapon = false},
  74. {name = "Butterfly Knife | Damascus", class = "csgo_butterfly_damascus", model = "models/weapons/w_csgo_butterfly.mdl", rank = 40}, prestige = 1},
  75. {name = "Butterfly Knife | Fade", class = "csgo_butterfly_fade", model = "models/weapons/w_csgo_butterfly.mdl", rank = 45}, prestige = 1},
  76. {name = "Butterfly Knife | Marble Fade", class = "csgo_butterfly_marblefade", model = "models/weapons/w_csgo_butterfly.mdl", rank = 50, prestige = 1},
  77.  
  78. ---Prestige 2
  79.  
  80. {name = "Bayonet Knife | Blue Steel", class = "csgo_bayonet_bluesteel", model = "models/weapons/w_csgo_bayonet.mdl", rank = 10, prestige = 2},
  81. {name = "Bowie Knife | Ultraviolet", class = "csgo_bowie_ultraviolet", model = "models/weapons/w_csgo_bowie.mdl", rank = 20, prestige = 2},
  82. {name = "Bayonet Knife | Fade", class = "csgo_bayonet_fade", model = "models/weapons/w_csgo_bayonet.mdl", rank = 30, prestige = 2},
  83. {name = "Daggers | Case", class = "csgo_daggers_case", model = "models/weapons/w_csgo_push.mdl", rank = 40, prestige = 2},
  84. {name = "Bowie Knife | Blue Steel", class = "csgo_bowie_bluesteel", model = "models/weapons/w_csgo_bowie.mdl", rank = 50, prestige = 2},
  85.  
  86. ---Prestige 3
  87.  
  88. {name = "Butterfly Knife | Tiger", class = "csgo_butterfly_tiger", model = "models/weapons/w_csgo_butterfly.mdl", rank = 10, prestige = 3},
  89. {name = "Butterfly Knife | Ultraviolet", class = "csgo_butterfly_ultraviolet", model = "models/weapons/w_csgo_butterfly.mdl", rank = 20, prestige = 3},
  90. {name = "Daggers | Blue Steel", class = "csgo_daggers_bluesteel", model = "models/weapons/w_csgo_push.mdl", rank = 30, prestige = 3},
  91. {name = "Falchion Knife | CrimsonWebs", class = "csgo_falchion_crimsonwebs", model = "models/weapons/w_csgo_falchion.mdl", rank = 40, prestige = 3},
  92. {name = "Falchion Knife | Night", class = "csgo_m9_marblefade", model = "models/weapons/w_csgo_falchion.mdl", rank = 50, prestige = 3},
  93.  
  94. ---Prestige 4
  95.  
  96. {name = "Huntsman Knife | Rust Coat", class = "csgo_huntsman_rustcoat", model = "models/weapons/w_csgo_tactical.mdl", rank = 10, prestige = 4},
  97. {name = "Karambit Knife | Damascus", class = "csgo_karambit_damascus", model = "models/weapons/w_csgo_karambit.mdl", rank = 20, prestige = 4},
  98. {name = "M9 Knife | Slaughter", class = "csgo_m9_slaughter", model = "models/weapons/w_csgo_m9.mdl", rank = 30, prestige = 4},
  99. {name = "Butterfly Knife | Slaughter", class = "csgo_butterfly_slaughter", model = "models/weapons/w_csgo_butterfly.mdl", rank = 40, prestige = 4},
  100. {name = "M9 Knife | Damascus", class = "csgo_m9_damascus", model = "models/weapons/w_csgo_m9.mdl", rank = 50, prestige = 4},
  101.  
  102. ---Prestige 5
  103.  
  104. {name = "Huntsman Knife | CrimsonWebs", class = "csgo_huntsman_crimsonwebs", model = "models/weapons/w_csgo_tactical.mdl", rank = 10, prestige = 5},
  105. {name = "Gut Knife | Damascus", class = "csgo_gut_damascus", model = "models/weapons/w_csgo_gut.mdl", rank = 20, prestige = 5},
  106. {name = "Falchion Knife | Ultraviolet", class = "csgo_falchion_ultraviolet", model = "models/weapons/w_csgo_falchion.mdl", rank = 30, prestige = 5},
  107. {name = "Falchion Knife | Fade", class = "csgo_falchion_fade", model = "models/weapons/w_csgo_falchion.mdl", rank = 40, prestige = 5},
  108. {name = "Daggers | Tiger", class = "csgo_daggers_tiger", model = "models/weapons/w_csgo_push.mdl", rank = 50, prestige = 5},
  109.  
  110. ---Prestige 6
  111.  
  112. {name = "Default Knife | Golden", class = "csgo_default_t_golden", model = "models/weapons/w_csgo_default_t.mdl", rank = 10, prestige = 6},
  113. {name = "Daggers | Webs", class = "csgo_daggers_webs", model = "models/weapons/w_csgo_push.mdl", rank = 20, prestige = 6},
  114. {name = "Bowie Knife | Damascus", class = "csgo_bowie_damascus", model = "models/weapons/w_csgo_bowie.mdl", rank = 30, prestige = 6},
  115. {name = "Bowie Knife | Marble Fade", class = "csgo_bowie_marblefade", model = "models/weapons/w_csgo_bowie.mdl", rank = 40, prestige = 6},
  116. {name = "Bowie Knife | Tiger", class = "csgo_bowie_tiger", model = "models/weapons/w_csgo_bowie.mdl", rank = 50, prestige = 6},
  117.  
  118. ---Prestige 7
  119.  
  120. {name = "Flip Knife | Marble Fade", class = "csgo_flip_marblefade", model = "models/weapons/w_csgo_flip.mdl", rank = 10, prestige = 7},
  121. {name = "Bayonet Knife | Case", class = "csgo_bayonet_case", model = "models/weapons/w_csgo_bayonet.mdl", rank = 20, prestige = 7},
  122. {name = "Daggers | Boreal", class = "csgo_daggers_boreal", model = "models/weapons/w_csgo_push.mdl", rank = 30, prestige = 7},
  123. {name = "Falchion Knife | Damascus", class = "csgo_falchion_damascus", model = "models/weapons/w_csgo_falchion.mdl", rank = 40, prestige = 7},
  124. {name = "Bowie Knife | Slaughter", class = "csgo_bowie_slaughter", model = "models/weapons/w_csgo_bowie.mdl", rank = 50, prestige = 7},
  125.  
  126.  
  127. ---Prestige 8
  128.  
  129. {name = "Bowie Knife | CrimsonWebs", class = "csgo_bowie_crimsonwebs", model = "models/weapons/w_csgo_bowie.mdl", rank = 10, prestige = 8},
  130. {name = "Butterfly Knife | Boreal", class = "csgo_butterfly_boreal", model = "models/weapons/w_csgo_butterfly.mdl", rank = 20, prestige = 8},
  131. {name = "Daggers | Grey Scaled", class = "csgo_daggers_greyscaled", model = "models/weapons/w_csgo_push.mdl", rank = 30, prestige = 8},
  132. {name = "Daggers | Rust Coat", class = "csgo_daggers_rustcoat", model = "models/weapons/w_csgo_push.mdl", rank = 40, prestige = 8},
  133. {name = "Bayonet Knife| Forest", class = "csgo_bayonet_ddpat", model = "models/weapons/w_csgo_bayonet.mdl", rank = 50, prestige = 8},
  134.  
  135. ---Prestige 9
  136.  
  137. {name = "Daggers | Forest", class = "csgo_daggers_ddpat", model = "models/weapons/w_csgo_push.mdl", rank = 10, prestige = 9},
  138. {name = "Daggers | Night", class = "csgo_daggers_night", model = "models/weapons/w_csgo_push.mdl", rank = 20, prestige = 9},
  139. {name = "Daggers | Fade", class = "csgo_daggers_fade", model = "models/weapons/w_csgo_push.mdl", rank = 30, prestige = 9},
  140. {name = "Falchion Knife | Boreal", class = "csgo_falchion_boreal", model = "models/weapons/w_csgo_falchion.mdl", rank = 40, prestige = 9},
  141. {name = "CT Knife | Golden", class = "csgo_default_golden", model = "models/weapons/w_csgo_default.mdl", rank = 50, prestige = 9},
  142.  
  143.  
  144.  
  145. ---Prestige 10
  146.  
  147. {name = "Falchion Knife | Slaughter", class = "csgo_falchion_slaughter", model = "models/weapons/w_csgo_falchion.mdl", rank = 10, prestige = 10},
  148. {name = "Falchion Knife | Blue Steel", class = "csgo_falchion_bluesteel", model = "models/weapons/w_csgo_falchion.mdl", rank = 20, prestige = 10},
  149. {name = "Flip Knife | Damascus", class = "csgo_flip_damascus", model = "models/weapons/w_csgo_flip.mdl", rank = 30, prestige = 10},
  150. {name = "Falchion Knife | Marble Fade", class = "csgo_falchion_marblefade", model = "models/weapons/w_csgo_falchion.mdl", rank = 40, prestige = 10},
  151. {name = "Daggers | Marble Fade", class = "csgo_daggers_marblefade", model = "models/weapons/w_csgo_push.mdl", rank = 50, prestige = 10}
  152. }
  153.  
  154.  
  155. local meta = FindMetaTable( "Player" )
  156.  
  157. function meta:GetLevel()
  158. return tonumber(self:GetNWInt( "level", 1 )) or 1
  159. end
  160.  
  161. function meta:GetPrestige()
  162. return tonumber(self:GetNWInt("Prestige", 1))
  163. end
  164.  
  165. function meta:GetEXP()
  166. local exp = tonumber( self:GetNWInt( "exp" , 0) )
  167. if !EXP.Ranks[self:GetLevel()+1] then
  168. exp = self:EXPNeeded()
  169. end
  170. return exp
  171. end
  172.  
  173. function meta:EXPNeeded()
  174. local curlvl = self:GetLevel() or 1
  175. local next = EXP.Ranks[curlvl].need
  176. local pres = self:GetPrestige() - 1
  177.  
  178. return (EXP.Ranks[next].need * (EXP.BaseNeed)) * ((pres / 10) + 1) or 0
  179. end
  180.  
  181. function meta:GetLevelName()
  182. if not isfunction(self.GetUndercover) or not self:GetUndercover() then
  183. return EXP.Ranks[self:GetLevel()].title
  184. else
  185. return EXP.Ranks[self:GetUndercoverLevel()].title
  186. end
  187. end
  188.  
  189. function meta:GetRealLevelName()
  190. if not isfunction(self.GetUndercover) or not self:GetUndercover() then
  191. if self:GetPrestige() != 1 then return "Prestige "..self:GetPrestige().." | "..EXP.Ranks[self:GetLevel()].title end
  192. return EXP.Ranks[self:GetLevel()].title
  193. else
  194. return EXP.Ranks[self:GetUndercoverLevel()].title
  195. end
  196. end
  197.  
  198. function RainbowColor()
  199. local frequency, time = .5, RealTime()
  200. local red = math.sin( frequency * time ) * 127 + 128
  201. local green = math.sin( frequency * time + 2 ) * 127 + 128
  202. local blue = math.sin( frequency * time + 4 ) * 127 + 128
  203. return Color( red, green, blue )
  204. end
  205.  
  206. function meta:GetLevelColor()
  207. if not isfunction(self.GetUndercover) or not self:GetUndercover() then
  208. if type(EXP.Ranks[self:GetLevel()].color) == "string" then
  209. return RainbowColor()
  210. else
  211. return EXP.Ranks[self:GetLevel()].color
  212. end
  213. else
  214. return EXP.Ranks[self:GetUndercoverLevel()].color
  215. end
  216. end
  217.  
  218. function EXP.GetSkin(id, world)
  219. id = math.Round(id)
  220. if not EXP.Unlocks[id] then return "models/weapons/c_crowbar.mdl" end
  221.  
  222. local bool = EXP.Unlocks[id].giveweapon
  223.  
  224. if bool == nil then bool = true end
  225.  
  226. if bool then
  227. return EXP.Unlocks[id].class or "weapon_fpcrowbar"
  228. end
  229.  
  230. if world then
  231. return EXP.Unlocks[id].model
  232. end
  233. if file.Exists( EXP.Unlocks[id].vmmodel, "GAME" ) then
  234. return EXP.Unlocks[id].vmmodel
  235. end
  236.  
  237. return "models/weapons/c_crowbar.mdl"
  238. end
  239.  
  240. if SERVER then
  241.  
  242. util.AddNetworkString("ChatAddText_LevelSystem")
  243.  
  244. else
  245.  
  246. net.Receive("ChatAddText_LevelSystem", function(len, ply)
  247. chat.AddText(unpack(net.ReadTable()))
  248. end)
  249.  
  250. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement