1
+ local service = {}
2
+
3
+ function service :CreateUIObject (type ,target )
4
+ if target then
5
+ if type == " Instrument" then
6
+ local par = Instance .new (" ScreenGui" )
7
+ par .Parent = target
8
+ par .Name = type
9
+ local maintain = Instance .new (" UIAspectRatioConstraint" )
10
+ maintain .AspectRatio = 1.779
11
+ maintain .AspectType = Enum .AspectType .FitWithinMaxSize
12
+ maintain .DominantAxis = Enum .DominantAxis .Width
13
+ maintain .Parent = par
14
+ local fram = Instance .new (" Frame" )
15
+ fram .Size = UDim2 .new (0.223 , 0 ,0.832 , 0 )
16
+ fram .BackgroundColor3 = Color3 .fromRGB (46 , 46 , 46 )
17
+ fram .BackgroundTransparency = 0.3
18
+ fram .Position = UDim2 .new (0.772 , 0 ,0.156 , 0 )
19
+ fram .Parent = par
20
+ local raintain = Instance .new (" UIAspectRatioConstraint" )
21
+ raintain .AspectRatio = 0.478
22
+ raintain .AspectType = Enum .AspectType .FitWithinMaxSize
23
+ raintain .DominantAxis = Enum .DominantAxis .Width
24
+ raintain .Parent = fram
25
+ local edges = Instance .new (" UICorner" )
26
+ edges .CornerRadius = UDim .new (0 ,35 )
27
+ local fram2 = Instance .new (" Frame" )
28
+ fram2 .Size = UDim2 .new (0.223 , 0 ,0.832 , 0 )
29
+ fram2 .BackgroundColor3 = Color3 .fromRGB (52 , 52 , 52 )
30
+ fram2 .BorderColor3 = Color3 .fromRGB (30 ,30 ,30 )
31
+ fram2 .BorderSizePixel = 1
32
+ fram2 .Position = UDim2 .new (0.772 , 0 ,0.156 , 0 )
33
+ fram2 .Parent = fram
34
+ end
35
+ else
36
+ warn (" Type Error Occured" )
37
+ return nil
38
+ end
39
+ end
40
+
41
+ return service
0 commit comments