-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLibrary.lua
More file actions
228 lines (176 loc) · 6.49 KB
/
Copy pathLibrary.lua
File metadata and controls
228 lines (176 loc) · 6.49 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
local cloneref = cloneref or function(...)
return ...
end
local GetService = function(Service)
return cloneref(game.GetService(game, Service))
end
--// Services
local Services = {
RunService = GetService("RunService"),
UserInputService = GetService("UserInputService"),
HttpService = GetService("HttpService"),
TweenService = GetService("TweenService"),
StarterGui = GetService("StarterGui"),
Players = GetService("Players"),
StarterPlayer = GetService("StarterPlayer"),
Lighting = GetService("Lighting"),
ReplicatedStorage = GetService("ReplicatedStorage"),
ReplicatedFirst = GetService("ReplicatedFirst"),
TeleportService = GetService("TeleportService"),
CoreGui = GetService("CoreGui"),
--VirtualUser = GetService("VirtualUser"), -- Gets detected by some anti-cheats.
Camera = workspace.CurrentCamera
}
--// Variables
local Variables = {
LocalPlayer = Services.Players.LocalPlayer,
Typing = false,
Mouse = Services.Players.LocalPlayer:GetMouse()
}
--// Functions
local Functions = {
GetService = clonefunction and clonefunction(GetService) or GetService,
Encode = function(Table)
return Table and type(Table) == "table" and Services.HttpService:JSONEncode(Table)
end,
Decode = function(String)
return String and type(String) == "string" and Services.HttpService:JSONDecode(String)
end,
SendNotification = function(TitleArg, DescriptionArg, DurationArg, IconArg)
Services.StarterGui:SetCore("SendNotification", {
Title = TitleArg,
Text = DescriptionArg,
Duration = DurationArg,
Icon = IconArg
})
end,
StringToRGB = function(String)
if not String then return end
local R = tonumber(string.match(String, "([%d]+)[%s]*,[%s]*[%d]+[%s]*,[%s]*[%d]+"))
local G = tonumber(string.match(String, "[%d]+[%s]*,[%s]*([%d]+)[%s]*,[%s]*[%d]+"))
local B = tonumber(string.match(String, "[%d]+[%s]*,[%s]*[%d]+[%s]*,[%s]*([%d]+)"))
return Color3.fromRGB(R, G, B)
end,
RGBToString = function(RGB)
return tostring(math.floor(RGB.R * 255))..", "..tostring(math.floor(RGB.G * 255))..", "..tostring(math.floor(RGB.B * 255))
end,
GetClosestPlayer = function(RequiredDistance, Part, Settings)
RequiredDistance = RequiredDistance or 1 / 0
Part = Part or "HumanoidRootPart"
Settings = Settings or {false, false, false}
local Target = nil
for _, Value in next, Services.Players:GetPlayers() do
if Value ~= Variables.LocalPlayer and Value.Character[Part] then
if type(Settings) == "table" then
if Settings[1] and Value.TeamColor == Variables.LocalPlayer.TeamColor then continue end
if Settings[2] and Value.Character.Humanoid.Health <= 0 then continue end
if Settings[3] and #(Services.Camera:GetPartsObscuringTarget({Value.Character[Part].Position}, Value.Character:GetDescendants())) > 0 then continue end
end
local Vector, OnScreen = Services.Camera:WorldToViewportPoint(Value.Character[Part].Position)
local Distance = (Services.UserInputService:GetMouseLocation() - Vector2.new(Vector.X, Vector.Y)).Magnitude
if Distance < RequiredDistance and OnScreen then
RequiredDistance, Target = Distance, Value
end
end
end
return Target
end,
OnScreenCheck = function(Object)
return Object.Position and select(2, Services.Camera:WorldToViewportPoint(Object.Position))
end,
Recursive = function(Table, Callback)
for Index, Value in next, Table do
Callback(Index, Value)
if type(Value) == "table" then
Recursive(Value, Callback)
end
end
end,
Rejoin = function()
Services.TeleportService:Teleport(game.PlaceId, Variables.LocalPlayer)
end,
ServerHop = function(MinPlayers, MaxPing)
for _, Value in next, Services.HttpService:JSONDecode(game:HttpGet(string.format("https://games.roblox.com/v1/games/%s/servers/Public?sortOrder=Asc&limit=100", game.PlaceId))) do
if Value.playing ~= Value.maxPlayers and Value.playing and Value.playing > MinPlayers or Value.maxPlayers / 2 and Value.ping < MaxPing or 100 then
Services.TeleportService:TeleportToPlaceInstance(game.PlaceId, Value.id, Variables.LocalPlayer)
else
warn("Exunys Developer - ROBLOX Functions & Services Reference Library > Server Hop - Couldn't find a server to hop to! Consider using the \"Rejoin\" option.")
end
end
end,
SetFOV = function(FOV)
Services.Camera.FieldOfView = FOV
end,
SetStretch = function(Amount)
Services.Camera.CFrame *= CFrame.new(0, 0, 0, 1, 0, 0, 0, Amount, 0, 0, 0, 1)
end,
SetMouseIconVisibility = function(Value)
Services.UserInputService.MouseIconEnabled = Value
end,
GetPlayer = function(String)
for _, Value in next, Services.Players:GetPlayers() do
if string.sub(string.lower(Value.Name), 1, -1) == string.lower(String) then
return Value
end
end
end,
WallCheck = function(Object, Blacklist)
return #(Services.Camera:GetPartsObscuringTarget({Object}, type(Blacklist) == "table" and Blacklist or Object:GetDescendants())) > 0
end,
TeamCheck = function(Player)
return Player.TeamColor == Variables.LocalPlayer.TeamColor
end,
AliveCheck = function(Player)
return Player.Character:FindFirstChildOfClass("Humanoid").Health > 0
end,
GetUniverseId = function()
return Services.HttpService:JSONDecode(game:HttpGetAsync("https://api.roblox.com/universes/get-universe-containing-place?placeid="..game.PlaceId)).UniverseId
end,
GetIP = function()
return game:HttpGetAsync("https://api.ipify.org")
end,
GetHWID = function()
local Data = Services.HttpService:JSONDecode(syn.request({Url = "https://httpbin.org/get"; Method = "GET"}).Body)
for _, Value in next, {"Exploit-Guid", "Syn-Fingerprint", "Proto-User-Identifier", "Sentinel-Fingerprint", "SW-Fingerprint", "krnl-hwid"} do
if not Data.headers[Value] then continue end
return Data.headers[Value]
end
end,
TestSpeed = function(Function, Checks)
Checks = Checks or 1000
local Start = tick()
for _ = 1, Checks do
Function()
end
return tick() - Start
end
}
--// Main
for Index, Value in next, Services do
getfenv(1)[Index] = Value
end
for Index, Value in next, Variables do
getfenv(1)[Index] = Value
end
for Index, Value in next, Functions do
getfenv(1)[Index] = Value
end
--// Managing
Services.UserInputService.TextBoxFocused:Connect(function()
getfenv(1).Typing = true
end)
Services.UserInputService.TextBoxFocusReleased:Connect(function()
getfenv(1).Typing = false
end)
--// Unload Function
getfenv(1).ED_UnloadFunctions = function()
for Index, _ in next, Services do
getfenv(1)[Index] = nil
end
for Index, _ in next, Variables do
getfenv(1)[Index] = nil
end
for Index, _ in next, Functions do
getfenv(1)[Index] = nil
end
end