Jezilas

API

Aug 12th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.26 KB | None | 0 0
  1. --[[
  2. --// INCOMPLETE; WILL FINISH LATER
  3.  
  4. Adonis API Documentation for developers
  5.  
  6. Require:
  7. Adonis' MainModule can be loaded by using require(359948692)()
  8. - This allows you to require the module via the console and test things per server
  9. without having to add the loader and save the game;
  10. - If you want to edit things like settings, themes, or plugins you can do the following:
  11. local data = {
  12. Settings = {
  13. Admins = {"SomeGuy"}
  14. };
  15. Themes = {
  16. game.Workspace.ThemeFolder1;
  17. game.Workspace.ThemeFolder2;
  18. };
  19. Plugins = {
  20. game.Workspace.Plugin1;
  21. game.Workspace.Plugin2;
  22. }
  23. require(359948692)(data)
  24.  
  25. - The MainModule will use a set of default settings for any setting not provided
  26.  
  27.  
  28. _G.Adonis:
  29. Read-only table in _G that can be used to access certain things in Adonis from other server scripts
  30.  
  31. Functions:
  32. _G.Adonis.Access(accessKey, serverSubTable)
  33. - Returns a read-only version of a server subtable; allowing you to use all of it's functions
  34. - Settings can be changed in the Settings module for what to allow access to and to change if scripts can read/write
  35.  
  36. _G.Adonis.CheckAdmin(player)
  37. - Returns true if the player is an Adonis admin
  38.  
  39. _G.Adonis.GetLevel(player)
  40. - Returns a player's admin level
  41. - Levels:
  42. 0 - Player
  43. 1 - Moderator
  44. 2 - Admin
  45. 3 - Owner
  46. 4 - Creators (basically place owners)
  47. 5 - Place owner (the person who actually owns the place)
  48.  
  49. _G.Adonis.CheckDonor(player)
  50. - Returns true if the player is an Adonis donor
  51.  
  52. _G.Adonis.CheckAgent(player)
  53. - Returns true if the player is a Trello agent
  54.  
  55. _G.Adonis.SetLighting(property, value)
  56. - Sets the lighting property for the server and all clients
  57. - Mainly used for local lighting to update all clients
  58.  
  59. _G.Adonis.SetPlayerLighting(player, property, value)
  60. - Sets the lighting property for a specific player
  61. - Requires LocalLighting be enabled in settings in order to workspace
  62.  
  63. _G.Adonis.NewParticle(part, type, properties)
  64. - Lets you create local particles on the target part with properties defined in the properties table
  65. - Type can be any classname that is place into a brick and has the .Enabled property
  66. - Part must be a weldable part
  67. _G.Adonis.RemoveParticle(part, name)
  68. - Removes local particles named <name> for all players from <part>
  69.  
  70. _G.Adonis.NewLocal(player, type, properties, newParent)
  71. - Creates Instance.new(type) with properties <properties table>
  72. in local parent newParent for player
  73. - newParents: "Camera", "LocalContainer", "PlayerGui"
  74. - Defaults to LocalContainer if no parent is given
  75.  
  76. _G.Adonis.MakeLocal(player, object, newParent)
  77. - Localizes object for player by moving it to newParent (a local container)
  78. - newParents: "Camera", "LocalContainer", "PlayerGui"
  79. - Defaults to LocalContainer if no parent is given
  80.  
  81. _G.Adonis.MoveLocal(player, object, oldParent, newParent)
  82. - Same as MakeLocal except moves an existing local based on name/object provided
  83.  
  84. _G.Adonis.RemoveLocal(player, object, oldParent)
  85. - Finds and removes object from oldParent (a local container)
  86. for player
  87.  
  88.  
  89. Service:
  90. Metatable used to access ROBLOX services and some utility functions
  91. For example: service.Players
  92.  
  93. Extra functions:
  94. service.Delete(object)
  95. - Uses service.Debris to delete an object; Works on some RobloxLocked objects
  96.  
  97. service.HookEvent(eventName, function)
  98. - Hooks events fired by service.FireEvent; Useful for running PlayerAdded after the admin finishes loading them
  99. - Returns a table conaining the UnHook() function to "unhook" the event
  100.  
  101. service.FireEvent(eventName, params)
  102. - Fires all functions for a specific event added by service.HookEvent
  103.  
  104. service.StartLoop(loopName, delay, function)
  105. - Starts an infinite loop that can be stopped using service.StopLoop(loopName)
  106. - Delay accepts a number, "Heartbeat", or "Stepped"
  107.  
  108. service.StopLoop(loopName)
  109. - Stops a loop started by service.StartLoop
  110.  
  111. service.ReadOnly(table)
  112. - Returns a read-only version of the table supplied to it
  113.  
  114. service.GetPlayers(commandPlayer, nameString, dontError, isServer)
  115. - Finds players via their name/modifiers provided in nameString
  116. - If no args are given it will return a list of all players connected to the server, not just in game.Players
  117.  
  118. Events:
  119. service.Events.eventName
  120. - Returns a table containing :connect and :disconnect
  121. - Basically the same as service.HookEvent but more like a ROBLOX event
  122.  
  123. Event List:
  124. PlayerAdded
  125. - Runs after Adonis client finishes loading
  126. - Returns player
  127.  
  128. PlayerRemoving
  129. - Fired when a player leaves
  130. - Returns player
  131.  
  132. NetworkAdded
  133. - Fired when a new NetworkClient appears
  134. - Returns NetworkClient
  135.  
  136. NetworkRemoved
  137. - Fired when a NetworkClient is removed
  138. - Returns NetworkClient
  139.  
  140. PlayerChatted
  141. - Fired when player chats; Works with anything that fires server.Process.Chat; Including Adonis' custom chat
  142. - Returns player, msg
  143.  
  144. CharacterAdded
  145. - Fired when character loads; Does not use player.CharacterAdded
  146. - Returns player
  147.  
  148. ErrorMessage
  149. - Fired when an error is found
  150. - Returns message, trace, script
  151.  
  152. Output
  153. - Fired when anything prints
  154. - Returns message, type
  155.  
  156. CommandRan
  157. - Fired when a command is ran
  158. - Returns msg, command, args, table, index, ran, error
  159.  
  160. - msg is the message the player chatted
  161. - command is the command pulled from msg
  162. - args is a table containing supplied command arguments
  163. - table is the command table
  164. - index is it's position in server.Commands
  165. - ran returns true is the command ran successfully
  166. - error returns any errors from the command function
  167.  
  168. Server:
  169. Main script table containing most of the functions and variables used by the admin
  170.  
  171. Subtables:
  172. Logs
  173. Variables
  174. Core
  175. Remote
  176. Anti
  177. Functions
  178.  
  179.  
  180. --]]
Add Comment
Please, Sign In to add comment