--Functions--


UIS.InputBegan:Connect(function(input, isTyping)
	if isTyping then return end
	if input.KeyCode == Enum.KeyCode.F and Enabled == true and Usable == true then
		ButtonDown = true
		Key = "F"
		script.Function:FireServer("Mochi Roll", mouse.Hit.Position)
		
		local BV = Instance.new("BodyVelocity")
		BV.MaxForce = Vector3.new(25000,0,25000)
		BV.Parent = c.HumanoidRootPart
				
		while ButtonDown == 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 * 75
			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.F and Key == "F" then
		--FireServer--
		script.Function:FireServer("Release", mouse.Hit.Position)
		ButtonDown = false
		Key = nil
	end
end)
