Advertisement
ClockworkHorror

Revex Test

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