-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.lua
228 lines (220 loc) · 9.49 KB
/
main.lua
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
--if game.PlaceId == 286090429 then
-- local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/xHeptc/Kavo-UI-Library/main/source.lua"))()
-- local Window = Library.CreateLib("Marsho", "Ocean")
-- local Main = Window:NewTab("Main")
-- local dababy = Main:NewSection("Local Player")
--end
--elseif game.PlaceId == 292439477 then
-- local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/xHeptc/Kavo-UI-Library/main/source.lua"))()
-- local Window = Library.CreateLib("Marsho", "Ocean")
-- local Main = Window:NewTab("Main")
-- local dababy = Main:NewSection("Local Player")
--end
--elseif game.PlaceId == 9057641087 then
--local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/xHeptc/Kavo-UI-Library/main/source.lua"))()
--local Window = Library.CreateLib("Marsho - Babymonie's Game", "Ocean")
--local Main = Window:NewTab("Main")
--local dababy = Main:NewSection("Local Player")
--end
function WorldToScreen(x, y, z)
local V = CFrame.new(x, y, z) * CFrame.Angles(0, 0, 0)
return Vector2.new(V.p.X, V.p.Y)
end
function D3DXVECTOR3(x, y, z)
return {x = x, y = y, z = z}
end
function DrawCircleNextLvl(x, y, z, radius, width, color, chordlength)
radius = radius or 300
quality = math.max(8, math.floor(180 / math.deg((math.asin((chordlength / (2 * radius)))))))
quality = 2 * math.pi / quality
radius = radius * .92
local points = {}
for theta = 0, 2 * math.pi + quality, quality do
local c = WorldToScreen(x + radius * math.cos(theta), y, z - radius * math.sin(theta))
points[#points + 1] = D3DXVECTOR3(c.x, c.y, 0)
end
DrawLines3D(points, width or 1, color or 4294967295)
end
function DrawLines3D(points, width, color)
local s = Instance.new("ScreenGui")
local l = Instance.new("Frame")
s.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
l.Parent = s
l.Size = UDim2.new(0, points[1].x, 0, points[1].y)
l.BackgroundColor3 = Color3.new(0, 0, 0)
l.BorderSizePixel = 0
l.ZIndex = 2
for i = 1, #points do
local p = Instance.new("Frame")
p.Parent = l
p.Size = UDim2.new(0, points[i].x, 0, points[i].y)
p.BackgroundColor3 = Color3.new(0, 0, 0)
p.BorderSizePixel = 0
p.ZIndex = 2
if i == 1 then
p.Position = UDim2.new(0, 0, 0, 0)
else
p.Position = UDim2.new(0, points[i - 1].x, 0, points[i - 1].y)
end
end
l.Position = UDim2.new(0, -points[1].x, 0, -points[1].y)
l.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
end
function DrawCircle(HeadPos, Radius, Color)
local CirclePos = WorldToScreen(D3DXVECTOR3(HeadPos.x, HeadPos.y, HeadPos.z))
if CirclePos.x > 0 and CirclePos.y > 0 then
DrawCircleNextLvl(CirclePos.x, CirclePos.y, Radius, 1, Color, 100)
end
end
local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/xHeptc/Kavo-UI-Library/main/source.lua"))()
local Window = Library.CreateLib("Marsho Arsenal", "Ocean")
local espTab = Window:NewTab("Combat")
local esp = espTab:NewSection("ESP")
esp:NewToggle("Enemy ESP", "Toggle ESP for Enemies", true, function(b)
if b then
else
end
end)
esp:NewToggle("Team Tracer ESP", "Toggle ESP for Team", true, function(b)
--we get all of the player's in the game
for i,v in pairs(game.Players:GetPlayers()) do
--if the player is on the same team as the local player
if v.Team == game.Players.LocalPlayer.Team then
--then we draw a box around them in the color specified in the variable teamesp
game.Players.LocalPlayer:DrawBox(v.Character.Head.Position, Vector3.new(0.5, 0.5, 0.5), teamesp)
end
end
end)
local aim = espTab:NewSection("Aimbot")
--Kill all toggle
aim:NewToggle("Kill All", "Toggle Kill All", true, function(b)
end)
--Silent Aim Toggle
aim:NewToggle("Silent Aim", "Toggle Silent Aim", true, function(b)
if b then
--> VARIABLES <--
local plrs = game:GetService("Players")
local plr = plrs.LocalPlayer
local mouse = plr:GetMouse()
local camera = game:GetService("Workspace").CurrentCamera
--> FUNCTIONS <--
function notBehindWall(target)
local ray = Ray.new(plr.Character.Head.Position, (target.Position - plr.Character.Head.Position).Unit * 300)
local part, position = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(ray, {plr.Character}, false, true)
if part then
local humanoid = part.Parent:FindFirstChildOfClass("Humanoid")
if not humanoid then
humanoid = part.Parent.Parent:FindFirstChildOfClass("Humanoid")
end
if humanoid and target and humanoid.Parent == target.Parent then
local pos, visible = camera:WorldToScreenPoint(target.Position)
if visible then
return true
end
end
end
end
function getPlayerClosestToMouse()
local target = nil
local maxDist = 100
for _,v in pairs(plrs:GetPlayers()) do
if v.Character then
if v.Character:FindFirstChild("Humanoid") and v.Character.Humanoid.Health ~= 0 and v.Character:FindFirstChild("HumanoidRootPart") and v.TeamColor ~= plr.TeamColor then
local pos, vis = camera:WorldToViewportPoint(v.Character.HumanoidRootPart.Position)
local dist = (Vector2.new(mouse.X, mouse.Y) - Vector2.new(pos.X, pos.Y)).magnitude
if dist < maxDist and vis then
local torsoPos = camera:WorldToViewportPoint(v.Character.HumanoidRootPart.Position)
local torsoDist = (Vector2.new(mouse.X, mouse.Y) - Vector2.new(torsoPos.X, torsoPos.Y)).magnitude
local headPos = camera:WorldToViewportPoint(v.Character.Head.Position)
local headDist = (Vector2.new(mouse.X, mouse.Y) - Vector2.new(headPos.X, headPos.Y)).magnitude
if torsoDist > headDist then
if notBehindWall(v.Character.Head) then
target = v.Character.Head
end
else
if notBehindWall(v.Character.HumanoidRootPart) then
target = v.Character.HumanoidRootPart
end
end
maxDist = dist
end
end
end
end
return target
end
--> Hooking to the remote <--
local gmt = getrawmetatable(game)
setreadonly(gmt, false)
local oldNamecall = gmt.__namecall
gmt.__namecall = newcclosure(function(self, ...)
local Args = {...}
local method = getnamecallmethod()
if tostring(self) == "HitPart" and tostring(method) == "FireServer" then
Args[1] = getPlayerClosestToMouse()
Args[2] = getPlayerClosestToMouse().Position
return self.FireServer(self, unpack(Args))
end
return oldNamecall(self, ...)
end)
else
local gmt = getrawmetatable(game)
setreadonly(gmt, false)
gmt.__namecall = oldNamecall
end
end)
--Aimbot
aim:NewToggle("Aimbot", "Toggle Aimbot", true, function(b)
if b then
function getClosest()
local closestDistance
local closestPlayer
for i,v in pairs(game.Players:GetChildren()) do
if v == game.Players.LocalPlayer and v.Team == game.Players.LocalPlayer.Team then
local distance = (game.Players.LocalPlayer.Character.HumanoidRootPart.Position )
end
end
end
else
end
end)
--Wallbang
aim:NewToggle("Wallbang", "Toggle Wallbang", true, function(b)
end)
--Kill Aura
aim:NewToggle("Kill Aura", "Toggle Kill Aura", true, function(b)
end)
--draw fov toggle
aim:NewToggle("Draw FOV", "Toggle Draw FOV", true, function(b)
end)
--fov slider
aim:NewSlider("FOV", "FOV", 100, 100, function(s)
end)
--localplayer tab
local localplayer = Window:NewTab("Local Player")
local player = localplayer:NewSection("Player")
player:NewToggle("Auto Respawn", "Toggle Auto Respawn", true, function(b)
if b then
--do a loop
while true do
--check if the player is dead
if game.Players.LocalPlayer.Character == nil then
--respawn the player
game.Players.LocalPlayer:LoadCharacter()
end
--if the player is alive
if game.Players.LocalPlayer.Character ~= nil then
local localplayername = game.Players.LocalPlayer.Name
print("Umm:" .. localplayername .. " is alive")
end
wait(1)
end
else
--do nothing
print("Umm:" .. game.Players.LocalPlayer.Name .. " is alive")
end
end)
player:NewButton("Kill", "Kill the local player", function()
local localplayer = game.Players.LocalPlayer
localplayer.Character.Humanoid.Health = 0
end)