Advertisement
zephpsian

Untitled

Feb 15th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.73 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87. TextProperties = {"ClassName", "Name", "Value", "Text", "Reflectance", "Transparency", "Heat", "TeamName", "WalkSpeed", "Health", "MaxHealth", "Size", "Position", "AccountAge", "RobloxLocked", "TeamColor", "userId", "Brightness", "Ambient", "TimeOfDay", "FieldOfView", "CameraType", "LinkedSource"}
  88. BoolProperties = {"Anchored", "CanCollide", "Disabled", "Jump", "Sit", "Visible", "Enabled", "Locked", "FilteringEnabled", "StreamingEnabled", "GlobalShadows"}
  89. BrickColorProperties = {"BrickColor", "Color", "TeamColor", "Texture", "Value"}
  90. s = Instance.new("ScreenGui", owner.PlayerGui)
  91. pgr = Instance.new("TextButton")
  92. pgr.Parent = s
  93. pgr.Size = UDim2.new(0,100,0,40)
  94. pgr.Position = UDim2.new(0,30,0,440)
  95. pgr.Text="Explorer"
  96. pgr.BackgroundTransparency = 0.3
  97. pgr.TextColor = BrickColor.new("White")
  98. pgr.BackgroundColor = BrickColor.new("Really Black")
  99. pgr.BorderColor = BrickColor.new("Black")
  100. pgr.Font = "ArialBold"
  101. pgr.FontSize = "Size14"
  102. pgr.TextStrokeColor3 = Color3.new(0/0,0/0,0/0)
  103. pgr.TextStrokeTransparency = 0.3
  104. pgr.BorderSizePixel = 1
  105. pgr.BorderColor = BrickColor.new("White")
  106.  
  107.  
  108.  
  109. local Cloned
  110. local Deleted
  111. local DeleteParent
  112. local Player
  113. local Search
  114. local ScriptSearch
  115. local Gui
  116. local Cloned = nil
  117. local Deleted = nil
  118. local DeleteParent = nil
  119. local Current = 0
  120. local CurrentOption = 0
  121.  
  122. function Clear()
  123. if Gui then
  124. Gui:Remove()
  125. end
  126. Current = 0
  127. CurrentOption = 0
  128. end
  129.  
  130. function AddButton(N, Function, Color, Copy)
  131. if not N then
  132. error("RenderButton - No Name Specified")
  133. end
  134. if not Function then
  135. error("RenderButton - No Function Specified")
  136. end
  137. if not Color then
  138. Color = Color3.new(1, 1, 1)
  139. end
  140. if Copy == nil then
  141. Copy = true
  142. end
  143. P = Instance.new("TextButton")
  144. if Copy then
  145. P.Size = UDim2.new(0, 110, 0, 20)
  146. else
  147. P.Size = UDim2.new(0, 130, 0, 20)
  148. end
  149. P.Text = N.Name
  150. P.Name = N.Name
  151. P.Parent = Gui
  152. P.BackgroundColor3 = Color
  153. P.TextColor3 = Color3.new(0, 0, 0)
  154. P.BackgroundTransparency = 0.5
  155. P.Position = UDim2.new(0, ((math.modf(Current/30))*150)+300, 0, 50+(20*((Current%30)-1)))
  156. P.MouseButton1Click:connect(function()
  157. Function(P)
  158. end)
  159. D = Instance.new("TextButton")
  160. D.Size = UDim2.new(0, 20, 0, 20)
  161. D.Text = "X"
  162. D.Name = N.Name
  163. D.Parent = Gui
  164. D.BackgroundColor3 = Color3.new(1, 0, 0)
  165. D.TextColor3 = Color3.new(0, 0, 0)
  166. D.BackgroundTransparency = 0.5
  167. D.Position = UDim2.new(0, ((math.modf(Current/30))*150)+300+130, 0, 50+(20*((Current%30)-1)))
  168. D.MouseButton1Click:connect(function()
  169. Deleted = N
  170. DeleteParent = N.Parent
  171. N.Parent = nil
  172. Clear()
  173. Search(DeleteParent)
  174. end)
  175. if Copy then
  176. C = Instance.new("TextButton")
  177. C.Size = UDim2.new(0, 20, 0, 20)
  178. C.Text = "C"
  179. C.Name = N.Name
  180. C.Parent = Gui
  181. C.BackgroundColor3 = Color3.new(0, 1, 0.5)
  182. C.TextColor3 = Color3.new(0, 0, 0)
  183. C.BackgroundTransparency = 0.5
  184. C.Position = UDim2.new(0, ((math.modf(Current/30))*150)+300+110, 0, 50+(20*((Current%30)-1)))
  185. C.MouseButton1Click:connect(function()
  186. Cloned = N
  187. Clear()
  188. Search(N.Parent)
  189. end)
  190. end
  191. Current = Current + 1
  192. return P
  193. end
  194.  
  195. function AddOption(N, Function, Color, Text)
  196. if not N then
  197. error("RenderButton - No Name Specified")
  198. end
  199. if not Color then
  200. Color = Color3.new(1, 1, 1)
  201. end
  202. if Text == nil then
  203. Text = false
  204. end
  205. if Text then
  206. P = Instance.new("TextBox")
  207. else
  208. P = Instance.new("TextButton")
  209. end
  210. P.Text = N
  211. P.Name = N
  212. P.Parent = Gui
  213. P.BackgroundColor3 = Color
  214. P.TextColor3 = Color3.new(0, 0, 0)
  215. P.BackgroundTransparency = 0.5
  216. P.Size = UDim2.new(0, 150, 0, 20)
  217. P.Position = UDim2.new(0, ((math.modf(CurrentOption/30))*150)+150, 0, 50+(20*((CurrentOption%30)-1)))
  218. if not Text and Function then
  219. P.MouseButton1Click:connect(function() Function(P) end)
  220. end
  221. CurrentOption = CurrentOption + 1
  222. return P
  223. end
  224.  
  225. function AddTextOption(Obj, Prop)
  226. local Ob = Obj
  227. local Pro = Prop
  228. if type(Ob[Pro]) == "number" or type(Ob[Pro]) == "string" then
  229. CurrentOption = CurrentOption + 1
  230. local T = AddOption(Ob[Pro], nil, Color3.new(0.1, 0.4, 0.1), true)
  231. CurrentOption = CurrentOption - 2
  232. local O = AddOption("Change "..Pro..":", function() Ob[Pro] = T.Text end, Color3.new(0.1, 0.8, 0.1), false)
  233. CurrentOption = CurrentOption + 1
  234. end
  235. end
  236.  
  237. function AddBrickColorOption(Obj, Prop)
  238. local Ob = Obj
  239. local Pro = Prop
  240. if BrickColor.new(tostring(Ob[Pro])) == Ob[Pro] then
  241. CurrentOption = CurrentOption + 1
  242. local T = AddOption(tostring(Ob[Pro]), nil, Color3.new(0.1, 0.4, 0.1), true)
  243. CurrentOption = CurrentOption - 2
  244. local O = AddOption("Change "..Pro..":", function() Ob[Pro] = BrickColor.new(T.Text) end, Color3.new(0.1, 0.8, 0.1), false)
  245. CurrentOption = CurrentOption + 1
  246. end
  247. end
  248.  
  249. function AddBoolOption(Obj, Prop)
  250. local Ob = Obj
  251. local Pro = Prop
  252. if type(Ob[Pro]) == "boolean" then
  253. local O = AddOption(Pro..": "..tostring(Ob[Pro]), nil, Color3.new(0.1, 0.8, 0.1), false)
  254. O.MouseButton1Click:connect(function()
  255. if Ob[Pro] then
  256. Ob[Pro] = false
  257. O.Text = Pro..": false"
  258. else
  259. Ob[Pro] = true
  260. O.Text = Pro..": true"
  261. end
  262. end)
  263. end
  264. end
  265.  
  266. function TestProperty(Obj, Property)
  267. Success = pcall(function()
  268. if Obj[Property] then
  269. return
  270. end
  271. end)
  272. return Success
  273. end
  274.  
  275. function LoadOptions(Object)
  276. for Num, Prop in pairs(TextProperties) do
  277. if TestProperty(Object, Prop) then
  278. AddTextOption(Object, Prop)
  279. end
  280. end
  281. for Num, Prop in pairs(BoolProperties) do
  282. if TestProperty(Object, Prop) then
  283. AddBoolOption(Object, Prop)
  284. end
  285. end
  286. for Num, Prop in pairs(BrickColorProperties) do
  287. if TestProperty(Object, Prop) then
  288. AddBrickColorOption(Object, Prop)
  289. end
  290. end
  291. end
  292.  
  293. function Search(Object)
  294. Gui = Instance.new("ScreenGui")
  295. Gui.Parent = owner.PlayerGui
  296. Gui.Name = "Explorer"
  297. if Object ~= game then
  298. AddOption("Back", function()
  299. Clear();
  300. Search(Object.Parent)
  301. end, Color3.new(0.5, 1, 1), false)
  302. end
  303. AddOption("Reload", function() Clear(); Search(Object); end, Color3.new(0.2, 1, 0.2), false)
  304. if Cloned then
  305. AddOption("Paste", function() Cloned:Clone().Parent = Object; Clear(); Search(Object); end, Color3.new(0.5, 1, 1), false)
  306. end
  307. if Deleted then
  308. AddOption("Undo", function() Deleted.Parent = DeleteParent; Deleted = nil; DeletedParent = nil; Clear(); Search(Object); end, Color3.new(1, 0.6, 0.1), false)
  309. end
  310. if Object:IsA("Player") then
  311. AddOption("Goto Character", function() Clear(); if Object.Character then Search(Object.Character); end end, Color3.new(1, 1, 1), false)
  312. end
  313. if Object:IsA("LocalScript") then
  314. AddOption("EditScript", function() Clear(); ScriptSearch(Object); end, Color3.new(1, 1, 1), false)
  315. end
  316. if Object:IsA("Terrain") then
  317. AddOption("Clear", function() Object:Clear(); end, Color3.new(1, 1, 1), false)
  318. end
  319. LoadOptions(Object)
  320. AddOption("Close", Clear, Color3.new(1, 0.2, 0), false)
  321. if not Object:IsA("Workspace") or not Object:IsA("Player") then
  322. for Num, Obj in pairs(Object:GetChildren()) do
  323. --if not Obj:IsA("BasePart") or not Object.Parent == game.Workspace then
  324. if true then
  325. if Obj:IsA("LocalScript") then
  326. AddButton(Obj, function() Clear(); Search(Obj); end, Color3.new(1, 0, 0), true)
  327. elseif Obj:IsA("Script") or Obj:IsA("StarterScript") or Obj:IsA("CoreScript") then
  328. AddButton(Obj, function() Clear(); Search(Obj); end, Color3.new(0.5, 0.5, 0.8), true)
  329. elseif Obj.Parent == game then
  330. AddButton(Obj, function() Clear(); Search(Obj); end, Color3.new(1, 1, 1), false)
  331. else
  332. AddButton(Obj, function() Clear(); Search(Obj); end, Color3.new(1, 1, 1), true)
  333. end
  334. end
  335. end
  336. end
  337. function MoveUp(Place, Amount)
  338. for i,v in pairs(Place:GetChildren()) do
  339. if v:IsA("TextLabel") or v:IsA("TextBox") then
  340. v.Position = v.Position + UDim2.new(0,0,0,-Amount)
  341. end
  342. end
  343. end
  344. function MoveDown(Place, Amount)
  345. for i,v in pairs(Place:GetChildren()) do
  346. if v:IsA("TextLabel") or v:IsA("TextBox") then
  347. v.Position = v.Position + UDim2.new(0,0,0,Amount)
  348. end
  349. end
  350. end
  351. i=0
  352. function ScriptSearch(S)
  353. Script2 = S
  354. Script = Script2.Source
  355. Table = {}
  356. Enabled = true
  357. Gui = Instance.new("ScreenGui")
  358. Gui.Parent = owner.PlayerGui
  359. Gui.Name = "Explorer"
  360. while Enabled do
  361. Start, End = string.find(Script, '\n')
  362. print(Start, End)
  363. if Start and End then
  364. table.insert(Table, string.sub(Script, 1, End))
  365. New = string.sub(Script, End+1, string.len(Script))
  366. Script = New
  367. else
  368. Enabled = false
  369. table.insert(Table, string.sub(Script, 1, End))
  370. print("Finished")
  371. end
  372. end
  373. P = Instance.new("TextLabel")
  374. P.Size = UDim2.new(0, 500, 0, 20)
  375. P.Text = Script2.Name
  376. P.Name = "Script Line"
  377. P.Parent = Gui
  378. P.BackgroundColor3 = Color3.new(1, 1, 1)
  379. P.TextColor3 = Color3.new(0, 0, 0)
  380. P.BackgroundTransparency = 0.5
  381. P.Position = UDim2.new(0.5, -250, 0, 150+(20*(i-1)))
  382. P.TextXAlignment = "Left"
  383. i=i+1
  384. New = {}
  385. for I,Val in pairs(Table) do
  386. print(Val)
  387. P = Instance.new("TextBox")
  388. P.ClearTextOnFocus = false
  389. P.Size = UDim2.new(0, 500, 0, 20)
  390. P.Text = Val
  391. P.Name = "Script Line"
  392. P.Parent = Gui
  393. P.BackgroundColor3 = Color3.new(1, 1, 1)
  394. P.TextColor3 = Color3.new(0, 0, 0)
  395. P.BackgroundTransparency = 0.5
  396. P.Position = UDim2.new(0.5, -250, 0, 150+(20*(i-1)))
  397. P.TextXAlignment = "Left"
  398. table.insert(New, P)
  399. i=i+1
  400. end
  401. i=1
  402. P = Instance.new("TextButton")
  403. P.Size = UDim2.new(0, 20, 0, 20)
  404. P.Text = "^"
  405. P.Name = "Scroll"
  406. P.Parent = Gui
  407. P.BackgroundColor3 = Color3.new(1, 1, 1)
  408. P.TextColor3 = Color3.new(0, 0, 0)
  409. P.BackgroundTransparency = 0.5
  410. P.Position = UDim2.new(0.5, -270, 0, 150+(20*(i-1)))
  411. P.MouseButton1Click:connect(function()
  412. MoveUp(Gui, -20)
  413. end)
  414. i=i+1
  415. P = Instance.new("TextButton")
  416. P.Size = UDim2.new(0, 20, 0, 20)
  417. P.Text = "v"
  418. P.Name = "Scroll"
  419. P.Parent = Gui
  420. P.BackgroundColor3 = Color3.new(1, 1, 1)
  421. P.TextColor3 = Color3.new(0, 0, 0)
  422. P.BackgroundTransparency = 0.5
  423. P.Position = UDim2.new(0.5, -270, 0, 150+(20*(i-1)))
  424. P.MouseButton1Click:connect(function()
  425. MoveDown(Gui, -20)
  426. end)
  427. i=i+1
  428. P = Instance.new("TextButton")
  429. P.Size = UDim2.new(0, 20, 0, 20)
  430. P.Text = "^^"
  431. P.Name = "Scroll"
  432. P.Parent = Gui
  433. P.BackgroundColor3 = Color3.new(1, 1, 1)
  434. P.TextColor3 = Color3.new(0, 0, 0)
  435. P.BackgroundTransparency = 0.5
  436. P.Position = UDim2.new(0.5, -270, 0, 150+(20*(i-1)))
  437. P.MouseButton1Click:connect(function()
  438. MoveUp(Gui, -200)
  439. end)
  440. i=i+1
  441. P = Instance.new("TextButton")
  442. P.Size = UDim2.new(0, 20, 0, 20)
  443. P.Text = "vv"
  444. P.Name = "Scroll"
  445. P.Parent = Gui
  446. P.BackgroundColor3 = Color3.new(1, 1, 1)
  447. P.TextColor3 = Color3.new(0, 0, 0)
  448. P.BackgroundTransparency = 0.5
  449. P.Position = UDim2.new(0.5, -270, 0, 150+(20*(i-1)))
  450. P.MouseButton1Click:connect(function()
  451. MoveDown(Gui, -200)
  452. end)
  453. i=i+1
  454. P = Instance.new("TextButton")
  455. P.Size = UDim2.new(0, 20, 0, 20)
  456. P.Text = "S"
  457. P.Name = "Save"
  458. P.Parent = Gui
  459. P.BackgroundColor3 = Color3.new(0, 1, 0)
  460. P.TextColor3 = Color3.new(0, 0, 0)
  461. P.BackgroundTransparency = 0.5
  462. P.Position = UDim2.new(0.5, -270, 0, 150+(20*(i-1)))
  463. P.MouseButton1Click:connect(function()
  464. StringS = ""
  465. for Num, Obj in pairs(New) do
  466. StringS = StringS..Obj.Text..'\n'
  467. end
  468. S.Source = StringS
  469. S.Disabled = true
  470. S.Disabled = false
  471. end)
  472. i=i+1
  473. P = Instance.new("TextButton")
  474. P.Size = UDim2.new(0, 20, 0, 20)
  475. P.Text = "x"
  476. P.Name = "Back"
  477. P.Parent = Gui
  478. P.BackgroundColor3 = Color3.new(1, 0.2, 0)
  479. P.TextColor3 = Color3.new(0, 0, 0)
  480. P.BackgroundTransparency = 0.5
  481. P.Position = UDim2.new(0.5, -270, 0, 150+(20*(i-1)))
  482. P.MouseButton1Click:connect(function()
  483. Clear()
  484. i=0
  485. Search(S)
  486. end)
  487. i=i+1
  488. end
  489. end
  490.  
  491. pgr.MouseButton1Click:connect(function()
  492. Clear()
  493. Search(game)
  494. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement