local a=game.Players.LocalPlayer local b=Instance.new("ScreenGui") local c=Instance.new("TextButton") local d=Instance.new("Frame") b.Parent=a:WaitForChild("PlayerGui") c.Size=UDim2.new(0,200,0,50) c.Position=UDim2.new(0,10,0,10) c.Text="Start Income" c.BackgroundColor3=Color3.fromRGB(0,255,0) c.TextColor3=Color3.fromRGB(255,255,255) c.Parent=b d.Size=UDim2.new(0,20,0,20) d.Position=UDim2.new(1,-20,1,-20) d.BackgroundColor3=Color3.fromRGB(255,0,0) d.AnchorPoint=Vector2.new(1,1) d.Parent=b local e=false local f local g=nil local h=nil local i=nil local j=nil local function k(l,m) if m then return end if l.UserInputType==Enum.UserInputType.MouseButton1 then if d:IsPointInRegion(l.Position) then g=l.Position i=b.Position l.Changed:Connect(function() if l.UserInputState==Enum.UserInputState.End then g=nil end end) elseif not d:IsPointInRegion(l.Position) then g=l.Position i=b.Position l.Changed:Connect(function() if l.UserInputState==Enum.UserInputState.End then g=nil end end) end end end local function l(m) if g then if d:IsPointInRegion(m.Position) then local n=m.Position-g b.Size=UDim2.new(0,i.X.Offset+n.X,0,i.Y.Offset+n.Y) else local n=m.Position-g b.Position=UDim2.new(i.X.Scale,i.X.Offset+n.X,i.Y.Scale,i.Y.Offset+n.Y) end end end game:GetService("UserInputService").InputBegan:Connect(k) game:GetService("UserInputService").InputChanged:Connect(l) local m=false local n c.MouseButton1Click:Connect(function() if m then if n then n:Disconnect() end c.Text="Start Income" c.BackgroundColor3=Color3.fromRGB(0,255,0) m=false else n=game:GetService("RunService").Heartbeat:Connect(function() local o={ [1]=game:GetService("Players").LocalPlayer } game:GetService("ReplicatedStorage").Knit.Services.TycoonService.RF.PayIncome:InvokeServer(unpack(o)) end) c.Text="Stop Income" c.BackgroundColor3=Color3.fromRGB(255,0,0) m=true end end)