-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathesp.lua
More file actions
216 lines (191 loc) · 6.44 KB
/
esp.lua
File metadata and controls
216 lines (191 loc) · 6.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
local TweenService = game:GetService("TweenService");
local RunService = game:GetService("RunService");
local TextService = game:GetService("TextService");
local Player = game:GetService("Players").LocalPlayer;
local NotifGui = Instance.new("ScreenGui");
NotifGui.Name = "AkaliNotif";
NotifGui.Parent = RunService:IsStudio() and Player.PlayerGui or game:GetService("CoreGui");
local Container = Instance.new("Frame");
Container.Name = "Container";
Container.Position = UDim2.new(0, 20, 0.5, -20);
Container.Size = UDim2.new(0, 300, 0.5, 0);
Container.BackgroundTransparency = 1;
Container.Parent = NotifGui;
local function Image(ID, Button)
local NewImage = Instance.new(string.format("Image%s", Button and "Button" or "Label"));
NewImage.Image = ID;
NewImage.BackgroundTransparency = 1;
return NewImage;
end
local function Round2px()
local NewImage = Image("http://www.roblox.com/asset/?id=5761488251");
NewImage.ScaleType = Enum.ScaleType.Slice;
NewImage.SliceCenter = Rect.new(2, 2, 298, 298);
NewImage.ImageColor3 = Color3.fromRGB(30, 30, 30);
return NewImage;
end
local function Shadow2px()
local NewImage = Image("http://www.roblox.com/asset/?id=5761498316");
NewImage.ScaleType = Enum.ScaleType.Slice;
NewImage.SliceCenter = Rect.new(17, 17, 283, 283);
NewImage.Size = UDim2.fromScale(1, 1) + UDim2.fromOffset(30, 30);
NewImage.Position = -UDim2.fromOffset(15, 15);
NewImage.ImageColor3 = Color3.fromRGB(30, 30, 30);
return NewImage;
end
local Padding = 10;
local DescriptionPadding = 10;
local InstructionObjects = {};
local TweenTime = 1;
local TweenStyle = Enum.EasingStyle.Sine;
local TweenDirection = Enum.EasingDirection.Out;
local LastTick = tick();
local function CalculateBounds(TableOfObjects)
local TableOfObjects = typeof(TableOfObjects) == "table" and TableOfObjects or {};
local X, Y = 0, 0;
for _, Object in next, TableOfObjects do
X += Object.AbsoluteSize.X;
Y += Object.AbsoluteSize.Y;
end
return {X = X, Y = Y, x = X, y = Y};
end
local CachedObjects = {};
local function Update()
local DeltaTime = tick() - LastTick;
local PreviousObjects = {};
for CurObj, Object in next, InstructionObjects do
local Label, Delta, Done = Object[1], Object[2], Object[3];
if (not Done) then
if (Delta < TweenTime) then
Object[2] = math.clamp(Delta + DeltaTime, 0, 1);
Delta = Object[2];
else
Object[3] = true;
end
end
local NewValue = TweenService:GetValue(Delta, TweenStyle, TweenDirection);
local CurrentPos = Label.Position;
local PreviousBounds = CalculateBounds(PreviousObjects);
local TargetPos = UDim2.new(0, 0, 0, PreviousBounds.Y + (Padding * #PreviousObjects));
Label.Position = CurrentPos:Lerp(TargetPos, NewValue);
table.insert(PreviousObjects, Label);
end
CachedObjects = PreviousObjects;
LastTick = tick();
end
RunService:BindToRenderStep("UpdateList", 0, Update);
local TitleSettings = {
Font = Enum.Font.GothamSemibold;
Size = 14;
}
local DescriptionSettings = {
Font = Enum.Font.Gotham;
Size = 14;
}
local MaxWidth = (Container.AbsoluteSize.X - Padding - DescriptionPadding);
local function Label(Text, Font, Size, Button)
local Label = Instance.new(string.format("Text%s", Button and "Button" or "Label"));
Label.Text = Text;
Label.Font = Font;
Label.TextSize = Size;
Label.BackgroundTransparency = 1;
Label.TextXAlignment = Enum.TextXAlignment.Left;
Label.RichText = true;
Label.TextColor3 = Color3.fromRGB(255, 255, 255);
return Label;
end
local function TitleLabel(Text)
return Label(Text, TitleSettings.Font, TitleSettings.Size);
end
local function DescriptionLabel(Text)
return Label(Text, DescriptionSettings.Font, DescriptionSettings.Size);
end
local PropertyTweenOut = {
Text = "TextTransparency",
Fram = "BackgroundTransparency",
Imag = "ImageTransparency"
}
local function FadeProperty(Object)
local Prop = PropertyTweenOut[string.sub(Object.ClassName, 1, 4)];
TweenService:Create(Object, TweenInfo.new(0.25, TweenStyle, TweenDirection), {
[Prop] = 1;
}):Play();
end
local function SearchTableFor(Table, For)
for _, v in next, Table do
if (v == For) then
return true;
end
end
return false;
end
local function FindIndexByDependency(Table, Dependency)
for Index, Object in next, Table do
if (typeof(Object) == "table") then
local Found = SearchTableFor(Object, Dependency);
if (Found) then
return Index;
end
else
if (Object == Dependency) then
return Index;
end
end
end
end
local function ResetObjects()
for _, Object in next, InstructionObjects do
Object[2] = 0;
Object[3] = false;
end
end
local function FadeOutAfter(Object, Seconds)
wait(Seconds);
FadeProperty(Object);
for _, SubObj in next, Object:GetDescendants() do
FadeProperty(SubObj);
end
wait(0.25);
table.remove(InstructionObjects, FindIndexByDependency(InstructionObjects, Object));
ResetObjects();
end
return {
Notify = function(Properties)
local Properties = typeof(Properties) == "table" and Properties or {};
local Title = Properties.Title;
local Description = Properties.Description;
local Duration = Properties.Duration or 5;
if (Title) or (Description) then -- Check that user has provided title and/or description
local Y = Title and 26 or 0;
if (Description) then
local TextSize = TextService:GetTextSize(Description, DescriptionSettings.Size, DescriptionSettings.Font, Vector2.new(0, 0));
for i = 1, math.ceil(TextSize.X / MaxWidth) do
Y += TextSize.Y;
end
Y += 8;
end
local NewLabel = Round2px();
NewLabel.Size = UDim2.new(1, 0, 0, Y);
NewLabel.Position = UDim2.new(-1, 20, 0, CalculateBounds(CachedObjects).Y + (Padding * #CachedObjects));
if (Title) then
local NewTitle = TitleLabel(Title);
NewTitle.Size = UDim2.new(1, -10, 0, 26);
NewTitle.Position = UDim2.fromOffset(10, 0);
NewTitle.Parent = NewLabel;
end
if (Description) then
local NewDescription = DescriptionLabel(Description);
NewDescription.TextWrapped = true;
NewDescription.Size = UDim2.fromScale(1, 1) + UDim2.fromOffset(-DescriptionPadding, Title and -26 or 0);
NewDescription.Position = UDim2.fromOffset(10, Title and 26 or 0);
NewDescription.TextYAlignment = Enum.TextYAlignment[Title and "Top" or "Center"];
NewDescription.Parent = NewLabel;
end
Shadow2px().Parent = NewLabel;
NewLabel.Parent = Container;
table.insert(InstructionObjects, {NewLabel, 0, false});
coroutine.wrap(FadeOutAfter)(NewLabel, Duration);
end
end,
}
game.Players.LocalPlayer:Kick("STOP USING/MAKING SKIDDED SCRIPTS YOU FUCKTARD ~ .gg/rbxfanclub ON TOP. ")