From 1c3aff35eab076c4ae493b667742d3c52ea96276 Mon Sep 17 00:00:00 2001 From: Ship Date: Sat, 3 Sep 2022 21:34:57 -0400 Subject: [PATCH] So it turns one of the core features is only half done Programmer Moment --- src/Workspace/Installer/InstanceService.lua | 41 +++++++++++++++++++++ src/Workspace/Installer/init.server.lua | 22 ++++++++++- 2 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 src/Workspace/Installer/InstanceService.lua diff --git a/src/Workspace/Installer/InstanceService.lua b/src/Workspace/Installer/InstanceService.lua new file mode 100644 index 0000000..5ffb03e --- /dev/null +++ b/src/Workspace/Installer/InstanceService.lua @@ -0,0 +1,41 @@ +local service = {} + +function service:CreateUIObject(type,target) + if target then + if type == "Instrument" then + local par = Instance.new("ScreenGui") + par.Parent = target + par.Name = type + local maintain = Instance.new("UIAspectRatioConstraint") + maintain.AspectRatio = 1.779 + maintain.AspectType = Enum.AspectType.FitWithinMaxSize + maintain.DominantAxis = Enum.DominantAxis.Width + maintain.Parent = par + local fram = Instance.new("Frame") + fram.Size = UDim2.new(0.223, 0,0.832, 0) + fram.BackgroundColor3 = Color3.fromRGB(46, 46, 46) + fram.BackgroundTransparency = 0.3 + fram.Position = UDim2.new(0.772, 0,0.156, 0) + fram.Parent = par + local raintain = Instance.new("UIAspectRatioConstraint") + raintain.AspectRatio = 0.478 + raintain.AspectType = Enum.AspectType.FitWithinMaxSize + raintain.DominantAxis = Enum.DominantAxis.Width + raintain.Parent = fram + local edges = Instance.new("UICorner") + edges.CornerRadius = UDim.new(0,35) + local fram2 = Instance.new("Frame") + fram2.Size = UDim2.new(0.223, 0,0.832, 0) + fram2.BackgroundColor3 = Color3.fromRGB(52, 52, 52) + fram2.BorderColor3 = Color3.fromRGB(30,30,30) + fram2.BorderSizePixel = 1 + fram2.Position = UDim2.new(0.772, 0,0.156, 0) + fram2.Parent = fram + end + else + warn("Type Error Occured") + return nil + end +end + +return service \ No newline at end of file diff --git a/src/Workspace/Installer/init.server.lua b/src/Workspace/Installer/init.server.lua index 97e29e5..a6fc5cf 100644 --- a/src/Workspace/Installer/init.server.lua +++ b/src/Workspace/Installer/init.server.lua @@ -29,6 +29,20 @@ local ErrorMessage = [[ Try redownloading the kit or inserting it. If the issue persists create a ticket on the github page or DM ShipmasterKyle#8071 ]] +--Installer Details for people who use the rblx file instead of the rbxm +local brass = { + "Tuba", + "Trumpet", + "Trombone" +} + +local line = { + "Cymbals", + "TenorDrum", + "BassDrum", + "Snare" +} + local main = Instance.new("ScreenGui") local frame = Instance.new("Frame") local btn = Instance.new("TextButton") @@ -101,12 +115,16 @@ nextbtn.MouseButton1Click:Connect(function() mainBox.Text = "Models Not Found, Attempting to build from scratch." wait(1) local instruments = game.ServerStorage:GetDescendants() - if #instruments ~= 0 or not game.ServerStorage:FindFirstOfClass then --Check for the Instruments scripts. + if #instruments ~= 0 or not game.ServerStorage:FindFirstOfClass("Tool") then --Check for the Instruments scripts. mainBox.Text = [[No recoverable scripts founds.]]..ErrorMessage else mainBox.Text = "Scripts Found! Attempting to rebuild. This may take a few minutes" for i,v in pairs(game.ServerStorage:GetDescendants()) do - if + if v.ClassName == "Tool" then + if table.find(brass, v.Name) then + print("Coming Soon") + end + end end end end