Advertisement
wallop560

WIP motg script

Sep 13th, 2020
1,442
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.71 KB | None | 0 0
  1. local ScreenGui = Instance.new("ScreenGui")
  2. local Frame = Instance.new("ImageLabel")
  3. local Frame_2 = Instance.new("Frame")
  4. local UIGridLayout = Instance.new("UIGridLayout")
  5. ScreenGui.Parent = game.Players.LocalPlayer.PlayerGui
  6. repStrg = game:GetService("ReplicatedStorage")
  7. plrs = game:GetService("Players")
  8. resources = repStrg.Resources
  9. remotes = resources.Remotes
  10. local destroy = remotes.DestroyItem
  11. local spawn = remotes.MakeItem
  12. local blockChatr = remotes.BuildingChat
  13.  
  14. function GetDescendants(parent,callback)
  15. for i,v in pairs(parent:GetDescendants())do
  16. callback(v)
  17. end
  18. end
  19. function GetChildren(parent,callback)
  20. for i,v in pairs(parent:GetChildren())do
  21. callback(v)
  22. end
  23. end
  24. function DestroyItem(item)
  25. destroy:FireServer(item)
  26. end
  27. function spawnItem(item,Offset)
  28. spawn:FireServer(item,plrs.LocalPlayer.Character.Head.Position + Offset)
  29. end
  30. function blockChat(block,message)
  31. blockChatr:FireServer(block,message)
  32. end
  33. function PlayerChat(plr,message)
  34. blockChatr:FireServer(plrs[plr].Character.Head,message)
  35. end
  36. function printDesc(parent)
  37. for i,v in pairs(parent:GetDescendants())do
  38. print(v.Name)
  39. end
  40. end
  41. function printChild(parent)
  42. for i,v in pairs(parent:GetChildren())do
  43. print(v.Name)
  44. end
  45. end
  46. function ClearChildren(parent)
  47. for i,v in pairs(parent:GetDescendants())do
  48. DestroyItem(v)
  49. end
  50. end
  51. function DeleteRemotes()
  52. for i,v in pairs(game:GetDescendants())do
  53. if v.Name ~= "DestroyItem" and v:IsA("RemoteEvent") then
  54. DestroyItem(v)
  55. end
  56. end
  57. end
  58. function everyoneChat(message)
  59. for i,v in pairs(game.Players:GetPlayers())do
  60. PlayerChat(v.Name,message)
  61. end
  62. end
  63. Frame.Name = "Frame"
  64. Frame.Parent = ScreenGui
  65. Frame.BackgroundColor3 = Color3.new(1, 1, 1)
  66. Frame.BackgroundTransparency = 1
  67. Frame.Position = UDim2.new(0.217255712, 0, 0.335456461, 0)
  68. Frame.Size = UDim2.new(0, 433, 0, 256)
  69. Frame.Image = "rbxassetid://3570695787"
  70. Frame.ImageColor3 = Color3.new(0.117647, 0.117647, 0.117647)
  71. Frame.ScaleType = Enum.ScaleType.Slice
  72. Frame.SliceCenter = Rect.new(100, 100, 100, 100)
  73. Frame.SliceScale = 0.1
  74.  
  75. Frame_2.Parent = Frame
  76. Frame_2.Size = UDim2.new(0, 436,0, 230)
  77. Frame_2.BackgroundColor3 = Color3.new(1, 1, 1)
  78. Frame_2.BackgroundTransparency = 1
  79. Frame_2.Position = UDim2.new(0.0180180185, 0, 0.0336134471, 0)
  80.  
  81. UIGridLayout.Parent = Frame_2
  82. UIGridLayout.SortOrder = Enum.SortOrder.LayoutOrder
  83. UIGridLayout.CellSize = UDim2.new(0, 100, 0, 30)
  84.  
  85. local Button = Instance.new("Frame")
  86. local Input = Instance.new("TextBox")
  87. Button.Name = "Button"
  88. Button.Parent = Frame_2
  89. Button.BackgroundColor3 = Color3.new(0.137255, 0.137255, 0.137255)
  90. Button.BorderSizePixel = 0
  91.  
  92. Input.Name = "Button"
  93. Input.Parent = Button
  94. Input.BackgroundColor3 = Color3.new(1, 1, 1)
  95. Input.BackgroundTransparency = 1
  96. Input.Size = UDim2.new(1, 0, 1, 0)
  97. Input.Font = Enum.Font.SourceSans
  98. Input.Text = ""
  99. Input.PlaceholderText = "Input"
  100. Input.TextColor3 = Color3.new(0.588235, 0.588235, 0.588235)
  101. Input.TextSize = 20
  102. Input.TextWrapped = true
  103. Input.TextScaled = true
  104. local Button2 = Instance.new("Frame")
  105. local Input2 = Instance.new("TextBox")
  106. Button2.Name = "Button"
  107. Button2.Parent = Frame_2
  108. Button2.BackgroundColor3 = Color3.new(0.137255, 0.137255, 0.137255)
  109. Button2.BorderSizePixel = 0
  110.  
  111. Input2.Name = "Button"
  112. Input2.Parent = Button2
  113. Input2.BackgroundColor3 = Color3.new(1, 1, 1)
  114. Input2.BackgroundTransparency = 1
  115. Input2.Size = UDim2.new(1, 0, 1, 0)
  116. Input2.Font = Enum.Font.SourceSans
  117. Input2.Text = ""
  118. Input2.PlaceholderText = "Input2"
  119. Input2.TextColor3 = Color3.new(0.588235, 0.588235, 0.588235)
  120. Input2.TextSize = 20
  121. Input2.TextWrapped = true
  122. Input2.TextScaled = true
  123. function Button(Text,CallBack)
  124. local Button3 = Instance.new("Frame")
  125. local Button_3 = Instance.new("TextButton")
  126. Button3.Name = "Button"
  127. Button3.Parent = Frame_2
  128. Button3.BackgroundColor3 = Color3.new(0.137255, 0.137255, 0.137255)
  129. Button3.BorderSizePixel = 0
  130.  
  131. Button_3.Name = "Button"
  132. Button_3.Parent = Button3
  133. Button_3.BackgroundColor3 = Color3.new(1, 1, 1)
  134. Button_3.BackgroundTransparency = 1
  135. Button_3.Size = UDim2.new(1, 0, 1, 0)
  136. Button_3.Font = Enum.Font.SourceSans
  137. Button_3.Text = Text
  138. Button_3.TextColor3 = Color3.new(0.588235, 0.588235, 0.588235)
  139. Button_3.TextSize = 20
  140. Button_3.TextWrapped = true
  141. Button_3.TextScaled = true
  142. Button_3.MouseButton1Click:Connect(CallBack)
  143. Button_3.MouseEnter:Connect(function()
  144. Button3.BackgroundColor3 = Color3.fromRGB(20,20,20)
  145. end)
  146. Button_3.MouseLeave:Connect(function()
  147. Button3.BackgroundColor3 = Color3.new(0.137255, 0.137255, 0.137255)
  148. end)
  149. Button_3.MouseButton1Click:Connect(function()
  150. Button3.BackgroundColor3 = Color3.fromRGB(150,150,150)
  151. wait()
  152. Button3.BackgroundColor3 = Color3.new(0.137255, 0.137255, 0.137255)
  153. end)
  154. end
  155.  
  156.  
  157.  
  158. Button("Delete Workspace",function()
  159. ClearChildren(workspace)
  160. end)
  161. Button("Delete Remotes",function()
  162. DeleteRemotes()
  163. end)
  164. Button("Kick All",function()
  165. for i,v in pairs(game.Players:GetPlayers()) do
  166. DestroyItem(v)
  167. end
  168. end)
  169. Button("Chat All",function()
  170. everyoneChat(Input.Text)
  171. end)
  172. Button("Chat Bricks",function()
  173. GetDescendants(workspace,function(brick)
  174.  
  175. blockChat(brick,Input.Text)
  176. end)
  177. end)
  178. Button("Player Chat",function()
  179. PlayerChat(Input.Text,Input2.Text)
  180. end)
  181. Button("Spawn Item",function()
  182. spawnItem(Input.Text,Vector3.new(Input2.Text))
  183. end)
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191. local library = {}
  192. function Tween(obj, tinfo, goal)
  193. game:GetService("TweenService"):Create(obj, tinfo, goal):Play()
  194. end
  195.  
  196. local TweenService = game:GetService("TweenService")
  197. local defaults; do
  198. local dragger = {}; do
  199. local mouse = game:GetService("Players").LocalPlayer:GetMouse();
  200. local inputService = game:GetService('UserInputService');
  201. local heartbeat = game:GetService("RunService").Heartbeat;
  202. function dragger.new(frame)
  203. local dragging
  204. local dragInput
  205. local dragStart
  206. local startPos
  207.  
  208. local function update(input)
  209. local delta = input.Position - dragStart
  210. Tween(frame, TweenInfo.new(0.05,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut), {Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)})
  211. end
  212.  
  213. frame.InputBegan:Connect(function(input)
  214. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  215. dragging = true
  216. dragStart = input.Position
  217. startPos = frame.Position
  218.  
  219. input.Changed:Connect(function()
  220. if input.UserInputState == Enum.UserInputState.End then
  221. dragging = false
  222. end
  223. end)
  224. end
  225. end)
  226.  
  227. frame.InputChanged:Connect(function(input)
  228. if input.UserInputType == Enum.UserInputType.MouseMovement then
  229. dragInput = input
  230. end
  231. end)
  232.  
  233. inputService.InputChanged:Connect(function(input)
  234. if input == dragInput and dragging then
  235. update(input)
  236. end
  237. end)
  238. end
  239.  
  240. game:GetService('UserInputService').InputBegan:connect(function(key, gpe)
  241. if (not gpe) then
  242. if key.KeyCode == Enum.KeyCode.RightControl then
  243. library.toggled = not library.toggled;
  244. for i, data in next, library.queue do
  245. local pos = (library.toggled and data.p or UDim2.new(-1, 0, -0.5,0))
  246. data.w:TweenPosition(pos, (library.toggled and 'Out' or 'In'), 'Quad', 0.15, true)
  247. wait();
  248. end
  249. end
  250. end
  251. end)
  252. end
  253.  
  254. dragger.new(Frame)
  255. end
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement