Advertisement
Kyirxuz

Gagaga

Jun 8th, 2025
1,016
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 17.96 KB | None | 0 0
  1. local UserInputService = game:GetService("UserInputService")
  2. local RunService = game:GetService("RunService")
  3. local Players = game:GetService("Players")
  4. local TweenService = game:GetService("TweenService")
  5.  
  6. local CONFIG = {
  7.     TRIGGER_KEY = Enum.KeyCode.X,
  8.     CAMERA_POINTS = {
  9.         Vector3.new(284, 25, 257),
  10.         Vector3.new(248, 25, 257),
  11.         Vector3.new(248, 25, -226),
  12.         Vector3.new(283, 25, -226)
  13.     },
  14.     INDICATOR_SIZE = UDim2.new(0, 20, 0, 20),
  15.     SMOOTHING_SPEED = 0.2,
  16.     MAX_OFFSET = 180,        
  17.     OFFSET_SCALING = .7,
  18.     GUI_TOGGLE_KEY = Enum.KeyCode.G -- Key to toggle the GUI
  19. }
  20.  
  21. local camera = workspace.CurrentCamera
  22. local player = Players.LocalPlayer
  23. local mouse = player:GetMouse()
  24.  
  25. -- State tracking
  26. local isKeyHeld = false
  27. local selectedPoint = nil
  28. local indicators = {}
  29. local initialLookVector = nil
  30. local isAHeld = false
  31. local isDHeld = false
  32. local scriptEnabled = true
  33. local settingsGui = nil
  34.  
  35. -- Key name mappings for display
  36. local keyNames = {
  37.     [Enum.KeyCode.A] = "A", [Enum.KeyCode.B] = "B", [Enum.KeyCode.C] = "C", [Enum.KeyCode.D] = "D",
  38.     [Enum.KeyCode.E] = "E", [Enum.KeyCode.F] = "F", [Enum.KeyCode.G] = "G", [Enum.KeyCode.H] = "H",
  39.     [Enum.KeyCode.I] = "I", [Enum.KeyCode.J] = "J", [Enum.KeyCode.K] = "K", [Enum.KeyCode.L] = "L",
  40.     [Enum.KeyCode.M] = "M", [Enum.KeyCode.N] = "N", [Enum.KeyCode.O] = "O", [Enum.KeyCode.P] = "P",
  41.     [Enum.KeyCode.Q] = "Q", [Enum.KeyCode.R] = "R", [Enum.KeyCode.S] = "S", [Enum.KeyCode.T] = "T",
  42.     [Enum.KeyCode.U] = "U", [Enum.KeyCode.V] = "V", [Enum.KeyCode.W] = "W", [Enum.KeyCode.X] = "X",
  43.     [Enum.KeyCode.Y] = "Y", [Enum.KeyCode.Z] = "Z",
  44.     [Enum.KeyCode.One] = "1", [Enum.KeyCode.Two] = "2", [Enum.KeyCode.Three] = "3", [Enum.KeyCode.Four] = "4",
  45.     [Enum.KeyCode.Five] = "5", [Enum.KeyCode.Six] = "6", [Enum.KeyCode.Seven] = "7", [Enum.KeyCode.Eight] = "8",
  46.     [Enum.KeyCode.Nine] = "9", [Enum.KeyCode.Zero] = "0",
  47.     [Enum.KeyCode.LeftShift] = "L-Shift", [Enum.KeyCode.RightShift] = "R-Shift",
  48.     [Enum.KeyCode.LeftControl] = "L-Ctrl", [Enum.KeyCode.RightControl] = "R-Ctrl",
  49.     [Enum.KeyCode.LeftAlt] = "L-Alt", [Enum.KeyCode.RightAlt] = "R-Alt",
  50.     [Enum.KeyCode.Space] = "Space", [Enum.KeyCode.Tab] = "Tab"
  51. }
  52.  
  53. local function createSettingsGui()
  54.     local screenGui = Instance.new("ScreenGui")
  55.     screenGui.Name = "CameraControlSettings"
  56.     screenGui.ResetOnSpawn = false
  57.     screenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  58.  
  59.     -- Main frame
  60.     local mainFrame = Instance.new("Frame")
  61.     mainFrame.Name = "MainFrame"
  62.     mainFrame.Size = UDim2.new(0, 300, 0, 350)
  63.     mainFrame.Position = UDim2.new(0.5, -150, 0.5, -175)
  64.     mainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 40)
  65.     mainFrame.BorderSizePixel = 0
  66.     mainFrame.Active = true
  67.     mainFrame.Draggable = true
  68.     mainFrame.Parent = screenGui
  69.  
  70.     local mainCorner = Instance.new("UICorner")
  71.     mainCorner.CornerRadius = UDim.new(0, 8)
  72.     mainCorner.Parent = mainFrame
  73.  
  74.     -- Title
  75.     local titleLabel = Instance.new("TextLabel")
  76.     titleLabel.Name = "Title"
  77.     titleLabel.Size = UDim2.new(1, 0, 0, 40)
  78.     titleLabel.Position = UDim2.new(0, 0, 0, 0)
  79.     titleLabel.BackgroundTransparency = 1
  80.     titleLabel.Text = "Camera Control Settings"
  81.     titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  82.     titleLabel.TextScaled = true
  83.     titleLabel.Font = Enum.Font.SourceSansBold
  84.     titleLabel.Parent = mainFrame
  85.  
  86.     -- Close button
  87.     local closeButton = Instance.new("TextButton")
  88.     closeButton.Name = "CloseButton"
  89.     closeButton.Size = UDim2.new(0, 30, 0, 30)
  90.     closeButton.Position = UDim2.new(1, -35, 0, 5)
  91.     closeButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
  92.     closeButton.Text = "X"
  93.     closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  94.     closeButton.TextScaled = true
  95.     closeButton.Font = Enum.Font.SourceSansBold
  96.     closeButton.Parent = mainFrame
  97.  
  98.     local closeCorner = Instance.new("UICorner")
  99.     closeCorner.CornerRadius = UDim.new(0, 4)
  100.     closeCorner.Parent = closeButton
  101.  
  102.     -- Enable/Disable Toggle
  103.     local enableFrame = Instance.new("Frame")
  104.     enableFrame.Size = UDim2.new(1, -20, 0, 50)
  105.     enableFrame.Position = UDim2.new(0, 10, 0, 50)
  106.     enableFrame.BackgroundTransparency = 1
  107.     enableFrame.Parent = mainFrame
  108.  
  109.     local enableLabel = Instance.new("TextLabel")
  110.     enableLabel.Size = UDim2.new(0.6, 0, 1, 0)
  111.     enableLabel.Position = UDim2.new(0, 0, 0, 0)
  112.     enableLabel.BackgroundTransparency = 1
  113.     enableLabel.Text = "Script Enabled:"
  114.     enableLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  115.     enableLabel.TextScaled = true
  116.     enableLabel.Font = Enum.Font.SourceSans
  117.     enableLabel.TextXAlignment = Enum.TextXAlignment.Left
  118.     enableLabel.Parent = enableFrame
  119.  
  120.     local enableToggle = Instance.new("TextButton")
  121.     enableToggle.Name = "EnableToggle"
  122.     enableToggle.Size = UDim2.new(0.3, 0, 0, 30)
  123.     enableToggle.Position = UDim2.new(0.65, 0, 0, 10)
  124.     enableToggle.BackgroundColor3 = scriptEnabled and Color3.fromRGB(50, 200, 50) or Color3.fromRGB(200, 50, 50)
  125.     enableToggle.Text = scriptEnabled and "ON" or "OFF"
  126.     enableToggle.TextColor3 = Color3.fromRGB(255, 255, 255)
  127.     enableToggle.TextScaled = true
  128.     enableToggle.Font = Enum.Font.SourceSansBold
  129.     enableToggle.Parent = enableFrame
  130.  
  131.     local enableCorner = Instance.new("UICorner")
  132.     enableCorner.CornerRadius = UDim.new(0, 4)
  133.     enableCorner.Parent = enableToggle
  134.  
  135.     -- Trigger Key Setting
  136.     local keyFrame = Instance.new("Frame")
  137.     keyFrame.Size = UDim2.new(1, -20, 0, 50)
  138.     keyFrame.Position = UDim2.new(0, 10, 0, 110)
  139.     keyFrame.BackgroundTransparency = 1
  140.     keyFrame.Parent = mainFrame
  141.  
  142.     local keyLabel = Instance.new("TextLabel")
  143.     keyLabel.Size = UDim2.new(0.5, 0, 1, 0)
  144.     keyLabel.Position = UDim2.new(0, 0, 0, 0)
  145.     keyLabel.BackgroundTransparency = 1
  146.     keyLabel.Text = "Trigger Key:"
  147.     keyLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  148.     keyLabel.TextScaled = true
  149.     keyLabel.Font = Enum.Font.SourceSans
  150.     keyLabel.TextXAlignment = Enum.TextXAlignment.Left
  151.     keyLabel.Parent = keyFrame
  152.  
  153.     local keyButton = Instance.new("TextButton")
  154.     keyButton.Name = "KeyButton"
  155.     keyButton.Size = UDim2.new(0.4, 0, 0, 30)
  156.     keyButton.Position = UDim2.new(0.55, 0, 0, 10)
  157.     keyButton.BackgroundColor3 = Color3.fromRGB(60, 60, 80)
  158.     keyButton.Text = keyNames[CONFIG.TRIGGER_KEY] or "X"
  159.     keyButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  160.     keyButton.TextScaled = true
  161.     keyButton.Font = Enum.Font.SourceSans
  162.     keyButton.Parent = keyFrame
  163.  
  164.     local keyCorner = Instance.new("UICorner")
  165.     keyCorner.CornerRadius = UDim.new(0, 4)
  166.     keyCorner.Parent = keyButton
  167.  
  168.     -- Max Offset Setting
  169.     local offsetFrame = Instance.new("Frame")
  170.     offsetFrame.Size = UDim2.new(1, -20, 0, 70)
  171.     offsetFrame.Position = UDim2.new(0, 10, 0, 170)
  172.     offsetFrame.BackgroundTransparency = 1
  173.     offsetFrame.Parent = mainFrame
  174.  
  175.     local offsetLabel = Instance.new("TextLabel")
  176.     offsetLabel.Size = UDim2.new(1, 0, 0, 30)
  177.     offsetLabel.Position = UDim2.new(0, 0, 0, 0)
  178.     offsetLabel.BackgroundTransparency = 1
  179.     offsetLabel.Text = "Max Offset: " .. CONFIG.MAX_OFFSET
  180.     offsetLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  181.     offsetLabel.TextScaled = true
  182.     offsetLabel.Font = Enum.Font.SourceSans
  183.     offsetLabel.TextXAlignment = Enum.TextXAlignment.Left
  184.     offsetLabel.Parent = offsetFrame
  185.  
  186.     local offsetTextBox = Instance.new("TextBox")
  187.     offsetTextBox.Name = "OffsetTextBox"
  188.     offsetTextBox.Size = UDim2.new(1, 0, 0, 30)
  189.     offsetTextBox.Position = UDim2.new(0, 0, 0, 35)
  190.     offsetTextBox.BackgroundColor3 = Color3.fromRGB(60, 60, 80)
  191.     offsetTextBox.Text = tostring(CONFIG.MAX_OFFSET)
  192.     offsetTextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  193.     offsetTextBox.TextScaled = true
  194.     offsetTextBox.Font = Enum.Font.SourceSans
  195.     offsetTextBox.PlaceholderText = "Enter max offset value"
  196.     offsetTextBox.Parent = offsetFrame
  197.  
  198.     local offsetBoxCorner = Instance.new("UICorner")
  199.     offsetBoxCorner.CornerRadius = UDim.new(0, 4)
  200.     offsetBoxCorner.Parent = offsetTextBox
  201.  
  202.     -- Offset Scaling Setting
  203.     local scalingFrame = Instance.new("Frame")
  204.     scalingFrame.Size = UDim2.new(1, -20, 0, 70)
  205.     scalingFrame.Position = UDim2.new(0, 10, 0, 250)
  206.     scalingFrame.BackgroundTransparency = 1
  207.     scalingFrame.Parent = mainFrame
  208.  
  209.     local scalingLabel = Instance.new("TextLabel")
  210.     scalingLabel.Size = UDim2.new(1, 0, 0, 30)
  211.     scalingLabel.Position = UDim2.new(0, 0, 0, 0)
  212.     scalingLabel.BackgroundTransparency = 1
  213.     scalingLabel.Text = "Offset Scaling: " .. CONFIG.OFFSET_SCALING
  214.     scalingLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  215.     scalingLabel.TextScaled = true
  216.     scalingLabel.Font = Enum.Font.SourceSans
  217.     scalingLabel.TextXAlignment = Enum.TextXAlignment.Left
  218.     scalingLabel.Parent = scalingFrame
  219.  
  220.     local scalingTextBox = Instance.new("TextBox")
  221.     scalingTextBox.Name = "ScalingTextBox"
  222.     scalingTextBox.Size = UDim2.new(1, 0, 0, 30)
  223.     scalingTextBox.Position = UDim2.new(0, 0, 0, 35)
  224.     scalingTextBox.BackgroundColor3 = Color3.fromRGB(60, 60, 80)
  225.     scalingTextBox.Text = tostring(CONFIG.OFFSET_SCALING)
  226.     scalingTextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  227.     scalingTextBox.TextScaled = true
  228.     scalingTextBox.Font = Enum.Font.SourceSans
  229.     scalingTextBox.PlaceholderText = "Enter scaling value (0.1 - 2.0)"
  230.     scalingTextBox.Parent = scalingFrame
  231.  
  232.     local scalingBoxCorner = Instance.new("UICorner")
  233.     scalingBoxCorner.CornerRadius = UDim.new(0, 4)
  234.     scalingBoxCorner.Parent = scalingTextBox
  235.  
  236.     -- Event connections
  237.     closeButton.MouseButton1Click:Connect(function()
  238.         screenGui:Destroy()
  239.         settingsGui = nil
  240.     end)
  241.  
  242.     enableToggle.MouseButton1Click:Connect(function()
  243.         scriptEnabled = not scriptEnabled
  244.         enableToggle.BackgroundColor3 = scriptEnabled and Color3.fromRGB(50, 200, 50) or Color3.fromRGB(200, 50, 50)
  245.         enableToggle.Text = scriptEnabled and "ON" or "OFF"
  246.        
  247.         if not scriptEnabled and isKeyHeld then
  248.             -- Stop camera control if script is disabled
  249.             isKeyHeld = false
  250.             selectedPoint = nil
  251.             local indicatorsGui = player.PlayerGui:FindFirstChild("CameraPointIndicators")
  252.             if indicatorsGui then
  253.                 indicatorsGui:Destroy()
  254.             end
  255.             RunService:UnbindFromRenderStep("ProximityCameraControl")
  256.         end
  257.     end)
  258.  
  259.     local isWaitingForKey = false
  260.     keyButton.MouseButton1Click:Connect(function()
  261.         if isWaitingForKey then return end
  262.         isWaitingForKey = true
  263.         keyButton.Text = "Press Key..."
  264.         keyButton.BackgroundColor3 = Color3.fromRGB(100, 100, 120)
  265.        
  266.         local connection
  267.         connection = UserInputService.InputBegan:Connect(function(input, gameProcessed)
  268.             if gameProcessed then return end
  269.             if input.UserInputType == Enum.UserInputType.Keyboard then
  270.                 CONFIG.TRIGGER_KEY = input.KeyCode
  271.                 keyButton.Text = keyNames[input.KeyCode] or input.KeyCode.Name
  272.                 keyButton.BackgroundColor3 = Color3.fromRGB(60, 60, 80)
  273.                 isWaitingForKey = false
  274.                 connection:Disconnect()
  275.             end
  276.         end)
  277.     end)
  278.  
  279.     offsetTextBox.FocusLost:Connect(function()
  280.         local newValue = tonumber(offsetTextBox.Text)
  281.         if newValue and newValue >= 0 and newValue <= 1000 then
  282.             CONFIG.MAX_OFFSET = newValue
  283.             offsetLabel.Text = "Max Offset: " .. CONFIG.MAX_OFFSET
  284.         else
  285.             offsetTextBox.Text = tostring(CONFIG.MAX_OFFSET)
  286.         end
  287.     end)
  288.  
  289.     scalingTextBox.FocusLost:Connect(function()
  290.         local newValue = tonumber(scalingTextBox.Text)
  291.         if newValue and newValue >= 0.1 and newValue <= 2.0 then
  292.             CONFIG.OFFSET_SCALING = newValue
  293.             scalingLabel.Text = "Offset Scaling: " .. CONFIG.OFFSET_SCALING
  294.         else
  295.             scalingTextBox.Text = tostring(CONFIG.OFFSET_SCALING)
  296.         end
  297.     end)
  298.  
  299.     screenGui.Parent = player.PlayerGui
  300.     return screenGui
  301. end
  302.  
  303. local function createIndicators()
  304.     local screenGui = Instance.new("ScreenGui")
  305.     screenGui.Name = "CameraPointIndicators"
  306.     screenGui.ResetOnSpawn = false
  307.  
  308.     for i, point in ipairs(CONFIG.CAMERA_POINTS) do
  309.         local frame = Instance.new("Frame")
  310.         frame.Size = CONFIG.INDICATOR_SIZE
  311.         frame.AnchorPoint = Vector2.new(0.5, 0.5)
  312.         frame.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  313.         frame.BorderSizePixel = 0
  314.  
  315.         local corner = Instance.new("UICorner")
  316.         corner.CornerRadius = UDim.new(1, 0)
  317.         corner.Parent = frame
  318.  
  319.         frame.Parent = screenGui
  320.         indicators[i] = frame
  321.     end
  322.  
  323.     screenGui.Parent = player.PlayerGui
  324.     return screenGui
  325. end
  326.  
  327. local function updateIndicators()
  328.     for i, point in ipairs(CONFIG.CAMERA_POINTS) do
  329.         local screenPos, isOnScreen = camera:WorldToScreenPoint(point)
  330.         local indicator = indicators[i]
  331.  
  332.         if isOnScreen then
  333.             indicator.Position = UDim2.new(0, screenPos.X, 0, screenPos.Y)
  334.             indicator.Visible = true
  335.            
  336.             indicator.BackgroundColor3 = (point == selectedPoint)
  337.                 and Color3.fromRGB(0, 255, 0)  
  338.                 or Color3.fromRGB(255, 0, 0)  
  339.         else
  340.             indicator.Visible = false
  341.         end
  342.     end
  343. end
  344.  
  345. local function findClosestPoint()
  346.     local closestPoint = CONFIG.CAMERA_POINTS[1]
  347.     local closestDistance = math.huge
  348.  
  349.     for _, point in ipairs(CONFIG.CAMERA_POINTS) do
  350.         local screenPos, isOnScreen = camera:WorldToScreenPoint(point)
  351.         if isOnScreen then
  352.             local distance = (Vector2.new(mouse.X, mouse.Y) - Vector2.new(screenPos.X, screenPos.Y)).Magnitude
  353.             if distance < closestDistance then
  354.                 closestDistance = distance
  355.                 closestPoint = point
  356.             end
  357.         end
  358.     end
  359.  
  360.     return closestPoint
  361. end
  362.  
  363. local function updateCamera()
  364.     if not isKeyHeld or not selectedPoint or not scriptEnabled then return end
  365.    
  366.     updateIndicators()
  367.  
  368.     local characterPosition = player.Character and player.Character:FindFirstChild("HumanoidRootPart")
  369.         and player.Character.HumanoidRootPart.Position
  370.         or camera.CFrame.Position
  371.  
  372.     local distanceToPoint = (characterPosition - selectedPoint).Magnitude
  373.  
  374.     local offsetAmount
  375.     if distanceToPoint <= 13 then
  376.         offsetAmount = 0
  377.     else
  378.         offsetAmount = math.min(distanceToPoint * CONFIG.OFFSET_SCALING, CONFIG.MAX_OFFSET)
  379.     end
  380.  
  381.     local offsetPosition = selectedPoint
  382.  
  383.     local dir = (selectedPoint - characterPosition)
  384.     dir = Vector3.new(dir.X, 0, dir.Z).Unit
  385.  
  386.     local rightVector = dir:Cross(Vector3.new(0, 1, 0)).Unit
  387.  
  388.     local distanceToPoint = (characterPosition - selectedPoint).Magnitude
  389.     local offsetAmount
  390.     if distanceToPoint <= 13 then
  391.         offsetAmount = 0
  392.     else
  393.         offsetAmount = math.min(distanceToPoint * CONFIG.OFFSET_SCALING, CONFIG.MAX_OFFSET) * 1.07
  394.     end
  395.  
  396.     local offsetPosition = selectedPoint
  397.  
  398.     if isAHeld then
  399.         offsetPosition = offsetPosition
  400.             + Vector3.new(0, offsetAmount, 0)        
  401.             + rightVector * offsetAmount            
  402.     elseif isDHeld then
  403.         offsetPosition = offsetPosition
  404.             + Vector3.new(0, offsetAmount, 0)        
  405.             - rightVector * offsetAmount            
  406.     end
  407.  
  408.     local targetCFrame = CFrame.lookAt(characterPosition, offsetPosition)
  409.     local currentCFrame = camera.CFrame
  410.     local newCFrame = currentCFrame:Lerp(targetCFrame, CONFIG.SMOOTHING_SPEED)
  411.     camera.CFrame = CFrame.new(currentCFrame.Position) * CFrame.fromOrientation(newCFrame:ToOrientation())
  412.  
  413.     local targetCFrame = CFrame.lookAt(characterPosition, offsetPosition)
  414.  
  415.     local currentCFrame = camera.CFrame
  416.     local newCFrame = currentCFrame:Lerp(targetCFrame, CONFIG.SMOOTHING_SPEED)
  417.     camera.CFrame = CFrame.new(currentCFrame.Position) * CFrame.fromOrientation(newCFrame:ToOrientation())
  418. end
  419.  
  420. local function onInputBegan(input, gameProcessed)
  421.     if gameProcessed then return end
  422.  
  423.     if input.KeyCode == CONFIG.GUI_TOGGLE_KEY then
  424.         if settingsGui then
  425.             settingsGui:Destroy()
  426.             settingsGui = nil
  427.         else
  428.             settingsGui = createSettingsGui()
  429.         end
  430.         return
  431.     end
  432.  
  433.     if not scriptEnabled then return end
  434.  
  435.     if input.KeyCode == CONFIG.TRIGGER_KEY then
  436.         isKeyHeld = true
  437.         selectedPoint = findClosestPoint()
  438.         initialLookVector = camera.CFrame.LookVector
  439.  
  440.         if not player.PlayerGui:FindFirstChild("CameraPointIndicators") then
  441.             createIndicators()
  442.         end
  443.  
  444.         RunService:BindToRenderStep(
  445.             "ProximityCameraControl",
  446.             Enum.RenderPriority.Camera.Value,
  447.             updateCamera
  448.         )
  449.     elseif input.KeyCode == Enum.KeyCode.A then
  450.         isAHeld = true
  451.     elseif input.KeyCode == Enum.KeyCode.D then
  452.         isDHeld = true
  453.     end
  454. end
  455.  
  456. local function onInputEnded(input, gameProcessed)
  457.     if input.KeyCode == CONFIG.TRIGGER_KEY then
  458.         isKeyHeld = false
  459.         selectedPoint = nil
  460.  
  461.         local indicatorsGui = player.PlayerGui:FindFirstChild("CameraPointIndicators")
  462.         if indicatorsGui then
  463.             indicatorsGui:Destroy()
  464.         end
  465.  
  466.         RunService:UnbindFromRenderStep("ProximityCameraControl")
  467.     elseif input.KeyCode == Enum.KeyCode.A then
  468.         isAHeld = false
  469.     elseif input.KeyCode == Enum.KeyCode.D then
  470.         isDHeld = false
  471.     end
  472. end
  473.  
  474. UserInputService.InputBegan:Connect(onInputBegan)
  475. UserInputService.InputEnded:Connect(onInputEnded)
  476.  
  477. game:BindToClose(function()
  478.     local indicatorsGui = player.PlayerGui:FindFirstChild("CameraPointIndicators")
  479.     if indicatorsGui then
  480.         indicatorsGui:Destroy()
  481.     end
  482.     if settingsGui then
  483.         settingsGui:Destroy()
  484.     end
  485. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement