Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local on
- local keybind=Enum.KeyCode.F5
- local keybindEnd=Enum.KeyCode.F6
- local UserInputService=game:GetService("UserInputService")
- local RunService=game:GetService("RunService")
- local plr=game:GetService("Players").LocalPlayer
- local mouse=plr:GetMouse()
- local sg=Instance.new("ScreenGui",plr.PlayerGui)
- local f=Instance.new("TextLabel",sg)
- f.Size=UDim2.new(0,25,0,10)
- f.BackgroundColor3=Color3.fromRGB(180,50,50)
- f.Visible=false
- f.Text="On"
- f.TextSize=11
- local vu = game:GetService("VirtualUser")
- local function CC()
- vu:CaptureController();
- end
- local function CB()
- local v2 = Vector2.new();
- vu:ClickButton1(v2);
- end
- function Start(a,b)
- if a.KeyCode==keybind then
- on=true
- a=RunService.Stepped:Connect(function()
- if on then
- CC();
- CB();
- f.Visible=true
- f.Position=UDim2.new(0,mouse.X-12.5,0,mouse.Y-15)
- else
- a:Disconnect()
- end
- end)
- f.Visible=false
- end
- end
- function Stop(a,b)
- if a.KeyCode==keybindEnd then
- on=false
- f.Visible=false
- end
- end
- UserInputService.InputBegan:connect(Start)
- UserInputService.InputEnded:connect(Stop)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement