Advertisement
RIKolig

arabic fortnite(translated: scq2x#5988)

Dec 17th, 2021
6,267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.48 KB | None | 0 0
  1. local weaponSystem = require(game:service'ReplicatedStorage'.WeaponsSystem.Libraries.BaseWeapon)
  2. local Material = loadstring(game:HttpGet("https://raw.githubusercontent.com/Kinlei/MaterialLua/master/Module.lua"))()
  3.  
  4. local client = game:GetService('Players').LocalPlayer;
  5.  
  6. local oldFire = weaponSystem.fire;
  7. local oldGetConfigValue = weaponSystem.getConfigValue
  8. local oldUseAmmo = weaponSystem.useAmmo;
  9. local oldGetAmmo = weaponSystem.getAmmoInWeapon
  10.  
  11. local function getClosestPlayer()
  12.     local final = nil
  13.     local maxRange = math.huge;
  14.  
  15.     for i, player in next, game:GetService('Players'):GetPlayers() do
  16.         if player == client then continue end
  17.         if (not player.Character) then continue end
  18.  
  19.         local humanoid = player.Character:FindFirstChild('Humanoid');
  20.         local head = player.Character:FindFirstChild('Head');
  21.  
  22.         if (not head) or (not humanoid) then continue end
  23.         if (humanoid.Health <= 0) then continue end
  24.  
  25.         local vector, visible = workspace.CurrentCamera:WorldToViewportPoint(head.Position);
  26.         if (not visible) then continue end
  27.  
  28.         local cursorPosition = game:GetService('UserInputService'):GetMouseLocation();
  29.         local screenPosition = Vector2.new(vector.X, vector.Y);
  30.  
  31.         local difference = math.floor((screenPosition - cursorPosition).magnitude);
  32.         if (difference < maxRange) then
  33.             maxRange = difference
  34.             final = head;
  35.         end
  36.     end
  37.     return final;
  38. end
  39.  
  40. function weaponSystem.getAmmoInWeapon(self, ...)
  41.     local arguments = {...}
  42.     if _G.infiniteAmmo then return 9e9 end
  43.     return oldGetAmmo(self, unpack(arguments))
  44. end
  45.  
  46. function weaponSystem.fire(self, ...)
  47.     local arguments = {...};
  48.  
  49.     if _G.silentAim then
  50.         local t = getClosestPlayer()
  51.         if t then
  52.             arguments[2] = (t.Position - arguments[1]).unit;
  53.             arguments[3] = 1;
  54.         end
  55.     end
  56.  
  57.     return oldFire(self, unpack(arguments))
  58. end
  59.  
  60. function weaponSystem.getConfigValue(self, ...)
  61.     local arguments = {...}
  62.  
  63.     if _G.fastFire and arguments[1] == 'ShotCooldown' then
  64.         return 0.01
  65.     elseif _G.autoGuns and arguments[1] == 'FireMode' then
  66.         return 'Automatic'
  67.     elseif _G.noRecoil and (arguments[1] == 'RecoilMin' or arguments[1] == 'RecoilMax') then
  68.         return 0
  69.     elseif _G.noSpread and (arguments[1] == 'MinSpread' or arguments[1] == 'MaxSpread') then
  70.         return 0
  71.     end
  72.  
  73.     return oldGetConfigValue(self, unpack(arguments))
  74. end
  75.  
  76. function weaponSystem.useAmmo(self, ...)
  77.     local arguments = {...}
  78.     if _G.infiniteAmmo then
  79.         if (self.ammoInWeaponValue) then
  80.             return 1;
  81.         end
  82.     end
  83.     return oldUseAmmo(self, unpack(arguments))
  84. end
  85.  
  86. local window = {} do
  87.     local windowMeta = {}
  88.     windowMeta.__index = windowMeta
  89.  
  90.     function windowMeta:Tab(name)
  91.         local tab = self.window.New({
  92.             Title = name;
  93.         })
  94.  
  95.         return setmetatable({
  96.             window = self.window;
  97.             tab = tab;
  98.         }, windowMeta)
  99.     end
  100.  
  101.     function windowMeta:Toggle(name, callback)
  102.         self.tab.Toggle({
  103.             Text = name;
  104.             Callback = callback;
  105.         })
  106.     end
  107.  
  108.     function windowMeta:Banner(name, options)
  109.         local _menu = {}
  110.  
  111.         for name, str in next, options do
  112.             _menu[name] = function() self.window.Banner({ Text = str }) end
  113.         end
  114.  
  115.         self.tab.Button({
  116.             Text = name;
  117.             Menu = _menu
  118.         })
  119.     end
  120.  
  121.     function window.new(name)
  122.         local main = Material.Load({
  123.             Title = name;
  124.             Style = 1;
  125.  
  126.             Theme = 'Jester';
  127.             SizeX = 300;
  128.             SizeY = 320;
  129.         })
  130.  
  131.         return setmetatable({ window = main }, windowMeta)
  132.     end
  133. end
  134.  
  135. local gui = window.new('Arabic Fortnite | перевёл scq2x#5988');
  136. local tab = gui:Tab('Главное');
  137.  
  138. tab:Toggle('Аим', function(value) _G.silentAim = value end)
  139. tab:Toggle('Беск. патроны', function(value) _G.infiniteAmmo = value end)
  140. tab:Toggle('Анти разброс', function(value) _G.noRecoil = value end)
  141. tab:Toggle('No Spread', function(value) _G.noSpread = value end)
  142. tab:Toggle('Быстрая стрельба', function(value) _G.fastFire = value end)
  143. tab:Toggle('Как автомат крч', function(value) _G.autoGuns = value end)
  144. tab:Banner('кредиты:', {
  145.     Scripting = "wally#5423";
  146.     ["Mental support"] = "swag#5948 & jack#2000",
  147. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement