|
| 03 Sep 2014 06:38 PM |
it's gonna be completely generated by a script
i made some cool functions that have saved button skins, so you can basically do
edit( Instance.new("Button", script.Parent), getSkin("closeButton") )
and it will create a button with preset properties and st00f yay
function edit(obj, ...) for _, property in pairs({...}) do if property[1]:lower() == "onclick" then obj.MouseButton1Click:connect(function() property[2]() end) else obj[property[1]] = property[2] end end return obj end
function getSkin(type) local skins = { ["close_button"] = { {"BackgroundColor3", Color3.new(1, 0, 0)}, {"Text", "swag"}, {"Size", UDim2.new(0, 50, 0, 50)}, {"OnClick", function() print("you clicked me!") end} } } return unpack(skins[type]) end
function generateUI() local button = edit( Instance.new("TextButton", script.Parent), getSkin("close_button") ) end
-ForeverDev [ R$5 / sadness ] |
|
|
| Report Abuse |
|
mittCat
|
  |
| Joined: 03 Mar 2013 |
| Total Posts: 17888 |
|
| |
|
| 03 Sep 2014 06:39 PM |
@mitt
yus
-ForeverDev [ R$5 / sadness ] |
|
|
| Report Abuse |
|
sidd28
|
  |
| Joined: 26 May 2014 |
| Total Posts: 4566 |
|
| |
|
| 03 Sep 2014 06:41 PM |
hai
-ForeverDev [ R$5 / sadness ] |
|
|
| Report Abuse |
|
| |
|
| 03 Sep 2014 06:45 PM |
| soryy im not gonna be your brother in law i got a gf |
|
|
| Report Abuse |
|