ilostspace

OP MoTG Gui

Jun 20th, 2019
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.34 KB | None | 0 0
  1. local MoTG = Instance.new("ScreenGui")
  2. local Run = Instance.new("TextButton")
  3. local Page1 = Instance.new("Frame")
  4. local setamount = Instance.new("TextBox")
  5. local spawnitem = Instance.new("TextButton")
  6. local spawnanimal = Instance.new("TextButton")
  7. local setspeed = Instance.new("TextButton")
  8. local killanimals = Instance.new("TextButton")
  9. local destroyitem = Instance.new("TextButton")
  10. local printitems = Instance.new("TextButton")
  11. local printanimals = Instance.new("TextButton")
  12. local choptree = Instance.new("TextButton")
  13. local Pg2 = Instance.new("TextButton")
  14. local setitem = Instance.new("TextBox")
  15. local Page2 = Instance.new("Frame")
  16. local setplay = Instance.new("TextBox")
  17. local globval = Instance.new("TextBox")
  18. local Pg1 = Instance.new("TextButton")
  19. local tooltext = Instance.new("TextBox")
  20. local gamepas = Instance.new("TextButton")
  21.  
  22. -- Properties
  23.  
  24. MoTG.Name = "MoTG"
  25. MoTG.Parent = game.CoreGui
  26.  
  27. Run.Name = "Run"
  28. Run.Parent = MoTG
  29. Run.BackgroundColor3 = Color3.new(0.290196, 0.741176, 0.67451)
  30. Run.BorderColor3 = Color3.new(0, 0, 0)
  31. Run.BorderSizePixel = 0
  32. Run.Position = UDim2.new(0, 0, 0, 400)
  33. Run.Size = UDim2.new(0, 20, 0, 20)
  34. Run.ZIndex = 10
  35. Run.Font = Enum.Font.SourceSansLight
  36. Run.FontSize = Enum.FontSize.Size18
  37. Run.Text = ">"
  38. Run.TextColor3 = Color3.new(0.87451, 0.862745, 0.890196)
  39.  
  40. Page1.Name = "Page1"
  41. Page1.Parent = MoTG
  42. Page1.Active = true
  43. Page1.BackgroundColor3 = Color3.new(0.290196, 0.741176, 0.67451)
  44. Page1.BorderSizePixel = 0
  45. Page1.Draggable = true
  46. Page1.Position = UDim2.new(0, -200, 0, 100)
  47. Page1.Size = UDim2.new(0, 200, 0, 300)
  48. Page1.ZIndex = 7
  49.  
  50. setamount.Name = "setamount"
  51. setamount.Parent = Page1
  52. setamount.BackgroundColor3 = Color3.new(0.211765, 0.662745, 0.596078)
  53. setamount.BackgroundTransparency = 0.30000001192093
  54. setamount.BorderColor3 = Color3.new(0.968628, 0.717647, 0.2)
  55. setamount.Position = UDim2.new(0, 15, 0, 45)
  56. setamount.Size = UDim2.new(0, 175, 0, 20)
  57. setamount.ZIndex = 10
  58. setamount.Font = Enum.Font.SourceSansLight
  59. setamount.FontSize = Enum.FontSize.Size14
  60. setamount.Text = "Amount"
  61. setamount.TextColor3 = Color3.new(0.87451, 0.862745, 0.890196)
  62.  
  63. spawnitem.Name = "spawnitem"
  64. spawnitem.Parent = Page1
  65. spawnitem.BackgroundColor3 = Color3.new(0.211765, 0.662745, 0.596078)
  66. spawnitem.BackgroundTransparency = 0.30000001192093
  67. spawnitem.BorderSizePixel = 0
  68. spawnitem.Position = UDim2.new(0, 40, 0, 75)
  69. spawnitem.Size = UDim2.new(0, 125, 0, 20)
  70. spawnitem.ZIndex = 10
  71. spawnitem.Font = Enum.Font.SourceSansLight
  72. spawnitem.FontSize = Enum.FontSize.Size14
  73. spawnitem.Text = "Spawn Item"
  74. spawnitem.TextColor3 = Color3.new(0.87451, 0.862745, 0.890196)
  75.  
  76. spawnanimal.Name = "spawnanimal"
  77. spawnanimal.Parent = Page1
  78. spawnanimal.BackgroundColor3 = Color3.new(0.211765, 0.662745, 0.596078)
  79. spawnanimal.BackgroundTransparency = 0.30000001192093
  80. spawnanimal.BorderSizePixel = 0
  81. spawnanimal.Position = UDim2.new(0, 40, 0, 100)
  82. spawnanimal.Size = UDim2.new(0, 125, 0, 20)
  83. spawnanimal.ZIndex = 10
  84. spawnanimal.Font = Enum.Font.SourceSansLight
  85. spawnanimal.FontSize = Enum.FontSize.Size14
  86. spawnanimal.Text = "Spawn Animal"
  87. spawnanimal.TextColor3 = Color3.new(0.87451, 0.862745, 0.890196)
  88.  
  89. setspeed.Name = "setspeed"
  90. setspeed.Parent = Page1
  91. setspeed.BackgroundColor3 = Color3.new(0.211765, 0.662745, 0.596078)
  92. setspeed.BackgroundTransparency = 0.30000001192093
  93. setspeed.BorderSizePixel = 0
  94. setspeed.Position = UDim2.new(0, 40, 0, 125)
  95. setspeed.Size = UDim2.new(0, 125, 0, 20)
  96. setspeed.ZIndex = 10
  97. setspeed.Font = Enum.Font.SourceSansLight
  98. setspeed.FontSize = Enum.FontSize.Size14
  99. setspeed.Text = "Set Walkspeed"
  100. setspeed.TextColor3 = Color3.new(0.87451, 0.862745, 0.890196)
  101.  
  102. killanimals.Name = "killanimals"
  103. killanimals.Parent = Page1
  104. killanimals.BackgroundColor3 = Color3.new(0.211765, 0.662745, 0.596078)
  105. killanimals.BackgroundTransparency = 0.30000001192093
  106. killanimals.BorderSizePixel = 0
  107. killanimals.Position = UDim2.new(0, 40, 0, 150)
  108. killanimals.Size = UDim2.new(0, 125, 0, 20)
  109. killanimals.ZIndex = 10
  110. killanimals.Font = Enum.Font.SourceSansLight
  111. killanimals.FontSize = Enum.FontSize.Size14
  112. killanimals.Text = "Kill All Named Animals"
  113. killanimals.TextColor3 = Color3.new(0.87451, 0.862745, 0.890196)
  114.  
  115. destroyitem.Name = "destroyitem"
  116. destroyitem.Parent = Page1
  117. destroyitem.BackgroundColor3 = Color3.new(0.211765, 0.662745, 0.596078)
  118. destroyitem.BackgroundTransparency = 0.30000001192093
  119. destroyitem.BorderSizePixel = 0
  120. destroyitem.Position = UDim2.new(0, 40, 0, 175)
  121. destroyitem.Size = UDim2.new(0, 125, 0, 20)
  122. destroyitem.ZIndex = 10
  123. destroyitem.Font = Enum.Font.SourceSansLight
  124. destroyitem.FontSize = Enum.FontSize.Size14
  125. destroyitem.Text = "Destroy Named Items"
  126. destroyitem.TextColor3 = Color3.new(0.87451, 0.862745, 0.890196)
  127.  
  128. printitems.Name = "printitems"
  129. printitems.Parent = Page1
  130. printitems.BackgroundColor3 = Color3.new(0.211765, 0.662745, 0.596078)
  131. printitems.BackgroundTransparency = 0.30000001192093
  132. printitems.BorderSizePixel = 0
  133. printitems.Position = UDim2.new(0, 40, 0, 200)
  134. printitems.Size = UDim2.new(0, 125, 0, 20)
  135. printitems.ZIndex = 10
  136. printitems.Font = Enum.Font.SourceSansLight
  137. printitems.FontSize = Enum.FontSize.Size14
  138. printitems.Text = "Print Item Names (F9)"
  139. printitems.TextColor3 = Color3.new(0.87451, 0.862745, 0.890196)
  140.  
  141. printanimals.Name = "printanimals"
  142. printanimals.Parent = Page1
  143. printanimals.BackgroundColor3 = Color3.new(0.211765, 0.662745, 0.596078)
  144. printanimals.BackgroundTransparency = 0.30000001192093
  145. printanimals.BorderSizePixel = 0
  146. printanimals.Position = UDim2.new(0, 40, 0, 225)
  147. printanimals.Size = UDim2.new(0, 125, 0, 20)
  148. printanimals.ZIndex = 10
  149. printanimals.Font = Enum.Font.SourceSansLight
  150. printanimals.FontSize = Enum.FontSize.Size14
  151. printanimals.Text = "Print Animal Names (F9)"
  152. printanimals.TextColor3 = Color3.new(0.87451, 0.862745, 0.890196)
  153.  
  154. choptree.Name = "choptree"
  155. choptree.Parent = Page1
  156. choptree.BackgroundColor3 = Color3.new(0.211765, 0.662745, 0.596078)
  157. choptree.BackgroundTransparency = 0.30000001192093
  158. choptree.BorderSizePixel = 0
  159. choptree.Position = UDim2.new(0, 40, 0, 250)
  160. choptree.Size = UDim2.new(0, 125, 0, 20)
  161. choptree.ZIndex = 10
  162. choptree.Font = Enum.Font.SourceSansLight
  163. choptree.FontSize = Enum.FontSize.Size14
  164. choptree.Text = "Chop Named Trees"
  165. choptree.TextColor3 = Color3.new(0.87451, 0.862745, 0.890196)
  166.  
  167. Pg2.Name = "Pg2"
  168. Pg2.Parent = Page1
  169. Pg2.BackgroundColor3 = Color3.new(0.211765, 0.662745, 0.596078)
  170. Pg2.BackgroundTransparency = 0.30000001192093
  171. Pg2.BorderColor3 = Color3.new(0, 0, 0)
  172. Pg2.BorderSizePixel = 0
  173. Pg2.Position = UDim2.new(0, 175, 0, 275)
  174. Pg2.Size = UDim2.new(0, 20, 0, 20)
  175. Pg2.ZIndex = 10
  176. Pg2.Font = Enum.Font.SourceSansLight
  177. Pg2.FontSize = Enum.FontSize.Size18
  178. Pg2.Text = ">"
  179. Pg2.TextColor3 = Color3.new(0.87451, 0.862745, 0.890196)
  180.  
  181. setitem.Name = "setitem"
  182. setitem.Parent = Page1
  183. setitem.BackgroundColor3 = Color3.new(0.211765, 0.662745, 0.596078)
  184. setitem.BackgroundTransparency = 0.30000001192093
  185. setitem.BorderColor3 = Color3.new(0.968628, 0.717647, 0.2)
  186. setitem.Position = UDim2.new(0, 5, 0, 10)
  187. setitem.Size = UDim2.new(0, 190, 0, 30)
  188. setitem.ZIndex = 10
  189. setitem.Font = Enum.Font.SourceSansLight
  190. setitem.FontSize = Enum.FontSize.Size18
  191. setitem.Text = "Item"
  192. setitem.TextColor3 = Color3.new(0.87451, 0.862745, 0.890196)
  193.  
  194. Page2.Name = "Page2"
  195. Page2.Parent = MoTG
  196. Page2.Active = true
  197. Page2.BackgroundColor3 = Color3.new(0.290196, 0.741176, 0.67451)
  198. Page2.BorderSizePixel = 0
  199. Page2.Draggable = true
  200. Page2.Position = UDim2.new(0, -200, 0, 100)
  201. Page2.Size = UDim2.new(0, 200, 0, 300)
  202. Page2.ZIndex = 7
  203.  
  204. setplay.Name = "setplay"
  205. setplay.Parent = Page2
  206. setplay.BackgroundColor3 = Color3.new(0.211765, 0.662745, 0.596078)
  207. setplay.BackgroundTransparency = 0.30000001192093
  208. setplay.BorderColor3 = Color3.new(0.968628, 0.717647, 0.2)
  209. setplay.Position = UDim2.new(0, 5, 0, 10)
  210. setplay.Size = UDim2.new(0, 190, 0, 30)
  211. setplay.ZIndex = 10
  212. setplay.Font = Enum.Font.SourceSansLight
  213. setplay.FontSize = Enum.FontSize.Size18
  214. setplay.Text = "Player"
  215. setplay.TextColor3 = Color3.new(0.87451, 0.862745, 0.890196)
  216.  
  217. globval.Name = "globval"
  218. globval.Parent = Page2
  219. globval.BackgroundColor3 = Color3.new(0.211765, 0.662745, 0.596078)
  220. globval.BackgroundTransparency = 0.30000001192093
  221. globval.BorderColor3 = Color3.new(0.968628, 0.717647, 0.2)
  222. globval.Position = UDim2.new(0, 15, 0, 45)
  223. globval.Size = UDim2.new(0, 175, 0, 20)
  224. globval.ZIndex = 10
  225. globval.Font = Enum.Font.SourceSansLight
  226. globval.FontSize = Enum.FontSize.Size14
  227. globval.Text = "Global Value"
  228. globval.TextColor3 = Color3.new(0.87451, 0.862745, 0.890196)
  229.  
  230. Pg1.Name = "Pg1"
  231. Pg1.Parent = Page2
  232. Pg1.BackgroundColor3 = Color3.new(0.211765, 0.662745, 0.596078)
  233. Pg1.BackgroundTransparency = 0.30000001192093
  234. Pg1.BorderColor3 = Color3.new(0, 0, 0)
  235. Pg1.BorderSizePixel = 0
  236. Pg1.Position = UDim2.new(0, 5, 0, 275)
  237. Pg1.Size = UDim2.new(0, 20, 0, 20)
  238. Pg1.ZIndex = 10
  239. Pg1.Font = Enum.Font.SourceSansLight
  240. Pg1.FontSize = Enum.FontSize.Size18
  241. Pg1.Text = "<"
  242. Pg1.TextColor3 = Color3.new(0.87451, 0.862745, 0.890196)
  243.  
  244. tooltext.Name = "tooltext"
  245. tooltext.Parent = Page2
  246. tooltext.BackgroundColor3 = Color3.new(0.211765, 0.662745, 0.596078)
  247. tooltext.BackgroundTransparency = 0.30000001192093
  248. tooltext.BorderSizePixel = 0
  249. tooltext.Position = UDim2.new(0, 40, 0, 75)
  250. tooltext.Size = UDim2.new(0, 125, 0, 20)
  251. tooltext.ZIndex = 10
  252. tooltext.Font = Enum.Font.SourceSansLight
  253. tooltext.FontSize = Enum.FontSize.Size14
  254. tooltext.Text = "Tool"
  255. tooltext.TextColor3 = Color3.new(0.87451, 0.862745, 0.890196)
  256.  
  257. gamepas.Name = "gamepas"
  258. gamepas.Parent = Page2
  259. gamepas.BackgroundColor3 = Color3.new(0.211765, 0.662745, 0.596078)
  260. gamepas.BackgroundTransparency = 0.30000001192093
  261. gamepas.BorderSizePixel = 0
  262. gamepas.Position = UDim2.new(0, 40, 0, 100)
  263. gamepas.Size = UDim2.new(0, 125, 0, 20)
  264. gamepas.ZIndex = 10
  265. gamepas.Font = Enum.Font.SourceSansLight
  266. gamepas.FontSize = Enum.FontSize.Size14
  267. gamepas.Text = "OP THE TOOL"
  268. gamepas.TextColor3 = Color3.new(0.87451, 0.862745, 0.890196)
  269.  
  270. --[[END OF GUI CREATION]]
  271.  
  272. local opened = false
  273. local disablebuttons = false
  274. local player33 = ""
  275. local gloval33 = 0
  276. local page = 1
  277.  
  278. local rs = game:GetService("RunService").RenderStepped
  279. LerpProperty = function(obj,prop,start,finish,time)
  280. local t = tick()
  281. obj[prop] = start
  282. while true do
  283. rs:wait() -- using RenderStepped cuz smooth lookin'
  284. local p = (tick()-t)/time -- progressed time in %
  285. if p >= 1 then break end -- more than 'time' seconds passed
  286. -- can transform p to math.sin or some other lerp:
  287. p = p * p * (3 - 2*p)
  288. -- stole that formula from some site on google (link below code)
  289. obj[prop] = start:Lerp(finish,p)
  290. end
  291. obj[prop] = finish
  292. end
  293.  
  294. spawntheitem = function()
  295. for i = 1, gloval do
  296. rs:wait()
  297. game.ReplicatedStorage.Resources.Remotes.MakeItem:FireServer(player33, game.Players.LocalPlayer.Character.UpperTorso.Position + Vector3.new(0, 3, 0))
  298. end
  299. end
  300.  
  301. spawncreature = function()
  302. for i = 1, gloval do
  303. rs:wait()
  304. game.ReplicatedStorage.Resources.Remotes.MakeAnimal:FireServer(player33, game.Players.LocalPlayer.Character.UpperTorso.Position + Vector3.new(0, 2, 0))
  305. end
  306. end
  307.  
  308. gofast = function()
  309. game.ReplicatedStorage.Resources.Remotes.SetWalkspeed:FireServer(tonumber(gloval))
  310. end
  311.  
  312. killanimal = function()
  313. for _, v in pairs (workspace.Animals:GetChildren()) do
  314. if player33 == "all" then
  315. game.ReplicatedStorage.Resources.Remotes.DamageAnimal:FireServer(v, 20000)
  316. elseif player33 ~= "all" and v.Name == player33 then
  317. game.ReplicatedStorage.Resources.Remotes.DamageAnimal:FireServer(v, 20000)
  318. end
  319. end
  320. end
  321.  
  322. destroyit = function()
  323. for _, v in pairs (workspace.Items:GetChildren()) do
  324. if player33 == "all" then
  325. game.ReplicatedStorage.Resources.Remotes.DestroyItem:FireServer(v)
  326. elseif v.Name == player33 then
  327. game.ReplicatedStorage.Resources.Remotes.DestroyItem:FireServer(v)
  328. end
  329. end
  330. end
  331.  
  332. printitem = function()
  333. for i, v in pairs (game.ReplicatedStorage.Resources.Items:GetChildren()) do
  334. print("["..i.."] ", v.Name)
  335. end
  336. end
  337.  
  338. printanimal = function()
  339. for i, v in pairs (game.ReplicatedStorage.Resources.Animals:GetChildren()) do
  340. print("["..i.."] ", v.Name)
  341. end
  342. end
  343.  
  344. choptrees = function()
  345. for _, v in pairs (workspace.Plants:GetChildren()) do
  346. if player33 == "all" then
  347. game.ReplicatedStorage.Resources.Remotes.ChopTree:FireServer(v)
  348. elseif v.Name == player33 then
  349. game.ReplicatedStorage.Resources.Remotes.ChopTree:FireServer(v)
  350. end
  351. end
  352. end
  353.  
  354. openclose = function()
  355. if opened == false and disablebuttons == false then
  356. if page == 1 then
  357. disablebuttons = true
  358. LerpProperty(Page1, "Position", Page1.Position, UDim2.new(0, 500, 0, 100), 0.5)
  359. Run.Text = "<"
  360. opened = true
  361. disablebuttons = false
  362. elseif page == 2 then
  363. disablebuttons = true
  364. LerpProperty(Page2, "Position", Page2.Position, UDim2.new(0, 500, 0, 100), 0.5)
  365. Run.Text = "<"
  366. opened = true
  367. disablebuttons = false
  368. end
  369. elseif opened == true and disablebuttons == false then
  370. if page == 1 then
  371. disablebuttons = true
  372. LerpProperty(Page1, "Position", Page1.Position, UDim2.new(0, -200, 0, 100), 0.5)
  373. Run.Text = ">"
  374. opened = false
  375. disablebuttons = false
  376. elseif page == 2 then
  377. disablebuttons = true
  378. LerpProperty(Page2, "Position", Page2.Position, UDim2.new(0, -200, 0, 100), 0.5)
  379. Run.Text = ">"
  380. opened = false
  381. disablebuttons = false
  382. end
  383. end
  384. end
  385.  
  386. switchpage = function()
  387. if page == 1 and disablebuttons == false then
  388. disablebuttons = true
  389. LerpProperty(Page1, "Position", Page1.Position, UDim2.new(0, -200, 0, 100), 0.25)
  390. wait(1/3)
  391. LerpProperty(Page2, "Position", Page2.Position, UDim2.new(0, 500, 0, 100), 0.25)
  392. page = 2
  393. disablebuttons = false
  394. elseif page == 2 and disablebuttons == false then
  395. disablebuttons = true
  396. LerpProperty(Page2, "Position", Page2.Position, UDim2.new(0, -200, 0, 100), 0.25)
  397. wait(1/3)
  398. LerpProperty(Page1, "Position", Page1.Position, UDim2.new(0, 500, 0, 100), 0.25)
  399. page = 1
  400. disablebuttons = false
  401. end
  402. end
  403.  
  404. connected = function(location, functionz)
  405. location.MouseButton1Down:connect(functionz)
  406. end
  407.  
  408. coroutine.resume(coroutine.create(function()
  409. while true do
  410. rs:wait()
  411. if page == 1 then
  412. player33 = setitem.Text
  413. gloval = setamount.Text
  414. elseif page == 2 then
  415. player33 = setitem.Text
  416. gloval = setamount.Text
  417. end
  418. end
  419. end))
  420.  
  421. connected(Pg1, switchpage)
  422. connected(Pg2, switchpage)
  423. connected(Run, openclose)
  424. connected(spawnitem, spawntheitem)
  425. connected(spawnanimal, spawncreature)
  426. connected(setspeed, gofast)
  427. connected(killanimals, killanimal)
  428. connected(destroyitem, destroyit)
  429. connected(printitems, printitem)
  430. connected(printanimals, printanimal)
  431. connected(choptree, choptrees)
Add Comment
Please, Sign In to add comment