Advertisement
Owen007

Untitled

Jul 2nd, 2022
889
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.06 KB | None | 0 0
  1. -- made by siper#9938
  2.  
  3. -- modules
  4. local network, char, loadgun, loadknife; do
  5. for _, object in next, getgc(true) do
  6. if (typeof(object) == "table") then
  7. if (rawget(object, "send")) then
  8. network = object;
  9. elseif (rawget(object, "setbasewalkspeed")) then
  10. char = object;
  11. end
  12. elseif (typeof(object) == "function") then
  13. local name = debug.getinfo(object).name;
  14.  
  15. if (name == "loadgun") then
  16. loadgun = object;
  17. elseif (name == "loadknife") then
  18. loadknife = object;
  19. end
  20. end
  21. end
  22. end
  23.  
  24. -- services
  25. local replicatedStorage = game:GetService("ReplicatedStorage");
  26.  
  27. -- cache
  28. local content = replicatedStorage:WaitForChild("Content");
  29. local productionContent = content:WaitForChild("ProductionContent");
  30. local attachmentModules = productionContent:WaitForChild("AttachmentModules");
  31. local gunModules = productionContent:WaitForChild("GunModules");
  32.  
  33. -- stored data
  34. local gunIgnore = {"JUGGUN", "HK417Old", "PAINTBALL GUN", "RAILGUN OLD", "PPK12", "SVK12E", "MG42"};
  35. local weaponData = {};
  36. local attachmentData = {};
  37. local primaryClasses = { "ASSAULT", "BATTLE", "CARBINE", "SHOTGUN", "PDW", "DMR", "LMG", "SNIPER" };
  38. local generalClassData = {
  39. ["ASSAULT"] = "AK12",
  40. ["BATTLE"] = "AK12",
  41. ["CARBINE"] = "M4A1",
  42. ["SHOTGUN"] = "KSG 12",
  43. ["PDW"] = "MP5K",
  44. ["DMR"] = "INTERVENTION",
  45. ["LMG"] = "COLT LMG",
  46. ["SNIPER"] = "INTERVENTION",
  47. ["PISTOL"] = "M9",
  48. ["MACHINE PISTOL"] = "M9",
  49. ["REVOLVER"] = "M9",
  50. ["OTHER"] = "M9",
  51. ["FRAGMENTATION"] = "M67 FRAG",
  52. ["HIGH EXPLOSIVE"] = "M67 FRAG",
  53. ["IMPACT"] = "M67 FRAG",
  54. ["ONE HAND BLADE"] = "KNIFE",
  55. ["TWO HAND BLADE"] = "KNIFE",
  56. ["ONE HAND BLUNT"] = "MAGLITE CLUB",
  57. ["TWO HAND BLUNT"] = "HOCKEY STICK",
  58. };
  59. local weapons = {};
  60.  
  61. -- hooks
  62. do
  63. local oldNetworkSend = network.send; network.send = function(self, name, ...)
  64. local args = {...};
  65.  
  66. if (name == "changewep") then
  67. weaponData[args[1]] = args[2];
  68. args[2] = generalClassData[weapons[args[2]].type];
  69. end
  70.  
  71. if (name == "changeatt") then
  72. attachmentData[args[2]] = args[3];
  73. return
  74. end
  75.  
  76. return oldNetworkSend(self, name, unpack(args));
  77. end
  78.  
  79. local oldLoadgrenade = char.loadgrenade; char.loadgrenade = function(self, name, ...)
  80. name = weaponData["Grenade"] or name;
  81. return oldLoadgrenade(self, name, ...);
  82. end;
  83.  
  84. local oldLoadknife; oldLoadknife = hookfunction(loadknife, function(name, ...)
  85. name = weaponData["Knife"] or name;
  86. return oldLoadknife(name, ...);
  87. end);
  88.  
  89. local oldLoadgun; oldLoadgun = hookfunction(loadgun, function(name, magsize, sparerounds, attachments, ...)
  90. local gunData = weapons[name];
  91. local newName = table.find(primaryClasses, gunData.type) and weaponData["Primary"] or weaponData["Secondary"];
  92.  
  93. name = (newName and newName or name);
  94.  
  95. local attachs = attachmentData[name];
  96.  
  97. if (attachs) then
  98. attachments = attachs;
  99. end
  100.  
  101. return oldLoadgun(name, magsize, sparerounds, attachments, ...);
  102. end);
  103. end
  104.  
  105. -- init
  106. do
  107. for _, module in next, gunModules:GetChildren() do
  108. if (not table.find(gunIgnore, module.Name)) then
  109. local data = require(module);
  110. weapons[module.Name] = data;
  111. end
  112. end
  113.  
  114. for _, module in next, attachmentModules:GetChildren() do
  115. local data = require(module);
  116. data.unlockkills = 0;
  117. end
  118.  
  119. for _, module in next, gunModules:GetChildren() do
  120. if (not table.find(gunIgnore, module.Name)) then
  121. local data = require(module);
  122. data.unlockrank = 0;
  123. data.adminonly = false;
  124. data.supertest = false;
  125. data.exclusiveunlock = false;
  126. data.hideunlessowned = false;
  127. data.adminonly = false;
  128. end
  129. end
  130. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement