Advertisement
Guest User

Roblox Explorer Script

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