Advertisement
Guest User

dsdd

a guest
Feb 16th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.48 KB | None | 0 0
  1. local Interface = game('GetObjects', 'rbxassetid://2809359811')[1]
  2. Interface.Parent = game.CoreGui
  3. local Pos
  4. local Held = false
  5. local Drag = Interface.Drag.Body.Scroller.Drag
  6.  
  7. local Detail = Interface.Drag.Body.Scroller.Detail
  8. local Value = Interface.Drag.Body.ValueLabel.Value
  9.  
  10. local Player, Gun
  11. local Mouse = game.Players.LocalPlayer:GetMouse()
  12.  
  13. local guv = getupvals or getupvalues or debug.getupvalues
  14. local suv = setupval or setupvalue or debug.setupvalue
  15.  
  16. local Meta = getrawmetatable(getrenv().shared)
  17. local Fire = guv(Meta.__index).fireserver
  18. suv(Fire, "heystopokay", function() return error end)
  19. suv(Fire, "plsno", function() return true end)
  20.  
  21. local function Round(val)
  22. local inte, frac = math.modf(val)
  23. if frac >= 0.5 then
  24. return math.ceil(val)
  25. else
  26. return math.floor(val)
  27. end
  28. end
  29. local UIS = game('GetService', 'UserInputService')
  30.  
  31. UIS.InputEnded:Connect(function(k)
  32. if k.KeyCode == Enum.KeyCode.LeftBracket then
  33. local Enabled = Interface.Enabled
  34. Interface.Enabled = not Enabled
  35. end
  36. end)
  37.  
  38. local Close = false
  39. local Collapse = Interface.Drag.Collapse
  40. Collapse.MouseButton1Click:Connect(function()
  41. local Body = Interface.Drag.Body
  42. if not Close then
  43. Body.ClipsDescendants = true
  44. Body:TweenSize(UDim2.new(1, 0, 0, 0), "In", "Quad", .5)
  45. wait(.5)
  46. Collapse.Text = "+"
  47. Close = true
  48. else
  49. Body:TweenSize(UDim2.new(1, 0, 0, 160), "Out", "Quad", .5)
  50. wait(.5)
  51. Body.ClipsDescendants = false
  52. Collapse.Text = "X"
  53. Close = false
  54. end
  55. end)
  56.  
  57. Drag.MouseButton1Down:Connect(function()
  58. Held = true
  59. print(Held)
  60. end)
  61.  
  62. Drag.MouseButton1Click:Connect(function()
  63. Held = false
  64. print(Held)
  65. end)
  66.  
  67. Value.FocusLost:Connect(function(fromenter)
  68. if fromenter then
  69. local Max = 100
  70. local Inc = 230/Max
  71. Pos = tonumber(Value.Text)
  72. if Pos > Max then
  73. Pos = Max
  74. elseif Pos < 1 then
  75. Pos = 1
  76. end
  77. Value.Text = Pos
  78. Drag.Position = UDim2.new(0, Inc * Pos, 0.5, -8)
  79. if Gun then
  80. Fire('ChangeValue', Gun.Stats.Recoil, getrenv()._G.Obfuscate(Pos))
  81. end
  82. end
  83. end)
  84.  
  85. local iPlayer = Interface.Drag.Body.Player
  86. iPlayer.FocusLost:Connect(function()
  87. for i,v in next, game('GetService', 'Players')('GetPlayers') do
  88. if v.Name:sub(1, iPlayer.Text:len()):lower() == iPlayer.Text:lower() then
  89. Player = v
  90. iPlayer.Text = v.Name
  91. return
  92. end
  93. end
  94. iPlayer.Text = 'No player found!'
  95. wait(2)
  96. iPlayer.Text = ''
  97. end)
  98.  
  99. local iGun = Interface.Drag.Body.Gun
  100. iGun.MouseButton1Click:Connect(function()
  101. if not Player then
  102. iGun.Text = "Invalid player!"
  103. wait(2)
  104. iGun.Text = "Select Gun"
  105. return
  106. end
  107.  
  108. local Queries = Interface.Drag.Body.Queries
  109. local Visible = Queries.Visible
  110. Queries.Visible = not Visible
  111.  
  112. for i,v in next, Queries('children') do
  113. if v('IsA', 'TextButton') then
  114. v('Destroy')
  115. end
  116. end
  117.  
  118. if not Visible then
  119. for i,v in next, Player.Backpack('children') do
  120. if v('FindFirstChild', 'Shooter') then
  121. local Button = Instance.new('TextButton', Queries)
  122. Button.Name = v.Name
  123. Button.Size = UDim2.new(1, 0, 0, 25)
  124. Button.BackgroundColor3 = Color3.fromRGB(235, 235, 235)
  125. Button.BorderSizePixel = 2
  126. Button.BorderColor3 = Color3.fromRGB(100, 100, 100)
  127. Button.Text = v.Name
  128. Button.TextColor3 = Color3.fromRGB(100, 100, 100)
  129. Button.TextSize = 16
  130. Button.Font = "SourceSansSemibold"
  131. Button.MouseButton1Click:Connect(function()
  132. Gun = v
  133. iGun.Text = v.Name
  134. Queries.Visible = false
  135. end)
  136. end
  137. end
  138. end
  139. end)
  140.  
  141. Mouse.Move:Connect(function()
  142. if Held then
  143. local Max = 100
  144. local Offset = Mouse.X - Detail.AbsolutePosition.X
  145. local Inc = 232/Max
  146. Pos = Round(Offset/Inc)
  147. if Pos > Max then
  148. Pos = Max
  149. elseif Pos < 0 then
  150. Pos = 0
  151. end
  152. Value.Text = Pos
  153. Drag.Position = UDim2.new(0, (Inc * Pos) - 1, 0.5, -8)
  154. if Gun then
  155. Fire('ChangeValue', Gun.Stats.Recoil, getrenv()._G.Obfuscate(Pos))
  156. end
  157. end
  158. end)
  159.  
  160. local Drag = Interface.Drag
  161. local dragging, dragInput, dragStart, startPos
  162. Drag.InputBegan:Connect(function(input)
  163. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  164. dragging = true
  165. dragStart = input.Position
  166. startPos = Drag.Position
  167.  
  168. input.Changed:Connect(function()
  169. if input.UserInputState == Enum.UserInputState.End then dragging = false end
  170. end)
  171. end
  172. end)
  173. Drag.InputChanged:Connect(function(input)
  174. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then dragInput = input end
  175. end)
  176. UIS.InputChanged:Connect(function(input)
  177. if input == dragInput and dragging then
  178. local delta = input.Position - dragStart
  179. Drag.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  180. end
  181. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement