Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Interface = game('GetObjects', 'rbxassetid://2809359811')[1]
- Interface.Parent = game.CoreGui
- local Pos
- local Held = false
- local Drag = Interface.Drag.Body.Scroller.Drag
- local Detail = Interface.Drag.Body.Scroller.Detail
- local Value = Interface.Drag.Body.ValueLabel.Value
- local Player, Gun
- local Mouse = game.Players.LocalPlayer:GetMouse()
- local guv = getupvals or getupvalues or debug.getupvalues
- local suv = setupval or setupvalue or debug.setupvalue
- local Meta = getrawmetatable(getrenv().shared)
- local Fire = guv(Meta.__index).fireserver
- suv(Fire, "heystopokay", function() return error end)
- suv(Fire, "plsno", function() return true end)
- local function Round(val)
- local inte, frac = math.modf(val)
- if frac >= 0.5 then
- return math.ceil(val)
- else
- return math.floor(val)
- end
- end
- local UIS = game('GetService', 'UserInputService')
- UIS.InputEnded:Connect(function(k)
- if k.KeyCode == Enum.KeyCode.LeftBracket then
- local Enabled = Interface.Enabled
- Interface.Enabled = not Enabled
- end
- end)
- local Close = false
- local Collapse = Interface.Drag.Collapse
- Collapse.MouseButton1Click:Connect(function()
- local Body = Interface.Drag.Body
- if not Close then
- Body.ClipsDescendants = true
- Body:TweenSize(UDim2.new(1, 0, 0, 0), "In", "Quad", .5)
- wait(.5)
- Collapse.Text = "+"
- Close = true
- else
- Body:TweenSize(UDim2.new(1, 0, 0, 160), "Out", "Quad", .5)
- wait(.5)
- Body.ClipsDescendants = false
- Collapse.Text = "X"
- Close = false
- end
- end)
- Drag.MouseButton1Down:Connect(function()
- Held = true
- print(Held)
- end)
- Drag.MouseButton1Click:Connect(function()
- Held = false
- print(Held)
- end)
- Value.FocusLost:Connect(function(fromenter)
- if fromenter then
- local Max = 100
- local Inc = 230/Max
- Pos = tonumber(Value.Text)
- if Pos > Max then
- Pos = Max
- elseif Pos < 1 then
- Pos = 1
- end
- Value.Text = Pos
- Drag.Position = UDim2.new(0, Inc * Pos, 0.5, -8)
- if Gun then
- Fire('ChangeValue', Gun.Stats.Recoil, getrenv()._G.Obfuscate(Pos))
- end
- end
- end)
- local iPlayer = Interface.Drag.Body.Player
- iPlayer.FocusLost:Connect(function()
- for i,v in next, game('GetService', 'Players')('GetPlayers') do
- if v.Name:sub(1, iPlayer.Text:len()):lower() == iPlayer.Text:lower() then
- Player = v
- iPlayer.Text = v.Name
- return
- end
- end
- iPlayer.Text = 'No player found!'
- wait(2)
- iPlayer.Text = ''
- end)
- local iGun = Interface.Drag.Body.Gun
- iGun.MouseButton1Click:Connect(function()
- if not Player then
- iGun.Text = "Invalid player!"
- wait(2)
- iGun.Text = "Select Gun"
- return
- end
- local Queries = Interface.Drag.Body.Queries
- local Visible = Queries.Visible
- Queries.Visible = not Visible
- for i,v in next, Queries('children') do
- if v('IsA', 'TextButton') then
- v('Destroy')
- end
- end
- if not Visible then
- for i,v in next, Player.Backpack('children') do
- if v('FindFirstChild', 'Shooter') then
- local Button = Instance.new('TextButton', Queries)
- Button.Name = v.Name
- Button.Size = UDim2.new(1, 0, 0, 25)
- Button.BackgroundColor3 = Color3.fromRGB(235, 235, 235)
- Button.BorderSizePixel = 2
- Button.BorderColor3 = Color3.fromRGB(100, 100, 100)
- Button.Text = v.Name
- Button.TextColor3 = Color3.fromRGB(100, 100, 100)
- Button.TextSize = 16
- Button.Font = "SourceSansSemibold"
- Button.MouseButton1Click:Connect(function()
- Gun = v
- iGun.Text = v.Name
- Queries.Visible = false
- end)
- end
- end
- end
- end)
- Mouse.Move:Connect(function()
- if Held then
- local Max = 100
- local Offset = Mouse.X - Detail.AbsolutePosition.X
- local Inc = 232/Max
- Pos = Round(Offset/Inc)
- if Pos > Max then
- Pos = Max
- elseif Pos < 0 then
- Pos = 0
- end
- Value.Text = Pos
- Drag.Position = UDim2.new(0, (Inc * Pos) - 1, 0.5, -8)
- if Gun then
- Fire('ChangeValue', Gun.Stats.Recoil, getrenv()._G.Obfuscate(Pos))
- end
- end
- end)
- local Drag = Interface.Drag
- local dragging, dragInput, dragStart, startPos
- Drag.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- dragging = true
- dragStart = input.Position
- startPos = Drag.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then dragging = false end
- end)
- end
- end)
- Drag.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then dragInput = input end
- end)
- UIS.InputChanged:Connect(function(input)
- if input == dragInput and dragging then
- local delta = input.Position - dragStart
- Drag.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement