Advertisement
TheUnknownDiscord

binoculars

Jan 3rd, 2022
26
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. tool = Instance.new("Tool",owner.Backpack)
  2. part = Instance.new("Part",tool)
  3. part.Name = "Handle"
  4. tool.Name = "sniper"
  5. local billboard = Instance.new("ScreenGui", owner.PlayerGui)
  6. billboard.Name = "the"
  7. cloakmeter = Instance.new("Frame",billboard)
  8. cloakmeter.BackgroundColor3 = Color3.fromRGB(225,225,225)
  9. cloakmeter.Size = UDim2.new(0.25,0,0.0078125,0)
  10. cloakmeter.Active = true
  11. cloakmeter.BackgroundTransparency = 0
  12. cloakmeter.AnchorPoint = Vector2.new(0.5, 0.01)
  13. cloakmeter.Position = UDim2.new(0.5, 0, 0.01, 0)
  14. cloakmeter2 = Instance.new("Frame",billboard)
  15. cloakmeter2.BackgroundColor3 = Color3.fromRGB(225,225,225)
  16. cloakmeter2.Size = UDim2.new(0.00390625,0,0.03125,0)
  17. cloakmeter2.Active = true
  18. cloakmeter2.BackgroundTransparency = 0
  19. cloakmeter2.AnchorPoint = Vector2.new(0.4, 0)
  20. cloakmeter2.Position = UDim2.new(0.4, 0, 0, 0)
  21. cloakmeter2.Name = "the2"
  22. NLS([[
  23. tool = owner.Backpack:WaitForChild("sniper")
  24. cloakmeter2 = owner.PlayerGui:WaitForChild("the"):WaitForChild("the2")
  25. local UserInputService = game:GetService("UserInputService")
  26. local TweenService = game:GetService("TweenService")
  27. local goal2 = {}
  28. goal2.FieldOfView = 70
  29. local tweenInfo = TweenInfo.new(.5)
  30. local tween2 = TweenService:Create(workspace.CurrentCamera, tweenInfo, goal2)
  31. mouse = owner:GetMouse()
  32. zoom = 0
  33. down = false
  34. equipped = false
  35. tool.Equipped:Connect(function()
  36. equipped = true
  37. end)
  38. tool.Unequipped:Connect(function()
  39. equipped = false
  40. end)
  41. local og = UserInputService.MouseDeltaSensitivity
  42. function zoomedin()
  43. local TweenService = game:GetService("TweenService")
  44. if zoom == 0 then
  45. local tweenInfo = TweenInfo.new(.5)
  46. local goal3 = {}
  47. goal3.Position = UDim2.new(0.4, 0, 0, 0)
  48. cloakmeter2.AnchorPoint = Vector2.new(0.4, 0)
  49. local tween3 = TweenService:Create(cloakmeter2, tweenInfo, goal3)
  50. tween3:Play()
  51. elseif zoom == 1 then
  52. local tweenInfo = TweenInfo.new(.5)
  53. local goal3 = {}
  54. goal3.Position = UDim2.new(0.45, 0, 0, 0)
  55. cloakmeter2.AnchorPoint = Vector2.new(0.45, 0)
  56. local tween3 = TweenService:Create(cloakmeter2, tweenInfo, goal3)
  57. tween3:Play()
  58. elseif zoom == 2 then
  59. local tweenInfo = TweenInfo.new(.5)
  60. local goal3 = {}
  61. goal3.Position = UDim2.new(0.5, 0, 0, 0)
  62. cloakmeter2.AnchorPoint = Vector2.new(0.5, 0)
  63. local tween3 = TweenService:Create(cloakmeter2, tweenInfo, goal3)
  64. tween3:Play()
  65. elseif zoom == 3 then
  66. local tweenInfo = TweenInfo.new(.5)
  67. local goal3 = {}
  68. goal3.Position = UDim2.new(0.55, 0, 0, 0)
  69. cloakmeter2.AnchorPoint = Vector2.new(0.55, 0)
  70. local tween3 = TweenService:Create(cloakmeter2, tweenInfo, goal3)
  71. tween3:Play()
  72. elseif zoom == 4 then
  73. local tweenInfo = TweenInfo.new(.5)
  74. local goal3 = {}
  75. goal3.Position = UDim2.new(0.6, 0, 0, 0)
  76. cloakmeter2.AnchorPoint = Vector2.new(0.6, 0)
  77. local tween3 = TweenService:Create(cloakmeter2, tweenInfo, goal3)
  78. tween3:Play()
  79. end
  80. if down then
  81. if zoom == 0 then
  82. UserInputService.MouseDeltaSensitivity = 0.75
  83. local TweenService = game:GetService("TweenService")
  84. local goal = {}
  85. goal.FieldOfView = 50
  86. local tweenInfo = TweenInfo.new(.5)
  87. local tween = TweenService:Create(workspace.CurrentCamera, tweenInfo, goal)
  88. tween:Play()
  89. elseif zoom == 1 then
  90. UserInputService.MouseDeltaSensitivity = 0.55
  91. local TweenService = game:GetService("TweenService")
  92. local goal = {}
  93. goal.FieldOfView = 35
  94. local tweenInfo = TweenInfo.new(.5)
  95. local tween = TweenService:Create(workspace.CurrentCamera, tweenInfo, goal)
  96. tween:Play()
  97. elseif zoom == 2 then
  98. UserInputService.MouseDeltaSensitivity = 0.35
  99. local TweenService = game:GetService("TweenService")
  100. local goal = {}
  101. goal.FieldOfView = 20
  102. local tweenInfo = TweenInfo.new(.5)
  103. local tween = TweenService:Create(workspace.CurrentCamera, tweenInfo, goal)
  104. tween:Play()
  105. elseif zoom == 3 then
  106. UserInputService.MouseDeltaSensitivity = 0.15
  107. local TweenService = game:GetService("TweenService")
  108. local goal = {}
  109. goal.FieldOfView = 5
  110. local tweenInfo = TweenInfo.new(.5)
  111. local tween = TweenService:Create(workspace.CurrentCamera, tweenInfo, goal)
  112. tween:Play()
  113. elseif zoom == 4 then
  114. UserInputService.MouseDeltaSensitivity = 0.03
  115. local TweenService = game:GetService("TweenService")
  116. local goal = {}
  117. goal.FieldOfView = 1
  118. local tweenInfo = TweenInfo.new(.5)
  119. local tween = TweenService:Create(workspace.CurrentCamera, tweenInfo, goal)
  120. tween:Play()
  121. end
  122. end
  123. end
  124. mouse.KeyDown:Connect(function(key)
  125. key = key:lower()
  126. if key == "q" then
  127. zoom += 1
  128. if zoom == 5 then
  129. zoom = 0
  130. end
  131. zoomedin()
  132. elseif key == "e" then
  133. zoom -= 1
  134. if zoom == -1 then
  135. zoom = 4
  136. end
  137. zoomedin()
  138. elseif key == "z" then
  139. if equipped then
  140. down = true
  141. zoomedin()
  142. end
  143. end
  144. end)
  145. mouse.KeyUp:Connect(function(key)
  146. key = key:lower()
  147. if key == "z" then
  148. down = false
  149. tween2:Play()
  150. UserInputService.MouseDeltaSensitivity = og
  151. end
  152. end)
  153. ]],owner.PlayerGui)
  154. print("z is to zoom")
  155. print("q and e is to cycle between the 5 different zoom levels")
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement