What was LoadLibrary replaced with, I can't seem to find it.
Ex.
local C = assert(LoadLibrary("RbxUtility")).Create local TC = C("RemoteEvent"){Name = "requestTeamChange", Parent = game:GetService("ReplicatedStorage")} local N = C("BindableEvent"){Name = "sendTopNotification", Parent = game:GetService("ReplicatedStorage")} TC.OnServerEvent:connect(function(Client, T, I, R) if game:GetService("Teams"):FindFirstChild(T) then if game:GetService("Teams")[T].TeamColor == Client.TeamColor then N:Fire(Client.Name, "You are already on team: "..T, 3) return end if T == game:GetService("Teams").Visitor then game.Players[Client.Name].TeamColor = game.Teams.Visitor.TeamColor wait(0.2) game.Players[Client.Name]:LoadCharacter() return end if Client:GetRankInGroup(I) >= R then game.Players[Client.Name].TeamColor = game.Teams[T].TeamColor wait(0.2) game.Players[Client.Name]:LoadCharacter() end end end) N.Event:connect(function(P, T, WT) if game.Players:FindFirstChild(P) then local PGui = game.Players[P]:WaitForChild("PlayerGui") if PGui:FindFirstChild("Notification") then PGui["Notification"]:Destroy() end local NewGuiPart1 = Instance.new("ScreenGui") NewGuiPart1.Name = "Notification" NewGuiPart1.Parent = PGui ------- local NewGuiPart2 = Instance.new("TextLabel") NewGuiPart2.BackgroundColor3 = Color3.new(46/255, 72/255, 91/255) NewGuiPart2.BorderSizePixel = 0 NewGuiPart2.Name = "NotificationText" NewGuiPart2.Position = UDim2.new(0.5, -150,0.5, -250) NewGuiPart2.Size = UDim2.new(0, 300, 0, 50) NewGuiPart2.Font = Enum.Font.ArialBold NewGuiPart2.FontSize = Enum.FontSize.Size14 NewGuiPart2.Text = T NewGuiPart2.TextColor3 = Color3.new(1, 1, 1) NewGuiPart2.TextWrapped = true NewGuiPart2.TextScaled = true NewGuiPart2.Parent = NewGuiPart1 wait(WT) NewGuiPart1:Destroy() end end) game:GetService("Players").PlayerAdded:connect(function(Player) Player.CharacterAdded:connect(function(Character) wait(5) local Children = Character:GetChildren() for i, v in pairs(Character.Head:GetChildren()) do if v:IsA("SpecialMesh") then v:Destroy() end end local M = C("SpecialMesh"){Name = "Mesh", Parent = Character.Head, MeshType = Enum.MeshType.Head, Scale = Vector3.new(1.25,1.25,1.25)} for i, v in pairs(Children) do if v:IsA("CharacterMesh") then v:Destroy() N:Fire(Player.Name, "Packages Removed! \n Please refrain fron wearing packages in this game! \n Thank you!", 3) end end end) end)
LoadLibrary.Create()
was essentially a short-hand way of writing Instance.new()
, with flexibility of altering properties before initializing the instance. The former method, of course, is not deprecated like the latter, and I personally think it's leaps and bounds easier to understand in terms of syntax. Read here for more information.