Advertisement
Tree_hub

Orion Hub Tut

Jan 17th, 2023
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.44 KB | None | 0 0
  1. local OrionLib = loadstring(game:HttpGet(('https://raw.githubusercontent.com/shlexware/Orion/main/source')))()
  2. Creating a Window
  3. local Window = OrionLib:MakeWindow({Name = "Title of the library", HidePremium = false, SaveConfig = true, ConfigFolder = "OrionTest"})
  4.  
  5. --[[
  6. Name = <string> - The name of the UI.
  7. HidePremium = <bool> - Whether or not the user details shows Premium status or not.
  8. SaveConfig = <bool> - Toggles the config saving in the UI.
  9. ConfigFolder = <string> - The name of the folder where the configs are saved.
  10. IntroEnabled = <bool> - Whether or not to show the intro animation.
  11. IntroText = <string> - Text to show in the intro animation.
  12. IntroIcon = <string> - URL to the image you want to use in the intro animation.
  13. Icon = <string> - URL to the image you want displayed on the window.
  14. CloseCallback = <function> - Function to execute when the window is closed.
  15. ]]
  16. Creating a Tab
  17. local Tab = Window:MakeTab({
  18. Name = "Tab 1",
  19. Icon = "rbxassetid://4483345998",
  20. PremiumOnly = false
  21. })
  22.  
  23. --[[
  24. Name = <string> - The name of the tab.
  25. Icon = <string> - The icon of the tab.
  26. PremiumOnly = <bool> - Makes the tab accessible to Sirus Premium users only.
  27. ]]
  28. Creating a Section
  29. local Section = Tab:AddSection({
  30. Name = "Section"
  31. })
  32.  
  33. --[[
  34. Name = <string> - The name of the section.
  35. ]]
  36. You can add elements to sections the same way you would add them to a tab normally.
  37.  
  38. Notifying the user
  39. OrionLib:MakeNotification({
  40. Name = "Title!",
  41. Content = "Notification content... what will it say??",
  42. Image = "rbxassetid://4483345998",
  43. Time = 5
  44. })
  45.  
  46. --[[
  47. Title = <string> - The title of the notification.
  48. Content = <string> - The content of the notification.
  49. Image = <string> - The icon of the notification.
  50. Time = <number> - The duration of the notfication.
  51. ]]
  52. Creating a Button
  53. Tab:AddButton({
  54. Name = "Button!",
  55. Callback = function()
  56. print("button pressed")
  57. end
  58. })
  59.  
  60. --[[
  61. Name = <string> - The name of the button.
  62. Callback = <function> - The function of the button.
  63. ]]
  64. Creating a Checkbox toggle
  65. Tab:AddToggle({
  66. Name = "This is a toggle!",
  67. Default = false,
  68. Callback = function(Value)
  69. print(Value)
  70. end
  71. })
  72.  
  73. --[[
  74. Name = <string> - The name of the toggle.
  75. Default = <bool> - The default value of the toggle.
  76. Callback = <function> - The function of the toggle.
  77. ]]
  78. Changing the value of an existing Toggle
  79. CoolToggle:Set(true)
  80. Creating a Color Picker
  81. Tab:AddColorpicker({
  82. Name = "Colorpicker",
  83. Default = Color3.fromRGB(255, 0, 0),
  84. Callback = function(Value)
  85. print(Value)
  86. end
  87. })
  88.  
  89. --[[
  90. Name = <string> - The name of the colorpicker.
  91. Default = <color3> - The default value of the colorpicker.
  92. Callback = <function> - The function of the colorpicker.
  93. ]]
  94. Setting the color picker's value
  95. ColorPicker:Set(Color3.fromRGB(255,255,255))
  96. Creating a Slider
  97. Tab:AddSlider({
  98. Name = "Slider",
  99. Min = 0,
  100. Max = 20,
  101. Default = 5,
  102. Color = Color3.fromRGB(255,255,255),
  103. Increment = 1,
  104. ValueName = "bananas",
  105. Callback = function(Value)
  106. print(Value)
  107. end
  108. })
  109.  
  110. --[[
  111. Name = <string> - The name of the slider.
  112. Min = <number> - The minimal value of the slider.
  113. Max = <number> - The maxium value of the slider.
  114. Increment = <number> - How much the slider will change value when dragging.
  115. Default = <number> - The default value of the slider.
  116. ValueName = <string> - The text after the value number.
  117. Callback = <function> - The function of the slider.
  118. ]]
  119. Change Slider Value
  120. Slider:Set(2)
  121. Make sure you make your slider a variable (local CoolSlider = Tab:AddSlider...) for this to work.
  122.  
  123. Creating a Label
  124. Tab:AddLabel("Label")
  125. Changing the value of an existing label
  126. CoolLabel:Set("Label New!")
  127. Creating a Paragraph
  128. Tab:AddParagraph("Paragraph","Paragraph Content")
  129. Changing an existing paragraph
  130. CoolParagraph:Set("Paragraph New!", "New Paragraph Content!")
  131. Creating an Adaptive Input
  132. Tab:AddTextbox({
  133. Name = "Textbox",
  134. Default = "default box input",
  135. TextDisappear = true,
  136. Callback = function(Value)
  137. print(Value)
  138. end
  139. })
  140.  
  141. --[[
  142. Name = <string> - The name of the textbox.
  143. Default = <string> - The default value of the textbox.
  144. TextDisappear = <bool> - Makes the text disappear in the textbox after losing focus.
  145. Callback = <function> - The function of the textbox.
  146. ]]
  147. Creating a Keybind
  148. Tab:AddBind({
  149. Name = "Bind",
  150. Default = Enum.KeyCode.E,
  151. Hold = false,
  152. Callback = function()
  153. print("press")
  154. end
  155. })
  156.  
  157. --[[
  158. Name = <string> - The name of the bind.
  159. Default = <keycode> - The default value of the bind.
  160. Hold = <bool> - Makes the bind work like: Holding the key > The bind returns true, Not holding the key > Bind returns false.
  161. Callback = <function> - The function of the bind.
  162. ]]
  163. Chaning the value of a bind
  164. Bind:Set(Enum.KeyCode.E)
  165. Creating a Dropdown menu
  166. Tab:AddDropdown({
  167. Name = "Dropdown",
  168. Default = "1",
  169. Options = {"1", "2"},
  170. Callback = function(Value)
  171. print(Value)
  172. end
  173. })
  174.  
  175. --[[
  176. Name = <string> - The name of the dropdown.
  177. Default = <string> - The default value of the dropdown.
  178. Options = <table> - The options in the dropdown.
  179. Callback = <function> - The function of the dropdown.
  180. ]]
  181. Adding a set of new Dropdown buttons to an existing menu
  182. Dropdown:Refresh(List<table>,true)
  183. The above boolean value "true" is whether or not the current buttons will be deleted.
  184.  
  185. Selecting a dropdown option
  186. Dropdown:Set("dropdown option")
  187. Finishing your script (REQUIRED)
  188. The below function needs to be added at the end of your code.
  189.  
  190. OrionLib:Init()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement