Ok so, I have a gun script, but it includes "LoadLibrary" which is deprecated. How can I change this without breaking the script? (Line 10)
local player = game.Players.LocalPlayer
local backpack, playergui = player:WaitForChild("Backpack"), player:WaitForChild("PlayerGui")
repeat wait(0.1) until player.Character
local char, camera = player.Character, workspace.CurrentCamera
local tool = script.Parent
local handle = tool:WaitForChild("Handle")
local barrel= tool:WaitForChild("Barrel")
local GunGUI = tool:WaitForChild("GunGUI")
local create = assert(LoadLibrary("RbxUtility")).Create
local storage = game:GetService("ReplicatedStorage")
local debris = game:GetService("Debris")
local cframe, cframeXYZ, vector = CFrame.new, CFrame.fromEulerAnglesXYZ, Vector3.new
local arms = {
Left = cframe(-0.249, 1.35, 0.6) * cframeXYZ(math.rad(290), 0, math.rad(-90)),
Right = cframe(-0.7, 0.4, 0.35) * cframeXYZ(math.rad(-90),math.rad(-5),math.rad(0)),}
local cursor = {
Standard = "http://www.roblox.com/asset/?id=275897531",
}
local creator = create("ObjectValue"){Name = "creator", Value = player}
local laser = create("Part"){Name = "Ray", Anchored = true, CanCollide = false, formFactor = 0, Size = vector(1, 1, 1), BrickColor = BrickColor.new("Bright yellow"),Material = Enum.Material.Neon, Reflectance = 0.3, Transparency = 0.25} --0.25
local light = Instance.new("PointLight",laser)
light.Range = 6
light.Color = Color3.new(255,255,0)
light.Brightness = 10
local mesh = create("BlockMesh"){Parent = laser, Name = "Mesh", Scale = Vector3.new(0.15, 0.15, 1)}
local armToggle = char:FindFirstChild("armToggle") and char.armToggle or create("BoolValue"){Parent = char, Name = "armToggle"}

2 comments
LoadLibrary("RbxUtility").Create() is literally just Instance.new()
Stop micro optimising