-
Notifications
You must be signed in to change notification settings - Fork 159
Expand file tree
/
Copy pathNarvaleWarfareScript.lua
More file actions
68 lines (66 loc) · 2.21 KB
/
Copy pathNarvaleWarfareScript.lua
File metadata and controls
68 lines (66 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
local library = loadstring(game:HttpGet("https://pastebin.com/raw/HYcfs6KC", true))()
library.options.underlinecolor = "rainbow"
local w = library:CreateWindow('Naval Warfare')
w:Toggle('Rapid Fire (Hold E)', {flag = "toggle1"})
spawn(function()
while wait() do
if w.flags.toggle1 then
if game.Players.LocalPlayer.Character:WaitForChild("Humanoid") then
local UIS = game:GetService("UserInputService")
while wait() do
if UIS:IsKeyDown(Enum.KeyCode.E) then
game:GetService("Players").LocalPlayer.Character["M1 Garand"]:Activate()
end
end
end
end
end
end)
w:Toggle('Infinite Ammo', {flag = "toggle2"})
function AvoidCrasher(Fenv, F)
for i, v in pairs(Fenv) do
if i == "script" and typeof(v) == "Instance" and v.ClassName == F.ClassName and F == v then
return true
end
end
return false
end
function LoopThroughTable(Tab, F, LookThrough)
for i, v in pairs(LookThrough) do
if typeof(v) == "function" and islclosure(v) and getfenv(v) and AvoidCrasher(getfenv(v), F) then
table.insert(Tab, v)
end
end
end
function GetFunctionsFromScript(F)
local functionstab = {}
LoopThroughTable(functionstab, F, getgc())
LoopThroughTable(functionstab, F, debug.getregistry())
return functionstab
end
function ChangeAmmoGun(Gun)
if not Gun:FindFirstChild("TriggerScript") then return end
local T = GetFunctionsFromScript(Gun.TriggerScript)
for i, v in pairs(GetFunctionsFromScript(Gun.TriggerScript)) do
if table.find(debug.getconstants(v), "Reloading...") then
if typeof(debug.getupvalue(v, 3)) ~= "number" then
debug.setupvalue(v, 4, 99999999)
else
hookfunction(v, function() end)
end
elseif table.find(debug.getconstants(T[i]), "Ray") then
debug.setconstant(T[i], 9, 999999999)
end
end
end
for i, v in pairs(game.Players.LocalPlayer.Backpack:GetChildren()) do
ChangeAmmoGun(v)
end
game.Players.LocalPlayer.CharacterAdded:connect(function()
repeat
wait()
until game.Players.LocalPlayer:FindFirstChild("Backpack") and #game.Players.LocalPlayer.Backpack:GetChildren() > 0
for i, v in pairs(game.Players.LocalPlayer.Backpack:GetChildren()) do
ChangeAmmoGun(v)
end
end)