Message
Message
-- Script Info:
-- Script date, Project created (6/13/2024 : 5:18 PM)
-- Script name: Redacted-project (placeholder)
-- Script description: Phantom Forces Rage/Legit cheat
-- Removed PlaceID Check due to Celery breaking with it, I don't even know...
-- Script settings
local Redacted = {
Username = OverrideUserSettings and "free user" or "sigma",
Build = OverrideUserSettings and 'v1' or 'v2',
-- UI Library
local InputService = game:GetService('UserInputService');
local TextService = game:GetService('TextService');
local CoreGui = game:GetService('CoreGui');
local Teams = game:GetService('Teams');
local Players = game:GetService('Players');
local RunService = game:GetService('RunService')
local TweenService = game:GetService('TweenService');
local RenderStepped = RunService.RenderStepped;
local LocalPlayer = Players.LocalPlayer;
local Mouse = LocalPlayer:GetMouse();
ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Global;
ScreenGui.Parent = CoreGui;
getgenv().Toggles = Toggles;
getgenv().Options = Options;
local Library = {
Registry = {};
RegistryMap = {};
HudRegistry = {};
AccentColor = Redacted.Accent;
FontColor = Color3.fromRGB(255, 255, 255);
MainColor = Color3.fromRGB(28, 28, 28);
BackgroundColor = Color3.fromRGB(20, 20, 20);
OutlineColor = Color3.fromRGB(50, 50, 50);
RiskColor = Color3.fromRGB(255, 50, 50),
OpenedFrames = {};
DependencyBoxes = {};
Signals = {};
ScreenGui = ScreenGui;
};
local RainbowStep = 0
local Hue = 0
table.insert(Library.Signals, RenderStepped:Connect(function(Delta)
RainbowStep = RainbowStep + Delta
Library.CurrentRainbowHue = Hue;
Library.CurrentRainbowColor = Color3.fromHSV(Hue, 0.8, 1);
end
end))
for i = 1, #PlayerList do
PlayerList[i] = PlayerList[i].Name;
end;
return PlayerList;
end;
for i = 1, #TeamList do
TeamList[i] = TeamList[i].Name;
end;
return TeamList;
end;
if not i then
return Library:Notify(event);
end;
function Library:AttemptSave()
if Library.SaveManager then
Library.SaveManager:Save();
end;
end;
return _Instance;
end;
function Library:ApplyTextStroke(Inst)
Inst.TextStrokeTransparency = 1;
Library:Create('UIStroke', {
Color = Color3.new(0, 0, 0);
Thickness = 1;
LineJoinMode = Enum.LineJoinMode.Miter;
Parent = Inst;
});
end;
function Library:CreateLabel(Properties, IsHud)
local _Instance = Library:Create('TextLabel', {
BackgroundTransparency = 1;
Font = Library.Font;
TextColor3 = Library.FontColor;
TextSize = 16;
TextStrokeTransparency = 0;
});
Library:ApplyTextStroke(_Instance);
Library:AddToRegistry(_Instance, {
TextColor3 = 'FontColor';
}, IsHud);
Instance.InputBegan:Connect(function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 then
local ObjPos = Vector2.new(
Mouse.X - Instance.AbsolutePosition.X,
Mouse.Y - Instance.AbsolutePosition.Y
);
while
InputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1) do
Instance.Position = UDim2.new(
0,
Mouse.X - ObjPos.X + (Instance.Size.X.Offset *
Instance.AnchorPoint.X),
0,
Mouse.Y - ObjPos.Y + (Instance.Size.Y.Offset *
Instance.AnchorPoint.Y)
);
RenderStepped:Wait();
end;
end;
end)
end;
Parent = Tooltip;
});
Library:AddToRegistry(Tooltip, {
BackgroundColor3 = 'MainColor';
BorderColor3 = 'OutlineColor';
});
Library:AddToRegistry(Label, {
TextColor3 = 'FontColor',
});
HoverInstance.MouseEnter:Connect(function()
if Library:MouseIsOverOpenedFrame() then
return
end
IsHovering = true
while IsHovering do
RunService.Heartbeat:Wait()
Tooltip.Position = UDim2.fromOffset(Mouse.X + 15, Mouse.Y + 12)
end
end)
HoverInstance.MouseLeave:Connect(function()
IsHovering = false
Tooltip.Visible = false
end)
end
HighlightInstance.MouseLeave:Connect(function()
local Reg = Library.RegistryMap[Instance];
function Library:MouseIsOverOpenedFrame()
for Frame, _ in next, Library.OpenedFrames do
local AbsPos, AbsSize = Frame.AbsolutePosition, Frame.AbsoluteSize;
return true;
end;
end;
end;
function Library:IsMouseOverFrame(Frame)
local AbsPos, AbsSize = Frame.AbsolutePosition, Frame.AbsoluteSize;
return true;
end;
end;
function Library:UpdateDependencyBoxes()
for _, Depbox in next, Library.DependencyBoxes do
Depbox:Update();
end;
end;
function Library:GetDarkerColor(Color)
local H, S, V = Color3.toHSV(Color);
return Color3.fromHSV(H, S, V / 1.5);
end;
Library.AccentColorDark = Library:GetDarkerColor(Library.AccentColor);
table.insert(Library.Registry, Data);
Library.RegistryMap[Instance] = Data;
if IsHud then
table.insert(Library.HudRegistry, Data);
end;
end;
function Library:RemoveFromRegistry(Instance)
local Data = Library.RegistryMap[Instance];
if Data then
for Idx = #Library.Registry, 1, -1 do
if Library.Registry[Idx] == Data then
table.remove(Library.Registry, Idx);
end;
end;
Library.RegistryMap[Instance] = nil;
end;
end;
function Library:UpdateColorsUsingRegistry()
-- TODO: Could have an 'active' list of objects
-- where the active list only contains Visible objects.
-- The above would be especially efficient for a rainbow menu color or live
color-changing.
function Library:GiveSignal(Signal)
-- Only used for signals not attached to library instances, as those should
be cleaned up on object destruction by Roblox
table.insert(Library.Signals, Signal)
end
function Library:Unload()
-- Unload all of the signals
for Idx = #Library.Signals, 1, -1 do
local Connection = table.remove(Library.Signals, Idx)
Connection:Disconnect()
end
ScreenGui:Destroy()
end
function Library:OnUnload(Callback)
Library.OnUnload = Callback
end
Library:GiveSignal(ScreenGui.DescendantRemoving:Connect(function(Instance)
if Library.RegistryMap[Instance] then
Library:RemoveFromRegistry(Instance);
end;
end))
do
local Funcs = {};
local ColorPicker = {
Value = Info.Default;
Transparency = Info.Transparency or 0;
Type = 'ColorPicker';
Title = type(Info.Title) == 'string' and Info.Title or 'Color
picker',
Callback = Info.Callback or function(Color) end;
};
function ColorPicker:SetHSVFromRGB(Color)
local H, S, V = Color3.toHSV(Color);
ColorPicker.Hue = H;
ColorPicker.Sat = S;
ColorPicker.Vib = V;
end;
ColorPicker:SetHSVFromRGB(ColorPicker.Value);
-- 1/16/23
-- Rewrote this to be placed inside the Library ScreenGui
-- There was some issue which caused RelativeOffset to be way off
-- Thus the color picker would never show
DisplayFrame:GetPropertyChangedSignal('AbsolutePosition'):Connect(function()
PickerFrameOuter.Position =
UDim2.fromOffset(DisplayFrame.AbsolutePosition.X, DisplayFrame.AbsolutePosition.Y +
18);
end)
Library:Create('UIGradient', {
Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.new(1, 1, 1)),
ColorSequenceKeypoint.new(1, Color3.fromRGB(212, 212, 212))
});
Rotation = 90;
Parent = HueBoxInner;
});
Library:ApplyTextStroke(HueBox);
local RgbBox =
Library:Create(RgbBoxBase.Frame:FindFirstChild('TextBox'), {
Text = '255, 255, 255',
PlaceholderText = 'RGB color',
TextColor3 = Library.FontColor
});
if Info.Transparency then
TransparencyBoxOuter = Library:Create('Frame', {
BorderColor3 = Color3.new(0, 0, 0);
Position = UDim2.fromOffset(4, 251);
Size = UDim2.new(1, -8, 0, 15);
ZIndex = 19;
Parent = PickerFrameInner;
});
TransparencyBoxInner = Library:Create('Frame', {
BackgroundColor3 = ColorPicker.Value;
BorderColor3 = Library.OutlineColor;
BorderMode = Enum.BorderMode.Inset;
Size = UDim2.new(1, 0, 1, 0);
ZIndex = 19;
Parent = TransparencyBoxOuter;
});
Library:AddToRegistry(TransparencyBoxInner, { BorderColor3 =
'OutlineColor' });
Library:Create('ImageLabel', {
BackgroundTransparency = 1;
Size = UDim2.new(1, 0, 1, 0);
Image = 'http://www.roblox.com/asset/?id=12978095818';
ZIndex = 20;
Parent = TransparencyBoxInner;
});
TransparencyCursor = Library:Create('Frame', {
BackgroundColor3 = Color3.new(1, 1, 1);
AnchorPoint = Vector2.new(0.5, 0);
BorderColor3 = Color3.new(0, 0, 0);
Size = UDim2.new(0, 1, 1, 0);
ZIndex = 21;
Parent = TransparencyBoxInner;
});
end;
local ContextMenu = {}
do
ContextMenu.Options = {}
ContextMenu.Container = Library:Create('Frame', {
BorderColor3 = Color3.new(),
ZIndex = 14,
Visible = false,
Parent = ScreenGui
})
ContextMenu.Inner = Library:Create('Frame', {
BackgroundColor3 = Library.BackgroundColor;
BorderColor3 = Library.OutlineColor;
BorderMode = Enum.BorderMode.Inset;
Size = UDim2.fromScale(1, 1);
ZIndex = 15;
Parent = ContextMenu.Container;
});
Library:Create('UIListLayout', {
Name = 'Layout',
FillDirection = Enum.FillDirection.Vertical;
SortOrder = Enum.SortOrder.LayoutOrder;
Parent = ContextMenu.Inner;
});
Library:Create('UIPadding', {
Name = 'Padding',
PaddingLeft = UDim.new(0, 4),
Parent = ContextMenu.Inner,
});
DisplayFrame:GetPropertyChangedSignal('AbsolutePosition'):Connect(updateMenuPositio
n)
ContextMenu.Inner.Layout:GetPropertyChangedSignal('AbsoluteContentSize'):Connect(up
dateMenuSize)
task.spawn(updateMenuPosition)
task.spawn(updateMenuSize)
Library:AddToRegistry(ContextMenu.Inner, {
BackgroundColor3 = 'BackgroundColor';
BorderColor3 = 'OutlineColor';
});
function ContextMenu:Show()
self.Container.Visible = true
end
function ContextMenu:Hide()
self.Container.Visible = false
end
Library:OnHighlight(Button, Button,
{ TextColor3 = 'AccentColor' },
{ TextColor3 = 'FontColor' }
);
Button.InputBegan:Connect(function(Input)
if Input.UserInputType ~= Enum.UserInputType.MouseButton1
then
return
end
Callback()
end)
end
ContextMenu:AddOption('Copy color', function()
Library.ColorClipboard = ColorPicker.Value
Library:Notify('Copied color!', 2)
end)
end
Library:AddToRegistry(PickerFrameInner, { BackgroundColor3 =
'BackgroundColor'; BorderColor3 = 'OutlineColor'; });
Library:AddToRegistry(Highlight, { BackgroundColor3 =
'AccentColor'; });
Library:AddToRegistry(SatVibMapInner, { BackgroundColor3 =
'BackgroundColor'; BorderColor3 = 'OutlineColor'; });
HueBox.FocusLost:Connect(function(enter)
if enter then
local success, result = pcall(Color3.fromHex, HueBox.Text)
if success and typeof(result) == 'Color3' then
ColorPicker.Hue, ColorPicker.Sat, ColorPicker.Vib =
Color3.toHSV(result)
end
end
ColorPicker:Display()
end)
RgbBox.FocusLost:Connect(function(enter)
if enter then
local r, g, b = RgbBox.Text:match('(%d+),%s*(%d+),%s*(%d+)')
if r and g and b then
ColorPicker.Hue, ColorPicker.Sat, ColorPicker.Vib =
Color3.toHSV(Color3.fromRGB(r, g, b))
end
end
ColorPicker:Display()
end)
function ColorPicker:Display()
ColorPicker.Value = Color3.fromHSV(ColorPicker.Hue,
ColorPicker.Sat, ColorPicker.Vib);
SatVibMap.BackgroundColor3 = Color3.fromHSV(ColorPicker.Hue, 1, 1);
Library:Create(DisplayFrame, {
BackgroundColor3 = ColorPicker.Value;
BackgroundTransparency = ColorPicker.Transparency;
BorderColor3 = Library:GetDarkerColor(ColorPicker.Value);
});
if TransparencyBoxInner then
TransparencyBoxInner.BackgroundColor3 = ColorPicker.Value;
TransparencyCursor.Position = UDim2.new(1 -
ColorPicker.Transparency, 0, 0, 0);
end;
CursorOuter.Position = UDim2.new(ColorPicker.Sat, 0, 1 -
ColorPicker.Vib, 0);
HueCursor.Position = UDim2.new(0, 0, ColorPicker.Hue, 0);
Library:SafeCallback(ColorPicker.Callback, ColorPicker.Value,
ColorPicker.Transparency);
Library:SafeCallback(ColorPicker.Changed, ColorPicker.Value,
ColorPicker.Transparency);
end;
function ColorPicker:OnChanged(Func)
ColorPicker.Changed = Func;
Func(ColorPicker.Value)
end;
function ColorPicker:Show()
for Frame, Val in next, Library.OpenedFrames do
if Frame.Name == 'Color' then
Frame.Visible = false;
Library.OpenedFrames[Frame] = nil;
end;
end;
PickerFrameOuter.Visible = true;
Library.OpenedFrames[PickerFrameOuter] = true;
end;
function ColorPicker:Hide()
PickerFrameOuter.Visible = false;
Library.OpenedFrames[PickerFrameOuter] = nil;
end;
ColorPicker.Transparency = Transparency or 0;
ColorPicker:SetHSVFromRGB(Color);
ColorPicker:Display();
end;
SatVibMap.InputBegan:Connect(function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 then
while
InputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1) do
local MinX = SatVibMap.AbsolutePosition.X;
local MaxX = MinX + SatVibMap.AbsoluteSize.X;
local MouseX = math.clamp(Mouse.X, MinX, MaxX);
RenderStepped:Wait();
end;
Library:AttemptSave();
end;
end);
HueSelectorInner.InputBegan:Connect(function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 then
while
InputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1) do
local MinY = HueSelectorInner.AbsolutePosition.Y;
local MaxY = MinY + HueSelectorInner.AbsoluteSize.Y;
local MouseY = math.clamp(Mouse.Y, MinY, MaxY);
RenderStepped:Wait();
end;
Library:AttemptSave();
end;
end);
DisplayFrame.InputBegan:Connect(function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 and not
Library:MouseIsOverOpenedFrame() then
if PickerFrameOuter.Visible then
ColorPicker:Hide()
else
ContextMenu:Hide()
ColorPicker:Show()
end;
elseif Input.UserInputType == Enum.UserInputType.MouseButton2 and
not Library:MouseIsOverOpenedFrame() then
ContextMenu:Show()
ColorPicker:Hide()
end
end);
if TransparencyBoxInner then
TransparencyBoxInner.InputBegan:Connect(function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 then
while
InputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1) do
local MinX = TransparencyBoxInner.AbsolutePosition.X;
local MaxX = MinX +
TransparencyBoxInner.AbsoluteSize.X;
local MouseX = math.clamp(Mouse.X, MinX, MaxX);
ColorPicker:Display();
RenderStepped:Wait();
end;
Library:AttemptSave();
end;
end);
end;
Library:GiveSignal(InputService.InputBegan:Connect(function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 then
local AbsPos, AbsSize = PickerFrameOuter.AbsolutePosition,
PickerFrameOuter.AbsoluteSize;
ColorPicker:Display();
ColorPicker.DisplayFrame = DisplayFrame
Options[Idx] = ColorPicker;
return self;
end;
local KeyPicker = {
Value = Info.Default;
Toggled = false;
Mode = Info.Mode or 'Toggle'; -- Always, Toggle, Hold
Type = 'KeyPicker';
Callback = Info.Callback or function(Value) end;
ChangedCallback = Info.ChangedCallback or function(New) end;
if KeyPicker.SyncToggleState then
Info.Modes = { 'Toggle' }
Info.Mode = 'Toggle'
end
Library:AddToRegistry(PickInner, {
BackgroundColor3 = 'BackgroundColor';
BorderColor3 = 'OutlineColor';
});
ToggleLabel:GetPropertyChangedSignal('AbsolutePosition'):Connect(function()
ModeSelectOuter.Position =
UDim2.fromOffset(ToggleLabel.AbsolutePosition.X + ToggleLabel.AbsoluteSize.X + 4,
ToggleLabel.AbsolutePosition.Y + 1);
end);
Library:AddToRegistry(ModeSelectInner, {
BackgroundColor3 = 'BackgroundColor';
BorderColor3 = 'OutlineColor';
});
Library:Create('UIListLayout', {
FillDirection = Enum.FillDirection.Vertical;
SortOrder = Enum.SortOrder.LayoutOrder;
Parent = ModeSelectInner;
});
function ModeButton:Select()
for _, Button in next, ModeButtons do
Button:Deselect();
end;
KeyPicker.Mode = Mode;
Label.TextColor3 = Library.AccentColor;
Library.RegistryMap[Label].Properties.TextColor3 =
'AccentColor';
ModeSelectOuter.Visible = false;
end;
function ModeButton:Deselect()
KeyPicker.Mode = nil;
Label.TextColor3 = Library.FontColor;
Library.RegistryMap[Label].Properties.TextColor3 = 'FontColor';
end;
Label.InputBegan:Connect(function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 then
ModeButton:Select();
Library:AttemptSave();
end;
end);
ModeButtons[Mode] = ModeButton;
end;
function KeyPicker:Update()
if Info.NoUI then
return;
end;
ContainerLabel.Visible = true;
ContainerLabel.TextColor3 = State and Library.AccentColor or
Library.FontColor;
Library.RegistryMap[ContainerLabel].Properties.TextColor3 = State
and 'AccentColor' or 'FontColor';
local YSize = 0
local XSize = 0
function KeyPicker:GetState()
if KeyPicker.Mode == 'Always' then
return true;
elseif KeyPicker.Mode == 'Hold' then
if KeyPicker.Value == 'None' then
return false;
end
function KeyPicker:SetValue(Data)
local Key, Mode = Data[1], Data[2];
DisplayLabel.Text = Key;
KeyPicker.Value = Key;
ModeButtons[Mode]:Select();
KeyPicker:Update();
end;
function KeyPicker:OnClick(Callback)
KeyPicker.Clicked = Callback
end
function KeyPicker:OnChanged(Callback)
KeyPicker.Changed = Callback
Callback(KeyPicker.Value)
end
if ParentObj.Addons then
table.insert(ParentObj.Addons, KeyPicker)
end
function KeyPicker:DoClick()
if ParentObj.Type == 'Toggle' and KeyPicker.SyncToggleState then
ParentObj:SetValue(not ParentObj.Value)
end
Library:SafeCallback(KeyPicker.Callback, KeyPicker.Toggled)
Library:SafeCallback(KeyPicker.Clicked, KeyPicker.Toggled)
end
PickOuter.InputBegan:Connect(function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 and not
Library:MouseIsOverOpenedFrame() then
Picking = true;
DisplayLabel.Text = '';
local Break;
local Text = '';
task.spawn(function()
while (not Break) do
if Text == '...' then
Text = '';
end;
wait(0.4);
end;
end);
wait(0.2);
local Event;
Event = InputService.InputBegan:Connect(function(Input)
local Key;
Break = true;
Picking = false;
DisplayLabel.Text = Key;
KeyPicker.Value = Key;
Library:SafeCallback(KeyPicker.ChangedCallback,
Input.KeyCode or Input.UserInputType)
Library:SafeCallback(KeyPicker.Changed, Input.KeyCode or
Input.UserInputType)
Library:AttemptSave();
Event:Disconnect();
end);
elseif Input.UserInputType == Enum.UserInputType.MouseButton2 and
not Library:MouseIsOverOpenedFrame() then
ModeSelectOuter.Visible = true;
end;
end);
Library:GiveSignal(InputService.InputBegan:Connect(function(Input)
if (not Picking) then
if KeyPicker.Mode == 'Toggle' then
local Key = KeyPicker.Value;
KeyPicker:Update();
end;
ModeSelectOuter.Visible = false;
end;
end;
end))
Library:GiveSignal(InputService.InputEnded:Connect(function(Input)
if (not Picking) then
KeyPicker:Update();
end;
end))
KeyPicker:Update();
Options[Idx] = KeyPicker;
return self;
end;
BaseAddons.__index = Funcs;
BaseAddons.__namecall = function(Table, Key, ...)
return Funcs[Key](...);
end;
end;
do
local Funcs = {};
function Funcs:AddBlank(Size)
local Groupbox = self;
local Container = Groupbox.Container;
Library:Create('Frame', {
BackgroundTransparency = 1;
Size = UDim2.new(1, 0, 0, Size);
ZIndex = 1;
Parent = Container;
});
end;
if DoesWrap then
local Y = select(2, Library:GetTextBounds(Text, Library.Font, 14,
Vector2.new(TextLabel.AbsoluteSize.X, math.huge)))
TextLabel.Size = UDim2.new(1, -4, 0, Y)
else
Library:Create('UIListLayout', {
Padding = UDim.new(0, 4);
FillDirection = Enum.FillDirection.Horizontal;
HorizontalAlignment = Enum.HorizontalAlignment.Right;
SortOrder = Enum.SortOrder.LayoutOrder;
Parent = TextLabel;
});
end
Label.TextLabel = TextLabel;
Label.Container = Container;
function Label:SetText(Text)
TextLabel.Text = Text
if DoesWrap then
local Y = select(2, Library:GetTextBounds(Text, Library.Font,
14, Vector2.new(TextLabel.AbsoluteSize.X, math.huge)))
TextLabel.Size = UDim2.new(1, -4, 0, Y)
end
Groupbox:Resize();
end
Groupbox:AddBlank(5);
Groupbox:Resize();
return Label;
end;
function Funcs:AddButton(...)
-- TODO: Eventually redo this
local Button = {};
local function ProcessButtonParams(Class, Obj, ...)
local Props = select(1, ...)
if type(Props) == 'table' then
Obj.Text = Props.Text
Obj.Func = Props.Func
Obj.DoubleClick = Props.DoubleClick
Obj.Tooltip = Props.Tooltip
else
Obj.Text = select(1, ...)
Obj.Func = select(2, ...)
end
Library:Create('UIGradient', {
Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.new(1, 1, 1)),
ColorSequenceKeypoint.new(1, Color3.fromRGB(212, 212, 212))
});
Rotation = 90;
Parent = Inner;
});
Library:AddToRegistry(Outer, {
BorderColor3 = 'Black';
});
Library:AddToRegistry(Inner, {
BackgroundColor3 = 'MainColor';
BorderColor3 = 'OutlineColor';
});
Library:OnHighlight(Outer, Outer,
{ BorderColor3 = 'AccentColor' },
{ BorderColor3 = 'Black' }
);
return true
end
Button.Outer.InputBegan:Connect(function(Input)
if not ValidateClick(Input) then return end
if Button.Locked then return end
if Button.DoubleClick then
Library:RemoveFromRegistry(Button.Label)
Library:AddToRegistry(Button.Label, { TextColor3 =
'AccentColor' })
Button.Label.TextColor3 = Library.AccentColor
Button.Label.Text = 'Are you sure?'
Button.Locked = true
Library:RemoveFromRegistry(Button.Label)
Library:AddToRegistry(Button.Label, { TextColor3 =
'FontColor' })
Button.Label.TextColor3 = Library.FontColor
Button.Label.Text = Button.Text
task.defer(rawset, Button, 'Locked', false)
if clicked then
Library:SafeCallback(Button.Func)
end
return
end
Library:SafeCallback(Button.Func);
end)
end
InitEvents(Button)
function Button:AddTooltip(tooltip)
if type(tooltip) == 'string' then
Library:AddToolTip(tooltip, self.Outer)
end
return self
end
function Button:AddButton(...)
local SubButton = {}
SubButton.Outer.Position = UDim2.new(1, 3, 0, 0)
SubButton.Outer.Size = UDim2.fromOffset(self.Outer.AbsoluteSize.X -
2, self.Outer.AbsoluteSize.Y)
SubButton.Outer.Parent = self.Outer
function SubButton:AddTooltip(tooltip)
if type(tooltip) == 'string' then
Library:AddToolTip(tooltip, self.Outer)
end
return SubButton
end
InitEvents(SubButton)
return SubButton
end
Groupbox:AddBlank(5);
Groupbox:Resize();
return Button;
end;
function Funcs:AddDivider()
local Groupbox = self;
local Container = self.Container
local Divider = {
Type = 'Divider',
}
Groupbox:AddBlank(2);
local DividerOuter = Library:Create('Frame', {
BackgroundColor3 = Color3.new(0, 0, 0);
BorderColor3 = Color3.new(0, 0, 0);
Size = UDim2.new(1, -4, 0, 5);
ZIndex = 5;
Parent = Container;
});
Library:AddToRegistry(DividerOuter, {
BorderColor3 = 'Black';
});
Library:AddToRegistry(DividerInner, {
BackgroundColor3 = 'MainColor';
BorderColor3 = 'OutlineColor';
});
Groupbox:AddBlank(9);
Groupbox:Resize();
end
local Textbox = {
Value = Info.Default or '';
Numeric = Info.Numeric or false;
Finished = Info.Finished or false;
Type = 'Input';
Callback = Info.Callback or function(Value) end;
};
Library:AddToRegistry(TextBoxInner, {
BackgroundColor3 = 'MainColor';
BorderColor3 = 'OutlineColor';
});
Library:OnHighlight(TextBoxOuter, TextBoxOuter,
{ BorderColor3 = 'AccentColor' },
{ BorderColor3 = 'Black' }
);
Library:Create('UIGradient', {
Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.new(1, 1, 1)),
ColorSequenceKeypoint.new(1, Color3.fromRGB(212, 212, 212))
});
Rotation = 90;
Parent = TextBoxInner;
});
ZIndex = 7;
Parent = TextBoxInner;
})
ZIndex = 7;
Parent = Container;
});
Library:ApplyTextStroke(Box);
function Textbox:SetValue(Text)
if Info.MaxLength and #Text > Info.MaxLength then
Text = Text:sub(1, Info.MaxLength);
end;
if Textbox.Numeric then
if (not tonumber(Text)) and Text:len() > 0 then
Text = Textbox.Value
end
end
Textbox.Value = Text;
Box.Text = Text;
Library:SafeCallback(Textbox.Callback, Textbox.Value);
Library:SafeCallback(Textbox.Changed, Textbox.Value);
end;
if Textbox.Finished then
Box.FocusLost:Connect(function(enter)
if not enter then return end
Textbox:SetValue(Box.Text);
Library:AttemptSave();
end)
else
Box:GetPropertyChangedSignal('Text'):Connect(function()
Textbox:SetValue(Box.Text);
Library:AttemptSave();
end);
end
-- https://devforum.roblox.com/t/how-to-make-textboxes-follow-current-
cursor-position/1368429/6
-- thank you nicemike40 :)
-- adjust if necessary
if currentCursorPos < PADDING then
Box.Position = UDim2.fromOffset(PADDING-width, 0)
elseif currentCursorPos > reveal - PADDING - 1 then
Box.Position = UDim2.fromOffset(reveal-width-PADDING-1,
0)
end
end
end
end
task.spawn(Update)
Box:GetPropertyChangedSignal('Text'):Connect(Update)
Box:GetPropertyChangedSignal('CursorPosition'):Connect(Update)
Box.FocusLost:Connect(Update)
Box.Focused:Connect(Update)
Library:AddToRegistry(Box, {
TextColor3 = 'FontColor';
});
function Textbox:OnChanged(Func)
Textbox.Changed = Func;
Func(Textbox.Value);
end;
Groupbox:AddBlank(5);
Groupbox:Resize();
Options[Idx] = Textbox;
return Textbox;
end;
local Toggle = {
Value = Info.Default or false;
Type = 'Toggle';
Library:AddToRegistry(ToggleOuter, {
BorderColor3 = 'Black';
});
Library:AddToRegistry(ToggleInner, {
BackgroundColor3 = 'MainColor';
BorderColor3 = 'OutlineColor';
});
Library:Create('UIListLayout', {
Padding = UDim.new(0, 4);
FillDirection = Enum.FillDirection.Horizontal;
HorizontalAlignment = Enum.HorizontalAlignment.Right;
SortOrder = Enum.SortOrder.LayoutOrder;
Parent = ToggleLabel;
});
Library:OnHighlight(ToggleRegion, ToggleOuter,
{ BorderColor3 = 'AccentColor' },
{ BorderColor3 = 'Black' }
);
function Toggle:UpdateColors()
Toggle:Display();
end;
function Toggle:Display()
ToggleInner.BackgroundColor3 = Toggle.Value and Library.AccentColor
or Library.MainColor;
ToggleInner.BorderColor3 = Toggle.Value and Library.AccentColorDark
or Library.OutlineColor;
Library.RegistryMap[ToggleInner].Properties.BackgroundColor3 =
Toggle.Value and 'AccentColor' or 'MainColor';
Library.RegistryMap[ToggleInner].Properties.BorderColor3 =
Toggle.Value and 'AccentColorDark' or 'OutlineColor';
end;
function Toggle:OnChanged(Func)
Toggle.Changed = Func;
Func(Toggle.Value);
end;
function Toggle:SetValue(Bool)
Bool = (not not Bool);
Toggle.Value = Bool;
Toggle:Display();
Library:SafeCallback(Toggle.Callback, Toggle.Value);
Library:SafeCallback(Toggle.Changed, Toggle.Value);
Library:UpdateDependencyBoxes();
end;
ToggleRegion.InputBegan:Connect(function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 and not
Library:MouseIsOverOpenedFrame() then
Toggle:SetValue(not Toggle.Value) -- Why was it not like this
from the start?
Library:AttemptSave();
end;
end);
if Toggle.Risky then
Library:RemoveFromRegistry(ToggleLabel)
ToggleLabel.TextColor3 = Library.RiskColor
Library:AddToRegistry(ToggleLabel, { TextColor3 = 'RiskColor' })
end
Toggle:Display();
Groupbox:AddBlank(Info.BlankSize or 5 + 2);
Groupbox:Resize();
Toggle.TextLabel = ToggleLabel;
Toggle.Container = Container;
setmetatable(Toggle, BaseAddons);
Toggles[Idx] = Toggle;
Library:UpdateDependencyBoxes();
return Toggle;
end;
local Slider = {
Value = Info.Default;
Min = Info.Min;
Max = Info.Max;
Rounding = Info.Rounding;
MaxSize = 232;
Type = 'Slider';
Callback = Info.Callback or function(Value) end;
};
Groupbox:AddBlank(3);
end
Library:AddToRegistry(SliderOuter, {
BorderColor3 = 'Black';
});
Library:AddToRegistry(SliderInner, {
BackgroundColor3 = 'MainColor';
BorderColor3 = 'OutlineColor';
});
Library:AddToRegistry(Fill, {
BackgroundColor3 = 'AccentColor';
BorderColor3 = 'AccentColorDark';
});
Library:AddToRegistry(HideBorderRight, {
BackgroundColor3 = 'AccentColor';
});
Library:OnHighlight(SliderOuter, SliderOuter,
{ BorderColor3 = 'AccentColor' },
{ BorderColor3 = 'Black' }
);
function Slider:Display()
local Suffix = Info.Suffix or '';
if Info.HideMax then
DisplayLabel.Text = string.format('%s', Slider.Value .. Suffix)
else
DisplayLabel.Text = string.format('%s/%s', Slider.Value ..
Suffix, Slider.Max .. Suffix);
end
function Slider:OnChanged(Func)
Slider.Changed = Func;
Func(Slider.Value);
end;
function Slider:GetValueFromXOffset(X)
return Round(Library:MapValue(X, 0, Slider.MaxSize, Slider.Min,
Slider.Max));
end;
function Slider:SetValue(Str)
local Num = tonumber(Str);
Slider.Value = Num;
Slider:Display();
Library:SafeCallback(Slider.Callback, Slider.Value);
Library:SafeCallback(Slider.Changed, Slider.Value);
end;
SliderInner.InputBegan:Connect(function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 and not
Library:MouseIsOverOpenedFrame() then
local mPos = Mouse.X;
local gPos = Fill.Size.X.Offset;
local Diff = mPos - (Fill.AbsolutePosition.X + gPos);
while
InputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1) do
local nMPos = Mouse.X;
local nX = math.clamp(gPos + (nMPos - mPos) + Diff, 0,
Slider.MaxSize);
Slider:Display();
RenderStepped:Wait();
end;
Library:AttemptSave();
end;
end);
Slider:Display();
Groupbox:AddBlank(Info.BlankSize or 6);
Groupbox:Resize();
Options[Idx] = Slider;
return Slider;
end;
local Dropdown = {
Values = Info.Values;
Value = Info.Multi and {};
Multi = Info.Multi;
Type = 'Dropdown';
SpecialType = Info.SpecialType; -- can be either 'Player' or 'Team'
Callback = Info.Callback or function(Value) end;
};
local RelativeOffset = 0;
Groupbox:AddBlank(3);
end
Library:AddToRegistry(DropdownOuter, {
BorderColor3 = 'Black';
});
Library:AddToRegistry(DropdownInner, {
BackgroundColor3 = 'MainColor';
BorderColor3 = 'OutlineColor';
});
Library:Create('UIGradient', {
Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.new(1, 1, 1)),
ColorSequenceKeypoint.new(1, Color3.fromRGB(212, 212, 212))
});
Rotation = 90;
Parent = DropdownInner;
});
Library:OnHighlight(DropdownOuter, DropdownOuter,
{ BorderColor3 = 'AccentColor' },
{ BorderColor3 = 'Black' }
);
local MAX_DROPDOWN_ITEMS = 8;
DropdownOuter:GetPropertyChangedSignal('AbsolutePosition'):Connect(RecalculateListP
osition);
Library:AddToRegistry(ListInner, {
BackgroundColor3 = 'MainColor';
BorderColor3 = 'OutlineColor';
});
TopImage = 'rbxasset://textures/ui/Scroll/scroll-middle.png',
BottomImage = 'rbxasset://textures/ui/Scroll/scroll-middle.png',
ScrollBarThickness = 3,
ScrollBarImageColor3 = Library.AccentColor,
});
Library:AddToRegistry(Scrolling, {
ScrollBarImageColor3 = 'AccentColor'
})
Library:Create('UIListLayout', {
Padding = UDim.new(0, 0);
FillDirection = Enum.FillDirection.Vertical;
SortOrder = Enum.SortOrder.LayoutOrder;
Parent = Scrolling;
});
function Dropdown:Display()
local Values = Dropdown.Values;
local Str = '';
if Info.Multi then
for Idx, Value in next, Values do
if Dropdown.Value[Value] then
Str = Str .. Value .. ', ';
end;
end;
Str = Str:sub(1, #Str - 2);
else
Str = Dropdown.Value or '';
end;
function Dropdown:GetActiveValues()
if Info.Multi then
local T = {};
return T;
else
return Dropdown.Value and 1 or 0;
end;
end;
function Dropdown:BuildDropdownList()
local Values = Dropdown.Values;
local Buttons = {};
local Count = 0;
Count = Count + 1;
Library:AddToRegistry(Button, {
BackgroundColor3 = 'MainColor';
BorderColor3 = 'OutlineColor';
});
Library:OnHighlight(Button, Button,
{ BorderColor3 = 'AccentColor', ZIndex = 24 },
{ BorderColor3 = 'OutlineColor', ZIndex = 23 }
);
local Selected;
if Info.Multi then
Selected = Dropdown.Value[Value];
else
Selected = Dropdown.Value == Value;
end;
function Table:UpdateButton()
if Info.Multi then
Selected = Dropdown.Value[Value];
else
Selected = Dropdown.Value == Value;
end;
ButtonLabel.InputBegan:Connect(function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1
then
local Try = not Selected;
if Selected then
Dropdown.Value[Value] = true;
else
Dropdown.Value[Value] = nil;
end;
else
Selected = Try;
if Selected then
Dropdown.Value = Value;
else
Dropdown.Value = nil;
end;
Table:UpdateButton();
Dropdown:Display();
Library:SafeCallback(Dropdown.Callback,
Dropdown.Value);
Library:SafeCallback(Dropdown.Changed,
Dropdown.Value);
Library:AttemptSave();
end;
end;
end);
Table:UpdateButton();
Dropdown:Display();
Buttons[Button] = Table;
end;
function Dropdown:SetValues(NewValues)
if NewValues then
Dropdown.Values = NewValues;
end;
Dropdown:BuildDropdownList();
end;
function Dropdown:OpenDropdown()
ListOuter.Visible = true;
Library.OpenedFrames[ListOuter] = true;
DropdownArrow.Rotation = 180;
end;
function Dropdown:CloseDropdown()
ListOuter.Visible = false;
Library.OpenedFrames[ListOuter] = nil;
DropdownArrow.Rotation = 0;
end;
function Dropdown:OnChanged(Func)
Dropdown.Changed = Func;
Func(Dropdown.Value);
end;
function Dropdown:SetValue(Val)
if Dropdown.Multi then
local nTable = {};
Dropdown.Value = nTable;
else
if (not Val) then
Dropdown.Value = nil;
elseif table.find(Dropdown.Values, Val) then
Dropdown.Value = Val;
end;
end;
Dropdown:BuildDropdownList();
Library:SafeCallback(Dropdown.Callback, Dropdown.Value);
Library:SafeCallback(Dropdown.Changed, Dropdown.Value);
end;
DropdownOuter.InputBegan:Connect(function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 and not
Library:MouseIsOverOpenedFrame() then
if ListOuter.Visible then
Dropdown:CloseDropdown();
else
Dropdown:OpenDropdown();
end;
end;
end);
InputService.InputBegan:Connect(function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 then
local AbsPos, AbsSize = ListOuter.AbsolutePosition,
ListOuter.AbsoluteSize;
Dropdown:CloseDropdown();
end;
end;
end);
Dropdown:BuildDropdownList();
Dropdown:Display();
local Defaults = {}
if next(Defaults) then
for i = 1, #Defaults do
local Index = Defaults[i]
if Info.Multi then
Dropdown.Value[Dropdown.Values[Index]] = true
else
Dropdown.Value = Dropdown.Values[Index];
end
Dropdown:BuildDropdownList();
Dropdown:Display();
end
Groupbox:AddBlank(Info.BlankSize or 5);
Groupbox:Resize();
Options[Idx] = Dropdown;
return Dropdown;
end;
function Funcs:AddDependencyBox()
local Depbox = {
Dependencies = {};
};
Layout:GetPropertyChangedSignal('AbsoluteContentSize'):Connect(function()
Depbox:Resize();
end);
Holder:GetPropertyChangedSignal('Visible'):Connect(function()
Depbox:Resize();
end);
function Depbox:Update()
for _, Dependency in next, Depbox.Dependencies do
local Elem = Dependency[1];
local Value = Dependency[2];
Holder.Visible = true;
Depbox:Resize();
end;
function Depbox:SetupDependencies(Dependencies)
for _, Dependency in next, Dependencies do
assert(type(Dependency) == 'table', 'SetupDependencies:
Dependency is not of type `table`.');
assert(Dependency[1], 'SetupDependencies: Dependency is missing
element argument.');
assert(Dependency[2] ~= nil, 'SetupDependencies: Dependency is
missing value argument.');
end;
Depbox.Dependencies = Dependencies;
Depbox:Update();
end;
Depbox.Container = Frame;
setmetatable(Depbox, BaseGroupbox);
table.insert(Library.DependencyBoxes, Depbox);
return Depbox;
end;
BaseGroupbox.__index = Funcs;
BaseGroupbox.__namecall = function(Table, Key, ...)
return Funcs[Key](...);
end;
end;
-- < Create other UI elements >
do
Library.NotificationArea = Library:Create('Frame', {
BackgroundTransparency = 1;
Position = UDim2.new(0, 0, 0, 40);
Size = UDim2.new(0, 300, 0, 200);
ZIndex = 100;
Parent = ScreenGui;
});
Library:Create('UIListLayout', {
Padding = UDim.new(0, 4);
FillDirection = Enum.FillDirection.Vertical;
SortOrder = Enum.SortOrder.LayoutOrder;
Parent = Library.NotificationArea;
});
Library:AddToRegistry(WatermarkInner, {
BorderColor3 = 'AccentColor';
});
Library:AddToRegistry(Gradient, {
Color = function()
return ColorSequence.new({
ColorSequenceKeypoint.new(0,
Library:GetDarkerColor(Library.MainColor)),
ColorSequenceKeypoint.new(1, Library.MainColor),
});
end
});
Library.Watermark = WatermarkOuter;
Library.WatermarkText = WatermarkLabel;
Library:MakeDraggable(Library.Watermark);
Library:AddToRegistry(KeybindInner, {
BackgroundColor3 = 'MainColor';
BorderColor3 = 'OutlineColor';
}, true);
Library:AddToRegistry(ColorFrame, {
BackgroundColor3 = 'AccentColor';
}, true);
local KeybindLabel = Library:CreateLabel({
Size = UDim2.new(1, 0, 0, 20);
Position = UDim2.fromOffset(5, 2),
TextXAlignment = Enum.TextXAlignment.Left,
Text = 'Keybinds';
ZIndex = 104;
Parent = KeybindInner;
});
Library:Create('UIListLayout', {
FillDirection = Enum.FillDirection.Vertical;
SortOrder = Enum.SortOrder.LayoutOrder;
Parent = KeybindContainer;
});
Library:Create('UIPadding', {
PaddingLeft = UDim.new(0, 5),
Parent = KeybindContainer,
})
Library.KeybindFrame = KeybindOuter;
Library.KeybindContainer = KeybindContainer;
Library:MakeDraggable(KeybindOuter);
end;
function Library:SetWatermarkVisibility(Bool)
Library.Watermark.Visible = Bool;
end;
function Library:SetWatermark(Text)
local X, Y = Library:GetTextBounds(Text, Library.Font, 14);
Library.Watermark.Size = UDim2.new(0, X + 15, 0, (Y * 1.5) + 3);
Library:SetWatermarkVisibility(true)
Library.WatermarkText.Text = Text;
end;
YSize = YSize + 7
Library:AddToRegistry(NotifyInner, {
BackgroundColor3 = 'MainColor';
BorderColor3 = 'OutlineColor';
}, true);
Library:AddToRegistry(Gradient, {
Color = function()
return ColorSequence.new({
ColorSequenceKeypoint.new(0,
Library:GetDarkerColor(Library.MainColor)),
ColorSequenceKeypoint.new(1, Library.MainColor),
});
end
});
Library:AddToRegistry(LeftColor, {
BackgroundColor3 = 'AccentColor';
}, true);
task.spawn(function()
wait(Time or 5);
wait(0.4);
NotifyOuter:Destroy();
end);
end;
function Library:CreateWindow(...)
local Arguments = { ... }
local Config = { AnchorPoint = Vector2.zero }
if Config.Center then
Config.AnchorPoint = Vector2.new(0.5, 0.5)
Config.Position = UDim2.fromScale(0.5, 0.5)
end
local Window = {
Tabs = {};
};
Library:MakeDraggable(Outer, 25);
Library:AddToRegistry(Inner, {
BackgroundColor3 = 'MainColor';
BorderColor3 = 'AccentColor';
});
Library:AddToRegistry(MainSectionOuter, {
BackgroundColor3 = 'BackgroundColor';
BorderColor3 = 'OutlineColor';
});
Library:AddToRegistry(MainSectionInner, {
BackgroundColor3 = 'BackgroundColor';
});
local TabArea = Library:Create('Frame', {
BackgroundTransparency = 1;
Position = UDim2.new(0, 8, 0, 8);
Size = UDim2.new(1, -16, 0, 21);
ZIndex = 1;
Parent = MainSectionInner;
});
Library:AddToRegistry(TabContainer, {
BackgroundColor3 = 'MainColor';
BorderColor3 = 'OutlineColor';
});
function Window:SetWindowTitle(Title)
WindowLabel.Text = Title;
end;
function Window:AddTab(Name)
local Tab = {
Groupboxes = {};
Tabboxes = {};
};
Library:AddToRegistry(TabButton, {
BackgroundColor3 = 'BackgroundColor';
BorderColor3 = 'OutlineColor';
});
Library:AddToRegistry(Blocker, {
BackgroundColor3 = 'MainColor';
});
Library:Create('UIListLayout', {
Padding = UDim.new(0, 8);
FillDirection = Enum.FillDirection.Vertical;
SortOrder = Enum.SortOrder.LayoutOrder;
HorizontalAlignment = Enum.HorizontalAlignment.Center;
Parent = LeftSide;
});
Library:Create('UIListLayout', {
Padding = UDim.new(0, 8);
FillDirection = Enum.FillDirection.Vertical;
SortOrder = Enum.SortOrder.LayoutOrder;
HorizontalAlignment = Enum.HorizontalAlignment.Center;
Parent = RightSide;
});
Side:WaitForChild('UIListLayout'):GetPropertyChangedSignal('AbsoluteContentSize'):C
onnect(function()
Side.CanvasSize = UDim2.fromOffset(0,
Side.UIListLayout.AbsoluteContentSize.Y);
end);
end;
function Tab:ShowTab()
for _, Tab in next, Window.Tabs do
Tab:HideTab();
end;
Blocker.BackgroundTransparency = 0;
TabButton.BackgroundColor3 = Library.MainColor;
Library.RegistryMap[TabButton].Properties.BackgroundColor3 =
'MainColor';
TabFrame.Visible = true;
end;
function Tab:HideTab()
Blocker.BackgroundTransparency = 1;
TabButton.BackgroundColor3 = Library.BackgroundColor;
Library.RegistryMap[TabButton].Properties.BackgroundColor3 =
'BackgroundColor';
TabFrame.Visible = false;
end;
function Tab:SetLayoutOrder(Position)
TabButton.LayoutOrder = Position;
TabListLayout:ApplyLayout();
end;
function Tab:AddGroupbox(Info)
local Groupbox = {};
Library:AddToRegistry(BoxOuter, {
BackgroundColor3 = 'BackgroundColor';
BorderColor3 = 'OutlineColor';
});
Library:AddToRegistry(BoxInner, {
BackgroundColor3 = 'BackgroundColor';
});
Library:AddToRegistry(Highlight, {
BackgroundColor3 = 'AccentColor';
});
Library:Create('UIListLayout', {
FillDirection = Enum.FillDirection.Vertical;
SortOrder = Enum.SortOrder.LayoutOrder;
Parent = Container;
});
function Groupbox:Resize()
local Size = 0;
Groupbox.Container = Container;
setmetatable(Groupbox, BaseGroupbox);
Groupbox:AddBlank(3);
Groupbox:Resize();
Tab.Groupboxes[Info.Name] = Groupbox;
return Groupbox;
end;
function Tab:AddLeftGroupbox(Name)
return Tab:AddGroupbox({ Side = 1; Name = Name; });
end;
function Tab:AddRightGroupbox(Name)
return Tab:AddGroupbox({ Side = 2; Name = Name; });
end;
function Tab:AddTabbox(Info)
local Tabbox = {
Tabs = {};
};
Library:AddToRegistry(BoxOuter, {
BackgroundColor3 = 'BackgroundColor';
BorderColor3 = 'OutlineColor';
});
Library:AddToRegistry(BoxInner, {
BackgroundColor3 = 'BackgroundColor';
});
local Highlight = Library:Create('Frame', {
BackgroundColor3 = Library.AccentColor;
BorderSizePixel = 0;
Size = UDim2.new(1, 0, 0, 2);
ZIndex = 10;
Parent = BoxInner;
});
Library:AddToRegistry(Highlight, {
BackgroundColor3 = 'AccentColor';
});
Library:Create('UIListLayout', {
FillDirection = Enum.FillDirection.Horizontal;
HorizontalAlignment = Enum.HorizontalAlignment.Left;
SortOrder = Enum.SortOrder.LayoutOrder;
Parent = TabboxButtons;
});
function Tabbox:AddTab(Name)
local Tab = {};
Library:AddToRegistry(Button, {
BackgroundColor3 = 'MainColor';
});
Library:AddToRegistry(Block, {
BackgroundColor3 = 'BackgroundColor';
});
Library:Create('UIListLayout', {
FillDirection = Enum.FillDirection.Vertical;
SortOrder = Enum.SortOrder.LayoutOrder;
Parent = Container;
});
function Tab:Show()
for _, Tab in next, Tabbox.Tabs do
Tab:Hide();
end;
Container.Visible = true;
Block.Visible = true;
Button.BackgroundColor3 = Library.BackgroundColor;
Library.RegistryMap[Button].Properties.BackgroundColor3 =
'BackgroundColor';
Tab:Resize();
end;
function Tab:Hide()
Container.Visible = false;
Block.Visible = false;
Button.BackgroundColor3 = Library.MainColor;
Library.RegistryMap[Button].Properties.BackgroundColor3 =
'MainColor';
end;
function Tab:Resize()
local TabCount = 0;
local Size = 0;
Button.InputBegan:Connect(function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1
and not Library:MouseIsOverOpenedFrame() then
Tab:Show();
Tab:Resize();
end;
end);
Tab.Container = Container;
Tabbox.Tabs[Name] = Tab;
setmetatable(Tab, BaseGroupbox);
Tab:AddBlank(3);
Tab:Resize();
return Tab;
end;
return Tabbox;
end;
function Tab:AddLeftTabbox(Name)
return Tab:AddTabbox({ Name = Name, Side = 1; });
end;
function Tab:AddRightTabbox(Name)
return Tab:AddTabbox({ Name = Name, Side = 2; });
end;
TabButton.InputBegan:Connect(function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 then
Tab:ShowTab();
end;
end);
-- This was the first tab added, so we show it by default.
if #TabContainer:GetChildren() == 1 then
Tab:ShowTab();
end;
Window.Tabs[Name] = Tab;
return Tab;
end;
function Library:Toggle()
if Fading then
return;
end;
if Toggled then
-- A bit scuffed, but if we're going from not toggled -> toggled we
want to show the frame immediately so that the fade is visible.
Outer.Visible = true;
task.spawn(function()
-- TODO: add cursor fade?
local State = InputService.MouseIconEnabled;
Cursor.Color = Library.AccentColor;
Cursor.PointA = Vector2.new(mPos.X, mPos.Y);
Cursor.PointB = Vector2.new(mPos.X + 16, mPos.Y + 6);
Cursor.PointC = Vector2.new(mPos.X + 6, mPos.Y + 16);
CursorOutline.PointA = Cursor.PointA;
CursorOutline.PointB = Cursor.PointB;
CursorOutline.PointC = Cursor.PointC;
RenderStepped:Wait();
end;
InputService.MouseIconEnabled = State;
Cursor:Remove();
CursorOutline:Remove();
end);
end;
if Desc:IsA('ImageLabel') then
table.insert(Properties, 'ImageTransparency');
table.insert(Properties, 'BackgroundTransparency');
elseif Desc:IsA('TextLabel') or Desc:IsA('TextBox') then
table.insert(Properties, 'TextTransparency');
elseif Desc:IsA('Frame') or Desc:IsA('ScrollingFrame') then
table.insert(Properties, 'BackgroundTransparency');
elseif Desc:IsA('UIStroke') then
table.insert(Properties, 'Transparency');
end;
if Cache[Prop] == 1 then
continue;
end;
TweenService:Create(Desc, TweenInfo.new(FadeTime,
Enum.EasingStyle.Linear), { [Prop] = Toggled and Cache[Prop] or 1 }):Play();
end;
end;
task.wait(FadeTime);
Outer.Visible = Toggled;
Fading = false;
end
Library:GiveSignal(InputService.InputBegan:Connect(function(Input,
Processed)
if type(Library.ToggleKeybind) == 'table' and
Library.ToggleKeybind.Type == 'KeyPicker' then
if Input.UserInputType == Enum.UserInputType.Keyboard and
Input.KeyCode.Name == Library.ToggleKeybind.Value then
task.spawn(Library.Toggle)
end
elseif Input.KeyCode == Enum.KeyCode.Insert then
task.spawn(Library.Toggle)
end
end))
Window.Holder = Outer;
return Window;
end;
Players.PlayerAdded:Connect(OnPlayerChange);
Players.PlayerRemoving:Connect(OnPlayerChange);
getgenv().Library = Library
local SaveManager = {} do
SaveManager.Folder = 'LinoriaLibSettings'
SaveManager.Ignore = {}
SaveManager.Parser = {
Toggle = {
Save = function(idx, object)
return { type = 'Toggle', idx = idx, value = object.Value }
end,
Load = function(idx, data)
if Toggles[idx] then
Toggles[idx]:SetValue(data.value)
end
end,
},
Slider = {
Save = function(idx, object)
return { type = 'Slider', idx = idx, value =
tostring(object.Value) }
end,
Load = function(idx, data)
if Options[idx] then
Options[idx]:SetValue(data.value)
end
end,
},
Dropdown = {
Save = function(idx, object)
return { type = 'Dropdown', idx = idx, value = object.Value,
mutli = object.Multi }
end,
Load = function(idx, data)
if Options[idx] then
Options[idx]:SetValue(data.value)
end
end,
},
ColorPicker = {
Save = function(idx, object)
return { type = 'ColorPicker', idx = idx, value =
object.Value:ToHex(), transparency = object.Transparency }
end,
Load = function(idx, data)
if Options[idx] then
Options[idx]:SetValueRGB(Color3.fromHex(data.value),
data.transparency)
end
end,
},
KeyPicker = {
Save = function(idx, object)
return { type = 'KeyPicker', idx = idx, mode = object.Mode, key
= object.Value }
end,
Load = function(idx, data)
if Options[idx] then
Options[idx]:SetValue({ data.key, data.mode })
end
end,
},
Input = {
Save = function(idx, object)
return { type = 'Input', idx = idx, text = object.Value }
end,
Load = function(idx, data)
if Options[idx] and type(data.text) == 'string' then
Options[idx]:SetValue(data.text)
end
end,
},
}
function SaveManager:SetIgnoreIndexes(list)
for _, key in next, list do
self.Ignore[key] = true
end
end
function SaveManager:SetFolder(folder)
self.Folder = folder;
self:BuildFolderTree()
end
function SaveManager:Save(name)
if (not name) then
return false, 'no config file is selected'
end
local data = {
objects = {}
}
table.insert(data.objects, self.Parser[toggle.Type].Save(idx,
toggle))
end
table.insert(data.objects, self.Parser[option.Type].Save(idx,
option))
end
writefile(fullPath, encoded)
return true
end
function SaveManager:Load(name)
if (not name) then
return false, 'no config file is selected'
end
return true
end
function SaveManager:IgnoreThemeSettings()
self:SetIgnoreIndexes({
"BackgroundColor", "MainColor", "AccentColor", "OutlineColor",
"FontColor", -- themes
"ThemeManager_ThemeList", 'ThemeManager_CustomThemeList',
'ThemeManager_CustomThemeName', -- themes
})
end
function SaveManager:BuildFolderTree()
local paths = {
self.Folder,
self.Folder .. '/themes',
self.Folder .. '/settings'
}
for i = 1, #paths do
local str = paths[i]
if not isfolder(str) then
makefolder(str)
end
end
end
function SaveManager:RefreshConfigList()
local list = listfiles(self.Folder .. '/settings')
local out = {}
for i = 1, #list do
local file = list[i]
if file:sub(-5) == '.json' then
-- i hate this but it has to be done ...
return out
end
function SaveManager:SetLibrary(library)
self.Library = library
end
function SaveManager:LoadAutoloadConfig()
if isfile(self.Folder .. '/settings/autoload.txt') then
local name = readfile(self.Folder .. '/settings/autoload.txt')
function SaveManager:BuildConfigSection(tab)
assert(self.Library, 'Must set SaveManager.Library')
section:AddDivider()
Options.SaveManager_ConfigList:SetValues(self:RefreshConfigList())
Options.SaveManager_ConfigList:SetValue(nil)
end)
section:AddButton('Refresh list', function()
Options.SaveManager_ConfigList:SetValues(self:RefreshConfigList())
Options.SaveManager_ConfigList:SetValue(nil)
end)
SaveManager:SetIgnoreIndexes({ 'SaveManager_ConfigList',
'SaveManager_ConfigName' })
end
SaveManager:BuildFolderTree()
end
--
-- Renderer
local Renderer = {DrawList = {}}
function Renderer:FindExistingShape(name)
local Shape = self.DrawList[name]
if Shape then
return Shape
else
return nil
end
end
function Renderer:Unrender(name_table)
for _, v in pairs(name_table) do
local Shape = self:FindExistingShape(v)
if Shape then
Shape.Visible = false
Shape:Remove()
end
self.DrawList[v] = nil
end
end
function Renderer:UnrenderAll()
for Name, Shape in pairs(self.DrawList) do
if Shape then
Shape.Visible = false
Shape:Remove()
end
self.DrawList[v] = nil
end
end
function Renderer:UnrenderAllExcept(exclude_table)
for Name, Shape in pairs(self.DrawList) do
local ShouldContinue = false
if ShouldContinue then
ShouldContinue = false
continue
end
if Shape then
Shape.Visible = false
Shape:Remove()
end
self.DrawList[Name] = nil
end
end
if Shape then
Shape.Visible = true
Shape.Position = position
Shape.Size = size
Shape.Color = color
Shape.Transparency = 1
Shape.Filled = false
else
Shape = Drawing.new("Square")
Shape.Visible = true
Shape.Position = position
Shape.Size = size
Shape.Color = color
Shape.Transparency = 1
Shape.Filled = false
self.DrawList[name] = Shape
end
return Shape
end
self.DrawList[name] = Shape
end
return Shape
end
if Shape then
Shape.Visible = true
Shape.Position = position
Shape.Radius = radius
Shape.Color = color
Shape.Transparency = 1
Shape.Filled = false
else
Shape = Drawing.new("Circle")
Shape.Visible = true
Shape.Position = position
Shape.Radius = radius
Shape.Color = color
Shape.Transparency = 1
Shape.Filled = false
self.DrawList[name] = Shape
end
return Shape
end
if Shape then
Shape.Visible = true
Shape.Position = position
Shape.Radius = radius
Shape.Color = color
Shape.Transparency = 1
Shape.Filled = true
else
Shape = Drawing.new("Circle")
Shape.Visible = true
Shape.Position = position
Shape.Radius = radius
Shape.Color = color
Shape.Transparency = 1
Shape.Filled = true
self.DrawList[name] = Shape
end
return Shape
end
if Shape then
Shape.Visible = true
Shape.From = from
Shape.To = to
Shape.Color = color
Shape.Thickness = thickness
Shape.Transparency = 1
else
Shape = Drawing.new("Line")
Shape.Visible = true
Shape.From = from
Shape.To = to
Shape.Color = color
Shape.Thickness = thickness
Shape.Transparency = 1
self.DrawList[name] = Shape
end
return Shape
end
if Shape then
Shape.Visible = true
Shape.Position = position
Shape.Text = text
Shape.Color = color
Shape.Size = size
Shape.Font = font
Shape.Transparency = 1
else
Shape = Drawing.new("Text")
Shape.Visible = true
Shape.Position = position
Shape.Text = text
Shape.Color = color
Shape.Size = size
Shape.Font = font
Shape.Transparency = 1
self.DrawList[name] = Shape
end
return Shape
end
--
-- Get Services
local Teams = game:GetService('Teams')
local Debris = game:GetService("Debris")
local Players = game:GetService("Players")
local Lighting = game:GetService("Lighting")
local Workspace = game:GetService("Workspace")
local RunService = game:GetService("RunService")
local HttpService = game:GetService("HttpService")
local NetworkClient = game:GetService("NetworkClient")
local TeleportService = game:GetService("TeleportService")
local UserInputService = game:GetService("UserInputService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local MarketPlaceService = game:GetService("MarketplaceService")
local VirtualInputManager = game:GetService("VirtualInputManager")
--
--[[ Get Phantom Force modules (Stolen from moonlight because this is so
minimalistic)
local Modules = {Stored = {}}
pcall(function()
Required = require(instance)
end)
Modules.Stored[instance.Name] = Required
end
if Modules.Stored[instance.Name] then
continue
end
pcall(function()
Required = require(instance)
end)
Modules.Stored[instance.Name] = Required
end
function Modules:GetFromProp(prop)
local Module = nil
for _,v in next, Modules.Stored do
if type(v) == "table" and rawget(v, prop) then
warn(_, v, prop)
table.foreach(v, print)
Module = v
end
end
return Module
end
function Modules:Get(name)
return Modules.Stored[name] or nil
end
local RoundSystemClientInterface =
Modules:GetFromProp("RoundSystemClientInterface")
local WeaponControllerInterface =
Modules:GetFromProp("WeaponControllerInterface")
local PlayerDataClientInterface =
Modules:GetFromProp("PlayerDataClientInterface")
local HudCrosshairsInterface = Modules:GetFromProp("HudCrosshairsInterface")
local LeaderboardInterface = Modules:GetFromProp("LeaderboardInterface")
local ReplicationInterface = Modules:GetFromProp("ReplicationInterface")
local CharacterInterface = Modules:GetFromProp("CharacterInterface")
local ActiveLoadoutUtils = Modules:GetFromProp("ActiveLoadoutUtils")
local PlayerStatusEvents = Modules:GetFromProp("PlayerStatusEvents")
local ReplicationObject = Modules:GetFromProp("ReplicationObject")
local ThirdPersonObject = Modules:GetFromProp("ThirdPersonObject")
local ContentDatabase = Modules:GetFromProp("ContentDatabase")
local BulletInterface = Modules:GetFromProp("BulletInterface")
local CharacterObject = Modules:GetFromProp("CharacterObject")
local CameraInterface = Modules:GetFromProp("CameraInterface")
local CameraObject = Modules:GetFromProp("MainCameraObject")
local PublicSettings = Modules:GetFromProp("PublicSettings")
local FirearmObject = Modules:GetFromProp("FirearmObject")
local NetworkClient = Modules:GetFromProp("NetworkClient")
local BulletObject = Modules:GetFromProp("BulletObject")
local MeleeObject = Modules:GetFromProp("MeleeObject")
local BulletCheck = Modules:GetFromProp("BulletCheck")
local GameClock = Modules:GetFromProp("GameClock")
local Physics = Modules:GetFromProp("PhysicsLib")
local Sound = Modules:GetFromProp("AudioSystem")
local Effects = Modules:GetFromProp("Effects")
--]]
-- Custom functions
-- https://devforum.roblox.com/t/tutorial-check-if-an-object-has-property/
1213998
function ObjectHasProperty(object, propertyName)
local success, _ = pcall(function()
object[propertyName] = object[propertyName]
end)
return success
end
AutoWall = false,
Autofire = false,
Other = {}
},
Visuals = {
Players = {
Boxes = {
Enabled = false,
Color = ColorRGB(255, 255, 255)
},
Chams = {
Enabled = false,
FillColor = ColorRGB(0, 0, 0),
OutlineColor = Redacted.Accent
},
WeaponChams = {
Enabled = false,
Color = Redacted.Accent,
-- OPTIONS: Storage.PartMaterials
Material = 'ForceField' -- Storage.PartMaterials
},
ArmChams = {
Enabled = false,
Color = Redacted.Accent,
World = {
OverrideTechnology = 'Compatibility',
OverrideWorldMaterials = 'Default',
OverrideClockTime = {
Enabled = false,
Value = 12
},
OverrideStarsCount = {
Enabled = false,
Value = 5000
},
OverrideAmbient = {
Enabled = false,
Color = Redacted.Accent
},
SkyboxChanger = {
Enabled = false,
Value = "Neptune"
}
},
Throwables = {},
Other = {
Crosshair = {
Enabled = false,
Color = ColorRGB(255, 255, 255)
},
VisualizeFOV = {
Enabled = false,
ActiveColor = ColorRGB(25, 255, 25), -- Light green
InactiveColor = ColorRGB(255, 25, 25) -- Light red
}
}
},
Misc = {
Movement = {
Bhop = false,
FlyHack = {
Enabled = false,
Value = 40
},
SpeedHack = {
Enabled = false,
Value = 45
}
},
Other = {
OverrideHipheight = {
Enabled = false,
Height = 20
},
}
}
}
--
-- Saved/Stored data, Used for mostly everything in our script requiring resetable
data.
local Storage = {
PenetrationDepth = {['AK12'] = 1.00,['AN-94'] = 1.00,['REMINGTON700'] = 3.00,
['ASVAL'] = 1.00,['SCAR-L'] = 1.00,['AUGA1'] = 1.00,['M16A4'] = 1.10,['G36'] =
1.30,['M16A1'] = 0.80,['M16A3'] = 1.10,['TYPE20'] = 1.40,['AUGA2'] = 1.00,['K2'] =
1.00,['FAMASF1'] = 1.00,['AK47'] = 1.40,['AKM'] = 1.40,['AK103'] = 1.40,['TAR-21']
= 1.20,['TYPE88'] = 0.90,['M231'] = 1.00,['C7A2'] = 0.90,['STG-44'] = 1.60,
['G11K2'] = 2.00,['M14'] = 1.80,['BEOWULFECR'] = 1.90,['SCAR-H'] = 1.50,['AK12BR']
= 2.00,['G3A3'] = 1.50,['AG-3'] = 2.00,['HK417'] = 1.60,['HENRY45-70'] = 2.00,
['FAL50.00'] = 2.00,['HCAR'] = 2.20,['M4A1'] = 1.00,['G36K'] = 1.10,['M4'] = 1.00,
['L22'] = 0.90,['SCARPDW'] = 0.90,['AKU12'] = 1.00,['GROZA-1'] = 1.50,['OTS-126'] =
1.20,['AK12C'] = 1.20,['HONEYBADGER'] = 1.30,['K1A'] = 0.75,['SR-3M'] = 1.00,
['GROZA-4'] = 1.50,['MC51'] = 1.50,['FAL50.63PARA'] = 2.00,['1858CARBINE'] = 0.50,
['AK105'] = 1.00,['JURY'] = 1.00,['KACSRR'] = 1.00,['GYROJETCARBINE'] = 0.70,
['C8A2'] = 0.80,['X95R'] = 1.00,['HK51B'] = 1.90,['CANCANNON'] = 1.20,['KSG12'] =
0.40,['MODEL870'] = 0.50,['DBV12'] = 0.50,['KS-23M'] = 0.70,['SAIGA-12'] = 0.50,
['STEVENSDB'] = 0.50,['E-GUN'] = 0.50,['AA-12'] = 0.30,['SPAS-12'] = 0.60,['DT11']
= 0.70,['USAS-12'] = 0.30,['MK11'] = 1.70,['SKS'] = 1.50,['SL-8'] = 1.30,
['DRAGUNOVSVU'] = 2.80,['VSSVINTOREZ'] = 1.50,['MSG90'] = 2.00,['M21'] = 2.40,
['BEOWULFTCR'] = 3.00,['SA58SPR'] = 2.00,['SCARSSR'] = 2.60,['COLTLMG'] = 1.40,
['M60'] = 2.20,['AUGHBAR'] = 1.60,['MG36'] = 1.80,['RPK12'] = 1.60,['L86LSW'] =
1.60,['RPK'] = 1.60,['HK21E'] = 1.60,['HAMRIAR'] = 1.40,['RPK74'] = 1.20,['MG3KWS']
= 1.80,['M1918A2'] = 2.20,['MGV-176'] = 0.50,['STONER96'] = 1.20,['CHAINSAW'] =
1.20,['MG42'] = 2.00,['INTERVENTION'] = 4.00,['MODEL700'] = 3.00,['AWS'] = 2.00,
['BFG50'] = 10.00,['AWM'] = 3.00,['TRG-42'] = 3.00,['MOSINNAGANT'] = 3.50,
['DRAGUNOVSVDS'] = 3.20,['M1903'] = 3.80,['K14'] = 3.00,['HECATEII'] = 10.00,
['FT300'] = 3.00,['M107'] = 5.00,['STEYRSCOUT'] = 3.00,['WA2000'] = 2.80,['NTW-20']
= 20.00,['M9'] = 0.50,['G17'] = 0.50,['M1911A1'] = 0.50,['M17'] = 0.50,
['DESERTEAGLEL5'] = 1.00,['G21'] = 0.50,['G23'] = 0.60,['M45A1'] = 0.50,['G40'] =
0.80,['KG-99'] = 0.50,['G50'] = 1.00,['FIVESEVEN'] = 1.20,['ZIP22'] = 0.50,['GIM1']
= 1.00,['HARDBALLER'] = 0.80,['IZHEVSKPB'] = 0.50,['MAKAROVPM'] = 0.50,['GB-22'] =
0.50,['DESERTEAGLEXIX'] = 1.30,['AUTOMAGIII'] = 1.20,['GYROJETMARKI'] = 0.50,
['GSP'] = 0.10,['GRIZZLY'] = 1.30,['M2011'] = 0.50,['ALIEN'] = 0.50,['AF2011-A1'] =
0.50,['G18C'] = 0.50,['93R'] = 0.50,['PP-2000'] = 1.00,['TEC-9'] = 0.50,
['MICROUZI'] = 0.50,['ŠKORPIONVZ.61'] = 0.50,['ASMI'] = 0.50,['MP1911'] = 0.50,
['ARMPISTOL'] = 0.90,['MP412REX'] = 0.50,['MATEBA6'] = 1.00,['1858NEWARMY'] = 0.50,
['REDHAWK44'] = 1.00,['JUDGE'] = 1.00,['EXECUTIONER'] = 1.00,['SUPERSHORTY'] =
0.60,['SFG50'] = 10.00,['M79THUMPER'] = 0.50,['COILGUN'] = 0.50,['SAWEDOFF'] =
0.60,['SAIGA-12U'] = 0.40,['OBREZ'] = 2.00,['SASS308'] = 2.00,['GLOCK17'] = 0.50},
WeaponVelocity = {['AK12'] = 2950.00,['REMINGTON700'] = 2650,['AN-94'] =
2950.00 ,['ASVAL'] = 1500.00 ,['SCAR-L'] = 2300.00 ,['AUGA1'] = 3200.00 ,['M16A4']
= 2700.00 ,['G36'] = 2700.00 ,['M16A1'] = 3100.00 ,['M16A3'] = 2700.00 ,['TYPE20']
= 2625.00 ,['AUGA2'] = 3200.00 ,['K2'] = 2400.00 ,['FAMASF1'] = 3100.00 ,['AK47'] =
2350.00 ,['AUGA3'] = 3200.00,['L85A2'] = 2500.00,['HK416'] = 2500.00,['AK74'] =
2900.00,['AKM'] = 2350.00,['AK103'] = 2350.00,['TAR-21'] = 2800.00,['TYPE88'] =
2950.00,['M231'] = 2200.00,['C7A2'] = 2800.00,['STG-44'] = 2250.00,['G11K2'] =
3100.00,['M14'] = 2550.00,['BEOWULFECR'] = 1800.00,['SCAR-H'] = 2900.00,['AK12BR']
= 2700.00,['G3A3'] = 2600.00,['AG-3'] = 2600.00,['HK417'] = 2500.00,['HENRY45-70']
= 1800.00,['FAL50.00'] = 2750.00,['HCAR'] = 2500.00,['M4A1'] = 2200.00,['G36K'] =
2500.00,['M4'] = 2200.00,['L22'] = 2000.00,['SCARPDW'] = 2200.00,['AKU12'] =
2550.00,['GROZA-1'] = 2400.00,['OTS-126'] = 2300.00,['AK12C'] = 2150.00,
['HONEYBADGER'] = 2000.00,['K1A'] = 1700.00,['SR-3M'] = 2000.00,['GROZA-4'] =
1200.00,['MC51'] = 2000.00,['FAL50.63PARA'] = 2200.00,['1858CARBINE'] = 1500.00,
['AK105'] = 2800.00,['JURY'] = 1500.00,['KACSRR'] = 1500.00,['GYROJETCARBINE'] =
50.00,['C8A2'] = 2400.00,['X95R'] = 2200.00,['HK51B'] = 2200.00,['CANCANNON'] =
1000.00,['KSG12'] = 1500.00,['MODEL870'] = 1500.00,['DBV12'] = 1500.00,['KS-23M'] =
1500.00,['SAIGA-12'] = 1500.00,['STEVENSDB'] = 1600.00,['E-GUN'] = 950.00,['AA-12']
= 1500.00,['SPAS-12'] = 1500.00,['DT11'] = 2000.00,['USAS-12'] = 1300.00,['MP5K'] =
1200.00,['UMP45'] = 870.00,['G36C'] = 2300.00,['MP7'] = 2400.00,['MAC10'] = 920.00,
['P90'] = 2350.00,['COLTMARS'] = 2600.00,['MP5'] = 1300.00,['COLTSMG633'] =
1300.00,['L2A3'] = 1280.00,['MP5SD'] = 1050.00,['MP10'] = 1300.00,['M3A1'] =
900.00,['MP5/10'] = 1400.00,['UZI'] = 1300.00,['AUGA3PARAXS'] = 1200.00,['K7'] =
1300.00,['AKS74U'] = 2400.00,['PPSH-41'] = 1600.00,['FALPARASHORTY'] = 2000.00,
['KRISSVECTOR'] = 960.00,['PP-19BIZON'] = 1250.00,['MP40'] = 1310.00,['X95SMG'] =
1300.00,['TOMMYGUN'] = 935.00,['RAMA1130'] = 1300.00,['BWC9A'] = 1300.00,['FIVE-0']
= 1200.00,['MK11'] = 2800.00,['SKS'] = 2500.00,['SL-8'] = 2800.00,['DRAGUNOVSVU'] =
2700.00,['VSSVINTOREZ'] = 2000.00,['MSG90'] = 2800.00,['M21'] = 2650.00,
['BEOWULFTCR'] = 1800.00,['SA58SPR'] = 2500.00,['SCARSSR'] = 3000.00,['COLTLMG'] =
2500.00,['M60'] = 2800.00,['AUGHBAR'] = 3300.00,['MG36'] = 2700.00,['RPK12'] =
3100.00,['L86LSW'] = 3100.00,['RPK'] = 2450.00,['HK21E'] = 2600.00,['HAMRIAR'] =
2600.00,['RPK74'] = 3150.00,['MG3KWS'] = 2700.00,['M1918A2'] = 2800.00,['MGV-176']
= 1550.00,['STONER96'] = 3000.00,['CHAINSAW'] = 3000.00,['MG42'] = 2400.00,
['INTERVENTION'] = 3000.00,['MODEL700'] = 2650.00,['AWS'] = 2500.00,['BFG50'] =
3000.00,['AWM'] = 3000.00,['TRG-42'] = 3000.00,['MOSINNAGANT'] = 3000.00,
['DRAGUNOVSVDS'] = 2650.00,['M1903'] = 3000.00,['K14'] = 2800.00,['HECATEII'] =
3000.00,['FT300'] = 2800.00,['M107'] = 2800.00,['STEYRSCOUT'] = 3000.00,['WA2000']
= 2850.00,['NTW-20'] = 2400.00,['M9'] = 1300.00,['G17'] = 1230.00,['M1911A1'] =
830.00,['M17'] = 1200.00,['DESERTEAGLEL5'] = 1700.00,['G21'] = 810.00,['G23'] =
1025.00,['M45A1'] = 830.00,['G40'] = 1350.00,['KG-99'] = 1500.00,['G50'] = 1250.00,
['FIVESEVEN'] = 2500.00,['ZIP22'] = 1600.00,['GIM1'] = 875.00,['HARDBALLER'] =
1400.00,['IZHEVSKPB'] = 950.00,['MAKAROVPM'] = 1030.00,['GB-22'] = 1900.00,
['DESERTEAGLEXIX'] = 1425.00,['AUTOMAGIII'] = 1700.00,['GYROJETMARKI'] = 25.00,
['GSP'] = 1800.00,['GRIZZLY'] = 1500.00,['M2011'] = 1300.00,['ALIEN'] = 1300.00,
['AF2011-A1'] = 1250.00,['G18C'] = 1230.00,['93R'] = 1200.00,['PP-2000'] = 2000.00,
['TEC-9'] = 1180.00,['MICROUZI'] = 2000.00,['ŠKORPIONVZ.61'] = 1200.00,['ASMI'] =
1260.00,['MP1911'] = 830.00,['ARMPISTOL'] = 2300.00,['MP412REX'] = 1700.00,
['MATEBA6'] = 1450.00,['1858NEWARMY'] = 1000.00,['REDHAWK44'] = 1600.00,['JUDGE'] =
2000.00,['EXECUTIONER'] = 2000.00,['SUPERSHORTY'] = 1400.00,['SFG50'] = 2000.00,
['M79THUMPER'] = 900.00,['COILGUN'] = 950.00,['SAWEDOFF'] = 1300.00,['SAIGA-12U'] =
1400.00,['OBREZ'] = 1500.00,['SASS308'] = 3000.00,['GLOCK17'] = 1230.00},
Skyboxes = {
["Purple Nebula"] = {
["SkyboxBk"] = "rbxassetid://159454299",
["SkyboxDn"] = "rbxassetid://159454296",
["SkyboxFt"] = "rbxassetid://159454293",
["SkyboxLf"] = "rbxassetid://159454286",
["SkyboxRt"] = "rbxassetid://159454300",
["SkyboxUp"] = "rbxassetid://159454288"
},
["Night Sky"] = {
["SkyboxBk"] = "rbxassetid://12064107",
["SkyboxDn"] = "rbxassetid://12064152",
["SkyboxFt"] = "rbxassetid://12064121",
["SkyboxLf"] = "rbxassetid://12063984",
["SkyboxRt"] = "rbxassetid://12064115",
["SkyboxUp"] = "rbxassetid://12064131"
},
["Pink Daylight"] = {
["SkyboxBk"] = "rbxassetid://271042516",
["SkyboxDn"] = "rbxassetid://271077243",
["SkyboxFt"] = "rbxassetid://271042556",
["SkyboxLf"] = "rbxassetid://271042310",
["SkyboxRt"] = "rbxassetid://271042467",
["SkyboxUp"] = "rbxassetid://271077958"
},
["Morning Glow"] = {
["SkyboxBk"] = "rbxassetid://1417494030",
["SkyboxDn"] = "rbxassetid://1417494146",
["SkyboxFt"] = "rbxassetid://1417494253",
["SkyboxLf"] = "rbxassetid://1417494402",
["SkyboxRt"] = "rbxassetid://1417494499",
["SkyboxUp"] = "rbxassetid://1417494643"
},
["Setting Sun"] = {
["SkyboxBk"] = "rbxassetid://626460377",
["SkyboxDn"] = "rbxassetid://626460216",
["SkyboxFt"] = "rbxassetid://626460513",
["SkyboxLf"] = "rbxassetid://626473032",
["SkyboxRt"] = "rbxassetid://626458639",
["SkyboxUp"] = "rbxassetid://626460625"
},
['Cache'] = {
['SkyboxBk'] = 'rbxassetid://220513302';
['SkyboxDn'] = 'rbxassetid://213221473';
['SkyboxFt'] = 'rbxassetid://220513328';
['SkyboxLf'] = 'rbxassetid://220513318';
['SkyboxRt'] = 'rbxassetid://220513279';
['SkyboxUp'] = 'rbxassetid://220513345';
},
["Fade Blue"] = {
["SkyboxBk"] = "rbxassetid://153695414",
["SkyboxDn"] = "rbxassetid://153695352",
["SkyboxFt"] = "rbxassetid://153695452",
["SkyboxLf"] = "rbxassetid://153695320",
["SkyboxRt"] = "rbxassetid://153695383",
["SkyboxUp"] = "rbxassetid://153695471"
},
["Elegant Morning"] = {
["SkyboxBk"] = "rbxassetid://153767241",
["SkyboxDn"] = "rbxassetid://153767216",
["SkyboxFt"] = "rbxassetid://153767266",
["SkyboxLf"] = "rbxassetid://153767200",
["SkyboxRt"] = "rbxassetid://153767231",
["SkyboxUp"] = "rbxassetid://153767288"
},
["Neptune"] = {
["SkyboxBk"] = "rbxassetid://218955819",
["SkyboxDn"] = "rbxassetid://218953419",
["SkyboxFt"] = "rbxassetid://218954524",
["SkyboxLf"] = "rbxassetid://218958493",
["SkyboxRt"] = "rbxassetid://218957134",
["SkyboxUp"] = "rbxassetid://218950090"
},
["Redshift"] = {
["SkyboxBk"] = "rbxassetid://401664839",
["SkyboxDn"] = "rbxassetid://401664862",
["SkyboxFt"] = "rbxassetid://401664960",
["SkyboxLf"] = "rbxassetid://401664881",
["SkyboxRt"] = "rbxassetid://401664901",
["SkyboxUp"] = "rbxassetid://401664936"
},
["Aesthetic Night"] = {
["SkyboxBk"] = "rbxassetid://1045964490",
["SkyboxDn"] = "rbxassetid://1045964368",
["SkyboxFt"] = "rbxassetid://1045964655",
["SkyboxLf"] = "rbxassetid://1045964655",
["SkyboxRt"] = "rbxassetid://1045964655",
["SkyboxUp"] = "rbxassetid://1045962969"
},
["Dababy"] = {
["SkyboxBk"] = "rbxassetid://6083995041",
["SkyboxDn"] = "rbxassetid://6083995041",
["SkyboxFt"] = "rbxassetid://6083995041",
["SkyboxLf"] = "rbxassetid://6083995041",
["SkyboxRt"] = "rbxassetid://6083995041",
["SkyboxUp"] = "rbxassetid://6083995041"
},
["Minecraft"] = {
["SkyboxBk"] = "rbxassetid://1876545003",
["SkyboxDn"] = "rbxassetid://1876544331",
["SkyboxFt"] = "rbxassetid://1876542941",
["SkyboxLf"] = "rbxassetid://1876543392",
["SkyboxRt"] = "rbxassetid://1876543764",
["SkyboxUp"] = "rbxassetid://1876544642"
},
["Deep Space Cluster"] = {
["MoonTextureId"] = "rbxassetid://6444320592",
["SkyboxBk"] = "rbxassetid://6444884337",
["SkyboxDn"] = "rbxassetid://6444884785",
["SkyboxFt"] = "rbxassetid://6444884337",
["SkyboxLf"] = "rbxassetid://6444884337",
["SkyboxRt"] = "rbxassetid://6444884337",
["SkyboxUp"] = "rbxassetid://6412503613"
},
["Oblivion Lost"] = {
["MoonTextureId"] = "rbxasset://sky/moon.jpg",
["SkyboxBk"] = "rbxassetid://5103110171",
["SkyboxDn"] = "rbxassetid://5102993828",
["SkyboxFt"] = "rbxassetid://5103111020",
["SkyboxLf"] = "rbxassetid://5103112417",
["SkyboxRt"] = "rbxassetid://5103113734",
["SkyboxUp"] = "rbxassetid://5102993828"
}
},
MapMaterials = {
['Minecraft'] = {
['Wood'] = 3258599312,
['WoodPlanks'] = 8676581022,
['Brick'] = 8558400252,
['Cobblestone'] = 5003953441,
['Concrete'] = 7341687607,
['DiamondPlate'] = 6849247561,
['Fabric'] = 118776397,
['Granite'] = 4722586771,
['Grass'] = 4722588177,
['Ice'] = 3823766459,
['Marble'] = 62967586,
['Metal'] = 62967586,
['Sand'] = 152572215
}
},
PartMaterials = {
"Plastic", "Wood", "Slate",
"Concrete", "CorrodedMetal", "DiamondPlate",
"Foil", "Grass", "Ice",
"Marble", "Granite", "Brick",
"Pebble", "Sand", "Fabric",
"SmoothPlastic", "Metal", "WoodPlanks",
"Cobblestone", "Neon", "Glass",
"ForceField"
},
HitboxMeshIds = {
["Head"] = "rbxassetid://6179256256",
["Torso"] = "rbxassetid://4049240078",
["Legs"] = "rbxassetid://4049240209",
["Arms"] = "rbxassetid://4049240323"
},
ScreenSize = Camera.ViewportSize,
WorldAmbientsOriginal = nil,
SkyboxOriginal = {},
WorldOriginal = {},
ArmsOriginal = {},
GunOriginal = {},
NextRagebotShot = tick(),
TargetWithinFOV = false,
AutoFireClick = false,
AimbotFiring = false
}
-- UI/Menu Creation
local Window = Library:CreateWindow({
Title = 'defense.lua ( ' .. Redacted.Username .. ", " .. Redacted.Build ..
' )',
Center = true, AutoShow = true, TabPadding = 5, MenuFadeTime = 0.2
})
local Tabs = {
Ragebot = Window:AddTab('Aimbot'),
Visuals = Window:AddTab('Visuals'),
Misc = Window:AddTab('Miscellaneous'),
Settings = Window:AddTab('Settings')
}
local Groups = {
Ragebot = {
General = Tabs.Ragebot:AddLeftGroupbox('General'),
},
Visuals = {
Players = Tabs.Visuals:AddLeftGroupbox('Players'),
World = Tabs.Visuals:AddRightGroupbox('World'),
Throwables = Tabs.Visuals:AddLeftGroupbox('Throwables'),
Other = Tabs.Visuals:AddRightGroupbox('Other')
},
Misc = {
Movement = Tabs.Misc:AddLeftGroupbox('Movement'),
Other = Tabs.Misc:AddRightGroupbox('Other')
},
Settings = {
Menu = Tabs.Settings:AddLeftGroupbox(OverrideUserSettings and 'Menu' or
'Menu')
-- 'Configuration' Is added later on by the SaveManager.
}
}
Callback = function(Value)
Config.Ragebot.General.Enabled = Value
end
})
Groups.Ragebot.General:AddDropdown('RagebotFieldOfViewMode', {
Text = 'Field of view mode', Tooltip = nil,
Callback = function(Value)
Config.Ragebot.General.FieldOfViewMode = Value
end
})
Groups.Ragebot.General:AddSlider('RagebotFieldOfView', {
Text = 'Field of view', Tooltip = 'Maximum angle the aimbot is allowed for
activation',
Callback = function(Value)
Config.Ragebot.General.FieldOfView = Value
end
})
Groups.Ragebot.General:AddSlider('RagebotMaxDistance', {
Text = 'Maximum distance', Tooltip = 'Maximum distance the aimbot is
allowed for activation',
Callback = function(Value)
Config.Ragebot.General.MaxDistance = Value
end
})
Groups.Ragebot.General:AddDropdown('RagebotTargetSelection', {
Text = 'Target selection', Tooltip = nil,
Callback = function(Value)
Config.Ragebot.General.TargetSelection = Value
end
})
--[[Groups.Ragebot.General:AddToggle('RagebotAutoWall', {
Text = 'Auto wall', Tooltip = nil,
Default = false,
Callback = function(Value)
Config.Ragebot.General.AutoWall = Value
end
})]]
Groups.Ragebot.General:AddToggle('RagebotAutoShoot', {
Text = 'Auto shoot', Tooltip = nil,
Default = false,
Callback = function(Value)
Config.Ragebot.General.AutoFire = Value
end
})
Groups.Ragebot.General:AddDropdown('RagebotHitboxes', {
Text = 'Hitboxes', Tooltip = 'Which hitboxes the aimbot will target',
Callback = function(Value)
Config.Ragebot.General.Hitboxes = Value
end
})
Default = false,
Callback = function(Value)
Config.Antiaim.FakeLag.Enabled = Value
end
})
Groups.Antiaim.Fakelag:AddSlider('FakelagMinDistance', {
Text = 'Minimum range',
Tooltip = nil,
Default = 20,
Min = 1,
Max = 40,
Rounding = 1,
Compact = false,
Callback = function(Value)
Config.Antiaim.FakeLag.MinDistance = Value
end
})
Groups.Antiaim.Fakelag:AddSlider('FakelagMaxDistance', {
Text = 'Maximum range',
Tooltip = nil,
Default = 30,
Min = 1,
Max = 40,
Rounding = 1,
Compact = false,
Callback = function(Value)
Config.Antiaim.FakeLag.MaxDistance = Value
end
})]]
Default = false,
Callback = function(Value)
Config.Visuals.Players.Boxes.Enabled = Value
end
}):AddColorPicker('BoxesColor', {
Title = 'Boxes color',
Groups.Visuals.Players:AddToggle('Chams', {
Text = 'Chams', Tooltip = nil,
Default = false,
Callback = function(Value)
Config.Visuals.Players.Chams.Enabled = Value
end
}):AddColorPicker('ChamsOutlineColor', {
Title = 'Outline color',
Default = Redacted.Accent,
Transparency = 0,
Callback = function(Value)
Config.Visuals.Players.Chams.OutlineColor = Value
end
}):AddColorPicker('ChamsFillColor', {
Title = 'Fill color',
Callback = function(Value)
Config.Visuals.Players.Chams.FillColor = Value
end
})
Groups.Visuals.Players:AddToggle('WeaponChams', {
Text = 'Weapon chams', Tooltip = nil,
Default = false,
Callback = function(Value)
Config.Visuals.Players.WeaponChams.Enabled = Value
end
}):AddColorPicker('WeaponChamsColor', {
Title = 'Color',
Default = Redacted.Accent,
Transparency = 0,
Callback = function(Value)
Config.Visuals.Players.WeaponChams.Color = Value
end
})
Groups.Visuals.Players:AddDropdown('WeaponChamsMaterial', {
Text = 'Weapon material', Tooltip = nil,
Values = Storage.PartMaterials,
Multi = false,
Default = 'ForceField',
Callback = function(Value)
Config.Visuals.Players.WeaponChams.Material = Value
end
})
Groups.Visuals.Players:AddToggle('ArmChams', {
Text = 'Arm chams',
Tooltip = nil,
Default = false,
Callback = function(Value)
Config.Visuals.Players.ArmChams.Enabled = Value
end
}):AddColorPicker('ArmChamsColor', {
Title = 'Color',
Transparency = 0,
Default = Redacted.Accent,
Callback = function(Value)
Config.Visuals.Players.ArmChams.Color = Value
end
})
Groups.Visuals.Players:AddDropdown('ArmChamsMaterial', {
Text = 'Arms material',
Tooltip = nil,
Values = Storage.PartMaterials,
Multi = false,
Default = 'ForceField',
Callback = function(Value)
Config.Visuals.Players.ArmChams.Material = Value
end
})
Callback = function(Value)
Config.Visuals.World.OverrideTechnology = Value
end
})
Groups.Visuals.World:AddDropdown('OverrideWorldMaterials', {
Text = 'Override world materials', Tooltip = nil,
Callback = function(Value)
Config.Visuals.World.OverrideWorldMaterials = Value
end
})
Groups.Visuals.World:AddToggle('OverrideClockTime', {
Text = 'Override ClockTime', Tooltip = nil,
Default = false,
Callback = function(Value)
Config.Visuals.World.OverrideClockTime.Enabled = Value
end
})
Groups.Visuals.World:AddSlider('OverrideClockTimeValue', {
Text = '', Tooltip = nil,
Callback = function(Value)
Config.Visuals.World.OverrideClockTime.Value = Value
end
})
Groups.Visuals.World:AddToggle('OverrideStarsCount', {
Text = 'Override stars amount', Tooltip = nil,
Default = false,
Callback = function(Value)
Config.Visuals.World.OverrideStarsCount.Enabled = Value
end
})
Groups.Visuals.World:AddSlider('StarsCountValue', {
Text = '', Tooltip = nil,
Callback = function(Value)
Config.Visuals.World.OverrideStarsCount.Value = Value
end
})
Groups.Visuals.World:AddToggle('AmbientLighting', {
Text = 'Ambient lighting', Tooltip = nil,
Default = false,
Callback = function(Value)
Config.Visuals.World.OverrideAmbient.Enabled = Value
end
}):AddColorPicker('AmbientLightingColor', {
Title = 'Override ambient',
Default = Redacted.Accent,
Transparency = 0,
Callback = function(Value)
Config.Visuals.World.OverrideAmbient.Color = Value
end
})
Groups.Visuals.World:AddToggle('SkyboxChanger', {
Text = 'Skybox changer', Tooltip = nil,
Default = false,
Callback = function(Value)
Config.Visuals.World.SkyboxChanger.Enabled = Value
end
})
Groups.Visuals.World:AddDropdown('SkyboxChangerTexture', {
Text = 'Skybox', Tooltip = nil,
Values = GetTableKeys(Storage.Skyboxes),
Multi = false,
Default = 1,
Callback = function(Value)
Config.Visuals.World.SkyboxChanger.Value = Value
end
})
Default = false,
Callback = function(Value)
Config.Visuals.Other.Crosshair.Enabled = Value
end
}):AddColorPicker('CrosshairColor', {
Title = 'Crosshair color',
Callback = function(Value)
Config.Visuals.Other.Crosshair.Color = Value
end
})
Groups.Visuals.Other:AddToggle('VisualizeFOV', {
Text = 'Visualise fov', Tooltip = nil,
Default = false,
Callback = function(Value)
Config.Visuals.Other.VisualizeFOV.Enabled = Value
end
}):AddColorPicker('FovInactiveColor', {
Title = 'Active color',
Callback = function(Value)
Config.Visuals.Other.VisualizeFOV.ActiveColor = Value
end
}):AddColorPicker('FovActiveColor', {
Title = 'Inactive color',
Default = Redacted.Accent,
Transparency = 0,
Callback = function(Value)
Config.Visuals.Other.VisualizeFOV.InactiveColor = Value
end
})
Callback = function(Value)
Config.Misc.Movement.Bhop = Value
end
})
Groups.Misc.Movement:AddToggle('FlyHack', {
Text = 'Flyhack', Tooltip = nil,
Default = false,
Callback = function(Value)
Config.Misc.Movement.FlyHack.Enabled = Value
end
})
Groups.Misc.Movement:AddSlider('FlyHackValue', {
Text = 'Flyhack speed', Tooltip = nil,
Callback = function(Value)
Config.Misc.Movement.FlyHack.Value = Value
end
})
Groups.Misc.Movement:AddToggle('SpeedHack', {
Text = 'Speedhack', Tooltip = nil,
Default = false,
Callback = function(Value)
Config.Misc.Movement.SpeedHack.Enabled = Value
end
})
Groups.Misc.Movement:AddSlider('SpeedHackValue', {
Text = 'Speedhack speed', Tooltip = nil,
Callback = function(Value)
Config.Misc.Movement.SpeedHack.Value = Value
end
})
Groups.Misc.Other:AddSlider('HipHeightValue', {
Text = 'Hip height', Tooltip = nil,
Callback = function(Value)
Config.Misc.Other.HipHeight = Value
end
})
Groups.Settings.Menu:AddLabel('Menu bind'):AddKeyPicker('MenuKeybind', {
Text = 'Menu keybind',
Default = 'Insert',
NoUI = true
})
Library.ToggleKeybind = Options.MenuKeybind
--
-- Returns the muzzle tip to our viewmodel weapon, bullets fire from this
position so we use this for aimbot currently.
function PhantomForces:GetMuzzleParts(Gun)
local MuzzleParts
return MuzzleParts
end
-- Returns Phantom Forces custom player models, The name variable is string
encrypted under everything so don't even bother changing this.
function PhantomForces:GetPlayerModels()
local PlayerList = {}
return PlayerList
end
-- @litozinnamon & @Shay yall should go kys, I hate doing this fucking retarded
bs it makes the code look stupid. yall doing this didn't prevent SHITTTTTT.
function PhantomForces:GetPlayerTeam(Player)
local Helmet =
Player:FindFirstChildWhichIsA("Folder"):FindFirstChildOfClass("MeshPart")
if Helmet then
if Helmet.BrickColor == BrickColor.new("Black") then
return Teams.Phantoms
else
return Teams.Ghosts
end
end
end
return nil
end
return nil
end
function PhantomForces:GetPlayerParts(Target)
local Hitboxes = {}
return Hitboxes
end
function PhantomForces.LocalPlayer:Get()
for i, Child in pairs(Workspace.Ignore:GetChildren()) do
if Child:IsA("Model") then
return Child
end
end
return nil
end
function PhantomForces.LocalPlayer:IsAlive()
for i, Child in pairs(Workspace.Ignore:GetChildren()) do
if Child:IsA("Model") then
return true
end
end
return false
end
function PhantomForces.LocalPlayer:GetArms()
local ArmsModel = {}
return ArmsModel
end
function PhantomForces.LocalPlayer:GetGun()
local GunModel = nil
function Misc:Run()
if not PhantomForces.LocalPlayer:IsAlive() then
return
end
return
end
self.oldroot.CanCollide = false
end
end]]
if Config.Misc.Movement.FlyHack.Enabled then
local LookVector = Camera.CFrame.LookVector
local Direction = Vec3()
local Directions = {
[Enum.KeyCode.W] = LookVector,
[Enum.KeyCode.A] = Vec3(LookVector.Z, 0, -LookVector.X),
[Enum.KeyCode.S] = -LookVector,
[Enum.KeyCode.D] = Vec3(-LookVector.Z, 0, LookVector.X),
[Enum.KeyCode.LeftControl] = Vec3(0, -5, 0),
[Enum.KeyCode.LeftShift] = Vec3(0, -5, 0),
[Enum.KeyCode.Space] = Vec3(0, 5, 0)
}
for Key, Dir in pairs(Directions) do
if UserInputService:IsKeyDown(Key) then
Direction = Direction + Dir
end
end
local Directions = {
[Enum.KeyCode.W] = Vec3(LookVector.X, 0, LookVector.Z),
[Enum.KeyCode.A] = Vec3(LookVector.Z, 0, -LookVector.X),
[Enum.KeyCode.S] = -Vec3(LookVector.X, 0, LookVector.Z),
[Enum.KeyCode.D] = Vec3(-LookVector.Z, 0, LookVector.X)
}
if Config.Misc.Movement.Bhop and
UserInputService:IsKeyDown(Enum.KeyCode.Space) then
Humanoid.Jump = true
end
Humanoid.HipHeight = Config.Misc.Other.HipHeight
end
--
function Visuals:UpdatePlayers()
local PlayerModels = PhantomForces:GetPlayerModels()
if Config.Visuals.Players.Boxes.Enabled and PlayerModels ~= nil then
Renderer:UnrenderAllExcept({'FOVCircle', 'CrosshairHorizontal',
'CrosshairVertical'})
if Torso then
local ScreenPosition, OnScreen =
Camera:WorldToViewportPoint(Torso.Position)
if OnScreen and
tostring(PhantomForces:GetPlayerTeam(Player)) ~= Players.LocalPlayer.Team.Name then
local Scale = math.floor(1000 / (Camera.CFrame.Position
- Torso.Position).Magnitude * 80 / Camera.FieldOfView)
Renderer:Rectangle(Player.Name .. "_Box",
ScreenPosition - (Size * (Scale / 2)) - Vec3(1, 1, 1), (Size * Scale) + Vec3(2, 2,
2), ColorRGB(0, 0, 0))
Renderer:Rectangle(Player.Name .. "_BoxOuter",
ScreenPosition - (Size * (Scale / 2)) + Vec3(1, 1, 1), (Size * Scale) - Vec3(2, 2,
2), ColorRGB(0, 0, 0))
Renderer:Rectangle(Player.Name .. "_BoxInner",
ScreenPosition - (Size * (Scale / 2)), Size * Scale,
Config.Visuals.Players.Boxes.Color)
end
end
end
end
elseif PlayerModels ~= nil then
Renderer:UnrenderAllExcept({'FOVCircle', 'CrosshairHorizontal',
'CrosshairVertical'})
end
end
function Visuals:UpdateFovCircle()
if Config.Visuals.Other.VisualizeFOV.Enabled and
PhantomForces.LocalPlayer:IsAlive() then
local MousePosition = UserInputService:GetMouseLocation()
Renderer:Circle("FOVCircle",
Vec2(MousePosition.X, MousePosition.Y),
Config.Ragebot.General.FieldOfView,
(Storage.TargetWithinFOV and
Config.Visuals.Other.VisualizeFOV.ActiveColor or
Config.Visuals.Other.VisualizeFOV.InactiveColor)
)
else
Renderer:Unrender({'FOVCircle'})
end
end
function Visuals:UpdateCrosshair()
if Config.Visuals.Other.Crosshair.Enabled and
PhantomForces.LocalPlayer:IsAlive() then
Renderer:Line("CrosshairVertical",
Vec2(Storage.ScreenSize.X / 2, Storage.ScreenSize.Y / 2 - 10),
Vec2(Storage.ScreenSize.X / 2, Storage.ScreenSize.Y / 2 + 10),
Config.Visuals.Other.Crosshair.Color, 2
)
Renderer:Line("CrosshairHorizontal",
Vec2(Storage.ScreenSize.X / 2 - 10, Storage.ScreenSize.Y / 2),
Vec2(Storage.ScreenSize.X / 2 + 10, Storage.ScreenSize.Y / 2),
Config.Visuals.Other.Crosshair.Color, 2
)
else
Renderer:Unrender({'CrosshairHorizontal', 'CrosshairVertical'})
end
end
function Visuals:UpdateAmbientLighting()
if Config.Visuals.World.OverrideAmbient.Enabled and Lighting then
if not Storage.WorldAmbientsOriginal then
Storage.WorldAmbientsOriginal = {
['Ambient'] = Lighting['Ambient'],
['OutdoorAmbient'] = Lighting["OutdoorAmbient"],
['ColorShift_Top'] = Lighting["ColorShift_Top"],
['ColorShift_Bottom'] = Lighting["ColorShift_Bottom"]
}
end
Lighting["Ambient"] =
Config.Visuals.World.OverrideAmbient.Color
Lighting["OutdoorAmbient"] =
Config.Visuals.World.OverrideAmbient.Color
Lighting["ColorShift_Top"] =
Config.Visuals.World.OverrideAmbient.Color
Lighting["ColorShift_Bottom"] =
Config.Visuals.World.OverrideAmbient.Color
elseif Storage.WorldAmbientsOriginal then
for name, v in pairs(Storage.WorldAmbientsOriginal) do
Lighting[name] = v
end
end
end
function Visuals:UpdateSkybox()
local Sky = Lighting:FindFirstChildOfClass("Sky")
Sky:Destroy()
local NewSky = Instance.new("Sky")
for _, v in
pairs(Storage.Skyboxes[Config.Visuals.World.SkyboxChanger.Value]) do
if Sky[_] ~= v then
Sky[_] = v
end
end
elseif Storage.SkyboxOriginal and Sky then
Sky:Destroy()
OriginalSky.Parent = Lighting
Storage.SkyboxOriginal = nil
end
end
function Visuals:UpdateWorldMaterials()
if WorldNeedsUpdate ~= Config.Visuals.World.OverrideWorldMaterials then
WorldNeedsUpdate = Config.Visuals.World.OverrideWorldMaterials
function Visuals:Update()
if Config.Visuals.World.OverrideClockTime.Enabled then
Lighting.ClockTime = Config.Visuals.World.OverrideClockTime.Value
end
Lighting.Technology = Config.Visuals.World.OverrideTechnology
coroutine.wrap(function()
self:UpdatePlayers()
end)()
self:UpdateFovCircle()
self:UpdateCrosshair()
self:UpdateAmbientLighting()
self:UpdateWorldMaterials()
self:UpdateSkybox()
end
--
return Backup
end
if OriginalPart then
Part.Transparency = OriginalPart.Transparency
Part.Material = OriginalPart.Material
Part.Color = OriginalPart.Color
end
end
end
Part.Material = Material
Part.Color = Color
end
end
end
function Chams:UpdatePlayers()
local PlayerModels, Arms, Gun = PhantomForces:GetPlayerModels(),
PhantomForces.LocalPlayer:GetArms(), PhantomForces.LocalPlayer:GetGun()
Highlight.Enabled = true
Highlight.Adornee = Player
Highlight.FillColor =
Config.Visuals.Players.Chams.FillColor
Highlight.OutlineColor =
Config.Visuals.Players.Chams.OutlineColor
Highlight.FillTransparency = nil
Highlight.OutlineTransparency = nil
Highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
elseif not Config.Visuals.Players.Chams.Enabled and Highlight
then
Highlight:Destroy()
end
end
end
end
end
function Chams:UpdateViewmodel()
local Arms, Gun = PhantomForces.LocalPlayer:GetArms(),
PhantomForces.LocalPlayer:GetGun()
if Gun then
if Config.Visuals.Players.WeaponChams.Enabled then
if not Storage.GunOriginal[Gun.Name] then
Storage.GunOriginal[Gun.Name] = Chams:CreateBackup(Gun,
'BasePart')
end
Chams:ApplyChams(
Gun, {ColorRGB(255, 152, 220)}, {'Texture'},
Config.Visuals.Players.WeaponChams.Material,
Config.Visuals.Players.WeaponChams.Color
)
elseif Storage.GunOriginal[Gun.Name] then
Chams:RestoreChams(Gun, Storage.GunOriginal[Gun.Name])
Storage.GunOriginal[Gun.Name] = nil
end
end
if Arms then
if Config.Visuals.Players.ArmChams.Enabled then
for _, Arm in ipairs(Arms) do
if not Storage.ArmsOriginal[Arm.Name] then
Storage.ArmsOriginal[Arm.Name] = Chams:CreateBackup(Arm,
'MeshPart')
end
Chams:ApplyChams(
Arm, {}, {'Sleeves'},
Config.Visuals.Players.ArmChams.Material,
Config.Visuals.Players.ArmChams.Color
)
end
else
for _, Arm in ipairs(Arms) do
if Storage.ArmsOriginal[Arm.Name] then
Chams:RestoreChams(Arm, Storage.ArmsOriginal[Arm.Name])
Storage.ArmsOriginal[Arm.Name] = nil
end
end
end
end
end
function Chams:Update()
self:UpdateViewmodel()
self:UpdatePlayers()
end
--
--
-- This will be removed in turn for actual AW, Waiting on a higher level
executor.
function Autowall:PlayerVisible(Player, Origin, End)
local Params = RaycastParams.new()
Params.FilterDescendantsInstances =
{Player:FindFirstChildOfClass("Folder"), Workspace.Ignore, Camera}
Params.FilterType = Enum.RaycastFilterType.Exclude
Params.IgnoreWater = true
return false
end
local Penetrated = 0
for _, ObscuredPart in
pairs(Camera:GetPartsObscuringTarget({Target.Position}, Ignore)) do
if ObscuredPart.CanCollide and ObscuredPart.Transparency ~= 1 and
ObscuredPart.Name ~= "Window" then
local MaxRayLength = ObscuredPart.Size.Magnitude *
Direction.Unit
local _, Enter =
game.Workspace:FindPartOnRayWithWhitelist(Ray.new(Part.Position, Direction),
{ObscuredPart}, true)
local _, Exit =
game.Workspace:FindPartOnRayWithWhitelist(Ray.new(Enter + MaxRayLength, -
MaxRayLength), {ObscuredPart}, true)
return true
end
end
end
--
Storage.TargetWithinFOV = true
MinCrosshairDistance = CrosshairDistance
elseif TargetSelectionConfig == 'Distance' then
local Distance = (Part.Position -
Camera.CFrame.Position).Magnitude
MinDistance = Distance
elseif TargetSelectionConfig == 'Health' then
-- This target selection option cannot be used yet because
we need to find a way to retrieve player health, names, etc.
elseif TargetSelectionConfig == 'Damage' then
-- This target selection optiion also cannot be used
because we don't have support to get access to weapon modules yet.
end
return BestTarget
end
function Ragebot:Run()
Storage.TargetWithinFOV, Storage.AimbotFiring = false, false
VirtualInputManager:SendMouseButtonEvent(
Storage.ScreenSize.X / 2, Storage.ScreenSize.Y / 2, 0, true, game,
0
)
end
VirtualInputManager:SendMouseButtonEvent(
Storage.ScreenSize.X / 2, Storage.ScreenSize.Y / 2, 0, false, game,
0
)
end
end
--
-- Connections
UserInputService.InputBegan:Connect(function(v)
if v.UserInputType == Enum.UserInputType.MouseButton2 then
Ragebot.Scoped = true
end
end)
UserInputService.InputEnded:Connect(function(v)
if v.UserInputType == Enum.UserInputType.MouseButton2 then
Ragebot.Scoped = false
end
end)
RunService.Stepped:Connect(function()
if Library.Unloaded then
return
end
Ragebot:Run()
Misc:Run()
end)
RunService.RenderStepped:Connect(function()
if Library.Unloaded then
return
end
Visuals:Update()
Chams:Update()
end)
--
Renderer:FindExistingShape("FOVCircle").Position = Vec2(MousePosition.X,
MousePosition.Y)
end)
Lighting:GetPropertyChangedSignal("Ambient"):Connect(function()
if Config.Visuals.World.OverrideAmbient.Enabled then
Lighting["Ambient"] = Config.Visuals.World.OverrideAmbient.Color
end
end)
Lighting:GetPropertyChangedSignal("OutdoorAmbient"):Connect(function()
if Config.Visuals.World.OverrideAmbient.Enabled then
Lighting["OutdoorAmbient"] = Config.Visuals.World.OverrideAmbient.Color
end
end)
Lighting:GetPropertyChangedSignal("ColorShift_Top"):Connect(function()
if Config.Visuals.World.OverrideAmbient.Enabled then
Lighting["ColorShift_Top"] = Config.Visuals.World.OverrideAmbient.Color
end
end)
Lighting:GetPropertyChangedSignal("ColorShift_Bottom"):Connect(function()
if Config.Visuals.World.OverrideAmbient.Enabled then
Lighting["ColorShift_Bottom"] =
Config.Visuals.World.OverrideAmbient.Color
end
end)
--
-- Unload feature
Groups.Settings.Menu:AddButton('Unload', function()
Library:Notify('[RedactedProject] This feature is unsupported at the
moment!')
-- Removed for now, I couldnt care enough cuz 1/2 the time you need to
relauch anyways.
-- Add back before public/private release, we havent decided either yet
also.
end)
--
SaveManager:IgnoreThemeSettings()
SaveManager:SetIgnoreIndexes({ 'MenuKeybind' })
SaveManager:SetFolder('RedactedProject')
SaveManager:BuildConfigSection(Tabs.Settings)
SaveManager:LoadAutoloadConfig()