forked from TrixAde/scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSecretHatchingSimGui.lua
More file actions
73 lines (65 loc) · 2.77 KB
/
Copy pathSecretHatchingSimGui.lua
File metadata and controls
73 lines (65 loc) · 2.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
local library = loadstring(game:HttpGet(('https://raw.githubusercontent.com/Maxgat5/UiLib/main/lua')))()
local w = library:CreateWindow("Secret Hatching Simulator 2")
local b = w:CreateFolder("AutoFarm")
local f = w:CreateFolder("AutoBuy")
local e = w:CreateFolder("Mix")
local u = w:CreateFolder("Credits")
SelectedEgg = "Common Egg"
Egg = {}
for i,v in pairs(game:GetService("Workspace").Eggs:GetChildren()) do
if not table.find(Egg,v.Name) then
table.insert(Egg,v.Name)
end
end
b:Toggle("AutoClicker",function(bool)
shared.toggle = bool
AutoClicker = bool
end)
f:Dropdown("Select Egg",Egg,true,function(a)
SelectedEgg = a
end)
f:Toggle("AutoBuyEgg",function(bool)
shared.toggle = bool
AutoBuyEgg = bool
end)
e:Toggle("AntiAfk",function(bool)
shared.toggle = bool
AntiAfk = bool
end)
if not game:GetService("Players").LocalPlayer.PlayerGui:FindFirstChild("Maxgat5") then
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "Maxgat5"
ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
end
game:GetService('RunService').Stepped:connect(function()
spawn(function()
if AutoClicker == true then
if game:GetService("Players").LocalPlayer.PlayerGui.aaa.CoinsNAutoCoins.Clicks:FindFirstChild("Click") then
game:GetService("Players").LocalPlayer.PlayerGui.aaa.CoinsNAutoCoins.Clicks.Click.Name = "Click1"
end
if game:GetService("Players").LocalPlayer.PlayerGui.aaa.CoinsNAutoCoins.Clicks:FindFirstChild("Click1") then
game:GetService("Players").LocalPlayer.PlayerGui.aaa.CoinsNAutoCoins.Clicks.Click1.Parent = game:GetService("Players").LocalPlayer.PlayerGui.Maxgat5
end
if game:GetService("Players").LocalPlayer.PlayerGui.Maxgat5:FindFirstChild("Click1") then
game:service'VirtualUser':ClickButton1(Vector2.new())
end
else
if game:GetService("Players").LocalPlayer.PlayerGui.Maxgat5:FindFirstChild("Click1") then
game:GetService("Players").LocalPlayer.PlayerGui.Maxgat5.Click1.Parent = game:GetService("Players").LocalPlayer.PlayerGui.aaa.CoinsNAutoCoins.Clicks
end
end
end)
spawn(function()
if AutoBuyEgg == true then
game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(game:GetService("Workspace").Eggs[SelectedEgg].View.CFrame.Position + Vector3.new(0,10,0))
game:GetService("ReplicatedStorage").GameClient.Events.RemoteFunction.BuyEgg:InvokeServer(SelectedEgg,"Buy1")
end
end)
spawn(function()
if AntiAfk == true then
local bb=game:service'VirtualUser'
bb:CaptureController()
bb:ClickButton2(Vector2.new())
end
end)
end)