Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local autoCollectActive = false
- local function createNeighborhoodGUI()
- if game:GetService("Players").LocalPlayer:FindFirstChild("PlayerGui"):FindFirstChild("NeighborhoodGUI") then
- return
- end
- local ScreenGui = Instance.new("ScreenGui")
- ScreenGui.Name = "NeighborhoodGUI"
- ScreenGui.ResetOnSpawn = false
- ScreenGui.Parent = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui")
- local MainFrame = Instance.new("Frame")
- MainFrame.Name = "MainFrame"
- MainFrame.Size = UDim2.new(0.3, 0, 0.2, 0)
- MainFrame.Position = UDim2.new(0.35, 0, 0.4, 0)
- MainFrame.BackgroundColor3 = Color3.fromRGB(34, 139, 34)
- MainFrame.Parent = ScreenGui
- local UICorner = Instance.new("UICorner")
- UICorner.CornerRadius = UDim.new(0, 10)
- UICorner.Parent = MainFrame
- local Title = Instance.new("TextLabel")
- Title.Name = "Title"
- Title.Size = UDim2.new(1, 0, 0.3, 0)
- Title.Position = UDim2.new(0, 0, 0, 0)
- Title.BackgroundTransparency = 1
- Title.Text = "💚 Neighborhood Tycoon GUI 💚"
- Title.Font = Enum.Font.FredokaOne
- Title.TextSize = 24
- Title.TextColor3 = Color3.fromRGB(255, 255, 255)
- Title.Parent = MainFrame
- local AutoCollectButton = Instance.new("TextButton")
- AutoCollectButton.Name = "AutoCollectButton"
- AutoCollectButton.Size = UDim2.new(0.9, 0, 0.4, 0)
- AutoCollectButton.Position = UDim2.new(0.05, 0, 0.4, 0)
- AutoCollectButton.Text = "Auto Collect Money"
- AutoCollectButton.Font = Enum.Font.FredokaOne
- AutoCollectButton.TextSize = 18
- AutoCollectButton.BackgroundColor3 = Color3.fromRGB(46, 204, 113)
- AutoCollectButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- AutoCollectButton.Parent = MainFrame
- local function startAutoCollect()
- autoCollectActive = not autoCollectActive
- AutoCollectButton.Text = autoCollectActive and "Stop Collecting" or "Auto Collect Money"
- while autoCollectActive do
- local tycoonNumber = game:GetService("Players").LocalPlayer.TycoonNumber.Value
- local mailbox = workspace.Tycoons[tostring(tycoonNumber)].StarterProps.Mailbox.Hitpart
- firetouchinterest(mailbox, game:GetService("Players").LocalPlayer.Character.HumanoidRootPart, 0)
- firetouchinterest(mailbox, game:GetService("Players").LocalPlayer.Character.HumanoidRootPart, 1)
- wait(0.5)
- end
- end
- AutoCollectButton.MouseButton1Click:Connect(startAutoCollect)
- local function makeDraggable(frame)
- local dragging = false
- local dragInput, dragStart, startPos
- local function update(input)
- local delta = input.Position - dragStart
- frame.Position = UDim2.new(
- startPos.X.Scale,
- startPos.X.Offset + delta.X,
- startPos.Y.Scale,
- startPos.Y.Offset + delta.Y
- )
- end
- frame.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- dragging = true
- dragStart = input.Position
- startPos = frame.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end)
- end
- end)
- frame.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
- dragInput = input
- end
- end)
- game:GetService("UserInputService").InputChanged:Connect(function(input)
- if input == dragInput and dragging then
- update(input)
- end
- end)
- end
- makeDraggable(MainFrame)
- end
- createNeighborhoodGUI()
- game:GetService("Players").LocalPlayer.CharacterAdded:Connect(function()
- wait(1)
- createNeighborhoodGUI()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement