DxvilzLuci

[ALPHA] Pet Swarm Simulator Script

Mar 2nd, 2021 (edited)
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.81 KB | None | 0 0
  1. -- Gui to Lua
  2. -- Version: 3.2
  3.  
  4. -- Instances:
  5. local player = game.Players.LocalPlayer
  6. local BadGui = Instance.new("ScreenGui")
  7. local Main = Instance.new("Frame")
  8. local UICorner = Instance.new("UICorner")
  9. local Top = Instance.new("Frame")
  10. local UICorner_2 = Instance.new("UICorner")
  11. local TextLabel = Instance.new("TextLabel")
  12. local Settings = Instance.new("Frame")
  13. local UICorner_3 = Instance.new("UICorner")
  14. local Zone = Instance.new("TextBox")
  15. local UICorner_4 = Instance.new("UICorner")
  16. local TextLabel_2 = Instance.new("TextLabel")
  17. local UICorner_5 = Instance.new("UICorner")
  18. local Update = Instance.new("TextButton")
  19. local UICorner_6 = Instance.new("UICorner")
  20. local TextLabel_3 = Instance.new("TextLabel")
  21. local UICorner_7 = Instance.new("UICorner")
  22. local Food = Instance.new("TextButton")
  23. local UICorner_8 = Instance.new("UICorner")
  24. local Eggs = Instance.new("TextButton")
  25. local UICorner_9 = Instance.new("UICorner")
  26. local TextLabel_4 = Instance.new("TextLabel")
  27.  
  28. --Properties:
  29.  
  30. BadGui.Name = "Bad Gui"
  31. BadGui.Parent = game.CoreGui
  32. BadGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  33.  
  34. Main.Name = "Main"
  35. Main.Parent = BadGui
  36. Main.BackgroundColor3 = Color3.fromRGB(38, 38, 38)
  37. Main.Position = UDim2.new(0.414558947, 0, 0.336165071, 0)
  38. Main.Size = UDim2.new(0, 276, 0, 270)
  39. Main.Active = true
  40. Main.Draggable = true
  41.  
  42. UICorner.Parent = Main
  43.  
  44. Top.Name = "Top"
  45. Top.Parent = Main
  46. Top.BackgroundColor3 = Color3.fromRGB(24, 24, 24)
  47. Top.Position = UDim2.new(0.177536249, 0, -0.0851851851, 0)
  48. Top.Size = UDim2.new(0, 178, 0, 47)
  49.  
  50. UICorner_2.Parent = Top
  51.  
  52. TextLabel.Parent = Top
  53. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  54. TextLabel.BackgroundTransparency = 1.000
  55. TextLabel.Size = UDim2.new(0, 178, 0, 47)
  56. TextLabel.Font = Enum.Font.Nunito
  57. TextLabel.Text = "Dan's Nono Square :>"
  58. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  59. TextLabel.TextScaled = true
  60. TextLabel.TextSize = 14.000
  61. TextLabel.TextWrapped = true
  62.  
  63. Settings.Name = "Settings"
  64. Settings.Parent = Main
  65. Settings.BackgroundColor3 = Color3.fromRGB(38, 38, 38)
  66. Settings.Position = UDim2.new(1.02898526, 0, 0, 0)
  67. Settings.Size = UDim2.new(0, 229, 0, 118)
  68.  
  69. UICorner_3.Parent = Settings
  70.  
  71. Zone.Name = "Zone"
  72. Zone.Parent = Settings
  73. Zone.BackgroundColor3 = Color3.fromRGB(24, 24, 24)
  74. Zone.Position = UDim2.new(0.113537118, 0, 0.262711853, 0)
  75. Zone.Size = UDim2.new(0, 175, 0, 38)
  76. Zone.Font = Enum.Font.Nunito
  77. Zone.PlaceholderColor3 = Color3.fromRGB(255, 255, 255)
  78. Zone.PlaceholderText = "Zone1"
  79. Zone.Text = ""
  80. Zone.TextColor3 = Color3.fromRGB(255, 255, 255)
  81. Zone.TextScaled = true
  82. Zone.TextSize = 14.000
  83. Zone.TextWrapped = true
  84.  
  85. UICorner_4.Parent = Zone
  86.  
  87. TextLabel_2.Parent = Settings
  88. TextLabel_2.BackgroundColor3 = Color3.fromRGB(24, 24, 24)
  89. TextLabel_2.Position = UDim2.new(0.0611353703, 0, -0.144067794, 0)
  90. TextLabel_2.Size = UDim2.new(0, 200, 0, 35)
  91. TextLabel_2.Font = Enum.Font.SourceSans
  92. TextLabel_2.Text = "Settings"
  93. TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  94. TextLabel_2.TextScaled = true
  95. TextLabel_2.TextSize = 14.000
  96. TextLabel_2.TextWrapped = true
  97.  
  98. UICorner_5.Parent = TextLabel_2
  99.  
  100. Update.Name = "Update"
  101. Update.Parent = Settings
  102. Update.BackgroundColor3 = Color3.fromRGB(24, 24, 24)
  103. Update.Position = UDim2.new(0.292576432, 0, 0.652542353, 0)
  104. Update.Size = UDim2.new(0, 93, 0, 31)
  105. Update.Font = Enum.Font.Nunito
  106. Update.Text = "Update"
  107. Update.TextColor3 = Color3.fromRGB(255, 255, 255)
  108. Update.TextScaled = true
  109. Update.TextSize = 14.000
  110. Update.TextWrapped = true
  111.  
  112. UICorner_6.Parent = Update
  113.  
  114. TextLabel_3.Parent = Settings
  115. TextLabel_3.BackgroundColor3 = Color3.fromRGB(24, 24, 24)
  116. TextLabel_3.BackgroundTransparency = 1.000
  117. TextLabel_3.Position = UDim2.new(0, 0, 1.06779659, 0)
  118. TextLabel_3.Size = UDim2.new(0, 229, 0, 144)
  119. TextLabel_3.Font = Enum.Font.SourceSans
  120. TextLabel_3.Text = "Zone1, Zone1.1, Zone2, Zone2.1, Zone3, Zone3.1, Zone4, Zone5"
  121. TextLabel_3.TextColor3 = Color3.fromRGB(255, 255, 255)
  122. TextLabel_3.TextScaled = true
  123. TextLabel_3.TextSize = 14.000
  124. TextLabel_3.TextWrapped = true
  125.  
  126. UICorner_7.Parent = TextLabel_3
  127.  
  128. Food.Name = "Food"
  129. Food.Parent = Main
  130. Food.BackgroundColor3 = Color3.fromRGB(24, 24, 24)
  131. Food.Position = UDim2.new(0.0543478243, 0, 0.114814818, 0)
  132. Food.Size = UDim2.new(0, 246, 0, 59)
  133. Food.Font = Enum.Font.SourceSans
  134. Food.Text = "Farm Food"
  135. Food.TextColor3 = Color3.fromRGB(255, 0, 0)
  136. Food.TextScaled = true
  137. Food.TextSize = 14.000
  138. Food.TextWrapped = true
  139.  
  140. UICorner_8.Parent = Food
  141.  
  142. Eggs.Name = "Eggs"
  143. Eggs.Parent = Main
  144. Eggs.BackgroundColor3 = Color3.fromRGB(24, 24, 24)
  145. Eggs.Position = UDim2.new(0.0543478243, 0, 0.362962961, 0)
  146. Eggs.Size = UDim2.new(0, 246, 0, 59)
  147. Eggs.Font = Enum.Font.SourceSans
  148. Eggs.Text = "Farm Eggs"
  149. Eggs.TextColor3 = Color3.fromRGB(255, 0, 0)
  150. Eggs.TextScaled = true
  151. Eggs.TextSize = 14.000
  152. Eggs.TextWrapped = true
  153.  
  154. UICorner_9.Parent = Eggs
  155.  
  156. TextLabel_4.Parent = Main
  157. TextLabel_4.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  158. TextLabel_4.BackgroundTransparency = 1.000
  159. TextLabel_4.Position = UDim2.new(0.0543478243, 0, 0.618518531, 0)
  160. TextLabel_4.Size = UDim2.new(0, 246, 0, 84)
  161. TextLabel_4.Font = Enum.Font.SourceSans
  162. TextLabel_4.Text = "By Luci & Dan :>"
  163. TextLabel_4.TextColor3 = Color3.fromRGB(255, 255, 255)
  164. TextLabel_4.TextScaled = true
  165. TextLabel_4.TextSize = 14.000
  166. TextLabel_4.TextWrapped = true
  167.  
  168.  
  169. -- Scripts:
  170.  
  171. local ZoneSet = "Zone1"
  172. local farmFood = false
  173. local farmEggs = false
  174.  
  175. Update.MouseButton1Click:Connect(function()
  176. Zone.PlaceholderText = Zone.Text
  177. ZoneSet = Zone.Text
  178. wait(.5)
  179. Zone.Text = ""
  180. end)
  181.  
  182. Food.MouseButton1Click:Connect(function()
  183. if farmFood == false then
  184. farmFood = true
  185. Food.TextColor3 = Color3.fromRGB(85, 255, 0)
  186. while farmFood do
  187. wait()
  188. for _, Food in pairs(game:GetService("Workspace").Zones[ZoneSet].FoodSpawns:GetChildren())do
  189. local A_1 = "CollectFood"
  190. local A_2 = Food
  191. for _, Pets in pairs(game:GetService("Workspace")[player.Name].Pets:GetChildren())do
  192. local A_3 = Pets
  193. local Event = game:GetService("ReplicatedStorage").Remotes.Functions.CollectionRF
  194. Event:InvokeServer(A_1, A_2, A_3)
  195. end
  196. end
  197. end
  198. else
  199. farmFood = false
  200. Food.TextColor3 = Color3.fromRGB(255, 0, 0)
  201. end
  202. end)
  203.  
  204. Eggs.MouseButton1Click:Connect(function()
  205. if farmEggs == false then
  206. farmEggs = true
  207. Eggs.TextColor3 = Color3.fromRGB(85, 255, 0)
  208. while farmEggs do
  209. wait()
  210. for _, Enemies in pairs(game:GetService("Workspace").Zones[ZoneSet].Enemies:GetChildren())do
  211. local A_1 = "AttackEnemy"
  212. local A_2 = Enemies
  213. for _, Pets in pairs(game:GetService("Workspace")[player.Name].Pets:GetChildren())do
  214. local A_3 = Pets
  215. local Event = game:GetService("ReplicatedStorage").Remotes.Functions.CombatRF
  216. Event:InvokeServer(A_1, A_2, A_3)
  217. end
  218. end
  219. end
  220. else
  221. farmEggs = false
  222. Eggs.TextColor3 = Color3.fromRGB(255, 0, 0)
  223. end
  224. end)
Add Comment
Please, Sign In to add comment