Advertisement
DrawingJhon

Script Editor

Jul 8th, 2022 (edited)
527
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.31 KB | None | 0 0
  1. script.Parent = owner.PlayerGui
  2.  
  3. --Converted with ttyyuu12345's model to script plugin v4
  4. ScreenGui0 = Instance.new("ScreenGui")
  5. ScreenGui0.ResetOnSpawn = false
  6. Frame1 = Instance.new("Frame")
  7. Frame2 = Instance.new("Frame")
  8. ImageButton3 = Instance.new("ImageButton")
  9. Frame4 = Instance.new("Frame")
  10. ImageButton5 = Instance.new("ImageButton")
  11. ScrollingFrame6 = Instance.new("ScrollingFrame")
  12. Frame7 = Instance.new("Frame")
  13. TextLabel8 = Instance.new("TextLabel")
  14. TextBox9 = Instance.new("TextBox")
  15. ScreenGui0.Name = "ScriptEditor"
  16. ScreenGui0.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  17. Frame1.Name = "Main"
  18. Frame1.Parent = ScreenGui0
  19. Frame1.Position = UDim2.new(0.5, 0, 0.5, 0)
  20. Frame1.Size = UDim2.new(0, 600, 0, 350)
  21. Frame1.AnchorPoint = Vector2.new(0.5, 0.5)
  22. Frame1.BackgroundColor = BrickColor.new("Black")
  23. Frame1.BackgroundColor3 = Color3.new(0.14902, 0.14902, 0.14902)
  24. Frame1.BorderSizePixel = 0
  25. Frame1.BackgroundTransparency = 0.2
  26. Frame2.Name = "Control"
  27. Frame2.Parent = Frame1
  28. Frame2.Position = UDim2.new(0, 0, 0, 30)
  29. Frame2.Size = UDim2.new(1, 0, 0, 30)
  30. Frame2.BackgroundColor = BrickColor.new("Black")
  31. Frame2.BackgroundColor3 = Color3.new(0.184314, 0.184314, 0.184314)
  32. Frame2.BackgroundTransparency = 0.2
  33. Frame2.BorderSizePixel = 0
  34. ImageButton3.Name = "run_button"
  35. ImageButton3.Parent = Frame2
  36. ImageButton3.Position = UDim2.new(0.949319243, 0, 0.0648680925, 0)
  37. ImageButton3.Size = UDim2.new(0, 30, 0, 30)
  38. ImageButton3.BackgroundColor = BrickColor.new("Sea green")
  39. ImageButton3.BackgroundColor3 = Color3.new(0.207843, 0.647059, 0.384314)
  40. ImageButton3.BackgroundTransparency = 1
  41. ImageButton3.LayoutOrder = 10
  42. ImageButton3.ZIndex = 2
  43. ImageButton3.Image = "rbxassetid://3926307971"
  44. ImageButton3.ImageColor3 = Color3.new(0.172549, 1, 0.266667)
  45. ImageButton3.ImageRectOffset = Vector2.new(764, 244)
  46. ImageButton3.ImageRectSize = Vector2.new(36, 36)
  47. Frame4.Name = "Top"
  48. Frame4.Parent = Frame1
  49. Frame4.Size = UDim2.new(1, 0, 0, 30)
  50. Frame4.BackgroundColor = BrickColor.new("Black")
  51. Frame4.BackgroundColor3 = Color3.new(0.156863, 0.156863, 0.156863)
  52. Frame4.BackgroundTransparency = 1
  53. Frame4.BorderSizePixel = 0
  54. ImageButton5.Name = "close"
  55. ImageButton5.Parent = Frame4
  56. ImageButton5.Position = UDim2.new(1, -30, 0.5, 0)
  57. ImageButton5.Size = UDim2.new(0, 20, 0, 20)
  58. ImageButton5.AnchorPoint = Vector2.new(0, 0.5)
  59. ImageButton5.BackgroundTransparency = 1
  60. ImageButton5.ZIndex = 2
  61. ImageButton5.Image = "rbxassetid://3926305904"
  62. ImageButton5.ImageRectOffset = Vector2.new(284, 4)
  63. ImageButton5.ImageRectSize = Vector2.new(24, 24)
  64. ScrollingFrame6.Parent = Frame1
  65. ScrollingFrame6.Name = "Editor"
  66. ScrollingFrame6.Position = UDim2.new(0.5, 0, 0, 60)
  67. ScrollingFrame6.Size = UDim2.new(1, -10, 1, -65)
  68. ScrollingFrame6.Active = true
  69. ScrollingFrame6.AnchorPoint = Vector2.new(0.5, 0)
  70. ScrollingFrame6.BackgroundColor = BrickColor.new("Black metallic")
  71. ScrollingFrame6.BackgroundColor3 = Color3.new(0.121569, 0.121569, 0.121569)
  72. ScrollingFrame6.BorderSizePixel = 0
  73. ScrollingFrame6.CanvasSize = UDim2.new()
  74. ScrollingFrame6.BackgroundTransparency = 0.2
  75. Frame7.Name = "Lines"
  76. Frame7.Parent = ScrollingFrame6
  77. Frame7.Size = UDim2.new(0, 30, 1, 0)
  78. Frame7.BackgroundColor = BrickColor.new("Black")
  79. Frame7.BackgroundTransparency = 0.4
  80. Frame7.BackgroundColor3 = Color3.new(0.14902, 0.14902, 0.14902)
  81. Frame7.BorderSizePixel = 0
  82. TextLabel8.Parent = Frame7
  83. TextLabel8.Name = "1"
  84. TextLabel8.Position = UDim2.new(0, 0, 0, 4)
  85. TextLabel8.Size = UDim2.new(1, 0, 0, 15)
  86. TextLabel8.BackgroundColor = BrickColor.new("Institutional white")
  87. TextLabel8.BackgroundColor3 = Color3.new(1, 1, 1)
  88. TextLabel8.BackgroundTransparency = 1
  89. TextLabel8.Font = Enum.Font.SourceSans
  90. TextLabel8.FontSize = Enum.FontSize.Size18
  91. TextLabel8.Text = "1"
  92. TextLabel8.TextColor = BrickColor.new("Institutional white")
  93. TextLabel8.TextColor3 = Color3.new(1, 1, 1)
  94. TextLabel8.TextSize = 15
  95. TextLabel8.TextYAlignment = Enum.TextYAlignment.Bottom
  96. TextBox9.Parent = ScrollingFrame6
  97. TextBox9.Position = UDim2.new(0, 34, 0, 4)
  98. TextBox9.Size = UDim2.new(1, -34, 1, 0)
  99. TextBox9.BackgroundColor = BrickColor.new("Dark taupe")
  100. TextBox9.BackgroundColor3 = Color3.new(0.290196, 0.290196, 0.290196)
  101. TextBox9.BackgroundTransparency = 1
  102. TextBox9.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  103. TextBox9.Font = Enum.Font.Code
  104. TextBox9.FontSize = Enum.FontSize.Size18
  105. TextBox9.Text = ""
  106. TextBox9.TextColor = BrickColor.new("Institutional white")
  107. TextBox9.TextColor3 = Color3.new(1, 1, 1)
  108. TextBox9.TextSize = 15
  109. TextBox9.TextXAlignment = Enum.TextXAlignment.Left
  110. TextBox9.TextYAlignment = Enum.TextYAlignment.Top
  111. TextBox9.ClearTextOnFocus = false
  112. TextBox9.MultiLine = true
  113.  
  114. local screengui = ScreenGui0
  115.  
  116. local remote = Instance.new("RemoteEvent", screengui)
  117. remote.Name = "Execute"
  118. remote.OnServerEvent:Connect(function(plr, action, source)
  119.     if plr == owner and remote.Parent:IsDescendantOf(owner.PlayerGui) then
  120.         if action == "Execute" then
  121.             NS(source, workspace)
  122.         elseif action == "Close" then
  123.             screengui:Destroy()
  124.         end
  125.     end
  126. end)
  127.  
  128. screengui.Parent = NLS([==[
  129. local screengui = script.ScriptEditor
  130. local runButton = screengui.Main.Control.run_button
  131. local closeButton = screengui.Main.Top.close
  132. local editor = screengui.Main.Editor
  133. local textbox = editor.TextBox
  134. local lineList = editor.Lines
  135. local line = lineList["1"]
  136.  
  137. local remote = screengui.Execute
  138. local tab = " " -- string.char(226)
  139.  
  140. textbox:GetPropertyChangedSignal("ContentText"):Connect(function()
  141.     --textbox.Text = textbox.Text:gsub("\t", tab)
  142.     lineList:ClearAllChildren()
  143.     local index = 0
  144.    
  145.     for i = 1, #textbox.Text:split("\n") do
  146.         local entry = line:Clone()
  147.         entry.Name = i
  148.         entry.Text = tostring(i)
  149.         entry.Position = UDim2.new(0, 0, 0, index + 4)
  150.         entry.Parent = lineList
  151.        
  152.         index = index + entry.AbsoluteSize.Y
  153.     end
  154.    
  155.     editor.CanvasSize = UDim2.new(0, textbox.TextBounds.X + 5, 0, textbox.TextBounds.Y + 5)
  156. end)
  157.  
  158. runButton.MouseButton1Click:Connect(function()
  159.     if textbox.Text ~= "" then
  160.         remote:FireServer("Execute", textbox.ContentText)
  161.     end
  162. end)
  163.  
  164. closeButton.MouseButton1Click:Connect(function()
  165.     remote:FireServer("Close")
  166. end)
  167.  
  168. local player = game:GetService("Players").LocalPlayer
  169. local mouse = player:GetMouse()
  170. local tweenEffect = false
  171.  
  172. local function makeDrag(frame, focusObj)
  173.     if focusObj == nil then
  174.         focusObj = frame
  175.     end
  176.    
  177.     local mouseButton1, Touch = Enum.UserInputType.MouseButton1, Enum.UserInputType.Touch
  178.     local pressing = false
  179.  
  180.     local con1
  181.     local con2
  182.     con1 = focusObj.InputBegan:connect(function(input)
  183.         pressing = true
  184.         local lastPosition
  185.         local dis = UDim2.new(0, mouse.X, 0, mouse.Y) - frame.Position
  186.         local loop
  187.         if input.UserInputType == mouseButton1 or input.UserInputType == Touch then
  188.             loop = game:GetService("RunService").RenderStepped:Connect(function()
  189.                 if pressing == false then loop:Disconnect() return end
  190.                 local pos = UDim2.new(0, mouse.X, 0, mouse.Y) - dis
  191.                 if pos == lastPosition then return else lastPosition = pos end
  192.                 if tweenEffect then
  193.                     frame:TweenPosition(pos, "Out", "Sine", 0.1, true)
  194.                 else
  195.                     frame.Position = pos
  196.                 end
  197.             end)
  198.         end
  199.     end)
  200.     con2 = game:GetService("UserInputService").InputEnded:Connect(function(input)
  201.         if input.UserInputType ~= mouseButton1 and input.UserInputType ~= Touch then return end
  202.         pressing = false
  203.     end)
  204. end
  205.  
  206. makeDrag(screengui.Main, screengui.Main.Top)
  207. ]==], script)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement