-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathArsenal.lua
More file actions
240 lines (185 loc) · 7.44 KB
/
Arsenal.lua
File metadata and controls
240 lines (185 loc) · 7.44 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
local library = sharedRequire('../../UILibrary.lua');
local Utility = sharedRequire('../../utils/Utility.lua');
local Maid = sharedRequire('../../utils/Maid.lua');
local Services = sharedRequire('../../utils/Services.lua');
local ControlModule = sharedRequire('../../classes/ControlModule.lua');
local FindFirstChild, FindFirstChildWhichIsA = game.FindFirstChild, game.FindFirstChildWhichIsA;
local IsA = game.IsA;
local column1, column2 = unpack(library.columns);
local RunService = Services:Get('RunService');
local LocalPlayer = Services:Get('Players').LocalPlayer;
local Heartbeat = RunService.Heartbeat;
local toggleFly;
local toggleNoClip;
local jumpPower;
do --//GC Scan
function Utility:getCharacter(player)
local character = player.Character;
if (not character or not FindFirstChild(character, 'Spawned')) then return end;
local humanoid = FindFirstChildWhichIsA(character, 'Humanoid');
local maxHealth = humanoid and humanoid.MaxHealth or 100;
local health = humanoid and humanoid.Health or 100;
local floatHealth = (health / maxHealth) * 100;
return player.Character, maxHealth, floatHealth, math.floor(health);
end;
do --//Bypass anti cheat
local oldSpawn;
oldSpawn = hookfunction(spawn, newcclosure(function(f)
local Constants = getconstants(f)
if(table.find(Constants, 'BeanBoozled')) then
return wait(9e9)
end
return oldSpawn(f)
end))
local clientEnv;
local clientEnvTwo;
for i,v in next, getgc(true) do
if(clientEnv and clientEnvTwo) then
break;
end;
if(typeof(v) == 'function' and islclosure(v) and not is_synapse_function(v)) then
local Env = getfenv(v);
if(rawget(Env, 'ammocount')) then
clientEnv = Env;
end;
elseif(typeof(v) == 'table' and rawget(v, 'firebullet')) then
clientEnvTwo = v;
end;
end;
local oldFireBullet = clientEnvTwo.firebullet;
clientEnvTwo.firebullet = function(...)
if(library.flags.infiniteAmmo) then
clientEnv.ammocount.Value = 100;
end;
return oldFireBullet(...);
end;
end
local maid = Maid.new();
local BodyVelocity;
function toggleFly(toggle)
if(not toggle) then
if(BodyVelocity) then
BodyVelocity:Destroy();
BodyVelocity = nil;
end;
return;
end;
local BodyVelocity = Instance.new('BodyVelocity');
repeat
local RootPart = LocalPlayer.Character and LocalPlayer.Character:FindFirstChild('Head');
local Camera = workspace.CurrentCamera;
local moveVector = ControlModule:GetMoveVector();
if(RootPart and Camera) then
BodyVelocity.Parent = RootPart;
BodyVelocity.Velocity = Camera.CFrame:VectorToWorldSpace(moveVector * library.flags.flySpeed);
BodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge);
end;
Heartbeat:Wait();
until not library.flags.fly;
BodyVelocity.Parent = nil;
end;
function toggleNoClip(toggle)
if(not toggle) then return end;
repeat
local Character = LocalPlayer.Character;
if(Character) then
for i, v in next, Character:GetDescendants() do
if(v:IsA("BasePart")) then
v.CanCollide = false;
end;
end;
end;
RunService.Stepped:Wait();
until not library.flags.noClip;
end;
function jumpPower(toggle)
if (not toggle) then
maid.jumpPower = nil;
return;
end;
maid.jumpPower = RunService.Heartbeat:Connect(function()
local humanoid = LocalPlayer.Character and LocalPlayer.Character:FindFirstChildWhichIsA('Humanoid');
if (not humanoid) then return end;
warn('woo', library.flags.jumpPowerValue);
humanoid.JumpPower = library.flags.jumpPowerValue;
end);
end;
local oldNamecall;
local oldIndex;
local oldNewIndex;
local rayCastSpoofs = 0;
oldNamecall = hookmetamethod(game, '__namecall', function(self, ...)
SX_VM_CNONE();
if(checkcaller()) then return oldNamecall(self, ...) end;
local method = getnamecallmethod();
local caller = getcallingscript();
if(method == 'FindPartOnRayWithIgnoreList' and library.flags.silentAim and caller and caller.Name == 'Client' and rayCastSpoofs < 250) then
rayCastSpoofs = rayCastSpoofs + 1;
local rootPart = LocalPlayer.Character and LocalPlayer.Character.PrimaryPart;
local character = Utility:getClosestCharacter();
character = character and character.Character;
local head = character and character.FindFirstChild(character, 'Head');
if(character and head) then
return head, (head.Position - rootPart.Position).Unit;
end;
end;
return oldNamecall(self, ...);
end);
oldIndex = hookmetamethod(game, '__index', function(self, p)
SX_VM_CNONE();
if(checkcaller()) then return oldIndex(self, p) end;
if(p == 'Touched' and IsA(self, 'BasePart') and library.flags.silentAim) then
local function ConnectTouched(self, f)
local Character = Utility:getClosestCharacter();
Character = Character and Character.Character;
local Head = Character and Character.FindFirstChild(Character, 'Head');
if(Character and Head) then
return f(Head);
end;
end;
return {
Connect = ConnectTouched;
connect = ConnectTouched;
};
end;
return oldIndex(self, p);
end);
oldNewIndex = hookmetamethod(game, '__newindex', function(self, p, v)
SX_VM_CNONE();
if(checkcaller() or not IsA(self, 'Humanoid')) then return oldNewIndex(self, p, v) end;
if(p == 'WalkSpeed' and library.flags.walkspeed) then
v = library.flags.walkspeedValue;
elseif (p == 'JumpPower' and library.flags.jumpPower) then
v = library.flags.jumpPowerValue;
end;
return oldNewIndex(self, p, v);
end);
task.spawn(function()
while task.wait(2) do
rayCastSpoofs = 0;
end;
end);
end;
local Character = column1:AddSection('Character')
local Gun = column2:AddSection('Gun');
Character:AddToggle({
text = 'Walkspeed'
}):AddSlider({flag = 'Walkspeed Value', min = 16, max = 500});
Character:AddToggle({
text = 'Jump Power',
callback = jumpPower
}):AddSlider({flag = 'Jump Power Value', min = 50, max = 500});
Character:AddToggle({
text = 'Fly',
callback = toggleFly
}):AddSlider({flag = 'Fly Speed', min = 16, max = 500});
Character:AddToggle({
text = 'No Clip',
callback = toggleNoClip
});
Gun:AddToggle({
text = 'Infinite Ammo'
});
Gun:AddToggle({
text = 'Silent Aim'
});