Advertisement
IiIDriversIiI

[Roblox] Explorer Script

May 16th, 2018
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.80 KB | None | 0 0
  1. local/
  2. local Asset = "http://www.roblox.com/asset/?id="
  3. local Provider = game:service("ContentProvider")
  4. local Seen = 20
  5. --lego
  6. local C3 = Color3.new
  7. local UD = UDim2.new
  8. local V2 = Vector2.new
  9.  
  10. local Icons = {
  11. PreviousPage = Asset..(57411555),
  12. NextPage = Asset..(57411520),
  13. Previous = Asset..(57375309),
  14. Home = Asset..(57375258),
  15. Refresh = Asset..(57376869),
  16. Properties = Asset..(57475029),
  17. Delete = Asset..(57474956),
  18. Copy = Asset..(57474905),
  19. Paste = Asset..(57474999),
  20. Cut = Asset..(57474927),
  21. Exit = Asset..(57510854),
  22. }
  23.  
  24. local Images = {
  25. {{"IntValue", "BrickColorValue", "Color3Value", "Vector3Value", "CFrameValue", "NumberValue", "ObjectValue", "StringValue", "BoolValue", "RayValue"}, Asset..(57403779)},
  26. {{"BasePart", "Part", "WedgePart"}, Asset..(57403711)},
  27. {{"ForceField"}, Asset..(57404473)},
  28. {{"Weld", "Rotate", "Glue"}, Asset..(57403808)},
  29. {{"BodyVelocity", "BodyPosition", "BodyForce", "BodyGyro", "BodyThrust", "BodyAngularVelocity", "BodyPosition", "RocketPropulsion"}, Asset..(57403610)},
  30. {{"Animation", "AnimationTrack"}, Asset..(57403557)},
  31. {{"Model"}, Asset..(57403668)},
  32. {{"Player", "Players"}, Asset..(57403743)},
  33. {{"BlockMesh", "SpecialMesh", "CylinderMesh", "FileMesh", "CharacterMesh"}, Asset..(57403643)},
  34. {{"TextButton", "TextLabel", "ImageLabel", "ImageButton", "Frame"}, Asset..(57403587)},
  35. {{"Camera"}, Asset..(57406901)},
  36. {{"Hat", "Accoutrement"}, Asset..(57406931)},
  37. {{"LocalScript"}, Asset..(57406954)},
  38. {{"HopperBin"}, Asset..(57406984)},
  39. {{"Tool"}, Asset..(57407105)},
  40. {{"Humanoid"}, Asset..(57407016)},
  41. {{"Script"}, Asset..(57407071)},
  42. {{"Message", "Hint"}, Asset..(57407564)},
  43. }
  44.  
  45. for _,v in pairs(Images) do
  46. Provider:Preload(v[2])
  47. end
  48.  
  49. wait(0.5)
  50.  
  51. function Find(Object)
  52. local Img = Asset..(57403690)
  53. for _,v in pairs(Images) do
  54. for _,k in pairs(v[1]) do
  55. if Object.className == k then
  56. Img = v[2]
  57. end
  58. end
  59. end
  60. return Img
  61. end
  62.  
  63. local Classes = {"Frame", "ImageLabel", "ImageButton", "TextLabel", "TextButton", "TextBox"}
  64. function Make(Class, Par, Size, Pos, Color, Trans, Border, Borderc, Txt, TxtC, Img)
  65. local Mk = "Frame"
  66. for _,v in pairs(Classes) do
  67. if Class == v then
  68. Mk = v
  69. end
  70. end
  71. local g = Instance.new(Mk)
  72. g.Size = Size
  73. g.Position = Pos
  74. g.BackgroundColor3 = Color
  75. g.Transparency = Trans
  76. g.BorderSizePixel = Border
  77. g.BorderColor3 = Borderc
  78. if Mk == "TextButton" or Mk == "TextLabel" or Mk == "TextBox" then
  79. g.Text = Txt
  80. g.TextColor3 = TxtC
  81. elseif Mk == "ImageLabel" or Mk == "ImageButton" then
  82. g.Image = Img
  83. end
  84. g.Parent = Par
  85. return g
  86. end
  87.  
  88. function Give(Player)
  89. local Place = workspace
  90. local From = 0
  91. local gui = Player:findFirstChild("PlayerGui")
  92. if gui then
  93. for _,v in pairs(gui:children()) do if v.Name == "GuiText" then v:remove() end end
  94. end
  95. local Sc = Instance.new("ScreenGui")
  96. Sc.Name = "GuiText"
  97. local Options = nil
  98. local Copied = nil
  99. local Number = (50-32)
  100. local Resolution = V2(1028, 768)
  101. local Main = Make("Frame", Sc, UD(1, 0, 1, 1), UD(0, 0, 0, -1), C3(0.92, 0.92, 0.96), 1, 0, C3())
  102. coroutine.resume(coroutine.create(function()
  103. wait(0.04)
  104. Resolution = V2(Main.AbsoluteSize.X, Main.AbsoluteSize.Y)
  105. end))
  106. local ExplorerDec = Make("Frame", Main, UD(0, 155, 0, 360), UD(0, 0, 0.5, -175), C3(0.75, 0.75, 0.9), 0, 0, C3())
  107. local Explorer = Make("Frame", ExplorerDec, UD(1, -5, 1, -10), UD(0, 0, 0, 5), C3(0.9, 0.9, 0.95), 0, 0, C3())
  108. local Bar = Make("Frame", Explorer, UD(1, 0, 0, 32), UD(), C3(0.75, 0.75, 0.9), 0, 0, C3())
  109. local Previous = Make("ImageButton", Bar, UD(0, 32, 0, 32), UD(0, 9, 0, 0), C3(0.75, 0.75, 0.9), 0, 0, C3(), nil, nil, Icons.Previous)
  110. local Home = Make("ImageButton", Bar, UD(0, 32, 0, 32), UD(0, 59, 0, 0), C3(0.75, 0.75, 0.9), 0, 0, C3(), nil, nil, Icons.Home)
  111. local Refresh = Make("ImageButton", Bar, UD(0, 32, 0, 32), UD(0, 109, 0, 0), C3(0.75, 0.75, 0.9), 0, 0, C3(), nil, nil, Icons.Refresh)
  112. local List = Make("Frame", Explorer, UD(1, -10, 1, -32-4), UD(0, 5, 0, 32), C3(0.7, 0.7, 0.85), 0, 0, C3())
  113. local NextPage = Make("ImageButton", ExplorerDec, UD(0.5, 0, 0, 30), UD(0.5, 0, 1, 0), C3(0.75, 0.75, 0.9), 0, 0, C3(), nil, nil, Icons.NextPage)
  114. local PreviousPage = Make("ImageButton", ExplorerDec, UD(0.5, 0, 0, 30), UD(0, 0, 1, 0), C3(0.75, 0.75, 0.9), 0, 0, C3(), nil, nil, Icons.PreviousPage)
  115.  
  116. local BackTool = Make("Frame", ExplorerDec, UD(0, 36, 0, (32+4)*4+4), UD(1, 0, 0, 0), C3(0.75, 0.75, 0.9), 0, 0, C3())
  117. local Properties = Make("ImageButton", BackTool, UD(0, 32, 0, 32), UD(0, 0, 0, 4), C3(0.82, 0.82, 0.93), 0, 0, C3(), nil, nil, Icons.Properties)
  118. local CopyP = Make("ImageButton", BackTool, UD(0, 32, 0, 32), UD(0, 0, 0, (32+4)*1+4), C3(0.82, 0.82, 0.93), 0, 0, C3(), nil, nil, Icons.Copy)
  119. local PasteP = Make("ImageButton", BackTool, UD(0, 32, 0, 32), UD(0, 0, 0, (32+4)*2+4), C3(0.82, 0.82, 0.93), 0, 0, C3(), nil, nil, Icons.Paste)
  120. local DeleteP = Make("ImageButton", BackTool, UD(0, 32, 0, 32), UD(0, 0, 0, (32+4)*3+4), C3(0.82, 0.82, 0.93), 0, 0, C3(), nil, nil, Icons.Delete)
  121.  
  122. local Name = Make("TextLabel", ExplorerDec, UD(1, 0, 0, 25), UD(0, 0, 0, -25), C3(0.8, 0.8, 0.95), 0, 0, C3(), "nil", C3())
  123. Name.FontSize = "Size14"
  124. Name.Font = "Arial"
  125. local Size = 350-36
  126. local Buttons = {}
  127. local SeenSize = (Size/Seen)
  128. for i = 0, Size-SeenSize, SeenSize do
  129. local Txt = Make("TextButton", List, UD(1, -SeenSize, 0, SeenSize), UD(0, SeenSize, 0, i), C3(0.8, 0.8, 0.9), 0, 0, C3(), "-", C3())
  130. Txt.Font = "Arial"
  131. Txt.FontSize = "Size12"
  132. Txt.TextWrap = true
  133. Txt.TextXAlignment = "Left"
  134. local Im = Make("ImageLabel", Txt, UD(0, SeenSize, 1, 0), UD(0, -SeenSize, 0, 0), C3(0.76, 0.76, 0.9), 0, 0, C3(), nil, nil, "")
  135. local Button = {Go = nil, Gui = Txt, Img = Im}
  136. table.insert(Buttons, Button)
  137. end
  138. local function Update(P)
  139. if Options then Options:remove() end
  140. if P ~= game and P ~= nil then
  141. Place = P
  142. Name.Text = tostring(Place)
  143. local Items = Place:children()
  144. local Amount = #Items
  145. for i = 1, #Buttons do
  146. local Item = Items[i+From]
  147. if Item then
  148. local img = Find(Item)
  149. Buttons[i].Go = Item
  150. Buttons[i].Gui.Text = Item.Name
  151. Buttons[i].Img.Image = img
  152. else
  153. Buttons[i].Go = nil
  154. Buttons[i].Gui.Text = "-"
  155. Buttons[i].Img.Image = ""
  156. end
  157. end
  158. end
  159. end
  160. local function OpenOptions(P, x, y)
  161. if Options then Options:remove() end
  162. if P ~= nil then
  163. local Pos = 87
  164. local Siz = 112
  165. if P:IsA("StringValue") then
  166. Siz = 132
  167. Pos = 107
  168. end
  169. local Back = Make("Frame", Main, UD(0, 150, 0, Siz), UD(0, x+3, 0, y+4), C3(0.65, 0.65, 0.8), 0, 0, C3())
  170. local Copy = Make("TextButton", Back, UD(1, -10, 0, 20), UD(0, 5, 0, 5), C3(0.85, 0.85, 0.95), 0, 0, C3(), "Copy", C3())
  171. local Paste = Make("TextButton", Back, UD(1, -10, 0, 20), UD(0, 5, 0, 25), C3(0.85, 0.85, 0.95), 0, 0, C3(), "Paste", C3())
  172. local Delete = Make("TextButton", Back, UD(1, -10, 0, 20), UD(0, 5, 0, 45), C3(0.85, 0.85, 0.95), 0, 0, C3(), "Delete", C3())
  173. local Rename = Make("TextButton", Back, UD(1, -10, 0, 20), UD(0, 5, 0, 65), C3(0.85, 0.85, 0.95), 0, 0, C3(), "Rename", C3())
  174. if P:IsA("StringValue") then
  175. local Read = Make("TextButton", Back, UD(1, -10, 0, 20), UD(0, 5, 0, 85), C3(0.85, 0.85, 0.95), 0, 0, C3(), "Read", C3())
  176. Read.Font = "Arial"
  177. Read.FontSize = "Size12"
  178. Read.TextXAlignment = "Left"
  179. Read.MouseButton1Down:connect(function()
  180. if Options then Options:remove() end
  181. local Text = P.Value
  182. local Lines = {}
  183. local Last = 1
  184. for i = 1, #Text, 1 do
  185. if Text:sub(i,i) == string.char(10) then
  186. local asd = Text:sub(Last, i-1)
  187. asd = asd:gsub(string.char(9), " ")
  188. table.insert(Lines, asd)
  189. Last = i+1
  190. end
  191. end
  192. local asd = Text:sub(Last, #Text)
  193. asd = asd:gsub(string.char(9), " ")
  194. table.insert(Lines, asd)
  195. local MainT = Make("Frame", Main, UD(1, -200, 0, 0), UD(0, 0, 0.5, 0), C3(1, 1, 1), 1, 0, C3())
  196. local Scroll = Make("Frame", Main, UD(0, 20, 0, Resolution.Y-40), UD(1, -220, 0, 20), C3(0.97, 0.97, 1), 0, 0, C3())
  197. local ButtonUp = Make("ImageButton", Scroll, UD(0, 20, 0, 20), UD(0, 0, 0, -20), C3(0.85, 0.85, 0.9), 0, 0, C3(), nil, nil, "")
  198. local ButtonDown = Make("ImageButton", Scroll, UD(0, 20, 0, 20), UD(0, 0, 1, 0), C3(0.85, 0.85, 0.9), 0, 0, C3(), nil, nil, "")
  199. local ScrollBar = Make("ImageButton", Scroll, UD(1, 0, 0, 150), UD(0, 0, 0, 0), C3(0.75, 0.75, 0.85), 0, 0, C3(), nil, nil, "")
  200. local Texts = {}
  201. for i = 0, Resolution.Y-13, 13 do
  202. local Txt = Make("TextLabel", MainT, UD(1, 0, 0, 13), UD(0, 0, i/Resolution.Y, 0), C3(1, 1, 1), 0, 1, C3(0.9, 0.9, 0.9), "", C3())
  203. Txt.Font = "Arial"
  204. Txt.FontSize = "Size12"
  205. Txt.TextXAlignment = "Left"
  206. table.insert(Texts, Txt)
  207. end
  208. for i, v in pairs(Texts) do
  209. local line = Lines[i]
  210. if line then
  211. v.Text = tostring(line)
  212. end
  213. end
  214. local Normal = UD(0, 0, 0.5, -175)
  215. ExplorerDec:TweenPosition(UD(0, -200, 0.5, -175), nil, nil, 0.5)
  216. MainT:TweenSize(UD(1, -200, 0, Resolution.Y+1))
  217. MainT:TweenPosition(UD(0, 0, 0, -1))
  218. local ScrollPos = 20
  219. local ScrollSize = Resolution.Y-40
  220. local SlideSize = 150
  221. local Point = ScrollPos + ScrollSize
  222. local AllPoint = Point-SlideSize-ScrollPos
  223. ScrollBar.MouseButton1Down:connect(function(x, y)
  224. local pos2 = ScrollBar.Position.Y.Offset-y
  225. local Conn = ScrollBar.MouseMoved:connect(function(X, Y)
  226. local pos = Y+pos2
  227. if pos < 0 then pos = 0 end
  228. if pos+SlideSize+ScrollPos > Point then pos = AllPoint end
  229. ScrollBar.Position = UD(0, 0, 0, pos)
  230. local Division = (pos/AllPoint)
  231. local Asd = #Lines-#Texts+5
  232. if Asd > #Lines then Asd = #Lines end
  233. local Placement = math.floor((Asd)*Division)
  234. for i, v in pairs(Texts) do
  235. local Line = Lines[i+Placement]
  236. if Line then
  237. v.Text = Line
  238. else
  239. v.Text = ""
  240. end
  241. end
  242. end)
  243. local co = ScrollBar.MouseButton1Up:connect(function()
  244. Conn:disconnect()
  245. co:disconnect()
  246. end)
  247. end)
  248. local Exit = Make("ImageButton", MainT, UD(0, 35, 0, 35), UD(1, -75, 0, 25), C3(), 1, 0, C3(), nil, nil, Icons.Exit)
  249. local c = Exit.MouseButton1Down:connect(function()
  250. Scroll:remove()
  251. Exit:remove()
  252. for _,v in pairs(Texts) do v.Text = "" end
  253. ExplorerDec:TweenPosition(Normal, nil, nil, 0.7)
  254. MainT:TweenSize(UD(0, 0, 0, 0), nil, nil, 0.5)
  255. MainT:TweenPosition(UD(0.5, 0, 0.5, 0), nil, nil, 0.5)
  256. wait(0.5)
  257. MainT:remove()
  258. end)
  259. end)
  260. end
  261. local Cancel = Make("TextButton", Back, UD(1, -10, 0, 20), UD(0, 5, 0, Pos), C3(0.85, 0.85, 0.95), 0, 0, C3(), "Cancel", C3())
  262. Copy.Font = "Arial"
  263. Paste.Font = "Arial"
  264. Delete.Font = "Arial"
  265. Rename.Font = "Arial"
  266. Cancel.Font = "Arial"
  267. Copy.FontSize = "Size12"
  268. Paste.FontSize = "Size12"
  269. Delete.FontSize = "Size12"
  270. Rename.FontSize = "Size12"
  271. Cancel.FontSize = "Size12"
  272. Copy.TextXAlignment = "Left"
  273. Paste.TextXAlignment = "Left"
  274. Delete.TextXAlignment = "Left"
  275. Rename.TextXAlignment = "Left"
  276. Cancel.TextXAlignment = "Left"
  277. Copy.MouseButton1Down:connect(function()
  278. if Options then Options:remove() end
  279. local a = P.archivable
  280. P.archivable = true
  281. Copied = P:clone()
  282. wait()
  283. P.archivable = a
  284. end)
  285. Paste.MouseButton1Down:connect(function()
  286. if Options then Options:remove() end
  287. if Copied then
  288. local clo = Copied:clone()
  289. clo.Parent = P
  290. end
  291. end)
  292. Delete.MouseButton1Down:connect(function()
  293. if Options then Options:remove() end
  294. P:remove()
  295. Update(Place)
  296. end)
  297. Rename.MouseButton1Down:connect(function()
  298. if Options then Options:remove() end
  299. local Sc2 = Instance.new("ScreenGui")
  300. Sc2.Name = "Rename"
  301. Sc2.Parent = gui
  302. local Effect = Make("ImageButton", Sc2, UD(0, 0, 0, 0), UD(0.5, 0, 0.5, 0), C3(0.9, 0.9, 1), 0, 0, C3(), nil, nil, "")
  303. Effect.AutoButtonColor = false
  304. local Writeback = Make("Frame", Sc2, UD(0, 0, 0, 0), UD(0.5, 0, 0.5, 0), C3(0.7, 0.7, 0.9), 0, 0, C3())
  305. local Write = Make("Frame", Writeback, UD(1, -10, 1, -10), UD(0, 5, 0, 5), C3(0.9, 0.9, 0.95), 0, 0, C3())
  306. local TextBar = Make("TextBox", Write, UD(0.8, 0, 0.15, 0), UD(0.1, 0, 0.2, 0), C3(0.5, 0.5, 0.8), 0, 0, C3(), "", C3(1,1,1))
  307. TextBar.FontSize = "Size14"
  308. TextBar.Font = "Arial"
  309. local Ok = Make("TextButton", Write, UD(0.3, 0, 0.17, 0), UD(0.1, 0, 0.5, 0), C3(0.65, 0.65, 0.85), 0, 0, C3(), "Ok", C3(1,1,1))
  310. local Canc = Make("TextButton", Write, UD(0.3, 0, 0.17, 0), UD(0.6, 0, 0.5, 0), C3(0.65, 0.65, 0.85), 0, 0, C3(), "Cancel", C3(1,1,1))
  311. Ok.Font = "ArialBold"
  312. Ok.FontSize = "Size18"
  313. Canc.Font = "ArialBold"
  314. Canc.FontSize = "Size18"
  315. Effect:TweenPosition(UD(0, 0, 0, -1))
  316. Writeback:TweenPosition(UD(0.5, -150, 0.5, -60))
  317. Writeback:TweenSize(UD(0, 300, 0, 120))
  318. Effect:TweenSize(UD(1, 0, 1, 1))
  319. local Normal = UD(0, 0, 0.5, -175)
  320. ExplorerDec:TweenPosition(UD(0, -200, 0.5, -175), nil, nil, 0.4)
  321. local function TweenBack()
  322. Effect:TweenPosition(UD(1, 0, 0.5, 0), nil, nil, 0.5)
  323. Effect:TweenSize(UD(0, 0, 0, 0), nil, nil, 0.5)
  324. Writeback:TweenPosition(UD(1, 0, 0.5, 0), nil, nil, 0.5)
  325. Writeback:TweenSize(UD(0, 0, 0, 0), nil, nil, 0.5)
  326. ExplorerDec:TweenPosition(Normal, nil, nil, 0.5)
  327. Ok.Text = ""
  328. Canc.Text = ""
  329. TextBar.Text = ""
  330. coroutine.resume(coroutine.create(function()
  331. for i = 0, 1, 0.08 do
  332. wait()
  333. Effect.BackgroundTransparency = 0.4+0.7*i
  334. end
  335. Sc2:remove()
  336. end))
  337. end
  338. coroutine.resume(coroutine.create(function()
  339. for i = 0, 1, 0.035 do
  340. wait()
  341. Effect.BackgroundTransparency = 0.4*i
  342. end
  343. end))
  344. Canc.MouseButton1Down:connect(function()
  345. TweenBack()
  346. end)
  347. Ok.MouseButton1Down:connect(function()
  348. coroutine.resume(coroutine.create(function()
  349. local derp = P.archivable
  350. P.archivable = true
  351. P.Name = TextBar.Text
  352. wait()
  353. P.archivable = derp
  354. end))
  355. TweenBack()
  356. Update(Place)
  357. end)
  358. end)
  359. Cancel.MouseButton1Down:connect(function()
  360. if Options then Options:remove() end
  361. end)
  362. Options = Back
  363. end
  364. end
  365. for i,v in pairs(Buttons) do
  366. v.Gui.MouseButton1Down:connect(function()
  367. if v.Go ~= nil then
  368. From = 0
  369. Update(v.Go)
  370. end
  371. end)
  372. v.Gui.MouseButton2Down:connect(function(x, y)
  373. OpenOptions(v.Go, x, y)
  374. end)
  375. end
  376. Home.MouseButton1Down:connect(function()
  377. pcall(function()
  378. From = 0
  379. Update(workspace)
  380. end)
  381. end)
  382. Previous.MouseButton1Down:connect(function()
  383. pcall(function()
  384. From = 0
  385. Update(Place.Parent)
  386. end)
  387. end)
  388. Refresh.MouseButton1Down:connect(function()
  389. pcall(function()
  390. From = 0
  391. Update(Place)
  392. end)
  393. end)
  394. NextPage.MouseButton1Down:connect(function()
  395. pcall(function()
  396. From = From + Seen
  397. Update(Place)
  398. end)
  399. end)
  400. PreviousPage.MouseButton1Down:connect(function()
  401. pcall(function()
  402. From = From - Seen
  403. if From < 0 then From = 0 end
  404. Update(Place)
  405. end)
  406. end)
  407. CopyP.MouseButton1Down:connect(function()
  408. pcall(function()
  409. if Options then Options:remove() end
  410. if Place ~= workspace then
  411. local a = Place.archivable
  412. Place.archivable = true
  413. Copied = Place:clone()
  414. wait()
  415. Place.archivable = a
  416. end
  417. end)
  418. end)
  419. PasteP.MouseButton1Down:connect(function()
  420. pcall(function()
  421. if Options then Options:remove() end
  422. if Copied and Copied ~= workspace then
  423. local clo = Copied:clone()
  424. clo.Parent = Place
  425. end
  426. end)
  427. end)
  428. DeleteP.MouseButton1Down:connect(function()
  429. pcall(function()
  430. if Options then Options:remove() end
  431. if Place ~= workspace then
  432. local plaic = Place.Parent
  433. if plaic == nil then plaic = workspace end
  434. Place:remove()
  435. Update(plaic)
  436. end
  437. end)
  438. end)
  439. Update(Place)
  440. Sc.Parent = gui
  441. end
  442.  
  443. Give(game.Players.LocalPlayer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement