Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game.Players.LocalPlayer
- local UIS = game:GetService("UserInputService")
- local flickEnabled = true
- local flickButton
- local xButton
- local gui = Instance.new("ScreenGui")
- gui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- local container = Instance.new("Frame")
- container.Size = UDim2.new(0.25, 0, 0.15, 0)
- container.Position = UDim2.new(0.7, 0, 0.05, 0)
- container.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- container.BorderSizePixel = 0
- container.BackgroundTransparency = 1
- container.Parent = gui
- flickButton = Instance.new("TextButton")
- flickButton.Text = "F"
- flickButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- flickButton.Size = UDim2.new(0.8, 0, 0.8, 0)
- flickButton.Position = UDim2.new(0.1, 0, 0.05, 0)
- flickButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- flickButton.BackgroundTransparency = 1
- flickButton.Parent = container
- xButton = Instance.new("TextButton")
- xButton.Text = "X"
- xButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- xButton.Size = UDim2.new(0.1, 0, 0.1, 0)
- xButton.Position = UDim2.new(0.85, 0, 0, 0)
- xButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- xButton.BackgroundTransparency = 1
- xButton.Parent = container
- local function flickCamera90Degrees()
- local currentCam = workspace.CurrentCamera
- local initialPos = currentCam.CFrame.Position
- local initialRot = currentCam.CFrame - initialPos
- currentCam.CFrame = CFrame.new(initialPos) * CFrame.Angles(0, math.rad(90), 0) * initialRot
- end
- local function flickCameraBack90Degrees()
- local currentCam = workspace.CurrentCamera
- local initialPos = currentCam.CFrame.Position
- local initialRot = currentCam.CFrame - initialPos
- currentCam.CFrame = CFrame.new(initialPos) * CFrame.Angles(0, math.rad(-90), 0) * initialRot
- end
- local function flickCameraSequence()
- flickCamera90Degrees()
- wait(0.03)
- flickCameraBack90Degrees()
- end
- flickButton.MouseButton1Click:Connect(function()
- if flickEnabled then
- flickCameraSequence()
- end
- end)
- xButton.MouseButton1Click:Connect(function()
- gui:Destroy()
- end)
- UIS.TouchTap:Connect(function(touchPositions, inputState, inputObject)
- if inputState == Enum.UserInputState.Begin then
- if flickEnabled then
- flickCameraSequence()
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement