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