Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plrs = gameConfusedervice('Players')
- local plr = plrs.LocalPlayer
- local UIS = gameConfusedervice('UserInputService')
- local RS = gameConfusedervice('RunService')
- local PlrGui = plr:WaitForChild('PlayerGui')
- -- Objects
- local ACHolder = Instance.new("ScreenGui")
- local BG = Instance.new("Frame")
- local Main = Instance.new("Frame")
- local ACLabel = Instance.new("TextLabel")
- local ACKeySet = Instance.new("TextButton")
- -- Properties
- ACHolder.Name = "ACHolder"
- ACHolder.Parent = PlrGui
- BG.Name = "BG"
- BG.Parent = ACHolder
- BG.Active = true
- BG.AnchorPoint = Vector2.new(0.5, 0.5)
- BG.BackgroundColor3 = Color3.new(1, 1, 1)
- BG.Position = UDim2.new(0.5, 0, 0.5, 0)
- BG.Size = UDim2.new(0, 200, 0, 125)
- BG.Style = Enum.FrameStyle.DropShadow
- BG.Draggable = true
- Main.Name = "Main"
- Main.Parent = BG
- Main.Active = true
- Main.AnchorPoint = Vector2.new(0.5, 0.5)
- Main.BackgroundColor3 = Color3.new(0.137255, 0.137255, 0.137255)
- Main.BackgroundTransparency = 0.5
- Main.Position = UDim2.new(0.5, 0, 0.5, 0)
- Main.Size = UDim2.new(0, 185, 0, 110)
- Main.ZIndex = 2
- ACLabel.Name = "ACLabel"
- ACLabel.Parent = Main
- ACLabel.AnchorPoint = Vector2.new(0.5, 0.5)
- ACLabel.BackgroundColor3 = Color3.new(1, 1, 1)
- ACLabel.BackgroundTransparency = 1
- ACLabel.Position = UDim2.new(0.5, 0, 0.300000012, 0)
- ACLabel.Size = UDim2.new(0, 120, 0, 25)
- ACLabel.Font = Enum.Font.Arcade
- ACLabel.Text = "AC"
- ACLabel.TextColor3 = Color3.new(1, 1, 1)
- ACLabel.TextSize = 60
- ACLabel.ZIndex = 2
- ACKeySet.Name = "ACKeySet"
- ACKeySet.Active = true
- ACKeySet.Parent = Main
- ACKeySet.AnchorPoint = Vector2.new(0.5, 0.5)
- ACKeySet.BackgroundColor3 = Color3.new(0.137255, 0.137255, 0.137255)
- ACKeySet.BackgroundTransparency = 1
- ACKeySet.Position = UDim2.new(0.5, 0, 0.699999988, 0)
- ACKeySet.Size = UDim2.new(0, 100, 0, 30)
- ACKeySet.Font = Enum.Font.Code
- ACKeySet.Text = "Set Keybind"
- ACKeySet.TextColor3 = Color3.new(1, 1, 1)
- ACKeySet.TextSize = 15
- ACKeySet.ZIndex = 3
- --Do stuff.
- local inFrame = false
- BG.MouseEnter:connect(function()
- inFrame = true
- end)
- BG.MouseLeave:connect(function()
- inFrame = false
- end)
- local PlaceHolder = function()
- print('lel')
- end
- local keybind = Enum.KeyCode.RightControl
- local KeyPressEquiv = mouse1click or leftclick or MOUSE_CLICK or PlaceHolder
- if Synapse then KeyPressEquiv = Synapse.mouse1click end
- if Input then KeyPressEquiv = Input.LeftClick end
- local con = nil
- local ucon = nil
- local mcon = nil
- ACKeySet.MouseEnter:connect(function()
- ACKeySet.BackgroundTransparency = 0.5
- end)
- ACKeySet.MouseLeave:connect(function()
- ACKeySet.BackgroundTransparency = 1
- end)
- local function ReInit()
- ucon = UIS.InputBegan:connect(function(keyy)
- if keyy == keybind and KeyPressEquiv ~= nil then
- if mcon then mcon:disconnect() mcon = nil else
- mcon = RS.Stepped:connect(function()
- if not inFrame then
- KeyPressEquiv()
- end
- end)
- end
- end
- end)
- end
- ACKeySet.MouseButton1Down:connect(function()
- ACKeySet.Text = 'Press a key now.'
- if ucon then ucon:disconnect() end
- wait()
- con = UIS.InputBegan:connect(function(keyy)
- if keyy.UserInputType == Enum.UserInputType.Keyboard then
- keybind = keyy
- ACKeySet.Text = keyy.KeyCode.Name
- con:disconnect()
- ReInit()
- end
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment