UIS.InputBegan:Connect(function(Y,Q)if Q then return end if Y.KeyCode==Enum.KeyCode.X and(Debounce==1 and(Enabled==true and(Tool.Equip.Value==true and Tool.Active.Value=="\078\111\110\101")))then ButtonDown=true Debounce=2 local Y={FieldOfView=50}local Q=TweenInfo.new(.2,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,.1)local J=ts:Create(game.Workspace.CurrentCamera,Q,Y)J:Play()local p=script.Charge.Particles.Charge1:Clone()local H=Player.Character p.Parent=H.HumanoidRootPart p:Emit(25)game.Debris:AddItem(p,2)local V=game.ReplicatedStorage["\087\097\116\101\114 \087\104\101\101\108"].Sounds.SwordSFX:Clone()V.Parent=Player.Character.HumanoidRootPart V.MaxDistance=150 V.TimePosition=0 V:Play()Player.Character.Humanoid.WalkSpeed=5 Player.Character.Humanoid.JumpPower=0 local n=require(game.ReplicatedStorage["\087\097\116\101\114 \087\104\101\101\108"].Modules.CameraShaker)local w=n.new(Enum.RenderPriority.Camera.Value,function(Y)camera.CFrame=camera.CFrame*Y end)w:Start()w:Shake(n.Presets.OldBump)script.Wheel:FireServer("\087\097\116\101\114 \087\104\101\101\108",mouse.Hit.Position)ButtonDown=true local W={FieldOfView=85}local F=TweenInfo.new(.25,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,.1)local U=ts:Create(game.Workspace.CurrentCamera,F,W)U:Play()Player.Character.Humanoid.WalkSpeed=0 Player.Character.Humanoid.JumpPower=0 task.wait(.5)local C=Instance.new("\066\111\100\121\086\101\108\111\099\105\116\121")C.MaxForce=Vector3.new(300000,0,300000)C.Parent=c.HumanoidRootPart while ButtonDown==true and Player.Character.HumanoidRootPart.Anchored~=true do c.HumanoidRootPart.CFrame=CFrame.new(c.HumanoidRootPart.Position,Vector3.new(mouse.Hit.Position.X,c.HumanoidRootPart.Position.Y,mouse.Hit.Position.Z))C.Velocity=c.HumanoidRootPart.CFrame.lookVector*80 RS.Heartbeat:Wait()end Enabled=true C:Destroy()end end)UIS.InputEnded:Connect(function(Y,Q)if Q then return end if Y.KeyCode==Enum.KeyCode.X and(Tool.Equip.Value==true and(Tool.Active.Value=="\078\111\110\101"and(Debounce==2 and ButtonDown==true)))then Debounce=3 script.Wheel:FireServer("\083\116\111\112",mouse.Hit.Position)local Y={FieldOfView=70}local Q=TweenInfo.new(.25,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,.1)local J=ts:Create(game.Workspace.CurrentCamera,Q,Y)J:Play()local p=require(game.ReplicatedStorage["\087\097\116\101\114 \087\104\101\101\108"].Modules.CameraShaker)local H=p.new(Enum.RenderPriority.Camera.Value,function(Y)camera.CFrame=camera.CFrame*Y end)H:Start()H:Shake(p.Presets.OldBump)ButtonDown=false Key=nil wait(.7)Tool.Active.Value="\078\111\110\101"Player.Character.Humanoid.WalkSpeed=16 Player.Character.Humanoid.JumpPower=50 wait(cooldown)Debounce=1 end end)


UIS.InputBegan:Connect(function(input, isTyping)
	if isTyping then return end
	if input.KeyCode == Enum.KeyCode.X and Debounce == 1 and Enabled == true and Tool.Equip.Value == true and Tool.Active.Value == "None"  then
		ButtonDown = true
		Debounce = 2
		local properties = {FieldOfView = 50}
		local info1 = TweenInfo.new(0.2,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,0.1)
		local tween = ts:Create(game.Workspace.CurrentCamera,info1,properties)
		tween:Play()
		local ChargeEffect = script.Charge.Particles.Charge1:Clone()
		local Character = Player.Character
		ChargeEffect.Parent = Character.HumanoidRootPart
		ChargeEffect:Emit(25)
		game.Debris:AddItem(ChargeEffect,2)
		local StartSfx = game.ReplicatedStorage["Water Wheel"].Sounds.SwordSFX:Clone() -- Sound Effect
		StartSfx.Parent = Player.Character.HumanoidRootPart
		StartSfx.MaxDistance = 150
		StartSfx.TimePosition = 0
		StartSfx:Play()	
		Player.Character.Humanoid.WalkSpeed = 5
		Player.Character.Humanoid.JumpPower = 0
       
		local CameraShaker = require(game.ReplicatedStorage["Water Wheel"].Modules.CameraShaker)
		local camshake = CameraShaker.new(Enum.RenderPriority.Camera.Value,function(shakeCFrame)
			camera.CFrame = camera.CFrame * shakeCFrame
		end)
		camshake:Start()
		camshake:Shake(CameraShaker.Presets.OldBump)

		script.Wheel:FireServer("Water Wheel", mouse.Hit.Position)
		ButtonDown = true
		local properties = {FieldOfView = 85}
		local info2 = TweenInfo.new(0.25,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,0.1)
		local tween2 = ts:Create(game.Workspace.CurrentCamera,info2,properties)
		tween2:Play()
		Player.Character.Humanoid.WalkSpeed = 0
		Player.Character.Humanoid.JumpPower = 0
		task.wait(0.5)
		local BV = Instance.new("BodyVelocity")
		BV.MaxForce = Vector3.new(300000,0,300000)
		BV.Parent = c.HumanoidRootPart
		
		while ButtonDown == true and Player.Character.HumanoidRootPart.Anchored ~= true do
			c.HumanoidRootPart.CFrame = CFrame.new(c.HumanoidRootPart.Position, Vector3.new(mouse.Hit.Position.X,c.HumanoidRootPart.Position.Y,mouse.Hit.Position.Z))
			BV.Velocity = c.HumanoidRootPart.CFrame.lookVector * 80
			RS.Heartbeat:Wait()
			
		end
		
	
		Enabled = true
		BV:Destroy()
		
		
	end
end)


UIS.InputEnded:Connect(function(input, IsTyping)
	if IsTyping then return end
	if input.KeyCode == Enum.KeyCode.X and Tool.Equip.Value == true and Tool.Active.Value == "None" and Debounce == 2 and 	ButtonDown == true then
		Debounce = 3
		
		script.Wheel:FireServer("Stop", mouse.Hit.Position)
		local properties = {FieldOfView = 70}
		local info3 = TweenInfo.new(0.25,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,0.1)
		local tween3 = ts:Create(game.Workspace.CurrentCamera,info3,properties)
		tween3:Play()
		local CameraShaker = require(game.ReplicatedStorage["Water Wheel"].Modules.CameraShaker)
		local camshake = CameraShaker.new(Enum.RenderPriority.Camera.Value,function(shakeCFrame)
			camera.CFrame = camera.CFrame * shakeCFrame
		end)
		camshake:Start()
		camshake:Shake(CameraShaker.Presets.OldBump)
		ButtonDown = false
		Key = nil
		wait(0.7)
		Tool.Active.Value = "None"
		Player.Character.Humanoid.WalkSpeed = 16
		Player.Character.Humanoid.JumpPower = 50
		wait(cooldown)
		Debounce = 1
	end
end)
