TheFlamingBlaster

Vex Offical

Dec 2nd, 2016
516
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.00 KB | None | 0 0
  1. -- Made by Z_V and TheFlamingBlaster.
  2. local owner = getfenv().owner
  3. -- https://vorth.co/projects/Scripts/
  4. --[[
  5. If you'd like to program your server to support Vex, put down the following lines in your .htaccess file
  6. AddType text/txt .txt
  7. AddType text/lua .lua
  8. --]]
  9.  
  10. print('Get script code at: '..https://pastebin.com/raw/QHVtkgJ9)
  11.  
  12. print("Don't know where to start? Try accessing http://rtest.net23.net/projects/Scripts/ with e/http://rtest.net23.net/projects/Scripts/ .")
  13. function explore(url)
  14. local ScreenGui = Instance.new("ScreenGui")
  15. print("V3X was made by Z_V and TheFlamingBlaster.")
  16. ScreenGui.Parent = owner:WaitForChild("PlayerGui")
  17.  
  18. local Status = Instance.new("TextLabel")
  19. Status.Visible = false
  20. Status.Parent = ScreenGui
  21. Status.Name = "Status"
  22. Status.Text = url
  23.  
  24. local Frame = Instance.new("Frame")
  25. Frame.Active = true
  26. Frame.Size = UDim2.new(0,600,0,300)
  27. Frame.Draggable = true
  28. Frame.Position = UDim2.new(1,-650,1,-350)
  29. Frame.BorderSizePixel = 0
  30. Frame.Parent = ScreenGui
  31. Frame.BackgroundColor3 = Color3.new(0.0980392, 0.0980392, 0.101961)
  32.  
  33. local TextLabel = Instance.new("TextLabel")
  34. TextLabel.BorderSizePixel = 0
  35. TextLabel.Parent = Frame
  36. TextLabel.TextXAlignment = Enum.TextXAlignment.Left
  37. TextLabel.Size = UDim2.new(0.17000067234039,0,0,25)
  38. TextLabel.FontSize = Enum.FontSize.Size24
  39. TextLabel.Text = "- vorth"
  40. TextLabel.TextSize = 24
  41. TextLabel.Font = Enum.Font.SourceSansLight
  42. TextLabel.BackgroundTransparency = 1
  43. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  44.  
  45. local Seperator = Instance.new("Frame")
  46. Seperator.Size = UDim2.new(1,0,0,2)
  47. Seperator.Name = "Seperator"
  48. Seperator.Position = UDim2.new(0,0,1,10)
  49. Seperator.BackgroundTransparency = 0.5
  50. Seperator.BorderSizePixel = 0
  51. Seperator.Parent = TextLabel
  52. Seperator.BackgroundColor3 = Color3.new(0.466667, 0.941177, 0.760784)
  53.  
  54. local ScrollingFrame = Instance.new("ScrollingFrame")
  55. ScrollingFrame.TopImage = "rbxassetid://482126534"
  56. ScrollingFrame.BorderSizePixel = 0
  57. ScrollingFrame.ScrollBarThickness = 2
  58. ScrollingFrame.Parent = Frame
  59. ScrollingFrame.Draggable = true
  60. ScrollingFrame.CanvasSize = UDim2.new(0,0,0,0)
  61. ScrollingFrame.Size = UDim2.new(1,0,1,-45)
  62. ScrollingFrame.MidImage = "rbxassetid://482126534"
  63. ScrollingFrame.Position = UDim2.new(0,0,0,45)
  64. ScrollingFrame.BackgroundTransparency = 1
  65. ScrollingFrame.BottomImage = "rbxassetid://482126534"
  66.  
  67. local Close = Instance.new("TextButton")
  68. Close.FontSize = Enum.FontSize.Size28
  69. Close.Size = UDim2.new(0,25,0,25)
  70. Close.TextSize = 28
  71. Close.Parent = Frame
  72. Close.Text = "X"
  73. Close.TextColor3 = Color3.new(1, 1, 1)
  74. Close.BackgroundTransparency = 1
  75. Close.Font = Enum.Font.SourceSansLight
  76. Close.Name = "Close"
  77. Close.Position = UDim2.new(1,-25,0,0)
  78. Close.MouseButton1Click:connect(function()
  79.     buttons = {}
  80.     ScreenGui:Destroy()
  81. end)
  82. local TextBox = Instance.new("TextLabel")
  83. TextBox.FontSize = Enum.FontSize.Size24
  84. TextBox.BorderSizePixel = 0
  85. TextBox.BackgroundColor3 = Color3.new(1, 1, 1)
  86. TextBox.Parent = Frame
  87. TextBox.TextXAlignment = Enum.TextXAlignment.Left
  88. TextBox.Size = UDim2.new(0.76999998092651,0,0,25)
  89. TextBox.Text = ""
  90. TextBox.TextSize = 24
  91. TextBox.TextColor3 = Color3.new(1, 1, 1)
  92. TextBox.Font = Enum.Font.SourceSansLight
  93. TextBox.BackgroundTransparency = 1
  94. TextBox.Position = UDim2.new(0.17000000178814,0,0,0)
  95.  
  96. local Seperator2 = Instance.new("Frame")
  97. Seperator2.Size = UDim2.new(1,0,0,2)
  98. Seperator2.Name = "Seperator"
  99. Seperator2.Position = UDim2.new(0,0,1,10)
  100. Seperator2.BackgroundTransparency = 0.5
  101. Seperator2.BorderSizePixel = 0
  102. Seperator2.Parent = TextBox
  103. Seperator2.BackgroundColor3 = Color3.new(0.709804, 0.427451, 0.941177)
  104.  
  105. local HTTP = game:GetService("HttpService")
  106. local Buttons = {}
  107. local Scroll = ScrollingFrame
  108.  
  109. thread = function(...)
  110. return coroutine.resume(coroutine.create(...))
  111. end
  112.  
  113. function removelastslash(url)
  114.   local t={}
  115.   local int = 0
  116.   for matchedValue in string.gmatch(url, ".") do
  117.     int = int + 1
  118.     if matchedValue == "/" then
  119.       table.insert(t, int)
  120.     end
  121.   end
  122.   local slashstart = t[#t - 1]
  123.   return url:sub(1,slashstart)
  124. end
  125. local function save(savename,url)
  126.   getfenv(0).owner:RLS([[
  127.     print("Saving script in local mode.")
  128.     local plr = game.Players.LocalPlayer
  129.     function runoutcmd(cmd)
  130.       wait(0.1)
  131.       plr.PlayerGui.SB_DataTransfer.SB_CommandRemote.Value = cmd
  132.     end
  133.     runoutcmd("ch/]]..savename:sub(1,string.len(savename) - 4).."/"..url..'")'..[[
  134.     wait(0.3)
  135.    runoutcmd("save/]]..savename:sub(1,string.len(savename) - 4)..'")'..[[
  136.     print("Successfully saved, exiting local mode.")
  137. ]])
  138. end
  139. clicking = false
  140. local function NewButton(TEXT)
  141.  local Button = Instance.new("TextButton",Scroll)
  142.  Button.Text = TEXT
  143.  Button.FontSize = Enum.FontSize.Size24
  144.  Button.BorderSizePixel = 0
  145.  Button.BackgroundColor3 = Color3.new(31/255,31/255,31/255)
  146.  Button.TextSize = 24
  147.  Button.TextColor3 = Color3.new(0.564706, 0.839216, 0.619608)
  148.  Button.Font = Enum.Font.SourceSansLight
  149.  Button.Size = UDim2.new(1,0,0,25)
  150.  Button.Position = UDim2.new(0,0,0,#Buttons*Button.Size.Y.Offset)
  151.  Button.TextXAlignment = "Left"
  152.  
  153.  Button.MouseButton2Click:connect(function()
  154.     if Button.Text:match(".lua") or Button.Text:match(".txt") then
  155.     if clicking == false then
  156.     local selector =  Instance.new("Frame",Scroll)
  157.     selector.Size = UDim2.new(0,250,0,35)
  158.     selector.BackgroundColor3 = Color3.new(31/255 * 3,31/255 * 3,31/255 * 3)
  159.     selector.ZIndex = 4
  160.     selector.Position = UDim2.new(0,150,0,Button.Position.Y.Offset)
  161.     selector.Name = "Selecting"
  162.     selector.BorderSizePixel = 0
  163.      local ButtonA = Instance.new("TextButton",selector)
  164.      ButtonA.Text = "Run Script"
  165.      ButtonA.FontSize = Enum.FontSize.Size24
  166.      ButtonA.BorderSizePixel = 0
  167.      ButtonA.BackgroundColor3 = Color3.new(31/255 * 2,31/255 * 2,31/255 * 2)
  168.      ButtonA.TextSize = 24
  169.     ButtonA.ZIndex = 5
  170.      ButtonA.MouseButton1Click:connect(function()
  171.          owner:RLS(HTTP:GetAsync(tostring(Status.Text)..Button.Text, true))
  172.      end)
  173.      ButtonA.TextColor3 = Color3.new(0.564706, 0.839216, 0.619608)
  174.      ButtonA.Font = Enum.Font.SourceSansLight
  175.      ButtonA.Size = UDim2.new(1,0,0,25)
  176.      ButtonA.Position = UDim2.new(0,0,0,0)
  177.      ButtonA.TextXAlignment = "Left"
  178.      local ButtonB = ButtonA:Clone()
  179.      ButtonB.Parent = selector
  180.      ButtonB.Position = UDim2.new(0,0,0,25)
  181.      ButtonB.Text = "Save Script"
  182.      ButtonB.MouseButton1Click:connect(function()
  183.         save(Button.Text,tostring(Status.Text)..Button.Text)
  184.     end)
  185.         for i,v in pairs(Scroll:GetChildren()) do
  186.             if v:IsA("TextButton") then
  187.                 v.AutoButtonColor = false
  188.             end
  189.         end
  190.     clicking = true
  191.     else
  192.     for i,v in pairs(Scroll:GetChildren()) do
  193.         if v:IsA("TextButton") then
  194.                 v.AutoButtonColor = true
  195.         end
  196.         if v.Name == "Selecting" then
  197.                 v:Destroy()
  198.         end
  199.         end
  200.         clicking = false
  201.        
  202.     end
  203.     else
  204.     if clicking == false then
  205.     local selector =  Instance.new("Frame",Scroll)
  206.     selector.Size = UDim2.new(0,250,0,25)
  207.     selector.BackgroundColor3 = Color3.new(31/255 * 3,31/255 * 3,31/255 * 3)
  208.     selector.ZIndex = 4
  209.     selector.Position = UDim2.new(0,150,0,Button.Position.Y.Offset)
  210.     selector.Name = "Selecting"
  211.     selector.BorderSizePixel = 0
  212.      local ButtonA = Instance.new("TextButton",selector)
  213.      ButtonA.Text = "Explore "..Button.Text
  214.      ButtonA.FontSize = Enum.FontSize.Size24
  215.      ButtonA.BorderSizePixel = 0
  216.      ButtonA.BackgroundColor3 = Color3.new(31/255 * 2,31/255 * 2,31/255 * 2)
  217.      ButtonA.TextSize = 24
  218.     ButtonA.ZIndex = 5
  219.      ButtonA.MouseButton1Click:connect(function()
  220.          for i,v in pairs(Scroll:GetChildren()) do
  221.             v:Destroy()
  222.          end
  223.          Buttons = {}
  224.          Explore(Status.Text..tostring(Button.Text))
  225.      end)
  226.      ButtonA.TextColor3 = Color3.new(0.564706, 0.839216, 0.619608)
  227.      ButtonA.Font = Enum.Font.SourceSansLight
  228.      ButtonA.Size = UDim2.new(1,0,0,25)
  229.      ButtonA.Position = UDim2.new(0,0,0,0)
  230.      ButtonA.TextXAlignment = "Left"
  231.         for i,v in pairs(Scroll:GetChildren()) do
  232.             if v:IsA("TextButton") then
  233.                 v.AutoButtonColor = false
  234.             end
  235.         end
  236.     clicking = true
  237.     else
  238.     for i,v in pairs(Scroll:GetChildren()) do
  239.         if v:IsA("TextButton") then
  240.                 v.AutoButtonColor = true
  241.         end
  242.         if v.Name == "Selecting" then
  243.                 v:Destroy()
  244.         end
  245.         end
  246.         clicking = false
  247.        
  248.     end
  249.     end
  250. end)
  251.  return Button
  252. end
  253.  
  254.  
  255.  
  256. function Explore(dir)
  257.  local Test = HTTP:GetAsync(dir, true) -- Get le directory
  258.  for x in Test:gmatch("%b\"\"") do
  259.     if x ~= "\"-//W3C//DTD HTML 3.2 Final//EN\"" and "\"/\"" then
  260.       local Temp = (string.gsub(("%s"):format(x), '"', ""))
  261.       wait()
  262.       TextBox.Text = #x
  263.       local Button = NewButton(Temp)
  264.       Scroll.CanvasSize = UDim2.new(0,0,0,0)
  265.       if Button.Position.Y.Offset+Button.Size.Y.Offset > Scroll.AbsoluteSize.Y then
  266.         Scroll.CanvasSize = UDim2.new(0,0,0,#Buttons*Button.Size.Y.Offset+Button.Size.Y.Offset)
  267.         Scroll.CanvasPosition = Vector2.new(0,Scroll.CanvasSize.Y.Offset-Scroll.AbsoluteSize.Y)
  268.       else
  269.         Scroll.CanvasSize = UDim2.new(0,0,0,0)
  270.       end
  271.       Buttons[#Buttons+1] = Button
  272.     end
  273.   end
  274.   for i,v in pairs(Scroll:GetChildren()) do
  275.     v.Text = string.gsub(v.Text, "%%20", " ")
  276.     if string.find(v.Text, ".lua") then
  277.       v.TextColor3 = Color3.new(20/255, 161/255, 221/255)
  278.     end
  279.     if string.find(v.Text, ".txt") then
  280.       v.TextColor3 = Color3.new(20/255, 161/255, 221/255)
  281.     end
  282.     if string.find(v.Text, "/projects/") then
  283.       v.TextColor3 = Color3.new(221/255, 0/255, 3/255)
  284.     end
  285.     v.MouseButton1Click:connect(function()
  286.       if string.find(tostring(v.Text), ".lua") or string.find(tostring(v.Text), ".txt") then
  287.         owner:RLS(HTTP:GetAsync(tostring(Status.Text)..v.Text, true))
  288.         elseif v.Text == "/projects/" then
  289.           return nil
  290.           elseif string.find(v.Text, "/projects/Scripts/") then
  291.             thread(function()
  292.               repeat wait() until #Scroll:GetChildren() == 0
  293.                 Test = removelastslash(Status.Text)
  294.                 Status.Text = Test
  295.                 Explore(Test)
  296.                 end)
  297.             for i,v in pairs(Scroll:GetChildren()) do
  298.               v:Destroy()
  299.               wait()
  300.             end
  301.             clicking = false
  302.             Buttons = {}
  303.           else
  304.             thread(function()
  305.               repeat wait() until #Scroll:GetChildren() == 0
  306.                 Explore(Status.Text..tostring(v.Text))
  307.                 Status.Text = Status.Text..tostring(v.Text)
  308.                 end)
  309.             for i,v in pairs(Scroll:GetChildren()) do
  310.               v:Destroy()
  311.               wait()
  312.             end
  313.             clicking = false
  314.             Buttons = {}
  315.           end
  316.           end)
  317.     --[[v.MouseButton2Click:connect(function()
  318.       if string.find(tostring(v.Text), ".lua") or string.find(tostring(v.Text), ".txt") then
  319.         print(v.Text)
  320.         print(tostring(Status.Text)..v.Text)
  321.         save(v.Text,tostring(Status.Text)..v.Text)
  322.       end
  323.       end) --]]
  324.   end
  325. end
  326.  
  327. Explore(Status.Text)
  328. end
  329. owner.Chatted:connect(function(msg)
  330.     if msg:sub(1,2) == "e/" then
  331.         local url = msg:sub(3)
  332.         explore(url)
  333.     end
  334.     if msg:sub(1,4) == "cre/" then
  335.         print("Made by TheFlamingBlaster and Z_V")
  336.     end
  337. end)
  338. explore("http://rtest.net23.net/projects/Scripts/")
Add Comment
Please, Sign In to add comment