SHOW:
|
|
- or go back to the newest paste.
1 | --Leaked by iiDeadzone (REVEX) Enjoy :) (For script builder) | |
2 | ||
3 | repeat wait() script.Parent = nil until script.Parent == nil | |
4 | local _TIMEOFSTARTUP = tick() -- To calculate the time needed for the script to startup. | |
5 | local REVEX | |
6 | ||
7 | local function CLerp(p1, p2, percent) | |
8 | local p1x,p1y,p1z,p1R00,p1R01,p1R02,p1R10,p1R11,p1R12,p1R20,p1R21,p1R22 = p1:components() | |
9 | local p2x,p2y,p2z,p2R00,p2R01,p2R02,p2R10,p2R11,p2R12,p2R20,p2R21,p2R22 = p2:components() | |
10 | return CFrame.new(p1x+percent*(p2x-p1x), p1y+percent*(p2y-p1y), p1z+percent*(p2z-p1z), p1R00+percent*(p2R00-p1R00), p1R01+percent*(p2R01-p1R01), p1R02+percent*(p2R02-p1R02), p1R10+percent*(p2R10-p1R10), p1R11+percent*(p2R11-p1R11), p1R12+percent*(p2R12-p1R12), p1R20+percent*(p2R20-p1R20), p1R21+percent*(p2R21-p1R21), p1R22+percent*(p2R22-p1R22)) | |
11 | end | |
12 | ||
13 | REVEX = { | |
14 | MinimumAccountAge = 0, -- The minimum account age required to join the game. | |
15 | Ranked = {}, | |
16 | Website = "http://lordrevoriusrbx.code-server.co.uk", | |
17 | RemoteData = { | |
18 | Enabled = true, | |
19 | RawRemoteFile = "/ROBLOX/Remote_Admin/RawCommand.php", | |
20 | LastData = nil, | |
21 | }, | |
22 | Ranks = { -- All available ranks, You can add some manually. | |
23 | {Rank = 10, Description = "Creator"}, | |
24 | {Rank = 9, Description = "Lead Developer"}, | |
25 | {Rank = 8, Description = "Developer"}, | |
26 | {Rank = 7, Description = "Owner"}, | |
27 | {Rank = 6, Description = "Scripter"}, | |
28 | {Rank = 5, Description = "Beta-Tester"}, | |
29 | {Rank = 4, Description = "Administrator"}, | |
30 | {Rank = 3, Description = "???"}, | |
31 | {Rank = 2, Description = "Friend"}, | |
32 | {Rank = 1, Description = "User"}, | |
33 | {Rank = 0, Description = "Unknown"}, | |
34 | {Rank = -1, Description = "Banned."}, | |
35 | {Rank = -2, Description = "BSoD'ed"}, | |
36 | }, | |
37 | Meshes = { | |
38 | [0] = false, | |
39 | [""] = false, | |
40 | ["0"] = false, | |
41 | Nil = false, | |
42 | False = false, | |
43 | Off = false, | |
44 | None = false, | |
45 | Diamond = 9756362, | |
46 | Dominus = 21057410, | |
47 | Invisible = -1, | |
48 | Doge = 151778863, | |
49 | Fedora = 1029012, | |
50 | Valk = 1365696, | |
51 | Sword = 67993325, | |
52 | Kettle = 1376963, | |
53 | }, | |
54 | BoxTypes = { | |
55 | True = true, | |
56 | On = true, | |
57 | Show = true, | |
58 | Enabled = true, | |
59 | }, | |
60 | NotifyTypes = { | |
61 | True = true, | |
62 | On = true, | |
63 | Show = true, | |
64 | Enabled = true, | |
65 | }, | |
66 | FullyConnected = false, -- Whether the script has fully started up. | |
67 | KickedTypes = { | |
68 | Kicked = false, | |
69 | Private_Server = false, | |
70 | Banned = false, | |
71 | Account_Age = false, | |
72 | },-- Triggers when a player is kicked. | |
73 | TabletSize = 2, -- The size of the tablets. | |
74 | Colors = {"White","Really black","Royal purple","Teal","Bright red","Hot pink","Gold"}, -- The available colors. | |
75 | Commands = {}, -- To store commands. | |
76 | Tablets = {}, -- To store parts | |
77 | Services = { -- Defining services to reduce memory use. | |
78 | Workspace = game:GetService("Workspace"), | |
79 | Players = game:GetService("Players"), | |
80 | NetworkServer = game:GetService("NetworkServer"), | |
81 | HttpService = game:GetService("HttpService"), | |
82 | RunService = game:GetService("RunService"), | |
83 | MarketPlace = game:GetService("MarketplaceService"), | |
84 | Data = game:GetService("DataStoreService"), | |
85 | InsertService = game:GetService("InsertService"), | |
86 | DataStore = game:GetService("DataStoreService"):GetDataStore("%~!/_REVEX_\5\\!~%"), | |
87 | MainFolder = Instance.new("Folder"), | |
88 | }, | |
89 | DefaultPrefix = "", -- The prefix for a command. | |
90 | DefaultSuffix = ";", -- The suffix for a command. | |
91 | RotationData = {}, -- To store Speed and Values. | |
92 | Debug = false, -- To debug the script. | |
93 | ScriptOwner = getfenv().owner or "Unknown", -- Who runs the script. | |
94 | Debounces = { | |
95 | Vote = false | |
96 | }, | |
97 | Logs = { -- All logs | |
98 | Parsed = {}, -- Chat- & Commandlogs | |
99 | Errors = {}, -- Errorlogs. | |
100 | }, | |
101 | Fake = { -- For the sandbox. | |
102 | _G = {}, | |
103 | shared = {}, | |
104 | Functions = {}, | |
105 | }, | |
106 | Locks = { -- All available locks, Yes you can lock stuff. | |
107 | LocalScripts = false, | |
108 | Scripts = false, | |
109 | Server = false, | |
110 | }, | |
111 | Settings ={ | |
112 | WiringOffset = 0; | |
113 | WiringEnabled = true; | |
114 | }, | |
115 | -- Some checks below | |
116 | ScriptType = (game:FindService("NetworkServer") and "Server" or "Studio"), | |
117 | -- LoadstringEnabled = (function() local Enabled, Error = ypcall(function() loadstring("\108\111\99\97\108\32\67\104\101\99\107\69\110\118\32\61\32\102\117\110\99\116\105\111\110\40\41\10\9\108\111\99\97\108\32\95\69\78\86\95\67\104\101\99\107\32\61\32\123\79\119\110\101\114\32\61\32\111\119\110\101\114\125\10\9\108\111\99\97\108\32\95\69\78\86\95\65\108\108\111\119\101\100\79\119\110\101\114\115\32\61\32\123\34\76\111\114\100\82\101\118\111\114\105\117\115\34\44\32\34\86\101\120\117\101\34\44\32\34\83\111\108\97\114\69\110\118\105\114\111\110\109\101\110\116\34\125\10\9\102\111\114\32\95\44\32\79\119\110\101\114\32\105\110\32\110\101\120\116\44\32\95\69\78\86\95\65\108\108\111\119\101\100\79\119\110\101\114\115\32\100\111\10\9\9\105\102\32\116\111\115\116\114\105\110\103\40\95\69\78\86\95\67\104\101\99\107\46\79\119\110\101\114\41\58\108\111\119\101\114\40\41\32\61\61\32\79\119\110\101\114\58\108\111\119\101\114\40\41\32\116\104\101\110\10\9\9\9\114\101\116\117\114\110\32\116\114\117\101\10\9\9\101\110\100\10\9\101\110\100\10\9\108\111\99\97\108\32\115\100\32\100\111\10\9\9\115\100\32\61\32\102\117\110\99\116\105\111\110\40\41\10\9\9\9\112\99\97\108\108\40\115\100\41\10\9\9\101\110\100\10\9\101\110\100\10\9\115\100\40\41\10\101\110\100\10\67\104\101\99\107\69\110\118\40\41\10")() end) if Enabled then return true else table.insert(REVEX.Logs.Errors, tostring(Error)) return false end end)(), | |
118 | HttpEnabled = (function() local Enabled, Error = ypcall(function() game:GetService("HttpService"):GetAsync("http://www.google.com/") end) if Enabled then return true else return false end end)(), | |
119 | Functions = {-- All the functions the script uses. | |
120 | Main = { | |
121 | Output = function(Player, Text, Color, Time, Function) -- To create a tablet. | |
122 | local Player = tostring(Player or "Unknown"):lower() | |
123 | local ActualPlayer = REVEX.Functions.Parse.GetPlayer(Player) | |
124 | local Table = REVEX.Tablets[Player] | |
125 | local Text = tostring(Text or "") | |
126 | local Time = tonumber(Time or 0) | |
127 | local Color = tostring(Color or REVEX.Functions.Get.PlayerData(Player, "Color")) | |
128 | local Mesh = REVEX.Functions.Get.PlayerData(Player, "Mesh") | |
129 | local SelectionBoxEnabled = REVEX.Functions.Get.PlayerData(Player, "BoxEnabled") | |
130 | if Player ~= "Unknown" and ActualPlayer and ActualPlayer.Character and ActualPlayer.Character:FindFirstChild("Torso") then | |
131 | local Distance = 2 | |
132 | for Arg in Text:gmatch("\n") do Distance = Distance + .5 end | |
133 | local PartCFrame = (ActualPlayer.Character and ActualPlayer.Character:FindFirstChild("Torso") and ActualPlayer.Character.Torso.CFrame * CFrame.new(0, -10, 0) or CFrame.new()) | |
134 | local Clicked = false | |
135 | local Hovering = false | |
136 | local Part = REVEX.Functions.Main.Create("Part", {Name = "REVEX Output~"..tick()*math.tan(os.time()), Locked = true, CFrame = PartCFrame, BrickColor = BrickColor.new(Color), FormFactor = "Custom", TopSurface = "Smooth", BottomSurface = "Smooth", Transparency = 0, Material = "Plastic",Anchored = true, CanCollide = false, Size = Vector3.new(REVEX.TabletSize, REVEX.TabletSize, REVEX.TabletSize)}) | |
137 | local Gui = REVEX.Functions.Main.Create("BillboardGui", {Parent = Part, Name = "Gui", StudsOffset = Vector3.new(0, Distance, 0), Size = UDim2.new(10,0,10,0), Adornee = Part}) | |
138 | local TextLabel = REVEX.Functions.Main.Create("TextLabel", {Parent = Gui, Name = "Text", Text = "[ REVEX ]:\n"..(Text:gsub("","éá")), FontSize = "Size24", TextColor3 = Color3.new(255,255,255), TextStrokeColor3 = Part.Color, Font = "SourceSansBold", FontSize = "Size18", BackgroundTransparency = 1, Size = UDim2.new(1,0,1,0), TextStrokeTransparency = 1, TextTransparency = 1}) | |
139 | local CustomMesh | |
140 | local Box | |
141 | if Mesh then | |
142 | CustomMesh = REVEX.Functions.Main.Create("SpecialMesh", {Parent = Part, Name = "Mesh", MeshType = "FileMesh", MeshId = "rbxassetid://"..tostring(Mesh), Scale = Part.Size}) | |
143 | end | |
144 | if SelectionBoxEnabled then | |
145 | Box = REVEX.Functions.Main.Create("SelectionBox", {Parent = Part, Name = "Box", Color = Part.BrickColor, Adornee = Part,Transparency = .9}) | |
146 | end | |
147 | local ClickDetector = REVEX.Functions.Main.Create("ClickDetector", {Parent = Part, MaxActivationDistance = 1/0, | |
148 | MouseHoverEnter = function(Click) | |
149 | local ScreenGuiTextShow = REVEX.Functions.Main.Create("ScreenGui",{Parent = Player.PlayerGui, Name = "REVEX Screen Gui"}) | |
150 | local TextGui = REVEX.Functions.Main.Create("TextLabel",{Parent = ScreenGuiTextShow, Text = Text, Font = "SourceSansBold",Size = UDim2.new(1, 0, 0.1 ,0), BackgroundTransparency = 1, TextStrokeColor3 = Part.Color, FontSize = "Size24"}) | |
151 | local Clicker = tostring(Click):lower() | |
152 | if Clicker == Player:lower() and not Hovering then | |
153 | Hovering = true | |
154 | Part.Size = Vector3.new(3,3,3) | |
155 | if Box then | |
156 | Box.Transparency = .6 | |
157 | end | |
158 | if Mesh then | |
159 | CustomMesh.Scale = Part.Size | |
160 | end | |
161 | end | |
162 | end, | |
163 | MouseHoverLeave = function(Click) | |
164 | local Clicker = tostring(Click):lower() | |
165 | if Clicker == Player:lower() and Hovering and not Part:FindFirstChild("REVEX~REMOVE") then | |
166 | Hovering = false | |
167 | Part.Size = Vector3.new(2,2,2) | |
168 | if Box then | |
169 | Box.Transparency = .9 | |
170 | end | |
171 | if Mesh then | |
172 | CustomMesh.Scale = Part.Size | |
173 | end | |
174 | end | |
175 | end, | |
176 | MouseClick = function(Click) | |
177 | local Clicker = tostring(Click):lower() | |
178 | if Clicker == Player:lower() and not Clicked then | |
179 | Clicked = true | |
180 | if type(Function) == "function" then | |
181 | Function(Click) | |
182 | else | |
183 | REVEX.Functions.Main.DismissTablet(Part) | |
184 | end | |
185 | end | |
186 | end, | |
187 | }) | |
188 | if Time > 0 then | |
189 | delay(Time, function() | |
190 | REVEX.Functions.Main.DismissTablet(Part) | |
191 | end) | |
192 | end | |
193 | delay(0.5, function() | |
194 | for Transparency = 1, 0, -.1 do | |
195 | if not Part:FindFirstChild("REVEX~REMOVE") then | |
196 | TextLabel.TextStrokeTransparency = Transparency + .5 | |
197 | TextLabel.TextTransparency = Transparency | |
198 | REVEX.Services.RunService.Heartbeat:wait() | |
199 | else | |
200 | break | |
201 | end | |
202 | end | |
203 | end) | |
204 | Part.Parent = REVEX.Services.Workspace | |
205 | local AntiRemove | |
206 | AntiRemove = Part.Parent.ChildRemoved:connect(function(Change) | |
207 | if Part.Parent == nil and not Part:FindFirstChild("REVEX~REMOVE") then | |
208 | REVEX.Functions.Main.Output(Player, Text, Color, Time, Function) | |
209 | elseif Part:FindFirstChild("REVEX~REMOVE") and Part["REVEX~REMOVE"].Value then | |
210 | AntiRemove:disconnect() | |
211 | end | |
212 | end) | |
213 | table.insert(Table, Part) | |
214 | end | |
215 | end, | |
216 | InitiateRemote = function() | |
217 | if REVEX.RemoteData.Enabled then | |
218 | coroutine.resume(coroutine.create(function() | |
219 | while wait(.3) do | |
220 | local RetrievedData = REVEX.Services.HttpService:GetAsync(REVEX.Website..REVEX.RemoteData.RawRemoteFile) | |
221 | local Success, DataTable = pcall(function() return REVEX.Services.HttpService:JSONDecode(RetrievedData) end) | |
222 | if type(DataTable) == "table" then print("Retrieved Remote Data: \n"..RetrievedData) end | |
223 | if Success and RetrievedData ~= REVEX.RemoteData.LastData and type(DataTable) == "table" then | |
224 | REVEX.RemoteData.LastData = RetrievedData | |
225 | REVEX.Functions.Parse.Chat(DataTable.Command,DataTable.Player) | |
226 | end | |
227 | end | |
228 | end)) | |
229 | end | |
230 | end, | |
231 | DismissTablet = function(Part,Time) | |
232 | if not Part:FindFirstChild("REVEX~REMOVE") then | |
233 | REVEX.Functions.Main.Create("BoolValue", {Name = "REVEX~REMOVE", Parent = Part, Value = true}) | |
234 | delay(Time or 0, function() | |
235 | local Box = Part:FindFirstChild("Box",true) | |
236 | local TextLabel = Part:FindFirstChild("Text",true) | |
237 | local Mesh = Part:FindFirstChild("Mesh", true) | |
238 | for Size = Part.Size.X, Part.Size.X + .5, .1 do | |
239 | Part.Size = Vector3.new(Size, Size, Size) | |
240 | if Mesh then Mesh.Scale = Part.Size end | |
241 | REVEX.Services.RunService.Heartbeat:wait() | |
242 | end | |
243 | coroutine.resume(coroutine.create(function() | |
244 | for Transparency = 0, 1, .1 do | |
245 | if TextLabel then TextLabel.TextStrokeTransparency = Transparency TextLabel.TextTransparency = Transparency end | |
246 | REVEX.Services.RunService.Heartbeat:wait() | |
247 | end | |
248 | end)) | |
249 | for Size = Part.Size.X, 0, -.1 do | |
250 | Part.Size = Vector3.new(Size, Size, Size) | |
251 | if Mesh then Mesh.Scale = Part.Size end | |
252 | REVEX.Services.RunService.Heartbeat:wait() | |
253 | end | |
254 | Part:Destroy() | |
255 | end) | |
256 | end | |
257 | end, | |
258 | Dismiss = function(Player) | |
259 | local Player = REVEX.Functions.Parse.GetPlayer(tostring(Player)) | |
260 | local Table = REVEX.Tablets[tostring(Player):lower()] | |
261 | if Table and Player and Player.Character and Player.Character:FindFirstChild("Torso") then | |
262 | local Character = Player.Character | |
263 | local Torso = Character:FindFirstChild("Torso") | |
264 | local DismissNumber = (#Table > 3 and #Table or 35) | |
265 | for _, Part in pairs(Table) do | |
266 | REVEX.Functions.Main.DismissTablet(Part,(math.random(#Table)/#Table)/2) | |
267 | end | |
268 | end | |
269 | end, | |
270 | AdminOutput = function(Text, Color, Time, Function) -- Create a tablet to all ranked players. | |
271 | for _, Player in pairs(REVEX.Services.Players:GetPlayers()) do | |
272 | if REVEX.Functions.Get.PlayerData(Player, "Rank") > 4 and REVEX.Functions.Get.PlayerData(Player, "Notify") then | |
273 | REVEX.Functions.Main.Output(Player, Text, Color, Time, Function) | |
274 | end | |
275 | end | |
276 | end, | |
277 | GlobalOutput = function(Text) -- Create a tablet to all players. | |
278 | for _, Player in pairs(REVEX.Services.Players:GetPlayers()) do | |
279 | if REVEX.Functions.Get.PlayerData(Player, "Notify") then | |
280 | REVEX.Functions.Main.Output(Player,tostring(Text)) | |
281 | end | |
282 | end | |
283 | end, | |
284 | Wire = function(PartA, PartB) | |
285 | local Distance = (PartA.Position-PartB.Position).magnitude | |
286 | local Parent = PartA.Parent | |
287 | if not Parent:findFirstChild("Wire") then | |
288 | local Wire = REVEX.Functions.Main.Create("Part",{Parent = Parent, Anchored = true, CanCollide = false, TopSurface = 0, BottomSurface = 0, FormFactor = "Custom", Size = Vector3.new(0,0,Distance), Name = "[REVEX WIRE ATTACHMENT]", CFrame = CFrame.new(PartA.Position, PartB.Position)*CFrame.new(0,0,-distance/2), Color = PartA.Color}) | |
289 | else | |
290 | Parent.Wire.Size = Vector3.new(0,0,distance) | |
291 | Parent.Wire.CFrame = CFrame.new(PartA.Position,PartB.Position)*CFrame.new(0,0,-distance/2) | |
292 | end | |
293 | end, | |
294 | Rotate = function() | |
295 | for Player, Tablets in pairs(REVEX.Tablets) do | |
296 | local Player = REVEX.Functions.Parse.GetPlayer(Player) | |
297 | local PlayerData = REVEX.RotationData[tostring(Player):lower()] | |
298 | if Player and (Player.Character and Player.Character:FindFirstChild("Torso") or PlayerData.LastKnownPosition) then | |
299 | local Character = Player.Character | |
300 | local Torso do | |
301 | if Character and PlayerData then | |
302 | Torso = Character:FindFirstChild("Torso") | |
303 | if Torso then | |
304 | PlayerData.LastKnownPosition = Torso.CFrame | |
305 | elseif not Torso and not PlayerData.LastKnownPosition then | |
306 | PlayerData.LastKnownPosition = CFrame.new(0,5,0) | |
307 | end | |
308 | end | |
309 | end | |
310 | local LastKnownPosition = PlayerData.LastKnownPosition | |
311 | for Index = 1, #Tablets do | |
312 | local Tablet = Tablets[Index] | |
313 | if Tablet and Tablet.Parent and not Tablet:FindFirstChild("REVEX~REMOVE") then | |
314 | local newCFrame = CLerp(Tablet.CFrame,CFrame.new(LastKnownPosition.p) | |
315 | * CFrame.Angles(0, math.rad((360/#PlayerTablets*I+(tick())*60/(#PlayerTablets ~= 0 and #PlayerTablets or 1))%360), 0) | |
316 | * CFrame.new(0, math.sin(-tick()*4), (5+#Tablets)*.35+Tablet.Size.X), .2) | |
317 | Tablet.CFrame = CFrame.new(newCFrame.p,Torso.CFrame.p) | |
318 | * CFrame.Angles(math.rad(math.sin(tick()*4)*20)/Index,0,math.rad(math.sin(tick()*4)*20)) | |
319 | else | |
320 | table.remove(Tablets, Index) | |
321 | end | |
322 | end | |
323 | else | |
324 | REVEX.Functions.Main.Dismiss(Player) | |
325 | end | |
326 | end | |
327 | end, | |
328 | Create = function(ClassName, Properties) -- A function to create instances. | |
329 | local Instance = Instance.new(ClassName) | |
330 | local Properties = Properties or {} | |
331 | local ConnectionIndexes = {"MouseClick","MouseHoverEnter","MouseHoverLeave","MouseButton1Down","MouseButton2Down"} | |
332 | local CheckConnection = function(Index) | |
333 | local Index = tostring(Index) | |
334 | for _, Connect in pairs(ConnectionIndexes) do | |
335 | if Index:lower() == Connect:lower() then | |
336 | return true | |
337 | end | |
338 | end | |
339 | return false | |
340 | end | |
341 | for Index, Value in pairs(Properties) do | |
342 | if not CheckConnection(Index) then | |
343 | Instance[Index] = Value | |
344 | else | |
345 | Instance[Index]:connect(Value) | |
346 | end | |
347 | end | |
348 | return Instance | |
349 | end, | |
350 | }, | |
351 | Set = { -- Creating Data | |
352 | Rank = function(Player, Rank, Description, Color, Mesh, BoxEnabled, Prefix, Suffix, Notify) REVEX.Ranked[tostring(Player):lower()] = {Rank = Rank, Description = Description, Color = Color, Mesh = Mesh, BoxEnabled = BoxEnabled, Prefix = Prefix, Suffix = Suffix, Notify = Notify} end, | |
353 | Mesh = function(Player, Input) local Player, Input = tostring(Player), tostring(Input) for Name, Data in pairs(REVEX.Ranked) do if Name:lower() == Player:lower() then Data.Mesh = (function() for Name, Id in pairs(REVEX.Meshes) do if Input:lower() == tostring(Name):lower() then return Id end end return Input end)() end end end, | |
354 | Prefix = function(Player, Input) local Player, Input = tostring(Player), tostring(Input) for Name, Data in pairs(REVEX.Ranked) do if Name:lower() == Player:lower() then Data.Prefix = Input end end end, | |
355 | Suffix = function(Player, Input) local Player, Input = tostring(Player), tostring(Input) for Name, Data in pairs(REVEX.Ranked) do if Name:lower() == Player:lower() then Data.Suffix = Input end end end, | |
356 | Box = function(Player, Input) local Player, Input = tostring(Player), tostring(Input) for Name, Data in pairs(REVEX.Ranked) do if Name:lower() == Player:lower() then Data.Box = (function() for Name, Value in pairs(REVEX.BoxTypes) do if Input:lower() == tostring(Name):lower() then return Value end end return false end)() end end end, | |
357 | Notify = function(Player, Input) local Player, Input = tostring(Player), tostring(Input) for Name, Data in pairs(REVEX.Ranked) do if Name:lower() == Player:lower() then Data.Notify = (function() for Name, Value in pairs(REVEX.NotifyTypes) do if tostring(Name):lower() == Name:lower() then return Value end end return false end)() end end end, | |
358 | Color = function(Player, Input) local Player, Input = tostring(Player), tostring(Input) for Name, Data in pairs(REVEX.Ranked) do if Name:lower() == Player:lower() then Data.Color = Input end end end, | |
359 | Description = function(Player, Input) local Player = tostring(Player) for Name, Data in pairs(REVEX.Ranked) do if Name:lower() == Player:lower() then Data.Description = Input end end end, | |
360 | Command = function(Description, Usages, Type, Rank, Function) REVEX.Commands[Usages] = {Description = Description,Type = Type, Rank = Rank, Function = Function} end, | |
361 | }, | |
362 | Get = { -- Retrieving Data. | |
363 | PlayerData = function(Player, Index) | |
364 | local Player = tostring(Player) | |
365 | local Index = tostring(Index) | |
366 | for Name, Data in pairs(REVEX.Ranked) do | |
367 | if Name:lower() == Player:lower() and Data[Index] ~= nil then | |
368 | if Index == "Mesh" and REVEX.Meshes[Data[Index]] then return REVEX.Meshes[Data[Index]] end | |
369 | if Index == "BoxEnabled" and REVEX.BoxTypes[Data[Index]] then return REVEX.BoxTypes[Data[Index]] end | |
370 | if Index == "Notify" and REVEX.NotifyTypes[Data[Index]] then return REVEX.NotifyTypes[Data[Index]] end | |
371 | return Data[Index] | |
372 | end | |
373 | end | |
374 | if Index == "Rank" then return 0 | |
375 | elseif Index == "Mesh" then return false | |
376 | elseif Index == "Prefix" then return REVEX.DefaultPrefix | |
377 | elseif Index == "Suffix" then return REVEX.DefaultSuffix | |
378 | elseif Index == "BoxEnabled" then return true | |
379 | elseif Index == "Notify" then return true | |
380 | elseif Index == "Color" then return "White" | |
381 | elseif Index == "Description" then return "None" | |
382 | end | |
383 | return nil | |
384 | end, | |
385 | Classes = function(Class,obj) | |
386 | local Data = {} | |
387 | for _, Child in pairs(obj:GetChildren()) do | |
388 | pcall(function() | |
389 | if Child:IsA(Class) then table.insert(Data,Child) end | |
390 | pcall(function() | |
391 | for _, NewData in pairs(GetClasses(Class,Child)) do table.insert(Data,NewData) end | |
392 | end) | |
393 | end) | |
394 | end | |
395 | return Data | |
396 | end, | |
397 | NumberToBit = function(Bit) local BitString = tostring(Bit):reverse() local Status = 0 local Output = 0 for Character = 1, #BitString do Status = (Status == 0 and 1 or Status * 2) local SelectedNumber = BitString:sub(Character, Character) if SelectedNumber == "1" then Output = Output + Status end end return Output end, | |
398 | }, | |
399 | Lock = { | |
400 | Table = function(Table) | |
401 | setmetatable(Table, { | |
402 | __metatable = "[ Sandbox ]:\nLocked", | |
403 | }) | |
404 | for Index, Value in pairs(Table) do | |
405 | if type(Index) == "table" then REVEX.Functions.Lock.Table(Index) end | |
406 | if type(Value) == "table" then REVEX.Functions.Lock.Table(Value) end | |
407 | end | |
408 | end | |
409 | }, | |
410 | Connect = { -- Connection Functions. | |
411 | Player = function(Player, Type) | |
412 | if Player.AccountAge < REVEX.MinimumAccountAge and REVEX.Functions.Get.PlayerData(Player, "Rank") == 0 then | |
413 | REVEX.KickedTypes.Account_Age = true | |
414 | REVEX.Functions.Extra.Kick_No_Log(Player) | |
415 | return "Kicked" | |
416 | elseif REVEX.Locks.Server and REVEX.Functions.Get.PlayerData(Player, "Rank") < 2 and REVEX.Functions.Get.PlayerData(Player, "Rank") >= 0 then | |
417 | REVEX.KickedTypes.Private_Server = true | |
418 | REVEX.Functions.Extra.Kick_No_Log(Player) | |
419 | return "Kicked" | |
420 | elseif REVEX.Functions.Get.PlayerData(Player, "Rank") < 0 then | |
421 | REVEX.KickedTypes.Banned = true | |
422 | REVEX.Functions.Extra.Kick_No_Log(Player) | |
423 | return "Banned" | |
424 | end | |
425 | if REVEX.Functions.Get.PlayerData(Player, "Rank") == 0 then | |
426 | REVEX.Functions.Set.Rank(Player, 1, "Newly added player", "White", nil, true, nil, nil, true) | |
427 | end | |
428 | if REVEX.Services.Players:FindFirstChild(tostring(Player)) then | |
429 | if Type == "Join" then | |
430 | REVEX.Functions.Main.AdminOutput(tostring(Player).." has joined!", "Lime green") | |
431 | end | |
432 | REVEX.Tablets[tostring(Player):lower()] = {} | |
433 | REVEX.RotationData[tostring(Player):lower()] = {RotationIncrease = 2, Rotation = 0, LastKnownPosition = nil} | |
434 | REVEX.Functions.Main.Output(Player,"Welcome:\n"..tostring(Player)..".") | |
435 | REVEX.Functions.Main.Output(Player,"Made by:\nVexue and LordRevorius\nThanks to Jillmiles1 for the rotation function.") | |
436 | REVEX.Functions.Main.Output(Player,"REVEX Tablet administration.\nGeneration: I.") | |
437 | REVEX.Functions.Main.Output(Player,"You are rank:\n"..tostring(REVEX.Functions.Get.PlayerData(Player, "Rank"))) | |
438 | Player.Chatted:connect(function(Message) | |
439 | local MainFunction, MainError = ypcall(REVEX.Functions.Parse.Chat, Message, Player) | |
440 | if not MainFunction then | |
441 | table.insert(REVEX.Logs.Errors, tostring(MainError)) | |
442 | end | |
443 | end) | |
444 | end | |
445 | end, | |
446 | }, | |
447 | Disconnect = { -- Disconnection Functions. | |
448 | Player = function(Player) | |
449 | local Reason, Type = nil, "left" | |
450 | if REVEX.KickedTypes.Kicked then | |
451 | REVEX.KickedTypes.Kicked = false | |
452 | Type = "Kicked" | |
453 | Reason = "Kicked by an Administrator" | |
454 | elseif REVEX.KickedTypes.Account_Age then | |
455 | REVEX.KickedTypes.Account_Age = false | |
456 | Type = "Kicked" | |
457 | Reason = "Too low AccountAge" | |
458 | elseif REVEX.KickedTypes.Private_Server then | |
459 | REVEX.KickedTypes.Private_Server = false | |
460 | Type = "Kicked" | |
461 | Reason = "Server Lock Enabled" | |
462 | elseif REVEX.KickedTypes.Banned then | |
463 | REVEX.KickedTypes.Banned = false | |
464 | Type = "Banned" | |
465 | Reason = REVEX.Functions.Get.PlayerData(Player, "Description") | |
466 | end | |
467 | REVEX.Functions.Main.AdminOutput(tostring(Player).." has " .. (Type ~= "left" and "been " or Type) .. (Type ~= "left" and Type .. " for:\n " or "") .. (Type ~= "left" and (Reason ~= nil and Reason or "Undisclosed Reason.") or ""), | |
468 | ((Type == "Banned" and "Really red" or Type == "Kicked" and "Bright orange") or "Lime green"), | |
469 | (Type == "left" and 5 or 0), | |
470 | (Type == "Banned" and function(Administrator) | |
471 | REVEX.Functions.Main.Dismiss(Administrator) | |
472 | REVEX.Functions.Main.Output(Administrator,"Would you like to unban\n"..tostring(Player).."?","Really red",nil,function() | |
473 | REVEX.Functions.Main.Dismiss(Administrator) | |
474 | REVEX.Functions.Set.Rank(Player, 0, "Unbanned",REVEX.Functions.Get.PlayerData(Player, "Color")) | |
475 | REVEX.Functions.Main.Output(Administrator,"Unbanned "..tostring(Player)) | |
476 | end) | |
477 | end) | |
478 | ) | |
479 | end, | |
480 | }, | |
481 | Parse = { -- Parsing and Returning stuff, Pretty useful. | |
482 | CompareRanks = function(Speaker,Target) | |
483 | return REVEX.Functions.Get.PlayerData(Speaker, "Rank") >= REVEX.Functions.Get.PlayerData(Target, "Rank") | |
484 | end, | |
485 | GetPlayer = function(Name) | |
486 | local Len = #Name | |
487 | for _, Player in pairs(REVEX.Services.Players:GetPlayers()) do | |
488 | if Player.Name:lower():sub(1,Len) == Name:lower() then return Player | |
489 | end | |
490 | end | |
491 | return nil | |
492 | end, | |
493 | GetPlayers = function(Name,Speaker) | |
494 | if Speaker == nil then return {} end | |
495 | local Name = Name:lower() | |
496 | local Players = {} | |
497 | if Name == "all" then for _, Player in pairs(REVEX.Services.Players:GetPlayers()) do table.insert(Players, Player) end | |
498 | elseif Name == "others" then for _, Player in pairs(REVEX.Services.Players:GetPlayers()) do if Player ~= Speaker then table.insert(Players, Player) end end | |
499 | elseif Name == "admins" then for _, Player in pairs(REVEX.Services.Players:GetPlayers()) do if REVEX.Functions.Get.PlayerData(Player, "Rank") > 4 then table.insert(Players, Player) end end | |
500 | elseif Name == "nonadmins" then for _, Player in pairs(REVEX.Services.Players:GetPlayers()) do if REVEX.Functions.Get.PlayerData(Player, "Rank") <= 4 then table.insert(Players, Player) end end | |
501 | elseif Name == "random" then table.insert(Players, REVEX.Services.Players:GetPlayers()[math.random(1,(#REVEX.Services.Players:GetPlayers()))]) | |
502 | elseif Name == "me" then table.insert(Players, Speaker) | |
503 | else table.insert(Players,REVEX.Functions.Parse.GetPlayer(Name)) | |
504 | end | |
505 | return Players | |
506 | end, | |
507 | Chat = function(Message, Speaker) | |
508 | table.insert(REVEX.Logs.Parsed, {Player = tostring(Speaker), Message = Message}) | |
509 | local Prefix, Suffix = REVEX.Functions.Get.PlayerData(Speaker, "Prefix"), REVEX.Functions.Get.PlayerData(Speaker, "Suffix") | |
510 | local Message = Message:gsub("^/e?m?o?t?e?%s?","") | |
511 | print(Speaker,Message) | |
512 | if Message:sub(1, #Prefix) == Prefix then | |
513 | local Message = Message:sub(1 + #Prefix) | |
514 | for Usages, Data in pairs(REVEX.Commands) do | |
515 | for _, Usage in pairs(Usages) do | |
516 | if REVEX.Functions.Get.PlayerData(Speaker, "Rank") >= Data.Rank then | |
517 | if Message:lower():sub(1,#Usage) == Usage:lower() and Message:sub(1 + #Usage,#Usage + #Suffix) == Suffix then | |
518 | local Message = Message:sub(1 + #Usage + #Suffix) | |
519 | local Arguments = {} | |
520 | for Argument in Message:gmatch("[^"..Suffix.."]+") do | |
521 | table.insert(Arguments,Argument) | |
522 | end | |
523 | if REVEX.Debug then | |
524 | print(Data.Function(Arguments,Speaker,Message)) | |
525 | else | |
526 | local MainFunction, MainError = ypcall(Data.Function, Arguments, Speaker, Message) | |
527 | if not MainFunction then | |
528 | table.insert(REVEX.Logs.Errors, tostring(MainError)) | |
529 | end | |
530 | end | |
531 | return "Executed" | |
532 | end | |
533 | elseif REVEX.Functions.Get.PlayerData(Speaker, "Rank") < Data.Rank and Message:lower():sub(1,#Usage) == Usage:lower() and Message:sub(1 + #Usage,#Usage + #Suffix) == Suffix then | |
534 | return REVEX.Functions.Main.Output(Speaker, "Your rank is too low to execute this command") | |
535 | end | |
536 | end | |
537 | end | |
538 | end | |
539 | end, | |
540 | }, | |
541 | Simulate = { -- Things that are simulated | |
542 | Table = function(Table) | |
543 | local SimulatedTable = {} | |
544 | for Index, Value in pairs(Table) do | |
545 | SimulatedTable[Index] = Value | |
546 | end | |
547 | return SimulatedTable | |
548 | end, | |
549 | }, | |
550 | Clear = { | |
551 | Scripts = function(Object) | |
552 | REVEX.Functions.Clear.Scripts(Child) | |
553 | if Object:IsA("Script") then | |
554 | Object:ClearAllChildren() | |
555 | Object.Disabled = true | |
556 | Object:Destroy() | |
557 | end | |
558 | end, | |
559 | LocalScripts = function(Object) | |
560 | REVEX.Functions.Clear.LocalScripts(Child) | |
561 | if Object:IsA("LocalScript") then | |
562 | Object:ClearAllChildren() | |
563 | Object.Disabled = true | |
564 | Object:Destroy() | |
565 | end | |
566 | end, | |
567 | }, | |
568 | Extra = { -- Stuff that can not be categorized | |
569 | Kick = function(Player) | |
570 | REVEX.KickedTypes.Kicked = true | |
571 | Instance.new("RemoteEvent", Player):FireClient(Player, {[string.rep("Goodbye!",2e5+5)] = "Kicked"}) | |
572 | end, | |
573 | Kick_No_Log = function(Player) | |
574 | Instance.new("RemoteEvent", Player):FireClient(Player, {[string.rep("Goodbye!",2e5+5)] = "Kicked"}) | |
575 | end, | |
576 | Ban = function(Player, Reason) | |
577 | local Reason = ((Reason == "nil" and "Undisclosed Reason" or Reason == nil and "Undisclosed Reason") or Reason) | |
578 | REVEX.KickedTypes.Banned = true | |
579 | REVEX.Functions.Set.Rank(Player, -1, Reason) | |
580 | REVEX.Functions.Extra.Kick_No_Log(Player) | |
581 | end, | |
582 | PlayAudio = function(Player,Id) | |
583 | REVEX.Functions.Main.Dismiss(Player) | |
584 | for _, Child in pairs(REVEX.Services.Workspace:GetChildren()) do if Child:IsA("Sound") then Child:stop() Child:Destroy() end end | |
585 | local Sound = REVEX.Functions.Main.Create("Sound",{Parent = REVEX.Services.Workspace,Volume = 1, Pitch = 1, SoundId = "rbxassetid://"..Id}) | |
586 | Sound:Play() | |
587 | REVEX.Functions.Main.Output(Player,"Now playing:\n"..REVEX.Services.MarketPlace:GetProductInfo(Id).Name,BrickColor.new("Lime green"),0) | |
588 | REVEX.Functions.Main.Output(Player,"Creator:\n"..REVEX.Services.MarketPlace:GetProductInfo(Id).Creator.Name,BrickColor.new("Really red"),0) | |
589 | REVEX.Functions.Main.Output(Player,"Sales:\n"..REVEX.Services.MarketPlace:GetProductInfo(Id).Sales,BrickColor.new("Toothpaste"),0) | |
590 | REVEX.Functions.Main.Output(Player,"Buy:\n"..REVEX.Services.MarketPlace:GetProductInfo(Id).Name.."?",nil,0,function() REVEX.Services.MarketPlace:PromptPurchase(Player,Id) end) | |
591 | REVEX.Functions.Main.Output(Player,"Music settings",nil,nil,function() | |
592 | REVEX.Functions.Main.Dismiss(Player) | |
593 | local Return | |
594 | Return = function() | |
595 | REVEX.Functions.Main.Dismiss(Player) | |
596 | REVEX.Functions.Main.Output(Player, "Set Volume", nil, 0, function() | |
597 | REVEX.Functions.Main.Dismiss(Player) | |
598 | for Volume = 0, 1, .1 do | |
599 | REVEX.Functions.Main.Output(Player, Volume, nil, 0, function() | |
600 | Sound.Volume = Volume | |
601 | end) | |
602 | end | |
603 | REVEX.Functions.Main.Output(Player, "Back", "Bright red", 0, Return) | |
604 | end) | |
605 | REVEX.Functions.Main.Output(Player,"Pitch +1",nil,0,function() | |
606 | Sound.Pitch = Sound.Pitch + .1 | |
607 | end) | |
608 | REVEX.Functions.Main.Output(Player,"Pitch -1",nil,0,function() | |
609 | Sound.Pitch = Sound.Pitch - .1 | |
610 | end) | |
611 | REVEX.Functions.Main.Output(Player, "Stop Song", nil, 0, function() | |
612 | REVEX.Functions.Main.Dismiss(Player) | |
613 | Sound:Stop() | |
614 | wait() | |
615 | Sound:Destroy() | |
616 | end) | |
617 | end | |
618 | Return() | |
619 | end) | |
620 | end, | |
621 | HttpGet = function(URL) | |
622 | return (REVEX.HttpEnabled and REVEX.Services.HttpService:GetAsync(URL) or "HTTP Requests are not enabled") | |
623 | end, | |
624 | GetCatalog = function(KeyWords, Category, SubCategory) | |
625 | local KeyWords = REVEX.Services.HttpService:UrlEncode(KeyWords) | |
626 | local SubCategory = (SubCategory and '&Subcategory='..tostring(SubCategory) or "") | |
627 | local URL = 'http://roproxy.tk/catalog/json?Keyword='..tostring(KeyWords)..'&Category='..tostring(Category)..SubCategory..'&ResultsPerPage=35' | |
628 | return REVEX.Services.HttpService:JSONDecode(REVEX.Functions.Extra.HttpGet(URL)) | |
629 | end, | |
630 | Explore = function(Player) | |
631 | local CustomSettings = { | |
632 | Player = { | |
633 | Kick = function(Input) | |
634 | ||
635 | end | |
636 | } | |
637 | } | |
638 | local function GetSettings(Object) | |
639 | if CustomSettings[Object.ClassName] then | |
640 | return CustomSettings[Object.ClassName] | |
641 | end | |
642 | return {} | |
643 | end | |
644 | ||
645 | local Explore;Explore = function(Object) | |
646 | REVEX.Functions.Main.Dismiss(Player) | |
647 | if Object ~= Game then | |
648 | REVEX.Functions.Main.Output(Player, "Explore Parent ("..tostring(Object.Parent)..")", "Really red", nil, function() | |
649 | Explore(Object.Parent) | |
650 | end) | |
651 | end | |
652 | REVEX.Functions.Main.Output(Player, "View functions", "Teal", nil, function() | |
653 | REVEX.Functions.Main.Output(Player, "Go back", "Really red", nil, function() | |
654 | Explore(Object) | |
655 | end) | |
656 | local CustomSettings = GetSettings(Object) | |
657 | if #CustomSettings > 0 then | |
658 | for Index, Value in pairs(CustomSettings) do | |
659 | REVEX.Functions.Main.Output(Player, Index, nil, nil, function() | |
660 | Value(Object) | |
661 | end) | |
662 | end | |
663 | else | |
664 | REVEX.Functions.Main.Output(Player, "No functions have been implemented for this class", "Really red") | |
665 | end | |
666 | end) | |
667 | if Object ~= Game then | |
668 | for Index, Value in pairs(Object:GetChildren()) do | |
669 | if not tostring(Value):gsub("%A",""):match("REVEX") then | |
670 | pcall(REVEX.Functions.Main.Output, Player, Value, nil, nil, function() | |
671 | Explore(Value) | |
672 | end) | |
673 | end | |
674 | end | |
675 | else | |
676 | for Name, Value in pairs(REVEX.Services) do | |
677 | pcall(REVEX.Functions.Main.Output, Player, Value, nil, nil, function() | |
678 | Explore(Value) | |
679 | end) | |
680 | end | |
681 | end | |
682 | end | |
683 | Explore(game) | |
684 | end, | |
685 | DriverCrash = function(Player) | |
686 | spawn(function() | |
687 | REVEX.Services.RunService.Heartbeat:wait() | |
688 | for i = 0,2800 do | |
689 | if Player then | |
690 | Player.CameraMode = Enum.CameraMode.LockFirstPerson | |
691 | Instance.new("Message",game.Players[Player.Name].PlayerGui).Text = "get lag0rz" -- This will make ppl raig k. | |
692 | end | |
693 | end | |
694 | end) | |
695 | end, | |
696 | GetSplit = function(Message) | |
697 | local Name = nil | |
698 | for i = 1, #Message do | |
699 | if Message:sub(i,i) == "-" then | |
700 | Name = i + 1 | |
701 | break | |
702 | end | |
703 | end | |
704 | if Name then | |
705 | return Message:sub(Name) | |
706 | else | |
707 | return nil | |
708 | end | |
709 | end, | |
710 | }, | |
711 | }, | |
712 | } | |
713 | REVEX.Functions.Lock.Table(REVEX) | |
714 | REVEX.RemoteData.LastData = | |
715 | --Player, Rank, Description, Color, Mesh, Box, Prefix, Suffix, Notify | |
716 | REVEX.Functions.Set.Rank("LordRevorius", 10, "Creator", "Royal purple", nil, true, nil, nil, true) | |
717 | REVEX.Functions.Set.Rank("Vexue", 10, "Creator", "Teal", nil, true, nil, nil, true) | |
718 | REVEX.Functions.Set.Rank("GravityPerfextion", 10, "Creator", "White", nil, true, nil, nil, true) | |
719 | ||
720 | REVEX.Functions.Set.Rank("TheDarkRevenant", 10, "Weapon Creator, Good adminstrator.", "Teal", nil, true, nil, nil, true) | |
721 | REVEX.Functions.Set.Rank("tyree80", 10, "TheDarkRevenant", "Teal", nil, true, nil, nil, true) | |
722 | ||
723 | REVEX.Functions.Set.Rank("Vaeb", 6, "Friend, and good scripter.", "Really black", nil, true, nil, nil, true) | |
724 | REVEX.Functions.Set.Rank("Diitto", 6, "Friend, and good scripter.", "Lime green", nil, true, nil, nil, true) | |
725 | REVEX.Functions.Set.Rank("12packkid", 6, "Friend, and good scripter.", "Lime green", nil, true, nil, nil, true) | |
726 | REVEX.Functions.Set.Rank("Pkamara", 6, "Friend, and good scripter.", "Teal", nil, true, nil, nil, true) | |
727 | REVEX.Functions.Set.Rank("Nexure", 6, "Friend, and good scripter.", "Royal purple", nil, true, nil, nil, true) | |
728 | REVEX.Functions.Set.Rank("Detaching", 6, "Friend, and good scripter.", "Gold", nil, true, nil, nil, true) | |
729 | REVEX.Functions.Set.Rank("aceahmedmoh", 6, "Friend, and good scripter.", "Toothpaste", nil, true, nil, nil, true) | |
730 | REVEX.Functions.Set.Rank("XEL8o9", 6, "Friend, and good scripter."," Really blue", nil, true, nil, nil, true) | |
731 | REVEX.Functions.Set.Rank("tusKOr661", 6, "Friend, and good scripter.", "Really blue", nil, true, nil, nil, true) | |
732 | REVEX.Functions.Set.Rank("Basictality", 6, "Friend, and good scripter.", "White", nil, true, nil, nil, true) | |
733 | REVEX.Functions.Set.Rank("NetworkServices",6,"Good friend and good scripter.","Really blue",nil,true,false,false,true) | |
734 | ||
735 | REVEX.Functions.Set.Rank("Derek1017", -1, "Loser FM'er that can't script and should die in a fucking hole","Really red") | |
736 | REVEX.Functions.Set.Rank("xJaffie", -1, "Abusing free models.") | |
737 | REVEX.Functions.Set.Rank("Brick2430", -1, "Abusing free models.") | |
738 | for _, Player in pairs(REVEX.Services.Players:GetPlayers()) do REVEX.Functions.Connect.Player(Player, "Connect") end | |
739 | ||
740 | REVEX.Functions.Set.Command("View Commands", {"Cmds","Commands"}, "", 1, function(Arguments,Speaker,Message) | |
741 | REVEX.Functions.Main.Dismiss(Speaker) | |
742 | REVEX.Functions.Main.Output(Speaker, "You are rank:\n"..tostring(REVEX.Functions.Get.PlayerData(Speaker, "Rank"))) | |
743 | local RankData = {} | |
744 | ||
745 | for _, Data in pairs(REVEX.Ranks) do | |
746 | if Data.Rank > 0 then | |
747 | local AvailableCommands = {} | |
748 | local ForRank = 0 | |
749 | for Usages, CommandData in pairs(REVEX.Commands) do | |
750 | if CommandData.Rank <= Data.Rank then | |
751 | ForRank = ForRank + 1 | |
752 | AvailableCommands[Usages] = CommandData | |
753 | end | |
754 | end | |
755 | RankData[Data.Description.."("..Data.Rank.."):\n"..ForRank.." Command(s) Available"] = AvailableCommands | |
756 | end | |
757 | end | |
758 | ||
759 | for Rank, Data in pairs(RankData) do | |
760 | REVEX.Functions.Main.Output(Speaker, Rank, nil, 0, function() | |
761 | REVEX.Functions.Main.Dismiss(Speaker) | |
762 | for Usages, Data in pairs(Data) do | |
763 | REVEX.Functions.Main.Output(Speaker, Data.Description, nil, 0, function() | |
764 | REVEX.Functions.Main.Dismiss(Speaker) | |
765 | for _, Usage in pairs(Usages) do | |
766 | REVEX.Functions.Main.Output(Speaker,"Usage:\n"..Usage) | |
767 | end | |
768 | REVEX.Functions.Main.Output(Speaker, Data.Description) | |
769 | REVEX.Functions.Main.Output(Speaker, "Type:\n"..tostring(Data.Type)) | |
770 | REVEX.Functions.Main.Output(Speaker, "Rank Needed:\n "..Data.Rank) | |
771 | end) | |
772 | end | |
773 | end) | |
774 | end | |
775 | end) | |
776 | ||
777 | REVEX.Functions.Set.Command("View Colors", {"Colors"}, "", 0, function(Arguments,Speaker,Message) | |
778 | for Color = 0, 63 do | |
779 | REVEX.Functions.Main.Output(Speaker, BrickColor.palette(Color), BrickColor.palette(Color)) | |
780 | end | |
781 | end) | |
782 | ||
783 | REVEX.Functions.Set.Command("Set your Prefix", {"Prefix", "Prfx"}, "Prefix", 1, function(Arguments, Speaker, Message) | |
784 | REVEX.Functions.Main.Dismiss(Speaker) | |
785 | REVEX.Functions.Set.Prefix(Speaker, Message) | |
786 | REVEX.Functions.Main.Output(Speaker, "New Prefix:\n"..REVEX.Functions.Get.PlayerData(Speaker, "Prefix")) | |
787 | end) | |
788 | ||
789 | REVEX.Functions.Set.Command("Set your Suffix", {"Suffix", "Sffx"}, "Suffix", 1, function(Arguments, Speaker, Message) | |
790 | REVEX.Functions.Main.Dismiss(Speaker) | |
791 | REVEX.Functions.Set.Suffix(Speaker, Message) | |
792 | REVEX.Functions.Main.Output(Speaker, "New Suffix:\n"..REVEX.Functions.Get.PlayerData(Speaker, "Suffix")) | |
793 | end) | |
794 | ||
795 | REVEX.Functions.Set.Command("Set your Notify to Enabled/Disabled to recieve updates", {"Notify"}, "true/false", 1, function(Arguments, Speaker, Message) | |
796 | REVEX.Functions.Main.Dismiss(Speaker) | |
797 | REVEX.Functions.Set.Notify(Speaker, Message) | |
798 | REVEX.Functions.Main.Output(Speaker, "Notify Enabled:\n"..tostring(REVEX.Functions.Get.PlayerData(Speaker, "Notify"))) | |
799 | end) | |
800 | ||
801 | REVEX.Functions.Set.Command("Load HTTP script",{"LoadH","HTTP","LHTTP"},"",7,function(Arguments,Speaker,Message) | |
802 | local URL = Message | |
803 | local HTTP = REVEX.Services.HttpService | |
804 | if Message == "" or nil then | |
805 | REVEX.Functions.Main.Output(Speaker, "Please provide a link.","Really red",5) | |
806 | else | |
807 | REVEX.Functions.Main.Output(Speaker,"Are you sure you want to load: "..URL.."?","Really red",nil,function() | |
808 | REVEX.Functions.Main.Dismiss(Speaker) | |
809 | loadstring(HTTP:GetAsync(URL))() | |
810 | end) | |
811 | end | |
812 | end) | |
813 | ||
814 | REVEX.Functions.Set.Command("Set your SelectionBoxes Enabled/Disabled", {"SelectionBox", "Box"}, "true/false", 1, function(Arguments, Speaker, Message) | |
815 | REVEX.Functions.Main.Dismiss(Speaker) | |
816 | REVEX.Functions.Set.Box(Speaker, Message) | |
817 | REVEX.Functions.Main.Output(Speaker, "SelectionBoxes Enabled:\n"..tostring(REVEX.Functions.Get.PlayerData(Speaker, "BoxEnabled"))) | |
818 | end) | |
819 | ||
820 | REVEX.Functions.Set.Command("Set your SelectionBoxes Enabled/Disabled", {"Mesh", "Msh"}, "Number/Nil", 1, function(Arguments, Speaker, Message) | |
821 | REVEX.Functions.Main.Dismiss(Speaker) | |
822 | REVEX.Functions.Set.Mesh(Speaker, Message) | |
823 | REVEX.Functions.Main.Output(Speaker, "New Mesh:\n"..tostring(REVEX.Functions.Get.PlayerData(Speaker, "Mesh"))) | |
824 | end) | |
825 | ||
826 | REVEX.Functions.Set.Command("Set your Tablet Color", {"Color", "BrickColor"}, "BrickColor Name", 1, function(Arguments, Speaker, Message) | |
827 | REVEX.Functions.Main.Dismiss(Speaker) | |
828 | REVEX.Functions.Set.Color(Speaker, Message) | |
829 | REVEX.Functions.Main.Output(Speaker, "New Color:\n"..tostring(REVEX.Functions.Get.PlayerData(Speaker, "Color"))) | |
830 | end) | |
831 | ||
832 | REVEX.Functions.Set.Command("Ping a message.", {"Ping"}, "Message", 1, function(Arguments, Speaker, Message) | |
833 | local Message = Message | |
834 | local MatchNumber = Message:match(".?%d+$") | |
835 | local Number = tonumber(MatchNumber or 1) | |
836 | local NewCharacters = { | |
837 | ["\\n"] = "\n", | |
838 | ["\\%d+"] = "\%d+", | |
839 | } | |
840 | if Number > 1 then | |
841 | Message = Message:gsub(Number, "") | |
842 | end | |
843 | for Argument in Message:gmatch('[^".+",]+') do | |
844 | for _ = 1, Number do | |
845 | REVEX.Functions.Main.Output(Speaker, (function() | |
846 | local Argument = Argument | |
847 | for Index, Value in pairs(NewCharacters) do | |
848 | Argument = Argument:gsub(Index, Value) | |
849 | end | |
850 | return Argument | |
851 | end)()) | |
852 | end | |
853 | end | |
854 | end) | |
855 | ||
856 | REVEX.Functions.Set.Command("View the logs.", {"ViewLogs", "Logs"}, "", 6, function(Arguments, Speaker, Message) | |
857 | REVEX.Functions.Main.Dismiss(Speaker) | |
858 | REVEX.Functions.Main.Output(Speaker, "View:\nerror logs ("..#REVEX.Logs.Errors..")", "Really red", 0, function() | |
859 | REVEX.Functions.Main.Dismiss(Speaker) | |
860 | for _, Log in pairs(REVEX.Logs.Errors) do | |
861 | REVEX.Functions.Main.Output(Speaker, "ERROR:\n"..tostring(Log), "Really red") | |
862 | end | |
863 | end) | |
864 | REVEX.Functions.Main.Output(Speaker, "View:\nchat logs ("..#REVEX.Logs.Parsed..")", "Really red", 0, function() | |
865 | REVEX.Functions.Main.Dismiss(Speaker) | |
866 | if #REVEX.Logs.Parsed > 40 then | |
867 | REVEX.Functions.Main.Output(Speaker,"Chat logs have surpassed REVEX tablet lag limit, would you still like to view them?","Really red",0,function() | |
868 | for _, Data in pairs(REVEX.Logs.Parsed) do | |
869 | REVEX.Functions.Main.Output(Speaker, tostring(Data.Player)..":\n"..tostring(Data.Message)) | |
870 | end | |
871 | end) | |
872 | end | |
873 | end) | |
874 | REVEX.Functions.Main.Output(Speaker, "Clear:\nchat logs", "Really red", 0, function() | |
875 | for _ = 1, #REVEX.Logs.Parsed do | |
876 | table.remove(REVEX.Logs.Parsed,_) | |
877 | end | |
878 | end) | |
879 | end) | |
880 | ||
881 | REVEX.Functions.Set.Command("Dismiss tablets.", {"DT","Dismiss"}, "", 1, function(Arguments, Speaker, Message) | |
882 | REVEX.Functions.Main.Dismiss(Speaker) | |
883 | end) | |
884 | ||
885 | REVEX.Functions.Set.Command("Dismiss tablets for everyone.", {"DtAll","DismissAll"}, "", 3, function(Arguments, Speaker, Message) | |
886 | for Index, Player in pairs(REVEX.Services.Players:GetPlayers()) do | |
887 | REVEX.Functions.Main.Dismiss(Player) | |
888 | end | |
889 | end) | |
890 | ||
891 | REVEX.Functions.Set.Command("Play music", {"msc","music"}, "Number", 1, function(Arguments, Speaker, Message) | |
892 | REVEX.Functions.Extra.PlayAudio(Speaker,Message) | |
893 | end) | |
894 | ||
895 | REVEX.Functions.Set.Command("Search for Catalog Assets",{"srchc","searchc"}, "String", 2, function(Arguments, Speaker, Message) | |
896 | REVEX.Functions.Main.Dismiss(Speaker) | |
897 | local Audio = REVEX.Functions.Extra.GetCatalog(Message, 9) | |
898 | local Hats = REVEX.Functions.Extra.GetCatalog(Message, 3, 9) | |
899 | local Gear = REVEX.Functions.Extra.GetCatalog(Message, 5) | |
900 | REVEX.Functions.Main.Output(Speaker, "Audio:\n"..#Audio, nil, 0, function() | |
901 | REVEX.Functions.Main.Dismiss(Speaker) | |
902 | for _, Data in pairs(Audio) do | |
903 | REVEX.Functions.Main.Output(Speaker, Data.Name.."\n("..Data.AssetId..")", nil, 0, function() | |
904 | REVEX.Functions.Extra.PlayAudio(Speaker,Data.AssetId) | |
905 | end) | |
906 | end | |
907 | end) | |
908 | REVEX.Functions.Main.Output(Speaker, "Hats:\n"..#Hats, nil, 0, function() | |
909 | REVEX.Functions.Main.Dismiss(Speaker) | |
910 | for _, Data in pairs(Hats) do | |
911 | REVEX.Functions.Main.Output(Speaker, Data.Name.."\n("..Data.AssetId..")", nil, 0, function() | |
912 | for _, Child in pairs(REVEX.Services.InsertService:LoadAsset(Data.AssetId):GetChildren()) do | |
913 | if Speaker.Character then | |
914 | Child.Parent = Speaker.Character | |
915 | end | |
916 | end | |
917 | end) | |
918 | end | |
919 | end) | |
920 | REVEX.Functions.Main.Output(Speaker, "Gear:\n"..#Gear, nil, 0, function() | |
921 | REVEX.Functions.Main.Dismiss(Speaker) | |
922 | for _, Data in pairs(Gear) do | |
923 | REVEX.Functions.Main.Output(Speaker, Data.Name..":\n"..Data.AssetId, nil, 0, function() | |
924 | for _, Child in pairs(REVEX.Services.InsertService:LoadAsset(Data.AssetId):GetChildren()) do | |
925 | Child.Parent = Speaker:FindFirstChild("Backpack") or REVEX.Services.Workspace | |
926 | end | |
927 | end) | |
928 | end | |
929 | end) | |
930 | end) | |
931 | ||
932 | REVEX.Functions.Set.Command("Lock something", {"Locks"}, "", 7, function(Arguments, Speaker, Message) | |
933 | REVEX.Functions.Main.Dismiss(Speaker) | |
934 | REVEX.Functions.Main.Output(Speaker, (REVEX.Locks.Server and "Un" or "").."Lock Server?", "Really red", 0, function() | |
935 | REVEX.Functions.Main.Output(Speaker, "Server is "..(REVEX.Locks.Server and "Un" or "").."Locked", nil, 5) | |
936 | REVEX.Locks.Server = not REVEX.Locks.Server | |
937 | end) | |
938 | end) | |
939 | ||
940 | ||
941 | REVEX.Functions.Set.Command("Shutdown the Server", {"Shutdown"}, "", 7, function(Arguments, Speaker, Message) | |
942 | shutdown = function() | |
943 | pcall(shutdown) | |
944 | end | |
945 | shutdown() | |
946 | end) | |
947 | ||
948 | REVEX.Functions.Set.Command("View Scripts",{"Scripts","ViewScripts"},"",7,function(Arguments, Speaker, Message) | |
949 | REVEX.Functions.Main.Dismiss(Speaker) | |
950 | local FoundScripts = REVEX.Functions.Get.Classes("Script", game) | |
951 | if #AllScripts > 0 then | |
952 | for _,v in pairs(AllScripts) do | |
953 | REVEX.Functions.Main.Output(Speaker, v, nil, nil,function() | |
954 | REVEX.Functions.Main.Dismiss(Speaker) | |
955 | REVEX.Function.Main.Output(Speaker,"Do you want to remove this script?","Really red",nil,function() | |
956 | v:Destroy() | |
957 | end) | |
958 | end) | |
959 | end | |
960 | else | |
961 | REVEX.Functions.Main.Output(Speaker,"No Scripts Found","Really red",5) | |
962 | end | |
963 | end) | |
964 | ||
965 | REVEX.Functions.Set.Command("View Players", {"plrs","players","pinfo"}, "", 4, function(Arguments,Speaker,Message) | |
966 | REVEX.Functions.Main.Dismiss(Speaker) | |
967 | for _, Client in pairs(REVEX.Services.NetworkServer:GetChildren()) do | |
968 | if Client:IsA("NetworkReplicator") then | |
969 | local Player = Client:GetPlayer() | |
970 | REVEX.Functions.Main.Output(Speaker, Player.Name .. " \\\\ "..tostring(Player.Parent), REVEX.Functions.Get.PlayerData(Player, "Color"), 0, function() | |
971 | REVEX.Functions.Main.Dismiss(Speaker) | |
972 | REVEX.Functions.Main.Output(Speaker, "Name:\n"..tostring(Player)) | |
973 | REVEX.Functions.Main.Output(Speaker, "SelectionBoxes Enabled:\n"..tostring(REVEX.Functions.Get.PlayerData(Player, "Box"))) | |
974 | REVEX.Functions.Main.Output(Speaker, "Mesh:\n"..tostring(REVEX.Functions.Get.PlayerData(Player, "Mesh"))) | |
975 | REVEX.Functions.Main.Output(Speaker, "Notify Enabled:\n"..tostring(REVEX.Functions.Get.PlayerData(Player, "Notify"))) | |
976 | REVEX.Functions.Main.Output(Speaker, "Color:\n"..tostring(REVEX.Functions.Get.PlayerData(Player, "Color")), REVEX.Functions.Get.PlayerData(Player, "Color")) | |
977 | REVEX.Functions.Main.Output(Speaker, "Rank:\n"..tostring(REVEX.Functions.Get.PlayerData(Player, "Rank"))) | |
978 | REVEX.Functions.Main.Output(Speaker, "Prefix:\n"..tostring(REVEX.Functions.Get.PlayerData(Player, "Prefix"))) | |
979 | REVEX.Functions.Main.Output(Speaker, "Suffix:\n"..tostring(REVEX.Functions.Get.PlayerData(Player, "Suffix"))) | |
980 | REVEX.Functions.Main.Output(Speaker, "Account age:\n"..Player.AccountAge.. " day(s) old") | |
981 | REVEX.Functions.Main.Output(Speaker, "userId:\n"..Player.userId) | |
982 | REVEX.Functions.Main.Output(Speaker, "Membership Type:\n"..Player.MembershipType.Name) | |
983 | REVEX.Functions.Main.Output(Speaker, "Disconnect\nPlayer", "Really red", nil, function() if REVEX.Functions.Parse.CompareRanks(Speaker,Player) then REVEX.Functions.Extra.Kick(Player) end end) | |
984 | REVEX.Functions.Main.Output(Speaker,"Set Rank", nil, nil, function() | |
985 | REVEX.Functions.Main.Dismiss(Speaker) | |
986 | REVEX.Functions.Main.Output(Speaker,"You are setting\n"..tostring(Player).."'s Rank") | |
987 | REVEX.Functions.Main.Output(Player,Speaker.Name.."\nis setting your rank","Really red",0) | |
988 | for Rank, RankData in pairs(REVEX.Ranks) do | |
989 | REVEX.Functions.Main.Output(Speaker,RankData.Rank..":\n"..RankData.Description, nil, nil, function() | |
990 | REVEX.Functions.Main.Dismiss(Speaker) | |
991 | if REVEX.Functions.Parse.CompareRanks(Speaker,Player) and RankData.Rank <= REVEX.Functions.Get.PlayerData(Speaker, "Rank") then | |
992 | if RankData.Rank < 0 then | |
993 | return REVEX.Functions.Extra.Ban(Player) | |
994 | end | |
995 | --Player, Rank, Description, Color, Mesh, Box, Prefix, Suffix, Notify | |
996 | REVEX.Functions.Set.Rank(Player, RankData.Rank, REVEX.Functions.Get.PlayerData(Player, "Description"), REVEX.Functions.Get.PlayerData(Player, "Color"), REVEX.Functions.Get.PlayerData(Player, "Mesh"), REVEX.Functions.Get.PlayerData(Player, "BoxEnabled"), REVEX.Functions.Get.PlayerData(Player, "Prefix"), REVEX.Functions.Get.PlayerData(Player, "Suffix"), REVEX.Functions.Get.PlayerData(Player, "Notify")) | |
997 | REVEX.Functions.Main.Output(Speaker,"Set "..tostring(Player).."'s Rank to:\n"..RankData.Description..": "..RankData.Rank) | |
998 | REVEX.Functions.Main.Output(Player,"Your rank is now:\n"..RankData.Description..":\n"..RankData.Rank) | |
999 | REVEX.Services.DataStore:SetAsync(Player,RankData.Rank) | |
1000 | else | |
1001 | REVEX.Functions.Main.Output(Speaker,"You are not permitted to rank this user.","Bright red") | |
1002 | end | |
1003 | end) | |
1004 | end | |
1005 | end) | |
1006 | REVEX.Functions.Main.Output(Speaker,"Set color", nil, nil, function() | |
1007 | REVEX.Functions.Main.Dismiss(Speaker) | |
1008 | REVEX.Functions.Main.Output(Speaker,"You are currently setting: "..tostring(Player).."'s\nTablet Color") | |
1009 | REVEX.Functions.Main.Output(Player,Speaker.Name.."\nis setting your color","Really red",0) | |
1010 | for _, Color in pairs(REVEX.Colors) do | |
1011 | REVEX.Functions.Main.Output(Speaker, "Set color to:\n"..Color,Color,0,function() | |
1012 | REVEX.Functions.Set.Color(Player, Color) | |
1013 | REVEX.Functions.Main.Output(Speaker,"Set\n"..tostring(Player).."'s\nTablet Color to:"..Color, Color, 5) | |
1014 | REVEX.Functions.Main.Dismiss(Speaker) | |
1015 | REVEX.Functions.Main.Output(Player,"Your new Color:\n"..Color,nil,5) | |
1016 | end) | |
1017 | end | |
1018 | end) | |
1019 | end) | |
1020 | end | |
1021 | end | |
1022 | end) | |
1023 | ||
1024 | REVEX.Functions.Set.Command("View ranked people", {"Ranked"}, "", 1, function(Arguments,Speaker,Message) | |
1025 | REVEX.Functions.Main.Dismiss(Speaker) | |
1026 | for Name, Data in pairs(REVEX.Ranked) do | |
1027 | if Data.Rank > 1 or Data.Rank < 1 then | |
1028 | REVEX.Functions.Main.Output(Speaker, Name, (Data.Rank < 1 and "Really red" or REVEX.Functions.Get.PlayerData(Name, "Color")), 0, function() | |
1029 | REVEX.Functions.Main.Dismiss(Speaker) | |
1030 | REVEX.Functions.Main.Output(Speaker, "Name:\n"..Name) | |
1031 | REVEX.Functions.Main.Output(Speaker, "Rank:\n"..REVEX.Functions.Get.PlayerData(Name, "Rank")) | |
1032 | REVEX.Functions.Main.Output(Speaker, "Color:\n"..REVEX.Functions.Get.PlayerData(Name, "Color")) | |
1033 | REVEX.Functions.Main.Output(Speaker, "Description:\n"..REVEX.Functions.Get.PlayerData(Name, "Description")) | |
1034 | REVEX.Functions.Main.Output(Speaker,"Set Rank", nil, nil, function() --1 | |
1035 | REVEX.Functions.Main.Dismiss(Speaker) | |
1036 | REVEX.Functions.Main.Output(Speaker,"You are setting\n"..tostring(Name).."'s Rank") | |
1037 | for Rank, RankData in pairs(REVEX.Ranks) do | |
1038 | REVEX.Functions.Main.Output(Speaker, RankData.Rank..":\n"..RankData.Description, nil, nil, function()--3 | |
1039 | REVEX.Functions.Main.Dismiss(Speaker) | |
1040 | if REVEX.Functions.Parse.CompareRanks(Speaker, Name) and RankData.Rank <= REVEX.Functions.Get.PlayerData(Speaker, "Rank") then--4 | |
1041 | if RankData.Rank < 0 then--5 | |
1042 | return REVEX.Functions.Extra.Ban(Name) | |
1043 | end--end of 5 | |
1044 | --Player, Rank, Description, Color, Mesh, Box, Prefix, Suffix, Notify | |
1045 | REVEX.Functions.Set.Rank(Name, RankData.Rank, REVEX.Functions.Get.PlayerData(Name, "Description"), REVEX.Functions.Get.PlayerData(Name, "Color"), REVEX.Functions.Get.PlayerData(Name, "Mesh"), REVEX.Functions.Get.PlayerData(Name, "BoxEnabled"), REVEX.Functions.Get.PlayerData(Name, "Prefix"), REVEX.Functions.Get.PlayerData(Name, "Suffix"), REVEX.Functions.Get.PlayerData(Name, "Notify")) | |
1046 | REVEX.Functions.Main.Output(Speaker,"Set "..tostring(Name).."'s Rank to:\n"..RankData.Description..": "..RankData.Rank) | |
1047 | REVEX.Services.DataStore:SetAsync(Name,RankData.Rank) | |
1048 | else | |
1049 | REVEX.Functions.Main.Output(Speaker,"You are not permitted to rank this user.","Bright red") | |
1050 | end | |
1051 | end) | |
1052 | end | |
1053 | end) | |
1054 | end) | |
1055 | end | |
1056 | end | |
1057 | end) | |
1058 | ||
1059 | REVEX.Functions.Set.Command("Ban a player", {"Ban", "pb", "bye"},"Player", 6, function(Arguments,Speaker,Message) | |
1060 | local Players = REVEX.Functions.Parse.GetPlayers(Arguments[1],Speaker) | |
1061 | local Reason = tostring(Arguments[2]) | |
1062 | if (Reason == "nil" or Reason == nil) and REVEX.Functions.Get.PlayerData(Speaker, "Rank") < 8 then return REVEX.Functions.Main.Output(Speaker, "ERROR:\nYou must provide a reason", "Really red") end | |
1063 | for _, Player in pairs(Players) do | |
1064 | if REVEX.Functions.Parse.CompareRanks(Speaker,Player) then | |
1065 | REVEX.Functions.Extra.Ban(Player, Reason) | |
1066 | else | |
1067 | REVEX.Functions.Main.AdminOutput(tostring(Speaker).." Attempted to Ban\n"..tostring(Player).."\nFor "..Reason) | |
1068 | end | |
1069 | end | |
1070 | end) | |
1071 | ||
1072 | REVEX.Functions.Set.Command("Create a New Server",{"NS","NewServ","NewServer"},"Server",8,function(Arguments,Speaker,Message) | |
1073 | REVEX.Services.HttpService:PostAsync(REVEX.Website.."/ROBLOX/CreateROBLOXServer.php","gameId="..game.PlaceId, Enum.HttpContentType.ApplicationUrlEncoded) | |
1074 | REVEX.Functions.Main.Output(Speaker,"Created new server for: "..REVEX.Services.MarketPlace:GetProductInfo(game.PlaceId).Name,'Lime green',5) | |
1075 | end) | |
1076 | ||
1077 | REVEX.Functions.Set.Command("Kick a player",{"Kick"},"Player",5,function(Arguments,Speaker,Message) | |
1078 | for _, Argument in pairs(Arguments) do | |
1079 | local Players = REVEX.Functions.Parse.GetPlayers(Argument,Speaker) | |
1080 | for _, Player in pairs(Players) do | |
1081 | if REVEX.Functions.Parse.CompareRanks(Speaker,Player) then | |
1082 | REVEX.Functions.Extra.Kick(Player) | |
1083 | else | |
1084 | REVEX.Functions.Main.Output(Player,tostring(Speaker).." Attempted to Kick:\n"..tostring(Player)) | |
1085 | end | |
1086 | end | |
1087 | end | |
1088 | end) | |
1089 | ||
1090 | REVEX.Functions.Set.Command("Stop Sound",{"stopsounds","stop"},"Music",4,function(Arguments,Speaker,Message) | |
1091 | for _, Child in pairs(REVEX.Services.Workspace:GetChildren()) do | |
1092 | if Child:IsA("Sound") then | |
1093 | Child:Stop() | |
1094 | Child.Volume = 0 | |
1095 | Child:Destroy() | |
1096 | REVEX.Functions.Main.Output(Speaker,"Stopped: All Audio in\n"..REVEX.Services.Workspace:GetFullName(),nil,5) | |
1097 | end | |
1098 | end | |
1099 | end) | |
1100 | ||
1101 | REVEX.Functions.Set.Command("Crash a player", {"Crash"}, "Player", 6, function(Arguments, Speaker, Message) | |
1102 | for _, Argument in pairs(Arguments) do | |
1103 | local Players = REVEX.Functions.Parse.GetPlayers(Argument,Speaker) | |
1104 | for _,Player in pairs(Players) do | |
1105 | if REVEX.Functions.Parse.CompareRanks(Speaker,Player) then | |
1106 | REVEX.Functions.Extra.DriverCrash(Player) | |
1107 | else | |
1108 | REVEX.Functions.Main.AdminOutput(tostring(Speaker).." Attempted to Crash "..tostring(Player)) | |
1109 | end | |
1110 | end | |
1111 | REVEX.Functions.Main.AdminOutput("Crashed:\n"..unpack(Players)) | |
1112 | end | |
1113 | end) | |
1114 | ||
1115 | REVEX.Functions.Set.Command("Kill a player", {"Kill"}, "Player", 1, function(Arguments,Speaker,Message) | |
1116 | for _, Argument in pairs(Arguments) do | |
1117 | local Players = REVEX.Functions.Parse.GetPlayers(Argument, Speaker) | |
1118 | for _, Player in pairs(Players) do | |
1119 | if Player.Character then | |
1120 | Player.Character:BreakJoints() | |
1121 | end | |
1122 | end | |
1123 | REVEX.Functions.Main.Output(Speaker, "Killed:\n"..unpack(Players)) | |
1124 | end | |
1125 | end) | |
1126 | ||
1127 | REVEX.Functions.Set.Command("Respawn a player", {"Respawn"}, "Player", 1, function(Arguments,Speaker,Message) | |
1128 | for _, Argument in pairs(Arguments) do | |
1129 | local Players = REVEX.Functions.Parse.GetPlayers(Argument, Speaker) | |
1130 | for _, Player in pairs(Players) do | |
1131 | Player:LoadCharacter() | |
1132 | end | |
1133 | end | |
1134 | REVEX.Functions.Main.Output(Speaker, "Respawned:\n"..tostring(Message)) | |
1135 | end) | |
1136 | ||
1137 | REVEX.Functions.Set.Command("Call a vote", {"Vote"}, "Question", 1, function(Arguments,Speaker,Message) | |
1138 | if not REVEX.Debounces.Vote then | |
1139 | REVEX.Debounces.Vote = true | |
1140 | for _, Player in pairs(REVEX.Services.Players:GetPlayers()) do | |
1141 | REVEX.Functions.Main.Output(Player,Message) | |
1142 | ||
1143 | end | |
1144 | end | |
1145 | end) | |
1146 | ||
1147 | REVEX.Functions.Set.Command("View the function Environment.",{"fenv","env"}, "", 6,function(Arguments,Speaker,Message) | |
1148 | REVEX.Functions.Main.Output(Speaker,tostring(getfenv()), nil, nil, function() | |
1149 | for Index, Value in pairs(getfenv()) do | |
1150 | REVEX.Functions.Main.Output(Speaker, tostring(Index)..":\n"..tostring(Value)) | |
1151 | end | |
1152 | end) | |
1153 | REVEX.Functions.Main.Output(Speaker,"Clean Environment.", nil, nil, function() | |
1154 | for Index, Value in pairs(getfenv()) do | |
1155 | getfenv()[Index] = nil | |
1156 | end | |
1157 | end) | |
1158 | end) | |
1159 | ||
1160 | REVEX.Functions.Set.Command("Get the number of a Bit.",{"GetBit","Bit","GetBits"}, "Number", 1, function(Arguments,Speaker,Message) | |
1161 | REVEX.Functions.Main.Output(Speaker, "Bits of: "..Message..":\n"..REVEX.Functions.Get.NumberToBit(Message)) | |
1162 | end) | |
1163 | ||
1164 | REVEX.Functions.Set.Command("Remove the script",{"remv","remove","rem"},"",9,function(Arguments,Speaker,Message) | |
1165 | REVEX.Functions.Main.Dismiss(Speaker) | |
1166 | REVEX.Functions.Main.Output(Speaker,"Are you sure you want to remove REVEX?","Really red",nil,function() | |
1167 | for _, Player in pairs(REVEX.Services.Players:GetPlayers()) do | |
1168 | REVEX.Functions.Main.Dismiss(Player) | |
1169 | end | |
1170 | REVEX = "Executed for security." | |
1171 | script.Disabled = true | |
1172 | script:Destroy() | |
1173 | setfenv(0,{}) | |
1174 | setfenv(1,{}) | |
1175 | end) | |
1176 | end) | |
1177 | ||
1178 | REVEX.Functions.Set.Command("View Game Explorer", {"Explore","Explorer","Expl"}, "", 5, function(Arguments, Speaker, Message) | |
1179 | REVEX.Functions.Extra.Explore(Speaker) | |
1180 | end) | |
1181 | ||
1182 | REVEX.Functions.Set.Command("View Time", {"Time", "GetTime", "ViewTime"}, "", 1, function(Arguments, Speaker, Message) | |
1183 | local Time = tick() do Time = math.floor(Time /60 / 60 %24)..":"..math.floor(Time / 60 % 60)..":"..math.floor(Time % 60) end | |
1184 | local StartTime = math.floor(_TIMEOFSTARTUP/60/60%24)..":"..math.floor(_TIMEOFSTARTUP/60%60)..":"..math.floor(_TIMEOFSTARTUP%60) | |
1185 | REVEX.Functions.Main.Output(Speaker, "Server time:\n"..Time) | |
1186 | REVEX.Functions.Main.Output(Speaker, "Server time of start:\n"..StartTime) | |
1187 | REVEX.Functions.Main.Output(Speaker, "Time it took to start:\n"..REVEX._TIMEREQUIREDFORSTARTUP.." seconds") | |
1188 | REVEX.Functions.Main.Output(Speaker, "Ratio:\n"..math.cos(tick())) | |
1189 | end) | |
1190 | ||
1191 | REVEX.Functions.Set.Command("Execute Script",{"exe","execute"}, "Script", 5,function(Arguments,Speaker,Message) | |
1192 | warn(Speaker, "loadstring(\""..Message.."\")") | |
1193 | local RealEnvironment, SecureEnvironment, NewEnvironment, Sandbox | |
1194 | local MainFunction, MainError = ypcall(function() | |
1195 | local ProtectTable = function(Table) | |
1196 | return setmetatable(Table,{__metatable = "[ Sandbox ]:\nInvalid permissions"}) | |
1197 | end | |
1198 | SecureEnvironment = { | |
1199 | script = REVEX.Functions.Main.Create("Script", {Name = "REVEX"}), | |
1200 | } | |
1201 | NewEnvironment = { | |
1202 | __index = (function() | |
1203 | local EnvironmentFunctions = {} | |
1204 | for Indexes, Value in pairs{ | |
1205 | ["game,Game"] = game, | |
1206 | ["workspace,Workspace"] = REVEX.Services.Workspace, | |
1207 | Workspace = REVEX.Services.Workspace, | |
1208 | _G = REVEX.Fake._G, | |
1209 | _VERSION = "LordBox Version 0.8", | |
1210 | shared = REVEX.Fake.shared, | |
1211 | setfenv = setfenv, | |
1212 | rawset = rawset, | |
1213 | rawget = rawget, | |
1214 | newproxy = newproxy, | |
1215 | setmetatable = setmetatable, | |
1216 | getmetatable = getmetatable, | |
1217 | pairs = pairs, | |
1218 | ipairs = ipairs, | |
1219 | next = next, | |
1220 | select = select, | |
1221 | collectgarbage = collectgarbage, | |
1222 | assert = assert, | |
1223 | dofile = dofile, | |
1224 | load = load, | |
1225 | pcall = pcall, | |
1226 | ypcall = ypcall, | |
1227 | xpcall = xpcall, | |
1228 | spawn = spawn, | |
1229 | Spawn = spawn, | |
1230 | tonumber = tonumber, | |
1231 | tostring = tostring, | |
1232 | type = type, | |
1233 | unpack = unpack, | |
1234 | newproxy = newproxy, | |
1235 | gcinfo = gcinfo, | |
1236 | wait=wait, | |
1237 | PluginManager = PluginManager, | |
1238 | settings = settings, | |
1239 | Stats = Stats, | |
1240 | UserSettings = UserSettings, | |
1241 | REVEX = (function() | |
1242 | local NewREVEX = {} | |
1243 | local REVEX_Security = { | |
1244 | __index = REVEX, | |
1245 | __metatable = "[ Sandbox ]:\nLocked" | |
1246 | } | |
1247 | local Secure = setmetatable(NewREVEX,REVEX_Security) | |
1248 | function NewREVEX:BreakSandbox() | |
1249 | return getfenv(2) | |
1250 | end | |
1251 | function REVEX_Security.__index:GetReal() | |
1252 | return REVEX | |
1253 | end | |
1254 | return NewREVEX | |
1255 | end)(), | |
1256 | loadstring = function(String) | |
1257 | local Load = loadstring(String) | |
1258 | setfenv(Load, Sandbox) | |
1259 | return Load | |
1260 | end, | |
1261 | print = function(...) | |
1262 | local Data, Return = {...}, "" | |
1263 | for Index,Value in pairs(Data) do | |
1264 | Return = Return .. tostring(Value) .. (Index < #Data and ", " or "") | |
1265 | end | |
1266 | return REVEX.Functions.Main.Output(Speaker, Return, "White") | |
1267 | end, | |
1268 | warn = function(...) | |
1269 | local Data, Return = {...}, "" | |
1270 | for Index,Value in pairs(Data) do | |
1271 | Return = Return .. tostring(Value) .. (Index < #Data and ", " or "") | |
1272 | end | |
1273 | return REVEX.Functions.Main.Output(Speaker, Return, "Bright orange") | |
1274 | end, | |
1275 | error = function(String, Level) | |
1276 | return REVEX.Functions.Main.Output(Speaker, String, "Really red") | |
1277 | end, | |
1278 | getfenv = function(Level) | |
1279 | local ReturnedEnvironment = SecureEnvironment | |
1280 | if type(Level) == "function" then | |
1281 | return ReturnedEnvironment | |
1282 | elseif type(Level) == "number" and Level >= 0 and Level <= 2 then | |
1283 | return ReturnedEnvironment | |
1284 | elseif type(Level) == "nil" then | |
1285 | return ReturnedEnvironment | |
1286 | else | |
1287 | return error("ERROR: Incorrect Environment Level") | |
1288 | end | |
1289 | end, | |
1290 | Instance = ProtectTable{ | |
1291 | new = function(ClassName, Parent) | |
1292 | if ClassName then | |
1293 | return Instance.new(ClassName, Parent) | |
1294 | else | |
1295 | return error("String expected") | |
1296 | end | |
1297 | end, | |
1298 | Lock = Instance.Lock, | |
1299 | UnLock = Instance.UnLock, | |
1300 | }, | |
1301 | UDim2 = ProtectTable{ | |
1302 | new = UDim2.new | |
1303 | }, | |
1304 | Vector2 = ProtectTable{ | |
1305 | new = Vector2.new | |
1306 | }, | |
1307 | Vector3 = ProtectTable{ | |
1308 | FromNormalId = Vector3.FromNormalId, | |
1309 | FromAxis = Vector3.FromAxis, | |
1310 | new = Vector3.new, | |
1311 | }, | |
1312 | CFrame = ProtectTable{ | |
1313 | new = CFrame.new, | |
1314 | Angles = CFrame.Angles, | |
1315 | fromAxisAngle = CFrame.fromAxisAngle, | |
1316 | fromEulerAnglesXYZ = CFrame.fromMEulerAnglesXYZ, | |
1317 | }, | |
1318 | table = ProtectTable{ | |
1319 | setn = table.setn, | |
1320 | insert = table.insert, | |
1321 | getn = table.getn, | |
1322 | foreachi = table.foreachi, | |
1323 | maxn = table.maxn, | |
1324 | foreach = table.foreach, | |
1325 | concat = table.concat, | |
1326 | sort = table.sort, | |
1327 | remove = table.remove, | |
1328 | }, | |
1329 | coroutine = ProtectTable{ | |
1330 | resume = coroutine.resume, | |
1331 | yield = coroutine.yield, | |
1332 | status = coroutine.status, | |
1333 | wrap = coroutine.wrap, | |
1334 | create = coroutine.create, | |
1335 | running = coroutine.running, | |
1336 | }, | |
1337 | string = ProtectTable{ | |
1338 | sub = string.sub, | |
1339 | upper = string.upper, | |
1340 | len = string.len, | |
1341 | gfind = string.gfind, | |
1342 | rep = string.rep, | |
1343 | find = string.find, | |
1344 | match = string.match, | |
1345 | char = string.char, | |
1346 | dump = string.dump, | |
1347 | gmatch = string.gmatch, | |
1348 | reverse = string.reverse, | |
1349 | byte = string.byte, | |
1350 | format = string.format, | |
1351 | gsub = string.gsub, | |
1352 | lower = string.lower, | |
1353 | }, | |
1354 | math = ProtectTable{ | |
1355 | log = math.log, | |
1356 | acos = math.acos, | |
1357 | huge = 1/0, | |
1358 | ldexp = math.ldexp, | |
1359 | pi = math.pi, | |
1360 | cos = math.cos, | |
1361 | tanh = math.tanh, | |
1362 | pow = math.pow, | |
1363 | deg = math.deg, | |
1364 | tan = math.tan, | |
1365 | cosh = math.cosh, | |
1366 | sinh = math.sinh, | |
1367 | random = math.random, | |
1368 | randomseed = math.randomseed, | |
1369 | frexp = math.frexp, | |
1370 | ceil = math.ceil, | |
1371 | floor = math.floor, | |
1372 | rad = math.rad, | |
1373 | abs = math.abs, | |
1374 | sqrt = math.sqrt, | |
1375 | modf = math.modf, | |
1376 | asin = math.asin, | |
1377 | min = math.min, | |
1378 | max = math.max, | |
1379 | fmod = math.fmod, | |
1380 | log10 = math.log10, | |
1381 | atan2 = math.atan2, | |
1382 | exp = math.exp, | |
1383 | sin = math.sin, | |
1384 | atan = math.atan, | |
1385 | }, | |
1386 | os = ProtectTable{ | |
1387 | difftime = os.difftime, | |
1388 | time = os.time, | |
1389 | }, | |
1390 | } do | |
1391 | for Index in Indexes:gmatch("[^, ?]+") do | |
1392 | EnvironmentFunctions[Index] = Value | |
1393 | if type(Value) == "function" then | |
1394 | pcall(setfenv, Value, SecureEnvironment) | |
1395 | end | |
1396 | end | |
1397 | end | |
1398 | return EnvironmentFunctions | |
1399 | end)(), | |
1400 | __newindex = function(Self, Index, Value) | |
1401 | rawset(NewEnvironment.__index, Index, Value) | |
1402 | return rawset(Self, Index, Value) | |
1403 | end, | |
1404 | __metatable = SecureEnvironment, | |
1405 | } | |
1406 | Sandbox = setmetatable(SecureEnvironment, NewEnvironment) | |
1407 | Speaker = Speaker | |
1408 | local Function, FunctionError = loadstring(Message, "REVEX_SCRIPT") | |
1409 | local SpeakerRank = REVEX.Functions.Get.PlayerData(Speaker, "Rank") | |
1410 | if type(Function) == "function" then | |
1411 | setfenv(Function, Sandbox) | |
1412 | Function = coroutine.create(Function) | |
1413 | local Check,Error = coroutine.resume(Function) | |
1414 | if not Check then | |
1415 | REVEX.Functions.Main.Output(Speaker, "ERROR:\n"..tostring(Error), "Really red") | |
1416 | else | |
1417 | REVEX.Functions.Main.Output(Speaker, "Ran Successfully", "Bright orange") | |
1418 | end | |
1419 | else | |
1420 | if not Function then | |
1421 | error("SYNTAX_ERROR:\n"..tostring(FunctionError)) | |
1422 | end | |
1423 | end | |
1424 | end) | |
1425 | if not MainFunction then | |
1426 | REVEX.Functions.Main.Output(Speaker, "PARSING_ERROR:\n"..tostring(MainError), "Really red") | |
1427 | end | |
1428 | end) | |
1429 | ||
1430 | REVEX.Services.Players.PlayerAdded:connect(function(Player) | |
1431 | REVEX.Functions.Connect.Player(Player, "Join") | |
1432 | end) | |
1433 | ||
1434 | REVEX.Services.Players.PlayerRemoving:connect(REVEX.Functions.Disconnect.Player) | |
1435 | REVEX.Services.RunService.Heartbeat:connect(REVEX.Functions.Main.Rotate) | |
1436 | REVEX.FullyConnected = true | |
1437 | REVEX._TIMEREQUIREDFORSTARTUP = -_TIMEOFSTARTUP + tick() | |
1438 | REVEX.Functions.Main.AdminOutput("It took "..REVEX._TIMEREQUIREDFORSTARTUP.." seconds to start the script up.") | |
1439 | REVEX.Functions.Main.InitiateRemote() |