Advertisement
FilterYT

Untitled

Apr 17th, 2019
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.79 KB | None | 0 0
  1. local ScreenGui = Instance.new('ScreenGui')
  2. local Frame = Instance.new('Frame')
  3. local Monster = Instance.new('TextBox')
  4. local TextLabel = Instance.new('TextLabel')
  5. local ChangeM = Instance.new('TextButton')
  6. local StartStop = Instance.new('TextButton')
  7. local RemoveDoors = Instance.new('TextButton')
  8. local FType = Instance.new('TextButton')
  9. local TextLabel_2 = Instance.new('TextLabel')
  10.  
  11. --Properties:
  12. ScreenGui.Parent = game.CoreGui
  13. ScreenGui.ResetOnSpawn = false
  14.  
  15. Frame.Parent = ScreenGui
  16. Frame.Active = true
  17. Frame.Draggable = true
  18. Frame.BackgroundColor3 = Color3.new(0.266667, 0.266667, 0.266667)
  19. Frame.BackgroundTransparency = 0.55
  20. Frame.Position = UDim2.new(0.5, -100, 0.5, -100)
  21. Frame.Selectable = true
  22. Frame.Size = UDim2.new(0, 200, 0, 200)
  23.  
  24. Monster.Name = 'Monster'
  25. Monster.Parent = Frame
  26. Monster.BackgroundColor3 = Color3.new(0.32549, 0.32549, 0.32549)
  27. Monster.BackgroundTransparency = 0.5
  28. Monster.Position = UDim2.new(0.0467410274, 0, 0.224623337, 0)
  29. Monster.Size = UDim2.new(0, 111, 0, 25)
  30. Monster.Font = Enum.Font.SourceSans
  31. Monster.Text = 'Slime'
  32. Monster.TextColor3 = Color3.new(1, 1, 1)
  33. Monster.TextScaled = true
  34. Monster.TextSize = 20
  35. Monster.TextStrokeTransparency = 0
  36. Monster.TextWrapped = true
  37.  
  38. TextLabel.Parent = Frame
  39. TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  40. TextLabel.BackgroundTransparency = 1
  41. TextLabel.Position = UDim2.new(0.12, 0, -0.003, 0)
  42. TextLabel.Size = UDim2.new(0, 150, 0, 40)
  43. TextLabel.Font = Enum.Font.Code
  44. TextLabel.Text = 'Magic Simulator GUI!'
  45. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  46. TextLabel.TextSize = 16
  47. TextLabel.TextStrokeTransparency = 0
  48.  
  49. ChangeM.Name = 'ChangeM'
  50. ChangeM.Parent = Frame
  51. ChangeM.BackgroundColor3 = Color3.new(0.278431, 0.278431, 0.278431)
  52. ChangeM.BackgroundTransparency = 0.60000002384186
  53. ChangeM.Position = UDim2.new(0.645, 0, 0.225, 0)
  54. ChangeM.Size = UDim2.new(0, 60, 0, 25)
  55. ChangeM.Font = Enum.Font.SourceSans
  56. ChangeM.Text = 'Change'
  57. ChangeM.TextColor3 = Color3.new(1, 1, 1)
  58. ChangeM.TextSize = 20
  59. ChangeM.TextStrokeTransparency = 0
  60.  
  61. StartStop.Name = 'Start/Stop'
  62. StartStop.Parent = Frame
  63. StartStop.BackgroundColor3 = Color3.new(0.278431, 0.278431, 0.278431)
  64. StartStop.BackgroundTransparency = 0.6
  65. StartStop.Position = UDim2.new(0.048, 0, 0.42, 0)
  66. StartStop.Size = UDim2.new(0, 180, 0, 25)
  67. StartStop.Font = Enum.Font.SourceSans
  68. StartStop.Text = 'Start Auto-Farming'
  69. StartStop.TextColor3 = Color3.new(1, 1, 1)
  70. StartStop.TextSize = 20
  71. StartStop.TextStrokeTransparency = 0
  72.  
  73. RemoveDoors.Name = 'RemoveDoors'
  74. RemoveDoors.Parent = Frame
  75. RemoveDoors.BackgroundColor3 = Color3.new(0.278431, 0.278431, 0.278431)
  76. RemoveDoors.BackgroundTransparency = 0.6
  77. RemoveDoors.Position = UDim2.new(0.048, 0, 0.8, 0)
  78. RemoveDoors.Size = UDim2.new(0, 180, 0, 25)
  79. RemoveDoors.Font = Enum.Font.SourceSans
  80. RemoveDoors.Text = 'Remove Doors'
  81. RemoveDoors.TextColor3 = Color3.new(1, 1, 1)
  82. RemoveDoors.TextSize = 20
  83. RemoveDoors.TextStrokeTransparency = 0
  84.  
  85. FType.Name = 'FType'
  86. FType.Parent = Frame
  87. FType.BackgroundColor3 = Color3.new(0.278431, 0.278431, 0.278431)
  88. FType.BackgroundTransparency = 0.60000002384186
  89. FType.Position = UDim2.new(0.048, 0, 0.61, 0)
  90. FType.Size = UDim2.new(0, 180, 0, 25)
  91. FType.Font = Enum.Font.SourceSans
  92. FType.Text = 'Farming Type: Single'
  93. FType.TextColor3 = Color3.new(1, 1, 1)
  94. FType.TextSize = 20
  95. FType.TextStrokeTransparency = 0
  96.  
  97. TextLabel_2.Parent = Frame
  98. TextLabel_2.BackgroundColor3 = Color3.new(1, 1, 1)
  99. TextLabel_2.BackgroundTransparency = 1
  100. TextLabel_2.Position = UDim2.new(0.045, 0, 0.869, 0)
  101. TextLabel_2.Size = UDim2.new(0, 175, 0, 40)
  102. TextLabel_2.Font = Enum.Font.Code
  103. TextLabel_2.Text = '-- By SernyPoptart'
  104. TextLabel_2.TextColor3 = Color3.new(1, 1, 1)
  105. TextLabel_2.TextSize = 10
  106. -- Scripts:
  107.  
  108. _G.Monster = Monster.Text
  109. _G.Farming = false
  110. _G.Single = true
  111.  
  112. Skills = {}
  113. Messages = {}
  114.  
  115. local function fixCoeficient (vector, coef)
  116. return Vector3.new(vector.X/coef, vector.Y/coef, vector.Z/coef)
  117. end
  118.  
  119. local message = function(msg, once)
  120. if Messages[msg] == nil then
  121. if once then
  122. Messages[msg] = true
  123. end
  124.  
  125. local StarterGui = game:GetService('StarterGui')
  126.  
  127. repeat
  128. wait()
  129. local Success = pcall(function()
  130. StarterGui:SetCore('ChatMakeSystemMessage', {
  131. Text = msg;
  132. Color = Color3.fromRGB(math.random(1,255), math.random(1,255), math.random(1,255));
  133. Font = Enum.Font.SourceSansBold;
  134. TextSize = 24
  135. })
  136. end)
  137. until Success
  138. end
  139. end
  140.  
  141. local player = game.Players.LocalPlayer
  142.  
  143. for _,v in pairs(player.Inventory:GetChildren()) do
  144. if v.Equipped.Value then
  145. table.insert(Skills, v.Name)
  146. end
  147. end
  148.  
  149. Meta = getrawmetatable(game)
  150. make_writeable(Meta)
  151. NameCall = Meta.__namecall
  152.  
  153. _G.Spell = nil
  154. _G.Hit = nil
  155.  
  156. FType.MouseButton1Down:connect(function()
  157. _G.Single = not _G.Single
  158.  
  159. if _G.Single then
  160. FType.Text = 'Farming Type: Single'
  161. else
  162. FType.Text = 'Farming Type: Multiple'
  163. end
  164. end)
  165.  
  166. ChangeM.MouseButton1Down:connect(function()
  167. _G.Monster = Monster.Text
  168. message('Changed monster to ''.._G.Monster..''!', false)
  169. end)
  170.  
  171. StartStop.MouseButton1Down:connect(function()
  172. if _G.Started and _G.Spell == nil and _G.Hit == nil or _G.Started and _G.Spell == nil and _G.Hit == nil then
  173. message('Use your ''.. Skills[1] ..'' magic until I find all the remotes ' .. player.Name .. '!!', false)
  174. end
  175.  
  176. if _G.Started == nil then
  177. _G.Started = true
  178.  
  179. message('Use your ''.. Skills[1] ..'' magic until I find all the remotes ' .. player.Name .. '!!', false)
  180.  
  181. spawn(function()
  182. Meta.__namecall = function(rc, ...)
  183. args = {...}
  184.  
  185. if _G.Spell == nil and Skills[1] == args[1] and typeof(args[2]) == 'Vector3' then
  186. if not spellMessage then
  187. spellMessage = false
  188. message('SPELL REMOTE FOUND!', true)
  189. end
  190.  
  191. _G.Spell = rc
  192. end
  193.  
  194. if _G.Spell ~= nil and _G.Hit == nil and _G.Spell ~=rc and Skills[1] == args[1] and typeof(args[3]) == 'Vector3' then
  195. if not hitMessage then
  196. hitMessage = false
  197. message('HIT REMOTE FOUND!', true)
  198. end
  199.  
  200. _G.Hit = rc
  201. end
  202.  
  203. return NameCall(rc, ...)
  204. end
  205. end)
  206.  
  207. repeat wait(1) print(_G.Spell, _G.Hit) until _G.Spell ~= nil and _G.Hit ~= nil
  208.  
  209. message('All set up!', true)
  210. end
  211.  
  212. if _G.Spell ~= nil and _G.Hit ~= nil then
  213. _G.Farming = not _G.Farming
  214.  
  215. if _G.Farming then
  216. StartStop.Text = 'Stop Auto-Farming'
  217. message('Farming is activated!', false)
  218. else
  219. StartStop.Text = 'Start Auto-Farming'
  220. message('Farming is deactivated!', false)
  221. end
  222.  
  223. while _G.Farming and wait(1) do
  224. pcall(function()
  225. for _,v in pairs(workspace.Monsters:GetChildren()) do
  226. if v:FindFirstChild('HumanoidRootPart') and v.Name == _G.Monster then
  227. if _G.Single then
  228. for _,n in pairs(player.Inventory:GetChildren()) do
  229. if n.Equipped.Value then
  230. _G.Spell:FireServer(n.Name, v:FindFirstChild('HumanoidRootPart').Position)
  231. wait()
  232. local pos = fixCoeficient(v:FindFirstChild('HumanoidRootPart').Position, 10)
  233. _G.Hit:FireServer(n.Name, nil, pos)
  234. end
  235. end
  236. else
  237. for _,n in pairs(player.Inventory:GetChildren()) do
  238. if n.Equipped.Value and n.Cooldown.Value == false then
  239. _G.Spell:FireServer(n.Name, v:FindFirstChild('HumanoidRootPart').Position)
  240. wait()
  241. local pos = fixCoeficient(v:FindFirstChild('HumanoidRootPart').Position, 10)
  242. _G.Hit:FireServer(n.Name, nil, pos)
  243. break
  244. end
  245. end
  246. end
  247. end
  248. end
  249. end)
  250. end
  251. end
  252. end)
  253.  
  254. RemoveDoors.MouseButton1Down:connect(function()
  255. for _, v in pairs(workspace.Doors:GetChildren()) do
  256. v:Destroy()
  257. end
  258. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement