NikkoLim

Explorer By NikkoLim

Jan 2nd, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.21 KB | None | 0 0
  1. -- Explorer:
  2.  
  3. TextProperties = {"ClassName", "Name", "Value", "Text", "Reflectance", "Transparency", "Heat", "TeamName", "WalkSpeed", "Health", "MaxHealth", "Size", "Position", "AccountAge", "RobloxLocked", "TeamColor", "userId", "Brightness", "Ambient", "TimeOfDay", "FieldOfView", "CameraType", "LinkedSource"}
  4. BoolProperties = {"Anchored", "CanCollide", "Disabled", "Jump", "Sit", "Visible", "Enabled", "Locked", "FilteringEnabled", "StreamingEnabled", "GlobalShadows"}
  5. BrickColorProperties = {"BrickColor", "Color", "TeamColor", "Texture", "Value"}
  6. s = Instance.new("ScreenGui", game.CoreGui)
  7. pgr = Instance.new("TextButton")
  8. pgr.Parent = s
  9. pgr.Size = UDim2.new(0,100,0,40)
  10. pgr.Position = UDim2.new(0,30,0,440)
  11. pgr.Text="Explorer"
  12. pgr.BackgroundTransparency = 0.3
  13. pgr.TextColor = BrickColor.new("White")
  14. pgr.BackgroundColor = BrickColor.new("Really Black")
  15. pgr.BorderColor = BrickColor.new("Black")
  16. pgr.Font = "ArialBold"
  17. pgr.FontSize = "Size14"
  18. pgr.TextStrokeColor3 = Color3.new(0/0,0/0,0/0)
  19. pgr.TextStrokeTransparency = 0.3
  20. pgr.BorderSizePixel = 1
  21. pgr.BorderColor = BrickColor.new("White")
  22.  
  23. if game.CoreGui:findFirstChild("Explorer") then
  24. game.CoreGui:findFirstChild("Explorer"):Remove()
  25. end
  26.  
  27. local Cloned
  28. local Deleted
  29. local DeleteParent
  30. local Player
  31. local Search
  32. local ScriptSearch
  33. local Gui
  34. local Cloned = nil
  35. local Deleted = nil
  36. local DeleteParent = nil
  37. local Current = 0
  38. local CurrentOption = 0
  39.  
  40. function Clear()
  41. if Gui then
  42. Gui:Remove()
  43. end
  44. Current = 0
  45. CurrentOption = 0
  46. end
  47.  
  48. function AddButton(N, Function, Color, Copy)
  49. if not N then
  50. error("RenderButton - No Name Specified")
  51. end
  52. if not Function then
  53. error("RenderButton - No Function Specified")
  54. end
  55. if not Color then
  56. Color = Color3.new(1, 1, 1)
  57. end
  58. if Copy == nil then
  59. Copy = true
  60. end
  61. P = Instance.new("TextButton")
  62. if Copy then
  63. P.Size = UDim2.new(0, 110, 0, 20)
  64. else
  65. P.Size = UDim2.new(0, 130, 0, 20)
  66. end
  67. P.Text = N.Name
  68. P.Name = N.Name
  69. P.Parent = Gui
  70. P.BackgroundColor3 = Color
  71. P.TextColor3 = Color3.new(0, 0, 0)
  72. P.BackgroundTransparency = 0.5
  73. P.Position = UDim2.new(0, ((math.modf(Current/30))*150)+300, 0, 50+(20*((Current%30)-1)))
  74. P.MouseButton1Click:connect(function()
  75. Function(P)
  76. end)
  77. D = Instance.new("TextButton")
  78. D.Size = UDim2.new(0, 20, 0, 20)
  79. D.Text = "X"
  80. D.Name = N.Name
  81. D.Parent = Gui
  82. D.BackgroundColor3 = Color3.new(1, 0, 0)
  83. D.TextColor3 = Color3.new(0, 0, 0)
  84. D.BackgroundTransparency = 0.5
  85. D.Position = UDim2.new(0, ((math.modf(Current/30))*150)+300+130, 0, 50+(20*((Current%30)-1)))
  86. D.MouseButton1Click:connect(function()
  87. Deleted = N
  88. DeleteParent = N.Parent
  89. N.Parent = nil
  90. Clear()
  91. Search(DeleteParent)
  92. end)
  93. if Copy then
  94. C = Instance.new("TextButton")
  95. C.Size = UDim2.new(0, 20, 0, 20)
  96. C.Text = "C"
  97. C.Name = N.Name
  98. C.Parent = Gui
  99. C.BackgroundColor3 = Color3.new(0, 1, 0.5)
  100. C.TextColor3 = Color3.new(0, 0, 0)
  101. C.BackgroundTransparency = 0.5
  102. C.Position = UDim2.new(0, ((math.modf(Current/30))*150)+300+110, 0, 50+(20*((Current%30)-1)))
  103. C.MouseButton1Click:connect(function()
  104. Cloned = N
  105. Clear()
  106. Search(N.Parent)
  107. end)
  108. end
  109. Current = Current + 1
  110. return P
  111. end
  112.  
  113. function AddOption(N, Function, Color, Text)
  114. if not N then
  115. error("RenderButton - No Name Specified")
  116. end
  117. if not Color then
  118. Color = Color3.new(1, 1, 1)
  119. end
  120. if Text == nil then
  121. Text = false
  122. end
  123. if Text then
  124. P = Instance.new("TextBox")
  125. else
  126. P = Instance.new("TextButton")
  127. end
  128. P.Text = N
  129. P.Name = N
  130. P.Parent = Gui
  131. P.BackgroundColor3 = Color
  132. P.TextColor3 = Color3.new(0, 0, 0)
  133. P.BackgroundTransparency = 0.5
  134. P.Size = UDim2.new(0, 150, 0, 20)
  135. P.Position = UDim2.new(0, ((math.modf(CurrentOption/30))*150)+150, 0, 50+(20*((CurrentOption%30)-1)))
  136. if not Text and Function then
  137. P.MouseButton1Click:connect(function() Function(P) end)
  138. end
  139. CurrentOption = CurrentOption + 1
  140. return P
  141. end
  142.  
  143. function AddTextOption(Obj, Prop)
  144. local Ob = Obj
  145. local Pro = Prop
  146. if type(Ob[Pro]) == "number" or type(Ob[Pro]) == "string" then
  147. CurrentOption = CurrentOption + 1
  148. local T = AddOption(Ob[Pro], nil, Color3.new(0.1, 0.4, 0.1), true)
  149. CurrentOption = CurrentOption - 2
  150. local O = AddOption("Change "..Pro..":", function() Ob[Pro] = T.Text end, Color3.new(0.1, 0.8, 0.1), false)
  151. CurrentOption = CurrentOption + 1
  152. end
  153. end
  154.  
  155. function AddBrickColorOption(Obj, Prop)
  156. local Ob = Obj
  157. local Pro = Prop
  158. if BrickColor.new(tostring(Ob[Pro])) == Ob[Pro] then
  159. CurrentOption = CurrentOption + 1
  160. local T = AddOption(tostring(Ob[Pro]), nil, Color3.new(0.1, 0.4, 0.1), true)
  161. CurrentOption = CurrentOption - 2
  162. local O = AddOption("Change "..Pro..":", function() Ob[Pro] = BrickColor.new(T.Text) end, Color3.new(0.1, 0.8, 0.1), false)
  163. CurrentOption = CurrentOption + 1
  164. end
  165. end
  166.  
  167. function AddBoolOption(Obj, Prop)
  168. local Ob = Obj
  169. local Pro = Prop
  170. if type(Ob[Pro]) == "boolean" then
  171. local O = AddOption(Pro..": "..tostring(Ob[Pro]), nil, Color3.new(0.1, 0.8, 0.1), false)
  172. O.MouseButton1Click:connect(function()
  173. if Ob[Pro] then
  174. Ob[Pro] = false
  175. O.Text = Pro..": false"
  176. else
  177. Ob[Pro] = true
  178. O.Text = Pro..": true"
  179. end
  180. end)
  181. end
  182. end
  183.  
  184. function TestProperty(Obj, Property)
  185. Success = pcall(function()
  186. if Obj[Property] then
  187. return
  188. end
  189. end)
  190. return Success
  191. end
  192.  
  193. function LoadOptions(Object)
  194. for Num, Prop in pairs(TextProperties) do
  195. if TestProperty(Object, Prop) then
  196. AddTextOption(Object, Prop)
  197. end
  198. end
  199. for Num, Prop in pairs(BoolProperties) do
  200. if TestProperty(Object, Prop) then
  201. AddBoolOption(Object, Prop)
  202. end
  203. end
  204. for Num, Prop in pairs(BrickColorProperties) do
  205. if TestProperty(Object, Prop) then
  206. AddBrickColorOption(Object, Prop)
  207. end
  208. end
  209. end
  210.  
  211. function Search(Object)
  212. Gui = Instance.new("ScreenGui")
  213. Gui.Parent = game.CoreGui
  214. Gui.Name = "Explorer"
  215. if Object ~= game then
  216. AddOption("Back", function()
  217. Clear();
  218. Search(Object.Parent)
  219. end, Color3.new(0.5, 1, 1), false)
  220. end
  221. AddOption("Reload", function() Clear(); Search(Object); end, Color3.new(0.2, 1, 0.2), false)
  222. if Cloned then
  223. AddOption("Paste", function() Cloned:Clone().Parent = Object; Clear(); Search(Object); end, Color3.new(0.5, 1, 1), false)
  224. end
  225. if Deleted then
  226. AddOption("Undo", function() Deleted.Parent = DeleteParent; Deleted = nil; DeletedParent = nil; Clear(); Search(Object); end, Color3.new(1, 0.6, 0.1), false)
  227. end
  228. if Object:IsA("Player") then
  229. AddOption("Goto Character", function() Clear(); if Object.Character then Search(Object.Character); end end, Color3.new(1, 1, 1), false)
  230. end
  231. if Object:IsA("LocalScript") then
  232. AddOption("EditScript", function() Clear(); ScriptSearch(Object); end, Color3.new(1, 1, 1), false)
  233. end
  234. if Object:IsA("Terrain") then
  235. AddOption("Clear", function() Object:Clear(); end, Color3.new(1, 1, 1), false)
  236. end
  237. LoadOptions(Object)
  238. AddOption("Close", Clear, Color3.new(1, 0.2, 0), false)
  239. if not Object:IsA("Workspace") or not Object:IsA("Player") then
  240. for Num, Obj in pairs(Object:GetChildren()) do
  241. --if not Obj:IsA("BasePart") or not Object.Parent == game.Workspace then
  242. if true then
  243. if Obj:IsA("LocalScript") then
  244. AddButton(Obj, function() Clear(); Search(Obj); end, Color3.new(1, 0, 0), true)
  245. elseif Obj:IsA("Script") or Obj:IsA("StarterScript") or Obj:IsA("CoreScript") then
  246. AddButton(Obj, function() Clear(); Search(Obj); end, Color3.new(0.5, 0.5, 0.8), true)
  247. elseif Obj.Parent == game then
  248. AddButton(Obj, function() Clear(); Search(Obj); end, Color3.new(1, 1, 1), false)
  249. else
  250. AddButton(Obj, function() Clear(); Search(Obj); end, Color3.new(1, 1, 1), true)
  251. end
  252. end
  253. end
  254. end
  255. function MoveUp(Place, Amount)
  256. for i,v in pairs(Place:GetChildren()) do
  257. if v:IsA("TextLabel") or v:IsA("TextBox") then
  258. v.Position = v.Position + UDim2.new(0,0,0,-Amount)
  259. end
  260. end
  261. end
  262. function MoveDown(Place, Amount)
  263. for i,v in pairs(Place:GetChildren()) do
  264. if v:IsA("TextLabel") or v:IsA("TextBox") then
  265. v.Position = v.Position + UDim2.new(0,0,0,Amount)
  266. end
  267. end
  268. end
  269. i=0
  270. function ScriptSearch(S)
  271. Script2 = S
  272. Script = Script2.Source
  273. Table = {}
  274. Enabled = true
  275. Gui = Instance.new("ScreenGui")
  276. Gui.Parent = game.CoreGui
  277. Gui.Name = "Explorer"
  278. while Enabled do
  279. Start, End = string.find(Script, '\n')
  280. print(Start, End)
  281. if Start and End then
  282. table.insert(Table, string.sub(Script, 1, End))
  283. New = string.sub(Script, End+1, string.len(Script))
  284. Script = New
  285. else
  286. Enabled = false
  287. table.insert(Table, string.sub(Script, 1, End))
  288. print("Finished")
  289. end
  290. end
  291. P = Instance.new("TextLabel")
  292. P.Size = UDim2.new(0, 500, 0, 20)
  293. P.Text = Script2.Name
  294. P.Name = "Script Line"
  295. P.Parent = Gui
  296. P.BackgroundColor3 = Color3.new(1, 1, 1)
  297. P.TextColor3 = Color3.new(0, 0, 0)
  298. P.BackgroundTransparency = 0.5
  299. P.Position = UDim2.new(0.5, -250, 0, 150+(20*(i-1)))
  300. P.TextXAlignment = "Left"
  301. i=i+1
  302. New = {}
  303. for I,Val in pairs(Table) do
  304. print(Val)
  305. P = Instance.new("TextBox")
  306. P.ClearTextOnFocus = false
  307. P.Size = UDim2.new(0, 500, 0, 20)
  308. P.Text = Val
  309. P.Name = "Script Line"
  310. P.Parent = Gui
  311. P.BackgroundColor3 = Color3.new(1, 1, 1)
  312. P.TextColor3 = Color3.new(0, 0, 0)
  313. P.BackgroundTransparency = 0.5
  314. P.Position = UDim2.new(0.5, -250, 0, 150+(20*(i-1)))
  315. P.TextXAlignment = "Left"
  316. table.insert(New, P)
  317. i=i+1
  318. end
  319. i=1
  320. P = Instance.new("TextButton")
  321. P.Size = UDim2.new(0, 20, 0, 20)
  322. P.Text = "^"
  323. P.Name = "Scroll"
  324. P.Parent = Gui
  325. P.BackgroundColor3 = Color3.new(1, 1, 1)
  326. P.TextColor3 = Color3.new(0, 0, 0)
  327. P.BackgroundTransparency = 0.5
  328. P.Position = UDim2.new(0.5, -270, 0, 150+(20*(i-1)))
  329. P.MouseButton1Click:connect(function()
  330. MoveUp(Gui, -20)
  331. end)
  332. i=i+1
  333. P = Instance.new("TextButton")
  334. P.Size = UDim2.new(0, 20, 0, 20)
  335. P.Text = "v"
  336. P.Name = "Scroll"
  337. P.Parent = Gui
  338. P.BackgroundColor3 = Color3.new(1, 1, 1)
  339. P.TextColor3 = Color3.new(0, 0, 0)
  340. P.BackgroundTransparency = 0.5
  341. P.Position = UDim2.new(0.5, -270, 0, 150+(20*(i-1)))
  342. P.MouseButton1Click:connect(function()
  343. MoveDown(Gui, -20)
  344. end)
  345. i=i+1
  346. P = Instance.new("TextButton")
  347. P.Size = UDim2.new(0, 20, 0, 20)
  348. P.Text = "^^"
  349. P.Name = "Scroll"
  350. P.Parent = Gui
  351. P.BackgroundColor3 = Color3.new(1, 1, 1)
  352. P.TextColor3 = Color3.new(0, 0, 0)
  353. P.BackgroundTransparency = 0.5
  354. P.Position = UDim2.new(0.5, -270, 0, 150+(20*(i-1)))
  355. P.MouseButton1Click:connect(function()
  356. MoveUp(Gui, -200)
  357. end)
  358. i=i+1
  359. P = Instance.new("TextButton")
  360. P.Size = UDim2.new(0, 20, 0, 20)
  361. P.Text = "vv"
  362. P.Name = "Scroll"
  363. P.Parent = Gui
  364. P.BackgroundColor3 = Color3.new(1, 1, 1)
  365. P.TextColor3 = Color3.new(0, 0, 0)
  366. P.BackgroundTransparency = 0.5
  367. P.Position = UDim2.new(0.5, -270, 0, 150+(20*(i-1)))
  368. P.MouseButton1Click:connect(function()
  369. MoveDown(Gui, -200)
  370. end)
  371. i=i+1
  372. P = Instance.new("TextButton")
  373. P.Size = UDim2.new(0, 20, 0, 20)
  374. P.Text = "S"
  375. P.Name = "Save"
  376. P.Parent = Gui
  377. P.BackgroundColor3 = Color3.new(0, 1, 0)
  378. P.TextColor3 = Color3.new(0, 0, 0)
  379. P.BackgroundTransparency = 0.5
  380. P.Position = UDim2.new(0.5, -270, 0, 150+(20*(i-1)))
  381. P.MouseButton1Click:connect(function()
  382. StringS = ""
  383. for Num, Obj in pairs(New) do
  384. StringS = StringS..Obj.Text..'\n'
  385. end
  386. S.Source = StringS
  387. S.Disabled = true
  388. S.Disabled = false
  389. end)
  390. i=i+1
  391. P = Instance.new("TextButton")
  392. P.Size = UDim2.new(0, 20, 0, 20)
  393. P.Text = "x"
  394. P.Name = "Back"
  395. P.Parent = Gui
  396. P.BackgroundColor3 = Color3.new(1, 0.2, 0)
  397. P.TextColor3 = Color3.new(0, 0, 0)
  398. P.BackgroundTransparency = 0.5
  399. P.Position = UDim2.new(0.5, -270, 0, 150+(20*(i-1)))
  400. P.MouseButton1Click:connect(function()
  401. Clear()
  402. i=0
  403. Search(S)
  404. end)
  405. i=i+1
  406. end
  407. end
  408.  
  409. pgr.MouseButton1Click:connect(function()
  410. Clear()
  411. Search(game)
  412. end)
Add Comment
Please, Sign In to add comment