Advertisement
Wubzer

Gun Module

Aug 27th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.90 KB | None | 0 0
  1.  
  2. --// Guns & Skins Handling
  3. --// By: Wubzer/WXBZ
  4.  
  5.  
  6. local module = {};
  7. local gunStorage = game.ServerStorage.Guns;
  8. local skinStorage = game.ServerStorage.Skins;
  9.  
  10.  
  11.  
  12.  
  13. --// Gun Configuration
  14. do
  15.    
  16.     local g = {
  17.        
  18.         [gunStorage.MNineEl] = {
  19.             Name        ="M1911";
  20.             Bio         ="Cheap, but effective pistol.";
  21.             Level       =0;
  22.             Cost        =nil;
  23.             Rarity      =nil;
  24.             HeadDamage  =75;
  25.             TorsoDamage =25;
  26.             ArmsDamage  =15;
  27.             LegsDamage  =20;
  28.             DamageFall  =3;
  29.             MaxRange    =120;
  30.             ClipSize    =8;
  31.             InReserve   =38;
  32.             RecoilType  =1;
  33.             RecoilScale =0.5;
  34.             FireRate    =0.13;
  35.             AimTime     =0.2;
  36.             HipAccuracy =0.7;
  37.             Image       ="*There is no thumbnail image currently.*";
  38.             Shooting    ="*There is no shooting sound currently.*";
  39.             Reloading   ="*There is no reloading sound currently.*";
  40.         },
  41.        
  42.         [gunStorage.MPSeven] = {
  43.             Name        ="MP7";
  44.             Bio         ="Deadly SMG at close-medium range.";
  45.             Level       =0;
  46.             Cost        =nil;
  47.             Rarity      =nil;
  48.             HeadDamage  =90;
  49.             TorsoDamage =16;
  50.             ArmsDamage  =8;
  51.             LegsDamage  =12;
  52.             DamageFall  =2;
  53.             MaxRange    =170;
  54.             ClipSize    =8;
  55.             InReserve   =38;
  56.             RecoilType  =1;
  57.             RecoilScale =0.4;
  58.             FireRate    =0.08;
  59.             AimTime     =0.3;
  60.             HipAccuracy =0.4;
  61.             Image       ="*There is no thumbnail image currently.*";
  62.             Shooting    ="*There is no shooting sound currently.*";
  63.             Reloading   ="*There is no reloading sound currently.*";
  64.         }
  65.        
  66.     };
  67.    
  68.    
  69.     function module.gInfo(gunName)
  70.        
  71.         local pos;
  72.         for i, gun in pairs(g) do
  73.             if (gun.Name == gunName) then
  74.                 pos = i;
  75.                 break;
  76.             end;
  77.         end;
  78.         if (pos == nil) then return {0, 0, 0, 0}; end;
  79.         return {g[pos].Name, g[pos].Bio, g[pos].Level, g[pos].Cost, g[pos].Rarity};
  80.    
  81.     end;
  82.    
  83.    
  84.     function module.gDamage(gunName)
  85.        
  86.         local pos;
  87.         for i, gun in pairs(g) do
  88.             if (gun.Name == gunName) then
  89.                 pos = i;
  90.                 break;
  91.             end;
  92.         end;
  93.         if (pos == nil) then return {0, 0, 0, 0}; end;
  94.         return {g[pos].HeadDamage, g[pos].TorsoDamage, g[pos].ArmsDamage, g[pos].LegsDamage};
  95.    
  96.     end;
  97.    
  98.    
  99.     function module.gConfiguration(gunName)
  100.        
  101.         local pos;
  102.         for i, gun in pairs(g) do
  103.             if (gun.Name == gunName) then
  104.                 pos = i;
  105.                 break;
  106.             end;
  107.         end;
  108.         if (pos == nil) then return {0, 0, 0, 0, 0, 0, 0, 0, 0}; end;
  109.         return {g[pos].DamageFall, g[pos].MaxRange, g[pos].ClipSize, g[pos].InReserve, g[pos].RecoilType, g[pos].RecoilScale, g[pos].FireRate, g[pos].AimTime, g[pos].HipAccuracy, g[pos].Image};
  110.    
  111.     end;
  112.    
  113.    
  114.     function module.gAudio(gunName)
  115.        
  116.         local pos;
  117.         for i, gun in pairs(g) do
  118.             if (gun.Name == gunName) then
  119.                 pos = i;
  120.                 break;
  121.             end;
  122.         end;
  123.         if (pos == nil) then return {0, 0}; end;
  124.         return {g[pos].Shooting, g[pos].Reloading};
  125.        
  126.     end;
  127.    
  128. end;
  129.  
  130.  
  131.  
  132.  
  133. --// Skin Configuration
  134. do
  135.    
  136.     local s = {
  137.         [skinStorage.DeveloperGold] = {
  138.             Type    = 0;
  139.             Name    = "24k Gold";
  140.             Bio     = "This skin is only for the l33test devs.";
  141.             Rarity  = 5;
  142.             Image   = "";
  143.         }
  144.     }
  145.    
  146. end;
  147.  
  148.  
  149.  
  150.  
  151. return module;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement