Skip to content
This repository was archived by the owner on Aug 20, 2024. It is now read-only.

Commit 3bc12c2

Browse files
committed
Add Signs Free codebase
Signed-off-by: RyanLua <[email protected]>
1 parent 547be01 commit 3bc12c2

File tree

8 files changed

+802
-0
lines changed

8 files changed

+802
-0
lines changed

src/SignsFree/COPYING.server.lua

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--[[
2+
A Roblox Studio Plugin which creates a customizable TextLabel parented to a Part.
3+
Copyright (C) 2023 The Winners Games
4+
5+
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6+
7+
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
8+
9+
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
10+
]]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
local choices = {
2+
{ Id = "1", Value = 0.5, Text = "1:2" },
3+
{ Id = "2", Value = 0.563, Text = "9:16" },
4+
{ Id = "3", Value = 0.625, Text = "10:16" },
5+
{ Id = "4", Value = 0.75, Text = "3:4" },
6+
{ Id = "5", Value = 1, Text = "1:1" },
7+
{ Id = "6", Value = 1.333, Text = "4:3" },
8+
{ Id = "7", Value = 1.6, Text = "16:10" },
9+
{ Id = "8", Value = 1.7, Text = "16:9" },
10+
{ Id = "9", Value = 2, Text = "2:1" },
11+
}
12+
13+
return choices

src/SignsFree/PluginGui/Color.lua

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
local choices = {
2+
-- [[<font color="rgb(r, g, b)">COLOR</font>]]
3+
{
4+
Id = "1",
5+
Color = Color3.fromRGB(255, 255, 255),
6+
Text = [[<stroke color="rgb(46, 46, 46)" joins="round" thickness="1" transparency="0.25"><font color="rgb(242, 243, 243)">White</font></stroke>]],
7+
},
8+
{ Id = "2", Color = Color3.fromRGB(128, 128, 128), Text = [[<font color="rgb(128, 128, 128)">Grey</font>]] },
9+
{ Id = "3", Color = Color3.fromRGB(255, 0, 0), Text = [[<font color="rgb(255, 0, 0)">Red</font>]] },
10+
{ Id = "4", Color = Color3.fromRGB(255, 255, 0), Text = [[<font color="rgb(245, 205, 48)">Yellow</font>]] },
11+
{ Id = "5", Color = Color3.fromRGB(255, 170, 0), Text = [[<font color="rgb(255, 170, 0)">Orange</font>]] },
12+
{ Id = "6", Color = Color3.fromRGB(0, 255, 0), Text = [[<font color="rgb(0, 255, 0)">Green</font>]] },
13+
{ Id = "7", Color = Color3.fromRGB(0, 0, 255), Text = [[<font color="rgb(0, 0, 255)">Blue</font>]] },
14+
{ Id = "8", Color = Color3.fromRGB(170, 0, 255), Text = [[<font color="rgb(170, 0, 255)">Violet</font>]] },
15+
{ Id = "9", Color = Color3.fromRGB(255, 0, 255), Text = [[<font color="rgb(255, 0, 255)">Pink</font>]] },
16+
{
17+
Id = "10",
18+
Color = Color3.fromRGB(27, 42, 53),
19+
Text = [[<stroke color="rgb(255, 255, 255)" joins="round" thickness="1" transparency="0.75"><font color="rgb(27, 42, 53)">Black</font></stroke>]],
20+
},
21+
{
22+
Id = "11",
23+
Color = Color3.fromRGB(17, 17, 17),
24+
Text = [[<stroke color="rgb(255, 255, 255)" joins="round" thickness="1" transparency="0.75"><font color="rgb(17, 17, 17)">Really black</font></stroke>]],
25+
},
26+
}
27+
28+
return choices
Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
local FontFace = {
2+
-- [[<font family="rbxasset://fonts/families/FAMILY.json">NAME</font>]]
3+
{
4+
Id = "AccanthisADFStd",
5+
Font = Font.fromName("AccanthisADFStd"),
6+
Text = [[<font family="rbxasset://fonts/families/AccanthisADFStd.json">Accanthis</font>]],
7+
},
8+
{
9+
Id = "AmaticSC",
10+
Font = Font.fromName("AmaticSC"),
11+
Text = [[<font family="rbxasset://fonts/families/AmaticSC.json">Amatic SC</font>]],
12+
},
13+
{
14+
Id = "Arial",
15+
Font = Font.fromName("Arial"),
16+
Text = [[<font family="rbxasset://fonts/families/Arial.json">Arial</font>]],
17+
},
18+
{
19+
Id = "Balthazar",
20+
Font = Font.fromName("Balthazar"),
21+
Text = [[<font family="rbxasset://fonts/families/Balthazar.json">Balthazar</font>]],
22+
},
23+
{
24+
Id = "Bangers",
25+
Font = Font.fromName("Bangers"),
26+
Text = [[<font family="rbxasset://fonts/families/Bangers.json">Bangers</font>]],
27+
},
28+
{
29+
Id = "ComicNeueAngular",
30+
Font = Font.fromName("ComicNeueAngular"),
31+
Text = [[<font family="rbxasset://fonts/families/ComicNeueAngular.json">Comic Neue</font>]],
32+
},
33+
{
34+
Id = "Creepster",
35+
Font = Font.fromName("Creepster"),
36+
Text = [[<font family="rbxasset://fonts/families/Creepster.json">Creepster</font>]],
37+
},
38+
{
39+
Id = "DenkOne",
40+
Font = Font.fromName("DenkOne"),
41+
Text = [[<font family="rbxasset://fonts/families/DenkOne.json">DenkOne</font>]],
42+
},
43+
{
44+
Id = "Fondamento",
45+
Font = Font.fromName("Fondamento"),
46+
Text = [[<font family="rbxasset://fonts/families/Fondamento.json">Fondamento</font>]],
47+
},
48+
{
49+
Id = "FredokaOne",
50+
Font = Font.fromName("FredokaOne"),
51+
Text = [[<font family="rbxasset://fonts/families/FredokaOne.json">FredokaOne</font>]],
52+
},
53+
{
54+
Id = "GothamSSm",
55+
Font = Font.fromName("GothamSSm"),
56+
Text = [[<font family="rbxasset://fonts/families/GothamSSm.json">Gotham SSm</font>]],
57+
},
58+
{
59+
Id = "GrenzeGotisch",
60+
Font = Font.fromName("GrenzeGotisch"),
61+
Text = [[<font family="rbxasset://fonts/families/GrenzeGotisch.json">Grenze Gotisch </font>]],
62+
},
63+
{
64+
Id = "Guru",
65+
Font = Font.fromName("Guru"),
66+
Text = [[<font family="rbxasset://fonts/families/Guru.json">Guru</font>]],
67+
},
68+
{
69+
Id = "HighwayGothic",
70+
Font = Font.fromName("HighwayGothic"),
71+
Text = [[<font family="rbxasset://fonts/families/HighwayGothic.json">Highway Gothic</font>]],
72+
},
73+
{
74+
Id = "Inconsolata",
75+
Font = Font.fromName("Inconsolata"),
76+
Text = [[<font family="rbxasset://fonts/families/Inconsolata.json">Inconsolata</font>]],
77+
},
78+
{
79+
Id = "IndieFlower",
80+
Font = Font.fromName("IndieFlower"),
81+
Text = [[<font family="rbxasset://fonts/families/IndieFlower.json">Indie Flower</font>]],
82+
},
83+
{
84+
Id = "JosefinSans",
85+
Font = Font.fromName("JosefinSans"),
86+
Text = [[<font family="rbxasset://fonts/families/JosefinSans.json">Josefin Sans</font>]],
87+
},
88+
{
89+
Id = "Jura",
90+
Font = Font.fromName("Jura"),
91+
Text = [[<font family="rbxasset://fonts/families/Jura.json">Jura</font>]],
92+
},
93+
{
94+
Id = "Kalam",
95+
Font = Font.fromName("Kalam"),
96+
Text = [[<font family="rbxasset://fonts/families/Kalam.json">Kalam</font>]],
97+
},
98+
{
99+
Id = "LuckiestGuy",
100+
Font = Font.fromName("LuckiestGuy"),
101+
Text = [[<font family="rbxasset://fonts/families/LuckiestGuy.json">Luckiest Guy</font>]],
102+
},
103+
{
104+
Id = "Merriweather",
105+
Font = Font.fromName("Merriweather"),
106+
Text = [[<font family="rbxasset://fonts/families/Merriweather.json">Merriweather</font>]],
107+
},
108+
{
109+
Id = "Michroma",
110+
Font = Font.fromName("Michroma"),
111+
Text = [[<font family="rbxasset://fonts/families/Michroma.json">Michroma</font>]],
112+
},
113+
{
114+
Id = "Nunito",
115+
Font = Font.fromName("Nunito"),
116+
Text = [[<font family="rbxasset://fonts/families/Nunito.json">Nunito</font>]],
117+
},
118+
{
119+
Id = "Oswald",
120+
Font = Font.fromName("Oswald"),
121+
Text = [[<font family="rbxasset://fonts/families/Oswald.json">Oswald</font>]],
122+
},
123+
{
124+
Id = "PatrickHand",
125+
Font = Font.fromName("PatrickHand"),
126+
Text = [[<font family="rbxasset://fonts/families/PatrickHand.json">Patrick Hand</font>]],
127+
},
128+
{
129+
Id = "PermanentMarker",
130+
Font = Font.fromName("PermanentMarker"),
131+
Text = [[<font family="rbxasset://fonts/families/PermanentMarker.json">Preduring Marker</font>]],
132+
},
133+
{
134+
Id = "PressStart2P",
135+
Font = Font.fromName("PressStart2P"),
136+
Text = [[<font family="rbxasset://fonts/families/PressStart2P.json">PressStart2P</font>]],
137+
},
138+
{
139+
Id = "Roboto",
140+
Font = Font.fromName("Roboto"),
141+
Text = [[<font family="rbxasset://fonts/families/Roboto.json">Roboto</font>]],
142+
},
143+
{
144+
Id = "RobotoCondensed",
145+
Font = Font.fromName("RobotoCondensed"),
146+
Text = [[<font family="rbxasset://fonts/families/RobotoCondensed.json">Roboto Condensed</font>]],
147+
},
148+
{
149+
Id = "RobotoMono",
150+
Font = Font.fromName("RobotoMono"),
151+
Text = [[<font family="rbxasset://fonts/families/RobotoMono.json">Roboto Mono</font>]],
152+
},
153+
{
154+
Id = "Sarpanch",
155+
Font = Font.fromName("Sarpanch"),
156+
Text = [[<font family="rbxasset://fonts/families/Sarpanch.json">Sarpanch</font>]],
157+
},
158+
{
159+
Id = "SourceSansPro",
160+
Font = Font.fromName("SourceSansPro"),
161+
Text = [[<font family="rbxasset://fonts/families/SourceSansPro.json">Source Sans Pro</font>]],
162+
},
163+
{
164+
Id = "SpecialElite",
165+
Font = Font.fromName("SpecialElite"),
166+
Text = [[<font size="12" family="rbxasset://fonts/families/SpecialElite.json">Special Elite</font>]],
167+
},
168+
{
169+
Id = "TitilliumWeb",
170+
Font = Font.fromName("TitilliumWeb"),
171+
Text = [[<font family="rbxasset://fonts/families/TitilliumWeb.json">Titillium Web</font>]],
172+
},
173+
{
174+
Id = "Ubuntu",
175+
Font = Font.fromName("Ubuntu"),
176+
Text = [[<font family="rbxasset://fonts/families/Ubuntu.json">Ubuntu</font>]],
177+
},
178+
{
179+
Id = "Zekton",
180+
Font = Font.fromName("Zekton"),
181+
Text = [[<font family="rbxasset://fonts/families/Zekton.json">Zekton</font>]],
182+
},
183+
}
184+
185+
return FontFace
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
----------------------------------------
2+
--
3+
-- InsertGuiObject.lua
4+
--
5+
-- Creates a part from a GuiObject.
6+
--
7+
----------------------------------------
8+
9+
local ChangeHistoryService = game:GetService("ChangeHistoryService")
10+
local CollectionService = game:GetService("CollectionService")
11+
local Selection = game:GetService("Selection")
12+
13+
local GuiObjectPart = {}
14+
GuiObjectPart.__index = GuiObjectPart
15+
16+
-- Creates a new GuiObjectPart
17+
function GuiObjectPart.new(
18+
label: GuiObject,
19+
autoLocalize: boolean?,
20+
lightInfluence: number?,
21+
alwaysOnTop: boolean?,
22+
size: Vector2
23+
)
24+
local self = {}
25+
setmetatable(self, GuiObjectPart)
26+
27+
local camera = workspace.CurrentCamera or Instance.new("Camera")
28+
29+
local partSizeX = label.AbsoluteSize.X / 50
30+
local partSizeY = label.AbsoluteSize.Y / 50
31+
local part = Instance.new("Part")
32+
part.Name = "SignPart"
33+
part.Anchored = true
34+
part.Parent = workspace
35+
part.Transparency = 1
36+
part.Size = Vector3.new(partSizeX, partSizeY, 0)
37+
part.Position = (camera.CFrame + camera.CFrame.LookVector * 10).Position
38+
39+
CollectionService:AddTag(part, "_Sign")
40+
41+
local surfaceGui = Instance.new("SurfaceGui")
42+
-- surfaceGui.SizingMode = Enum.SurfaceGuiSizingMode.PixelsPerStud
43+
surfaceGui.CanvasSize = size or Vector2.new(200, 200)
44+
surfaceGui.LightInfluence = lightInfluence or 0
45+
surfaceGui.AlwaysOnTop = alwaysOnTop or false
46+
surfaceGui.AutoLocalize = autoLocalize or true
47+
surfaceGui.Parent = part
48+
49+
local guiObject = label:Clone()
50+
guiObject.Parent = surfaceGui
51+
52+
Selection:Set({ part })
53+
54+
ChangeHistoryService:SetWaypoint("Insert new SignPart")
55+
56+
self._part = part
57+
self._surfaceGui = surfaceGui
58+
self._guiObject = guiObject
59+
60+
return self
61+
end
62+
63+
-- Gets the GuiObjectPart
64+
function GuiObjectPart:GetPart(): Part
65+
return self._part
66+
end
67+
68+
-- Gets the SurfaceGui
69+
function GuiObjectPart:GetSurfaceGui(): SurfaceGui
70+
return self._surfaceGui
71+
end
72+
73+
-- Gets the GuiObject
74+
function GuiObjectPart:GetGuiObject(): GuiObject
75+
return self._guiObject
76+
end
77+
78+
return GuiObjectPart

0 commit comments

Comments
 (0)