Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log changes + Minor fixes towards modules #958

Merged
merged 19 commits into from
May 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions MainModule/Client/Core/Anti.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ return function(Vargs, GetEnv)

local Anti, Process, UI, Variables
local script = script
local service = service
local client = client
local service = env.service
local client = env.client
local Core = client.Core
local Remote = client.Remote
local Functions = client.Functions
Expand Down
98 changes: 52 additions & 46 deletions MainModule/Client/UI/Default/Credits.lua
Original file line number Diff line number Diff line change
@@ -1,69 +1,75 @@

client = nil
service = nil

return function(data, env)
if env then
setfenv(1, env)
end

local window = client.UI.Make("Window",{
Name = "Credits";
Title = "Credits";
Icon = client.MatIcons.Grade;
Size = {280, 300};
AllowMultiple = false;

local client = env.client
local service = env.service

local window = client.UI.Make("Window", {
Name = "Credits",
Title = "Credits",
Icon = client.MatIcons.Grade,
Size = { 280, 300 },
AllowMultiple = false,
})
local tabFrame = window:Add("TabFrame",{
Size = UDim2.new(1, -10, 1, -10);
Position = UDim2.new(0, 5, 0, 5);
if not window then
return
end

local tabFrame = window:Add("TabFrame", {
Size = UDim2.new(1, -10, 1, -10),
Position = UDim2.new(0, 5, 0, 5),
})

local Credits = require(client.Shared.Credits)
for _, tab in ipairs({
[1] = tabFrame:NewTab("Main", {Text = "Main"}),
[2] = tabFrame:NewTab("GitHub", {Text = "Contributors"}),
[3] = tabFrame:NewTab("Misc", {Text = "Everyone Else"})
})
do
local scroller = tab:Add("ScrollingFrame",{
List = {};
ScrollBarThickness = 3;
BackgroundTransparency = 1;
Position = UDim2.new(0, 5, 0, 30);
Size = UDim2.new(1, -10, 1, -35);
[1] = tabFrame:NewTab("Main", { Text = "Main" }),
[2] = tabFrame:NewTab("GitHub", { Text = "Contributors" }),
[3] = tabFrame:NewTab("Misc", { Text = "Everyone Else" }),
}) do
local scroller = tab:Add("ScrollingFrame", {
List = {},
ScrollBarThickness = 3,
BackgroundTransparency = 1,
Position = UDim2.new(0, 5, 0, 30),
Size = UDim2.new(1, -10, 1, -35),
})

local search = tab:Add("TextBox", {
Position = UDim2.new(0, 5, 0, 5);
Size = UDim2.new(1, -10, 0, 20);
BackgroundTransparency = 0.25;
BorderSizePixel = 0;
TextColor3 = Color3.new(1, 1, 1);
Text = "";
PlaceholderText = "Search";
TextStrokeTransparency = 0.8;
Position = UDim2.new(0, 5, 0, 5),
Size = UDim2.new(1, -10, 0, 20),
BackgroundTransparency = 0.25,
BorderSizePixel = 0,
TextColor3 = Color3.new(1, 1, 1),
Text = "",
PlaceholderText = "Search",
TextStrokeTransparency = 0.8,
})
search:Add("ImageLabel", {
Image = client.MatIcons.Search;
Position = UDim2.new(1, -20, 0, 2);
Size = UDim2.new(0, 16, 0, 16);
ImageTransparency = 0.2;
BackgroundTransparency = 1;
Image = client.MatIcons.Search,
Position = UDim2.new(1, -20, 0, 2),
Size = UDim2.new(0, 16, 0, 16),
ImageTransparency = 0.2,
BackgroundTransparency = 1,
})

local function generate()
local i = 1
local filter = search.Text
scroller:ClearAllChildren()
for _, credit in ipairs(require(client.Shared.Credits)[tab.Name]) do
if (credit.Text:sub(1, #filter):lower() == filter:lower()) or (tab.Name == "GitHub" and credit.Text:sub(9, 8+#filter):lower() == filter:lower()) then
for _, credit in ipairs(Credits[tab.Name]) do
if
(string.lower(string.sub(credit.Text, 1, #filter)) == string.lower(filter))
or (tab.Name == "GitHub" and string.lower(string.sub(credit.Text, 9, 8 + #filter)) == string.lower(filter))
then
scroller:Add("TextLabel", {
Text = ` {credit.Text} `;
ToolTip = credit.Desc;
BackgroundTransparency = (i%2 == 0 and 0) or 0.2;
Size = UDim2.new(1, 0, 0, 26);
Position = UDim2.new(0, 0, 0, (26*(i-1)));
TextXAlignment = "Left";
Text = ` {credit.Text} `,
ToolTip = credit.Desc,
BackgroundTransparency = (i % 2 == 0 and 0) or 0.2,
Size = UDim2.new(1, 0, 0, 26),
Position = UDim2.new(0, 0, 0, (26 * (i - 1))),
TextXAlignment = "Left",
})
i += 1
end
Expand Down
12 changes: 8 additions & 4 deletions MainModule/Client/UI/Default/Music.rbxmx
Original file line number Diff line number Diff line change
Expand Up @@ -595,12 +595,14 @@ return function(data, env)
TextXAlignment = "Center";
OnClicked = function()
personalTab:FocusTab();
if (client.Variables.Playlist.Playlist ~= nil) and (client.Variables.Playlist.Playlist ~= {}) then
local Playlist = type(client.Variables.Playlist) == "table" and client.Variables.Playlist.Playlist
if Playlist and next(Playlist) then
client.Functions.UpdatePlaylist(client.Variables.Playlist)
getSongs(personalTab, ((client.Functions.Playlist()).Playlist or {}))
else
warn("[ERROR] Cannot update empty Playlist")
end

activeSongList = availableSongLists["Personal"] or {}
end
})
Expand Down Expand Up @@ -646,9 +648,11 @@ return function(data, env)
Position = UDim2.new(0, 145, 0, 5);
TextXAlignment = "Center";
OnClick = function()
audioLib("UpdateSound", {
Playing = not audioLib("GetSound").Playing
})
if audioLib("GetSound") then
audioLib("UpdateSound", {
Playing = not audioLib("GetSound").Playing
})
end
end
})

Expand Down
2 changes: 1 addition & 1 deletion MainModule/Server/Commands/Admins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ return function(Vargs, env)
local senderLevel = data.PlayerData.Level
local userFound = false

if not target:find(":") then
if not string.find(target, ":") then
for _, v in service.GetPlayers(plr, target, {
UseFakePlayer = true;
DontError = true;
Expand Down
2 changes: 1 addition & 1 deletion MainModule/Server/Commands/Donors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ return function(Vargs, env)
hat:Destroy()
Functions.Hint(`{args[1]} has been removed.`, {plr})
else
Functions.Hint(`{args[1]} is not a valid accessory. Run \`{Settings.PlayerPrefix}myhats\` for a list of accessories you are wearing.`, {plr})
Functions.Hint(`{args[1]} is not a valid accessory. Run {Settings.PlayerPrefix}myhats for a list of accessories you are wearing.`, {plr})
end

end
Expand Down
59 changes: 31 additions & 28 deletions MainModule/Server/Commands/Moderators.lua
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ return function(Vargs, env)
end
end
};

RemoveLayeredClothings = {
Prefix = Settings.Prefix;
Commands = {"removelayeredclothings"};
Expand All @@ -904,15 +904,15 @@ return function(Vargs, env)
if humanoid then
local humanoidDesc: HumanoidDescription = humanoid:GetAppliedDescription()
local accessoryBlob = humanoidDesc:GetAccessories(false)

for i=#accessoryBlob, 1, -1 do -- backwards loop due to table.remove
local blobItem = accessoryBlob[i]

if blobItem.IsLayered then
table.remove(accessoryBlob, i)
end
end

humanoidDesc:SetAccessories(accessoryBlob, false)
humanoid:ApplyDescription(humanoidDesc, Enum.AssetTypeVerification.Always)
end
Expand Down Expand Up @@ -1237,7 +1237,7 @@ return function(Vargs, env)
Title = "Trello Synced Ban List";
Message = "Trello has not been enabled.";
})
else
else
Remote.MakeGui(plr, "List", {
Title = "Trello Synced Bans List";
Icon = server.MatIcons.Gavel;
Expand Down Expand Up @@ -4340,7 +4340,7 @@ return function(Vargs, env)
Function = function(plr: Player, args: {string})
assert(args[1], "Missing player name")
assert(args[2], "Missing team name")
for _, v in service.GetPlayers(plr, args[1]) do
for _, v in service.GetPlayers(plr, args[1], { NoFakePlayer = true }) do
for a, tm in service.Teams:GetChildren() do
if string.sub(string.lower(tm.Name), 1, #args[2]) == string.lower(args[2]) then
v.Team = tm
Expand Down Expand Up @@ -4579,7 +4579,7 @@ return function(Vargs, env)
end
end

for _, v in service.GetPlayers(plr, args[1]) do
for _, v in service.GetPlayers(plr, args[1], { NoFakePlayer = true }) do
if point then
if not v.Character then
continue
Expand Down Expand Up @@ -4619,7 +4619,7 @@ return function(Vargs, env)
if not point then Functions.Hint("Waypoint "..m.." was not found.", {plr}) end
elseif args[2] and string.find(args[2], ",") then
local x, y, z = string.match(args[2], "(.*),(.*),(.*)")
for _, v in service.GetPlayers(plr, args[1]) do
for _, v in service.GetPlayers(plr, args[1], { NoFakePlayer = true }) do
if not v.Character or not v.Character:FindFirstChild("HumanoidRootPart") then continue end

if workspace.StreamingEnabled == true then
Expand Down Expand Up @@ -4650,8 +4650,8 @@ return function(Vargs, env)
end
end
else
local target = service.GetPlayers(plr, args[2])[1]
local players = service.GetPlayers(plr, args[1])
local target = service.GetPlayers(plr, args[2], { NoFakePlayer = true })[1]
local players = service.GetPlayers(plr, args[1], { NoFakePlayer = true })
if #players == 1 and players[1] == target then
local n = players[1]
if n.Character:FindFirstChild("HumanoidRootPart") and target.Character:FindFirstChild("HumanoidRootPart") then
Expand Down Expand Up @@ -4690,12 +4690,15 @@ return function(Vargs, env)
for k, n in players do
if n ~= target then
local Character = n.Character
if not Character then continue end
if not Character or not Character:FindFirstChild("HumanoidRootPart") then
continue
end

if workspace.StreamingEnabled == true then
n:RequestStreamAroundAsync((targ_root.CFrame*CFrame.Angles(0, math.rad(90/#players*k), 0)*CFrame.new(5+.2*#players, 0, 0))*CFrame.Angles(0, math.rad(90), 0).Position)
end

local Humanoid = Character and Character:FindFirstChildOfClass("Humanoid")
local Humanoid = Character:FindFirstChildOfClass("Humanoid")
local root = Character:FindFirstChild('HumanoidRootPart')
local FlightPos = root:FindFirstChild("ADONIS_FLIGHT_POSITION")
local FlightGyro = root:FindFirstChild("ADONIS_FLIGHT_GYRO")
Expand Down Expand Up @@ -4783,7 +4786,7 @@ return function(Vargs, env)
for i = (l-1) * math.floor(numPlayers/lines) + 1, l * math.floor(numPlayers/lines) do
local char = players[i].Character
if not char then continue end

local hum = char:FindFirstChildOfClass("Humanoid")
if hum then
if hum.SeatPart then
Expand All @@ -4794,7 +4797,7 @@ return function(Vargs, env)
hum.Jump = true
end
end

task.wait()

local rootPart = char:FindFirstChild("HumanoidRootPart")
Expand Down Expand Up @@ -4850,7 +4853,7 @@ return function(Vargs, env)
AdminLevel = "Moderators";
Function = function(plr: Player, args: {string})
local statName = assert(args[2], "Missing stat name (argument #2)")
for _, v in service.GetPlayers(plr, args[1]) do
for _, v in service.GetPlayers(plr, args[1], { NoFakePlayer = true }) do
local leaderstats = v:FindFirstChild("leaderstats")
if leaderstats then
local absoluteMatch = leaderstats:FindFirstChild(statName)
Expand Down Expand Up @@ -5787,9 +5790,9 @@ return function(Vargs, env)
Value = not args[3] or (args[3] and (string.lower(args[3]) == "true" or string.lower(args[3]) == "yes"));
Parent = scr;
})

scr.Name = "ADONIS_FLIGHT"

for i, v in service.GetPlayers(plr, args[1]) do
local part = v.Character:FindFirstChild("HumanoidRootPart")
if part then
Expand All @@ -5803,33 +5806,33 @@ return function(Vargs, env)
if oldg then oldg:Destroy() end
if oldga then oldga:Destroy() end
if olds then olds:Destroy() end

local new = scr:Clone()
local flightPositionAttachment: Attachment = service.New("Attachment")
local flightGyroAttachment: Attachment = service.New("Attachment")
local flightPosition: AlignPosition = service.New("AlignPosition")
local flightGyro: AlignOrientation = service.New("AlignOrientation")

flightPositionAttachment.Name = "ADONIS_FLIGHT_POSITION_ATTACHMENT"
flightPositionAttachment.Parent = part

flightGyroAttachment.Name = "ADONIS_FLIGHT_GYRO_ATTACHMENT"
flightGyroAttachment.Parent = part

flightPosition.Name = "ADONIS_FLIGHT_POSITION"
flightPosition.MaxForce = 0
flightPosition.Position = part.Position
flightPosition.Attachment0 = flightPositionAttachment
flightPosition.Mode = Enum.PositionAlignmentMode.OneAttachment
flightPosition.Parent = part

flightGyro.Name = "ADONIS_FLIGHT_GYRO"
flightGyro.MaxTorque = 0
flightGyro.CFrame = part.CFrame
flightGyro.Attachment0 = flightGyroAttachment
flightGyro.Mode = Enum.OrientationAlignmentMode.OneAttachment
flightGyro.Parent = part

new.Parent = part
new.Disabled = false
Remote.MakeGui(v, "Notification", {
Expand All @@ -5841,7 +5844,7 @@ return function(Vargs, env)
end
end
};

FlySpeed = {
Prefix = Settings.Prefix;
Commands = {"flyspeed", "flightspeed"};
Expand All @@ -5850,7 +5853,7 @@ return function(Vargs, env)
AdminLevel = "Moderators";
Function = function(plr: Player, args: {string})
local speed = tonumber(args[2])

for i, v in service.GetPlayers(plr, args[1]) do
local part = v.Character:FindFirstChild("HumanoidRootPart")
if part then
Expand All @@ -5872,7 +5875,7 @@ return function(Vargs, env)
end
end
};

UnFly = {
Prefix = Settings.Prefix;
Commands = {"unfly", "ground"};
Expand All @@ -5897,7 +5900,7 @@ return function(Vargs, env)
end
end
};

Fling = {
Prefix = Settings.Prefix;
Commands = {"fling"};
Expand Down Expand Up @@ -6738,7 +6741,7 @@ return function(Vargs, env)
local attack = args[4] == "true" and true or false
local friendly = args[5] == "true" and true or false
local walk

if args[3] == "false" then
walk = false
else
Expand Down
Loading